/* Reset CSS */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
/**/
/* My edits */
/**/

/* Palette */
:root {
    --nav: #211829;
    --section: #291C30;
    --heading: #D8BD8A;
    --text: #E8D4B5;
    --text-muted: #B9A9B9;
    --button: #B99A62;
    --button-text: #181220;
    --link: #A987B8;
    --deco: #A9D2D6;
    --bg: #181220;
    --success: #6fbf73;
    --success-hover: #79ca7d;
    --success-border: #2f7a3d;
    --error: #d14949;
}

a { color: var(--link); }
a:hover { color: var(--deco); }

/* Localization */
.lang { display: none; }
.lang.active { display: block; }

/* Body */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg);
    font-family: Georgia, serif;
    color: var(--text);
}

/* Header */
header {
    display: flex;
    justify-content: space-around;
    background-color: var(--nav);
    border-bottom: 1px solid color-mix(in srgb, var(--heading) 30%, transparent);
    width: 100%; /* Otherwise it will shrink-to-content */
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.4em;
    width: 100%; /* Otherwise it will shrink-to-content */
}

.logo {
    margin-left: .3em;
    font-size: 1.8em;
    color: var(--text);
    letter-spacing: 0.02em;
    text-decoration: none;
}

.logo::before,
.logo::after {
    content: "✦";
    font-size: 0.5em;
    vertical-align: middle;
}

.logo::before {
    margin-right: 0.5em;
}

.logo::after {
    margin-left: 0.5em;
}

/* Cart icon + cart view */
.lang-and-cart {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-right: 0.5em;
}

#cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    text-decoration: none;
}

.cart-icon {
    height: 2em;
}

.cart-icon.shake {
    animation: cart-icon-shake 0.5s ease;
}

@keyframes cart-icon-shake {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(-18deg); }
    30% { transform: rotate(14deg); }
    45% { transform: rotate(-10deg); }
    60% { transform: rotate(8deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.cart-count {
    position: absolute;
    top: 1em;
    right: 0.4em;
    box-sizing: border-box;
    min-width: 1.7em;
    height: 1.7em;
    padding: 0 0.35em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--error);
    color: #fff;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 0.8em;
}

.cart-count[hidden] {
    display: none;
}

#clear-cart {
    margin-top: 0.3em;
}

/* Lang switch */
.lang-switch {
    font-size: 1.3em;
    margin-top: 0.2em;
}

.lang-switch a {
    cursor: pointer;
    text-decoration: underline;
}

/* Navigation */
nav {
    font-size: 1.4em;
    width: 92%;
    margin-bottom: 0.7em;
}

nav ul {
    display: flex;
    justify-content: space-between;
    margin-top: 1em;
}

.nav-home-icon {
    height: 1em;
    vertical-align: middle;
}

nav ul li a,
.lang-switch a {
    color: var(--text);
}

nav ul li a:hover,
.lang-switch a:hover,
.logo:hover {
    color: var(--link);
}

nav ul li a.active,
.lang-switch a.active {
    text-decoration: none;
}

/* Landing hero */
.hero {
    position: relative;
    margin-top: 1.5em;
    margin-bottom: 2em;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5em;
}

.hero .hero-cta {
    width: 11em;
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

/* Landing page */
.tagline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    font-size: 1.6em;
    font-style: italic;
    text-align: center;
}

/*.tagline::before,*/
/*.tagline::after {*/
/*    content: "✦";*/
/*    color: var(--heading);*/
/*    font-style: normal;*/
/*    font-size: 0.8em;*/
/*}*/

.intro {
    text-align: center;
}

.features {
    display: flex;
    margin-top: 2em;
    margin-bottom: 2em;
}

.features li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4em;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
}

.features li + li {
    border-left: 1px solid color-mix(in srgb, var(--heading) 50%, transparent);
}

.features img {
    height: 2.4em;
}

@media (max-width: 600px) {
    .features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.2em 0;
    }

    .features li:nth-child(odd) {
        border-left: 0;
    }
}

/* Content */

.container {
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.articles {
    border-radius: 0.4em;
    margin-top: 0.5em;
    padding: 0 0.5em 0.5em;
    width: 100%;
    min-height: 15em;
}

h1, h2, h3, h4, h5, h6, #price {
    color: var(--text);
}

h1 {
    font-size: 1.7em;
    letter-spacing: 0.02em;
    margin-bottom: 0.3em;
}

h2, h3 {
    font-size: 1.3em;
}

h3 {
    margin-bottom: 1em;
}

.book-details {
    line-height: 1.6em;
}

#price {
    font-weight: bold;
    font-size: 1.7em;
    margin-bottom: 1.5em;
}

hr {
    /* border, not a 1px background: borders snap to whole pixels, so every hr renders equally thick */
    border: 0;
    border-top: 1px solid var(--text);
    opacity: 0.6;
    margin: 0.5em 0;
}

p {
    font-size: 1.1em;
    letter-spacing: 0.02em;
    line-height: 1.5; /* 1.5 times the font size */
    text-align: justify;
    margin-top: 0.7em;
    font-family: sans-serif;
}

p b {
    font-weight: bold;
    font-size: 0.9em;
}

.align-left {
    text-align: left;
    margin-bottom: 0.7em;
}

li b, strong {
    font-weight: bold;
}

section {
    margin-bottom: 1em;
}

.vop-consent {
    display: flex;
    align-items: center;
    gap: 0.7em;
    margin: 1em 0;
}

.vop-consent input {
    flex-shrink: 0;
    width: 1.5em;
    height: 1.5em;
    margin: 0;
    accent-color: var(--button);
    cursor: pointer;
}

/* Cart view */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    height: 2em;
    padding: 0 1em;
    border: 0.1em solid var(--heading);
    background-color: var(--button);
    border-radius: 99em;
    color: var(--button-text);
    font-family: sans-serif;
    font-size: 0.9em;
    cursor: pointer;
}

.cart-button:hover {
    background-color: var(--heading);
}

/* display: inline-flex above would otherwise override the hidden attribute (#clear-cart) */
.cart-button[hidden] {
    display: none;
}

.button-icon {
    height: 1.1em;
    width: 1.1em;
}

.cart-line-items-wrapper {
    display: flex;
    margin-bottom: 0.5em;
}

.cart-line-items {
    display: flex;
    justify-content: space-between;
    flex: 1;
    margin-left: 0.3em;
}

.cart-product-image {
    width: 5em;
    border-radius: 0.2em;
}

.cart-total {
    float: right;
    font-weight: bold;
}

.cart-delivery-address {
    margin: 2em 0;
}

#checkout-submit {
    margin-bottom: 0.5em;
    margin-top: 2em;
}

.payment-note {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
    margin-bottom: 2em;
    font-size: 0.9em;
    color: var(--text-muted);
}

.payment-note img { /* Stripe logo */
    height: 1.1em;
}

.images {
    float: left;
    width: 42%;
    margin: 0.2em 1em 0 0;
    border-radius: 0.2em;
}

/* product cover: cap growth on wide screens so it stays level with the details beside it */
img.images {
    max-width: 16em;
}

.images img {
    width: 100%;
    border-radius: 0.5em;
}

p i {
    font-style: italic;
}

.divider {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5em;
    margin: 0.8em 0;
    color: var(--text);
}

/* full width under the floated product image */
.divider.below-cta {
    clear: both;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.shipping-description {
    margin-top: 1em;
    color: var(--success);
    font-weight: bold;
}

#packeta-selector-value {
    font-size: 1.1em;
    margin-bottom: 1.5em;
}

#pickup-point-error {
    color: var(--error);
    font-size: 1.1em;
    font-weight: bold;
}

#checkout-form {
    margin-top: 1em;
}

.checkout-label {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.3em;
    margin-bottom: 0.8em;
}

.checkout-input {
    box-sizing: border-box;
    width: 100%;
    height: 2.3em;
    padding: 0 0.6em;
    font-size: 16px;
    border: 0.1em solid color-mix(in srgb, var(--text-muted) 50%, transparent);
    border-radius: 0.4em;
    background-color: var(--nav);
    color: var(--text);
}

textarea.checkout-input {
    resize: none;
    height: auto;
    /* inputs use the browser's system font; textareas default to monospace */
    font-family: system-ui, sans-serif;
    padding: 0.4em 0.6em;
}

/*Footer*/
footer {
    margin-bottom: 0.5em;
    width: 90%;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    align-items: flex-start;
    text-align: left;
    font-size: 0.9em;
    width: 100%;
}

.footer-links a {
    text-decoration: underline;
    color: var(--link);
}

.footer-links a b {
    font-weight: bold;
    color: var(--heading);
}

.footer_icons {
    display: flex;
    gap: 3em;
    justify-content: center;
    align-items: center;
    margin-bottom: 2em;
    margin-top: 2em;
}

footer img {
    height: 1.8em;
}

.copyright {
    margin-top: 2em;
    font-size: 0.8em;
    color: var(--text-muted);
}

#envelope-icon {
    height: 2.1em;
}

/* mobile: centered below the floated cover; desktop: left-aligned beside it (see media query) */
.btncontainer {
    display: flex;
    justify-content: center;
    clear: both;
    margin-bottom: 1.5em;
}

.call-to-action {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3em;
    width: 18em;
    padding: 0 1.5em;
    font-size: 0.9em;
    border: 0.12em solid;
    font-family: sans-serif;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.call-to-action,
.call-to-action-pay.cta-gold {
    color: var(--button-text);
    background: linear-gradient(var(--heading), var(--button));
    border-color: var(--heading);
    border-radius: 99em;
    position: relative;
    overflow: hidden;
}

/* shine: a light band sweeping across every few seconds */
.call-to-action::after,
.call-to-action-pay.cta-gold::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--text) 70%, transparent) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: cta-shine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cta-shine {
    0% { transform: translateX(-100%); }
    40%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .call-to-action::after,
    .call-to-action-pay.cta-gold::after {
        animation: none;
    }
}

/* gradient, not a plain color: .call-to-action-pay's background transition would fade from transparent */
.call-to-action:hover,
.call-to-action-pay.cta-gold:hover {
    color: var(--button-text);
    background: linear-gradient(var(--heading), var(--heading));
}

.cta-icon {
    display: block;
    height: 1.4em;
    width: auto;
    margin-right: 0.5em;
}

.call-to-action.added {
    background: var(--success);
    border-color: var(--success-border);
    color: #fff;
    animation: added-punch 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.call-to-action-pay {
    display: block;
    height: 3em;
    margin: 1em auto 2em;
    padding: 0 1.5em;
    font-size: 0.9em;
    background-color: var(--success);
    border: 0.1em solid var(--success-border);
    color: #fff;
    border-radius: 0.5em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.call-to-action-pay:hover {
    background-color: var(--success-hover);
}

@keyframes added-punch {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(0.88);
    }
    60% {
        transform: scale(1.10);
    }
    100% {
        transform: scale(1);
    }
}

.hp {
    position: absolute;
    left: -9999px;
}


@media (max-width: 1199px) {
    .desktop-only {
        display: none;
    }
}

@media (min-width: 1200px) {

    .mobile-only {
        display: none;
    }

    .intro hr {
        display: none;
    }

    .footer-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    footer {
        width: 40%;
    }

    .header-container {
        width: 42%;
    }

    .container {
        width: 40%;
    }

    .images {
        width: 35%;
    }

    .btncontainer {
        justify-content: flex-start;
        clear: none;
    }

    .lang-and-cart {
        gap: 3em;
    }

    nav {
        width: 30%;
    }

    #checkout-form {
        width: 70%;
        margin-inline: auto;
    }
    
    .call-to-action {
        width: 14em;
    }
    
    .articles {
        background-color: var(--section);
        border: 1px solid color-mix(in srgb, var(--heading) 40%, transparent);
    }
    
    h1 {
        margin-top: 0.5em;
    }
    
    .hero .hero-cta {
        width: 15em;
    }
}
