:root {
    --ink: #172033;
    --muted: #657186;
    --brand: #b51f2a;
    --brand-dark: #861722;
    --gold: #d99a2b;
    --paper: #f7f3ec;
    --line: #e7dfd2;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(23, 32, 51, .12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
    background: #fffaf3;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

.section-inner {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: var(--white);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(181, 31, 42, .18);
}

.common-header {
    position: relative;
    z-index: 50;
    background: rgba(255, 250, 243, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.common-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: var(--brand-dark);
    color: var(--white);
}

.common-announcement {
    font-size: 13px;
    padding: 10px 18px;
    text-align: center;
}

.language-control {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 5px 18px 5px 10px;
    background: #6f6f6f;
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.language-control label {
    cursor: pointer;
}

.language-control select {
    min-width: 122px;
    height: 31px;
    padding: 0 8px;
    border: 2px solid #1f1f1f;
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.common-wrap {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.common-brand-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 18px 0 8px;
}

.common-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 800;
}

.common-brand-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(23, 32, 51, .16);
}

.common-brand small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.common-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.common-search input {
    min-width: 0;
    height: 54px;
    padding: 0 18px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-size: 16px;
    outline: 0;
}

.common-search button {
    min-width: 136px;
    height: 54px;
    border: 0;
    border-radius: 8px;
    background: var(--ink);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.common-contact-btn {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--brand);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 12px 24px rgba(181, 31, 42, .18);
}

.common-contact-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.common-contact-btn:hover,
.common-contact-btn.is-active {
    background: var(--brand-dark);
}

.common-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 66px;
    color: #293449;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.common-nav-link,
.common-dropdown-label {
    display: inline-flex;
    min-height: 66px;
    align-items: center;
}

.common-nav-link.is-active,
.common-dropdown.is-active .common-dropdown-label,
.common-nav-link:hover,
.common-dropdown-label:hover {
    color: var(--brand);
}

.common-dropdown {
    position: relative;
}

.common-dropdown-label {
    gap: 7px;
}

.common-dropdown-label::after {
    content: "^";
    color: var(--gold);
    font-size: 16px;
    transform: translateY(3px);
}

.common-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    display: grid;
    min-width: 248px;
    padding: 12px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .16s ease, transform .16s ease;
}

.common-dropdown:hover .common-dropdown-menu,
.common-dropdown:focus-within .common-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.common-dropdown-menu a {
    padding: 14px 22px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.common-dropdown-menu a:hover,
.common-dropdown-menu a.is-active {
    color: var(--brand);
    background: var(--paper);
}

.common-book-strip {
    height: 132px;
    background:
        linear-gradient(rgba(23, 32, 51, .08), rgba(23, 32, 51, .08)),
        url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1800&q=82') center 54%/cover;
}

.page-hero {
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(23, 32, 51, .9), rgba(23, 32, 51, .55)),
        url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?auto=format&fit=crop&w=1800&q=82') center/cover;
}

.page-hero .section-inner {
    min-height: 260px;
    display: grid;
    align-content: center;
    padding: 58px 0;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.breadcrumb span {
    color: #ffe6b9;
}

.page-title {
    margin: 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
}

.content-section {
    padding: 68px 0;
}

.section-head {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-head h2,
.section-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.index-grid,
.publisher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.index-pill {
    position: relative;
    overflow: hidden;
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(23, 32, 51, .05);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease, background .22s ease;
}

.index-pill:hover,
.index-pill:focus-visible {
    border-color: rgba(181, 31, 42, .45);
    background:
        linear-gradient(135deg, rgba(181, 31, 42, .08), rgba(217, 154, 43, .14)),
        var(--white);
    color: var(--brand);
    box-shadow: 0 18px 38px rgba(23, 32, 51, .13);
    transform: translateY(-4px);
}

.index-pill:focus-visible {
    outline: 3px solid rgba(217, 154, 43, .34);
    outline-offset: 3px;
}

.publisher-groups {
    display: grid;
    gap: 34px;
}

.publisher-block {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(247, 243, 236, .94)),
        var(--paper);
    box-shadow: 0 16px 38px rgba(23, 32, 51, .07);
}

.publisher-block-head {
    margin-bottom: 20px;
}

.publisher-block h3 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.publisher-block p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.publisher-pill {
    min-height: 74px;
    display: flex;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
    box-shadow: 0 10px 28px rgba(23, 32, 51, .05);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease, background .22s ease;
}

.publisher-pill:hover,
.publisher-pill:focus-visible {
    border-color: rgba(181, 31, 42, .45);
    background:
        linear-gradient(135deg, rgba(181, 31, 42, .08), rgba(217, 154, 43, .14)),
        var(--white);
    color: var(--brand);
    box-shadow: 0 18px 38px rgba(23, 32, 51, .13);
    transform: translateY(-4px);
}

.publisher-pill:focus-visible {
    outline: 3px solid rgba(217, 154, 43, .34);
    outline-offset: 3px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.book-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 34px rgba(23, 32, 51, .07);
}

.book-cover {
    min-height: 220px;
    display: grid;
    align-content: end;
    padding: 18px;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(181, 31, 42, .92), rgba(217, 154, 43, .82)),
        url('https://images.unsplash.com/photo-1512820790803-83ca734da794?auto=format&fit=crop&w=700&q=82') center/cover;
}

.book-cover span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.book-cover strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.25;
}

.book-body {
    padding: 18px;
}

.book-title {
    min-height: 68px;
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.35;
}

.book-author,
.book-publisher {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.price {
    display: block;
    margin-top: 16px;
    color: var(--brand);
    font-size: 18px;
    font-weight: 800;
}

.site-footer {
    padding: 54px 0 22px;
    background: #161d2b;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(150px, .7fr) minmax(280px, 1.2fr) minmax(250px, 1fr);
    gap: 48px;
    align-items: start;
}

.site-footer h3,
.site-footer h4 {
    margin: 0 0 14px;
    color: var(--white);
    line-height: 1.25;
}

.site-footer p,
.site-footer li,
.footer-contact address {
    color: rgba(255, 255, 255, .72);
    line-height: 1.7;
}

.footer-about p,
.footer-newsletter p {
    max-width: 330px;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer a {
    color: inherit;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-contact address {
    display: grid;
    gap: 6px;
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    font-size: inherit;
    font-style: normal;
    font-weight: 400;
}

.footer-contact strong,
.footer-contact span {
    display: block;
}

.footer-contact strong {
    color: rgba(255, 255, 255, .84);
    font: inherit;
}

.newsletter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.newsletter input {
    min-width: 0;
    flex: 1 1 150px;
    height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
}

.newsletter .btn {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 20px;
}

.newsletter button:disabled {
    cursor: wait;
    opacity: .72;
}

.newsletter-message {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.newsletter-message.is-success {
    color: #9be7b0;
}

.newsletter-message.is-error {
    color: #ffb4b4;
}

.copyright {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .58);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 980px) {
    .common-brand-row,
    .footer-grid,
    .index-grid,
    .publisher-grid,
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .common-search {
        grid-column: 1 / -1;
    }

    .common-nav {
        flex-wrap: wrap;
        gap: 0 20px;
        padding: 8px 0 16px;
        white-space: normal;
    }

    .common-nav-link,
    .common-dropdown-label {
        min-height: 42px;
    }
}

@media (max-width: 640px) {
    .common-topbar {
        grid-template-columns: 1fr;
    }

    .language-control {
        justify-content: center;
        padding: 8px 12px;
    }

    .common-brand-row,
    .common-search,
    .footer-grid,
    .index-grid,
    .publisher-grid,
    .book-grid {
        grid-template-columns: 1fr;
    }

    .common-search,
    .common-contact-btn {
        grid-column: auto;
    }

    .common-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        font-size: 13px;
    }

    .common-brand-logo {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .common-dropdown {
        position: static;
    }

    .common-dropdown-menu {
        position: static;
        grid-column: 1 / -1;
        min-width: 0;
        padding: 4px 0 10px;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .common-book-strip {
        height: 96px;
    }

    .section-head,
    .newsletter {
        align-items: stretch;
        flex-direction: column;
    }

    .publisher-block {
        padding: 20px;
    }
}
