:root {
    --ink: #162025;
    --muted: #64747c;
    --line: #d9e1e4;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --teal: #176b87;
    --teal-dark: #0d485d;
    --coral: #d65a4a;
    --gold: #d9a441;
    --green: #3c7b63;
    --shadow: 0 16px 40px rgba(22, 32, 37, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(251, 250, 246, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--teal);
    font-weight: 800;
}

.brand small,
.book-info p,
.muted,
.fine-print,
.site-footer p {
    color: var(--muted);
}

.brand small {
    display: block;
    font-size: 12px;
}

.nav-links,
.site-footer nav,
.hero-actions,
.product-copy form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 700;
}

.nav-links a.active,
.nav-links a:hover {
    background: #e7f1f4;
    color: var(--teal-dark);
}

.cart-link span {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 12px;
}

main {
    min-height: 68vh;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    min-height: 620px;
    padding: clamp(42px, 7vw, 88px) clamp(18px, 4vw, 56px);
    background: linear-gradient(120deg, #f7efe5 0%, #eef7f5 55%, #fff8e7 100%);
}

.hero h1,
.page-title h1,
.content-page h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1;
}

.hero p {
    max-width: 620px;
    font-size: 18px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--teal);
    border-radius: 8px;
    background: #fff;
    color: var(--teal-dark);
    font-weight: 800;
    cursor: pointer;
}

.btn.primary,
.btn:hover {
    background: var(--teal);
    color: #fff;
}

.btn.ghost {
    border-color: var(--line);
}

.btn.small {
    width: 100%;
    min-height: 40px;
}

.btn.wide {
    width: 100%;
}

.hero-shelf {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 20px;
    align-items: end;
}

.book-cover {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 3 / 4.2;
    min-height: 230px;
    padding: 20px;
    border-radius: 6px;
    color: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.book-cover::after {
    content: "";
    position: absolute;
    inset: 12px 12px auto auto;
    width: 36%;
    height: 46%;
    border: 2px solid rgba(255,255,255,.34);
    border-radius: 999px 999px 8px 8px;
}

.book-cover span,
.book-cover small {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.82);
}

.book-cover strong {
    position: relative;
    z-index: 1;
    max-width: 12ch;
    font-size: 28px;
    line-height: 1.05;
}

.book-cover.large {
    width: min(390px, 100%);
    min-height: 520px;
}

.book-cover.large strong {
    font-size: 44px;
}

.book-cover.mini {
    width: 76px;
    min-height: 96px;
    padding: 10px;
    box-shadow: none;
}

.book-cover.mini strong {
    font-size: 12px;
}

.cover-blue { background: linear-gradient(145deg, #176b87, #8a4f9e); }
.cover-green { background: linear-gradient(145deg, #2e7d5b, #0f596b); }
.cover-red { background: linear-gradient(145deg, #bd3f32, #6e3a74); }
.cover-yellow { background: linear-gradient(145deg, #d9a441, #ad5735); }
.cover-slate { background: linear-gradient(145deg, #263642, #1b7a75); }
.cover-pink { background: linear-gradient(145deg, #c94f7c, #5d68b5); }

.section,
.page-title,
.content-page,
.product-view,
.checkout-layout,
.cart-layout,
.success-box {
    padding: clamp(34px, 5vw, 70px) clamp(18px, 4vw, 56px);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 32px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    padding: 0 clamp(18px, 4vw, 56px) clamp(36px, 5vw, 70px);
}

.section .book-grid {
    padding: 0;
}

.book-card {
    display: grid;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.book-info h3,
.cart-line h2,
.summary h2,
.checkout-form h2 {
    margin: 0;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 12px 0;
}

.price-row strong {
    font-size: 22px;
}

.price-row del {
    color: var(--muted);
}

.price-row.big strong {
    font-size: 34px;
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin: 0 clamp(18px, 4vw, 56px) clamp(44px, 6vw, 80px);
    border: 1px solid var(--line);
    background: var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.trust-strip div {
    padding: 22px;
    background: #fff;
}

.trust-strip span,
.contact-grid span,
.gateway-box span {
    display: block;
    color: var(--muted);
}

.filters {
    display: grid;
    grid-template-columns: 1fr minmax(180px, 260px) auto;
    gap: 12px;
    padding: 0 clamp(18px, 4vw, 56px) 28px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.product-view,
.checkout-layout,
.cart-layout {
    display: grid;
    grid-template-columns: minmax(260px, 430px) 1fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
}

.checkout-layout,
.cart-layout {
    grid-template-columns: 1fr minmax(280px, 380px);
}

.product-copy {
    max-width: 680px;
}

.product-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
}

.stock {
    color: var(--green);
    font-weight: 800;
}

.cart-lines,
.checkout-form,
.summary,
.success-box,
.business-details,
.contact-grid {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.cart-line {
    display: grid;
    grid-template-columns: 76px 1fr 92px 110px;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
    border-bottom: 0;
}

.summary,
.checkout-form {
    padding: 22px;
}

.summary p {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 12px 0;
}

.summary .total {
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 20px;
}

.summary .btn {
    width: 100%;
    margin-top: 10px;
}

.field-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    font-weight: 700;
}

.fine-print {
    font-size: 13px;
}

.gateway-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 8px;
    background: #eef7f5;
}

.content-page {
    max-width: 940px;
}

.content-page h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.business-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin-top: 24px;
    overflow: hidden;
    background: var(--line);
}

.business-details div,
.contact-grid div {
    padding: 18px;
    background: #fff;
}

.business-details dt {
    color: var(--muted);
    font-weight: 700;
}

.business-details dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.contact-form {
    margin-top: 24px;
}

.legal p {
    font-size: 18px;
}

.empty-state,
.success-box {
    margin: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 56px);
}

.site-footer {
    align-items: flex-start;
    border-top: 1px solid var(--line);
    background: #fff;
}

@media (max-width: 820px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .product-view,
    .checkout-layout,
    .cart-layout,
    .filters,
    .trust-strip,
    .field-grid,
    .business-details,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-shelf {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-line {
        grid-template-columns: 76px 1fr;
    }
}

@media (max-width: 520px) {
    .hero-shelf,
    .book-grid {
        grid-template-columns: 1fr;
    }

    .book-cover {
        min-height: 270px;
    }
}

