/* .books-section {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 300px),
        linear-gradient(110deg, #e7f1ef 0%, #e6e0dd 60%);
} */

.books__list {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    overflow-x: auto;
    width: 100%;
    justify-content: space-evenly;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.books__list::-webkit-scrollbar {
    display: none;
}

.books__item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    width: 12rem;
}

.books__item-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 5px;
    height: 20rem;
}

.books__item h3.item-header {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-align: center;
    min-height: calc(var(--text-h3) * 1.1 * 2);
}

/* ===========================================================
   Language buy buttons — one small flag pill per edition
   =========================================================== */

.book__buy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
}

.book__buy-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    border: 2px solid var(--color-text);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.book__buy-flag {
    width: 1.25rem;
    height: 0.875rem;
    border-radius: 2px;
    flex-shrink: 0;
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .book__buy-link:hover {
        border-color: var(--theme-color-orange);
        background: var(--theme-color-white);
        transform: translateY(-2px);
    }
}

@media (min-width: 48rem) {
    .books__list {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

/* ===========================================================
   Bookstore page (books.html) — author hero, featured release,
   filterable catalog and quote band. Adapted from the
   concept-bookstore preview onto the site's design tokens.
   =========================================================== */

.eyebrow {
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: var(--text-small);
    color: var(--theme-color-orange);
}

/* ---------- author hero ---------- */
.ahero {
    gap: var(--space-2xl);
}

.ahero__portrait {
    position: relative;
    width: 100%;
    max-width: 18rem;
    margin: 0;
}

.ahero__portrait img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 55px rgba(33, 33, 33, 0.22);
}

.ahero__portrait::before {
    content: "";
    position: absolute;
    inset: auto -1rem -1rem auto;
    z-index: 0;
    width: 72%;
    height: 72%;
    background: var(--theme-color-orange);
    border-radius: var(--radius-md);
}

.ahero__copy {
    text-align: center;
}

.ahero__name {
    margin: var(--space-sm) 0 var(--space-md);
    /* Scales with the viewport so a name never wraps, even on tiny screens. */
    font-size: clamp(1.6rem, 8vw, calc(var(--text-h1) * 1.1));
    text-transform: uppercase;
    white-space: nowrap;
}

.ahero__bio {
    margin: 0 auto var(--space-lg);
    max-width: 34rem;
    color: var(--color-text-muted);
    font-size: var(--text-lead);
}

@media (min-width: 48rem) {
    .ahero {
        flex-direction: row;
        align-items: center;
    }

    .ahero__portrait {
        flex-shrink: 0;
    }

    .ahero__copy {
        text-align: left;
    }

    .ahero__bio {
        margin-inline: 0;
    }
}

/* ---------- featured release ---------- */
.featured__card {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    overflow: hidden;
    background: var(--color-cream);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 55px rgba(42, 37, 29, 0.12);
}

.featured__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20rem;
    padding: var(--space-3xl) var(--space-lg);
    background: var(--theme-color-black);
    overflow: hidden;
}

.featured__book {
    width: min(14rem, 58%);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 2px 5px 5px 2px;
    transform: perspective(1500px) rotateY(-22deg) rotateX(3deg) rotate(-1deg);
    box-shadow:
        -3px 0 0 rgba(0, 0, 0, 0.18),
        -28px 34px 46px rgba(33, 33, 33, 0.45);
}

.featured__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-2xl);
}

.featured__title {
    margin: 0;
    font-size: var(--text-h1);
    text-transform: uppercase;
}

.featured__lead {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-lead);
}

.featured__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.featured__meta {
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--text-small);
    color: var(--color-muted-warm);
}

@media (min-width: 48rem) {
    .featured__card {
        grid-template-columns: 1.05fr 0.95fr;
    }

    .featured__panel {
        order: 2;
    }

    .featured__copy {
        order: 1;
    }
}

/* ---------- catalog ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
}

.chip {
    padding: var(--space-xs) var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--text-small);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip.is-on {
    background: var(--theme-color-black);
    border-color: var(--theme-color-black);
    color: var(--theme-color-white);
}

@media (hover: hover) and (pointer: fine) {
    .chip:hover {
        color: var(--color-text);
        border-color: var(--color-text);
    }
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl) var(--space-lg);
    width: 100%;
}

.book {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
}

.book__coverwrap {
    position: relative;
    width: 100%;
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px rgba(42, 37, 29, 0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.book__cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.book__title {
    margin: var(--space-sm) 0 0;
}

@media (hover: hover) and (pointer: fine) {
    .book:hover .book__coverwrap {
        transform: translateY(-6px);
        box-shadow: 0 22px 40px rgba(42, 37, 29, 0.18);
    }
}

@media (min-width: 40rem) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 60rem) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-3xl) var(--space-xl);
    }
}

/* ---------- quote band ---------- */
.band__inner {
    max-width: 46rem;
    margin-inline: auto;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    border-block: 1px solid var(--color-border);
}

.band__quote {
    margin: var(--space-md) 0;
    font-family: var(--font-title);
    font-size: var(--text-h2);
    line-height: 1.35;
    color: var(--color-text);
    white-space: pre-line;
}

.band__by {
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: var(--text-small);
    color: var(--color-muted-warm);
}
