/* Kitabzo: contemporary Islamic editorial design using olive, limestone, brass, and deliberately asymmetric layouts. */
:root {
    --olive: #375744;
    --olive-deep: #182d25;
    --ink: #18231d;
    --limestone: #f3efe5;
    --paper: #fffdf8;
    --brass: #c99c4d;
    --clay: #9d4f3d;
    --line: rgba(24, 35, 29, .18);
    --muted: #6c736d;
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "Manrope", Arial, sans-serif;
    --ease: cubic-bezier(.23, 1, .32, 1)
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 14px/1.6 var(--sans)
}

a {
    color: inherit;
    text-decoration: none
}

button,
input,
textarea,
select {
    font: inherit
}

button {
    cursor: pointer
}

.announcement {
    background: var(--olive-deep);
    color: #f6f0e3;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    padding: 10px 20px;
    text-transform: uppercase
}

.announcement span {
    color: var(--brass);
    padding: 0 10px
}

.announcement-bar {
    background: var(--brass);
    color: var(--ink);
    text-align: center;
    padding: 8px 15px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.announcement-bar p {
    margin: 0;
}

.site-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 8px 4.2vw;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: relative;
    z-index: 10
}

.site-header.is-sticky {
    position: sticky;
    top: 0;
    z-index: 1000
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: max-content
}

.brand-mark {
    width: 45px;
    height: 45px;
    object-fit: contain
}

/* Storefront header logo: grows with the size setting but is capped so the
   header height never balloons — even at the 150px max the header stays slim. */
.site-header .brand-mark {
    height: var(--logo-size, 45px);
    width: auto;
    max-height: 56px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: .9;
    text-transform: uppercase
}

.brand-copy strong {
    font-size: 19px;
    letter-spacing: .06em
}

.brand-copy small {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .34em;
    margin: 6px 0 0 1px
}

.site-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-left: auto
}

.site-nav > a, .nav-dropdown > a {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
    position: relative
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--paper);
    min-width: 220px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    top: 100%;
    left: 0;
    padding: 15px 0;
    border: 1px solid var(--line);
    flex-direction: column;
}

.nav-dropdown:hover .dropdown-content,
.nav-dropdown:focus-within .dropdown-content {
    display: flex;
}

.dropdown-content a {
    padding: 12px 25px;
    text-decoration: none;
    display: block;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f7f7f7;
    color: var(--brass);
}

.site-nav > a:after,
.nav-dropdown > a:after,
.underline-link:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 1px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s var(--ease)
}

.site-nav > a:hover:after,
.nav-dropdown > a:hover:after,
.underline-link:hover:after {
    transform: scaleX(1)
}

.shelf-link {
    margin-left: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.shelf-link b {
    display: grid;
    place-items: center;
    background: var(--brass);
    font-size: 10px;
    width: 23px;
    height: 23px;
    border-radius: 50%
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 4px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: border-color 0.2s
}

.menu-toggle:hover {
    border-color: var(--brass)
}

.flash-message {
    position: fixed;
    right: 22px;
    top: 22px;
    background: var(--ink);
    color: white;
    padding: 12px 17px;
    z-index: 90;
    box-shadow: 0 10px 30px rgba(24, 35, 29, .2);
    font-weight: 700;
    font-size: 12px
}

.eyebrow {
    margin: 0 0 13px;
    color: var(--brass);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase
}

.eyebrow.light {
    color: #e8c77f
}

.hero-section {
    position: relative;
    min-height: 650px;
    background: var(--olive-deep);
    color: white;
    display: grid;
    grid-template-columns: 50% 50%;
    overflow: hidden
}

.hero-visual {
    grid-column: 2;
    background-image: linear-gradient(90deg, var(--olive-deep) 0%, rgba(24, 45, 37, .38) 38%, rgba(24, 45, 37, .05) 100%), url('/images/kitabzo-hero-library.jpg');
    background-size: cover;
    background-position: center
}

.hero-copy {
    grid-area: 1/1;
    align-self: center;
    padding: 8vw 4.2vw;
    position: relative;
    z-index: 1
}

.hero-copy h1 {
    font: clamp(56px, 6vw, 92px)/.93 var(--serif);
    letter-spacing: -.055em;
    margin: 0;
    max-width: 630px
}

.hero-copy h1 em {
    color: #e1bf6e;
    font-weight: 400
}

.hero-lede {
    max-width: 460px;
    font-size: 15px;
    line-height: 1.75;
    color: #e6eee7;
    margin: 30px 0
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 19px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    transition: transform .16s var(--ease), background .18s var(--ease), color .18s var(--ease)
}

.button:active {
    transform: scale(.97)
}

.button-brass {
    background: var(--brass);
    color: var(--ink)
}

.button-brass:hover {
    background: #dfb863
}

.button-ghost {
    border-color: rgba(255, 255, 255, .55);
    color: white
}

.button-ghost:hover {
    background: white;
    color: var(--ink)
}

.button-olive {
    background: var(--olive);
    color: white
}

.button-olive:hover {
    background: var(--olive-deep)
}

.button-cream {
    background: var(--limestone);
    color: var(--ink)
}

.button.full {
    width: 100%
}

.hero-note {
    margin: 48px 0 0;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #b8c6ba
}

.hero-index {
    position: absolute;
    right: 4.2vw;
    bottom: 33px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em
}

.hero-index i {
    height: 1px;
    width: 55px;
    background: var(--brass)
}

.service-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 28px 4.2vw;
    border-bottom: 1px solid var(--line)
}

.service-rail>div {
    min-height: 60px;
    padding: 0 28px;
    border-right: 1px solid var(--line);
    display: grid;
    grid-template-columns: 26px 1fr;
    grid-template-rows: 24px auto;
    column-gap: 8px
}

.service-rail>div:first-child {
    padding-left: 0
}

.service-rail>div:last-child {
    border: 0
}

.service-rail b {
    color: var(--brass);
    font: 20px var(--serif);
    grid-row: span 2
}

.service-rail span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase
}

.service-rail small {
    color: var(--muted);
    font-size: 11px
}

.category-section,
.catalogue-section,
.arrival-section {
    padding: 120px 4.2vw
}

.category-section {
    background: var(--limestone)
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
    margin-bottom: 45px
}

.section-heading h2,
.page-intro h1,
.admin-heading h1 {
    font: clamp(38px, 4vw, 62px)/.96 var(--serif);
    letter-spacing: -.045em;
    margin: 0
}

.split-heading>p {
    max-width: 350px;
    margin: 0;
    color: var(--muted)
}

.category-list {
    border-top: 1px solid var(--line)
}

.category-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 130px 20px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
    transition: padding .2s var(--ease), color .2s var(--ease)
}

.category-row:hover {
    padding-left: 18px;
    color: var(--olive)
}

.category-row span {
    font: 15px var(--serif);
    color: var(--brass)
}

.category-row strong {
    font: clamp(23px, 3vw, 40px)/1 var(--serif);
    letter-spacing: -.03em
}

.category-row em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px
}

.category-row i {
    font-style: normal;
    font-size: 20px
}

.catalogue-section {
    padding-bottom: 105px
}

.catalogue-heading {
    align-items: center
}

.underline-link {
    position: relative;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding-bottom: 3px
}

.underline-link span {
    color: var(--brass);
    font-size: 17px;
    margin-left: 7px
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 19px
}

.product-card {
    min-width: 0
}

.product-cover {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: var(--cover);
    color: #f6efdf;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease)
}

.product-card:hover .product-cover {
    transform: translateY(-5px);
    box-shadow: 0 15px 26px rgba(24, 35, 29, .17), inset 0 0 0 1px rgba(255, 255, 255, .3)
}

.product-cover:before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, .3);
    pointer-events: none
}

.product-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.cover-rule {
    display: block;
    width: 38px;
    height: 2px;
    background: var(--brass);
    margin-bottom: 17px
}

.cover-category,
.cover-author {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    position: relative;
    z-index: 1
}

.product-cover strong {
    font: clamp(24px, 2.3vw, 36px)/.95 var(--serif);
    letter-spacing: -.04em;
    position: relative;
    z-index: 1;
    margin-top: 18px
}

.cover-author {
    margin-top: auto;
    color: rgba(255, 255, 255, .75);
    max-width: 80%
}

.cover-number {
    position: absolute;
    right: 20px;
    bottom: 19px;
    color: var(--brass);
    font: 17px var(--serif)
}

.stock-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f2d27b;
    color: var(--ink);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 6px 7px;
    text-transform: uppercase;
    z-index: 2
}

.product-copy {
    padding-top: 15px
}

.product-category {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--brass);
    margin: 0 0 5px
}

.product-title {
    font: 21px/1.05 var(--serif);
    letter-spacing: -.025em;
    display: block;
    min-height: 44px
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 13px 0 12px;
    font-size: 11px
}

.product-meta span:last-child {
    color: var(--muted)
}

.text-action {
    border: 0;
    background: none;
    padding: 0;
    color: var(--olive);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase
}

.text-action:disabled {
    color: var(--muted);
    cursor: not-allowed
}

.text-action span {
    font-size: 17px;
    vertical-align: -1px;
    margin-left: 4px;
    transition: margin .18s var(--ease)
}

.text-action:hover span {
    margin-left: 9px
}

.essay-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr .7fr;
    background: var(--olive-deep);
    color: white;
    min-height: 555px
}

.essay-copy {
    align-self: center;
    padding: 70px 5vw
}

.essay-copy h2 {
    font: clamp(34px, 5vw, 75px)/.94 var(--serif);
    margin: 0;
    letter-spacing: -.055em
}

.essay-copy h2 em {
    color: #e1bf6e;
    font-weight: 400
}

.essay-image {
    overflow: hidden
}

.essay-image img,
.family-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover
}

.essay-note {
    align-self: end;
    padding: 45px 3vw 57px
}

.essay-note p {
    font: 16px/1.75 var(--serif);
    color: #dce8dd
}

.roundel {
    display: inline-grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--brass);
    border-radius: 50%;
    color: var(--brass);
    font: 14px var(--serif);
    margin-bottom: 22px
}

.arrival-section {
    background: #faf7ef
}

.family-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    padding: 50px 4.2vw;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center
}

.family-image {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(24, 35, 29, .08);
    aspect-ratio: 4/3;
    height: auto
}

.family-copy {
    max-width: 480px;
    padding: 0
}

.family-copy h2 {
    font: clamp(32px, 4vw, 52px)/1.05 var(--serif);
    letter-spacing: -.045em;
    margin: 0 0 16px
}

.family-copy>p:not(.eyebrow) {
    max-width: 460px;
    color: var(--muted);
    margin: 0 0 25px;
    font-size: 15px;
    line-height: 1.6
}

.site-footer {
    padding: 100px 4.2vw 40px;
    background: var(--ink);
    color: #f6efdf;
    font-family: var(--sans);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    margin-bottom: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 60px;
}

.footer-brand {
    max-width: 420px;
}

.footer-brand-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-logo {
    height: var(--logo-size, 44px);
    width: auto;
    max-height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand h2 {
    font: clamp(26px, 3vw, 36px)/1 var(--serif);
    letter-spacing: -0.02em;
    margin: 0;
    color: white;
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.footer-socials a:hover {
    color: var(--ink);
    background: var(--brass);
    transform: translateY(-3px);
}

.footer-socials a svg {
    display: block;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-content: start;
}

/* ---- Brands / publishers logo strip ---- */
.brands-section {
    padding: 56px 24px;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.brands-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.brands-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 34px;
}

.brands-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.brands-track {
    display: flex;
    align-items: stretch;
    gap: 22px;
    width: max-content;
    animation: brands-scroll 32s linear infinite;
}

.brands-marquee:hover .brands-track {
    animation-play-state: paused;
}

@keyframes brands-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 11px)); }
}

@media (prefers-reduced-motion: reduce) {
    .brands-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    color: var(--muted);
    width: 200px;
    flex-shrink: 0;
    padding: 30px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.brand-item img {
    height: 76px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-align: center;
}

a.brand-item:hover {
    transform: translateY(-4px);
    border-color: var(--brass);
    box-shadow: 0 12px 26px -14px rgba(24, 35, 29, 0.35);
}

a.brand-item:hover .brand-name {
    color: var(--brass);
}

@media (max-width: 560px) {
    .brand-item {
        width: 160px;
        padding: 24px 16px;
    }
}

.footer-col h3 {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brass);
    margin: 0 0 25px;
}

.footer-col a {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-col a:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
    display: flex;
    gap: 25px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: white;
}

.copyright {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 4.2vw;
    align-items: start
}

.detail-cover {
    width: 100%
}

.detail-copy {
    padding-top: 0
}

.back-link {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 55px;
    color: var(--muted)
}

.detail-copy h1 {
    font: clamp(36px, 5vw, 52px)/1.1 var(--serif);
    font-weight: 400;
    letter-spacing: -.01em;
    margin: 0
}

.detail-author {
    color: var(--brass);
    font-size: 14px;
    margin: 14px 0 32px
}

.detail-description {
    font-size: 16px;
    line-height: 1.8;
    max-width: 560px;
    color: #4d5650
}

.detail-price {
    font: 30px var(--serif);
    margin: 32px 0
}

.detail-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap
}

.detail-form label {
    display: grid;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    gap: 6px
}

.detail-form input {
    width: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    background: white
}

.inventory-note {
    font-size: 11px;
    color: var(--muted)
}

.cart-page,
.checkout-page {
    padding: 92px 4.2vw 120px;
    max-width: 1280px;
    margin: 0 auto
}

.page-intro {
    max-width: 650px;
    margin-bottom: 60px
}

.page-intro>p:last-child {
    font-size: 15px;
    color: var(--muted);
    margin: 20px 0 0
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 6vw;
    align-items: start
}

.cart-items {
    border-top: 1px solid var(--line)
}

.cart-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 100px 55px;
    gap: 23px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line)
}

.cart-cover {
    width: 82px;
    padding: 11px;
    aspect-ratio: 1
}

.cart-cover strong {
    font-size: 16px;
    margin-top: 9px
}

.cart-item h2 {
    font: 23px/1 var(--serif);
    letter-spacing: -.025em;
    margin: 0 0 8px
}

.cart-item p:not(.product-category) {
    margin: 0;
    color: var(--muted);
    font-size: 12px
}

.quantity-form label {
    display: grid;
    gap: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase
}

.quantity-form input {
    max-width: 55px;
    padding: 7px;
    border: 1px solid var(--line)
}

.quantity-form button,
.remove-button {
    padding: 0;
    margin-top: 6px;
    border: 0;
    background: none;
    color: var(--olive);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.remove-button {
    color: var(--clay);
    margin: 0
}

.order-summary {
    background: var(--limestone);
    padding: 29px
}

.order-summary>div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    font-size: 12px
}

.order-summary b {
    font-weight: 800;
    text-align: right
}

.summary-total {
    border-top: 1px solid var(--line);
    margin-top: 11px;
    padding-top: 17px !important;
    font-size: 14px !important
}

.summary-total b {
    font: 24px var(--serif)
}

.order-summary .button {
    margin: 22px 0 14px
}

.order-summary small {
    display: block;
    color: var(--muted);
    line-height: 1.6
}

.empty-state {
    background: var(--limestone);
    padding: 75px 25px;
    text-align: center
}

.empty-state h2 {
    font: 42px var(--serif);
    letter-spacing: -.04em;
    margin: 0
}

.empty-state p {
    color: var(--muted);
    margin: 9px 0 24px
}

.checkout-form {
    display: grid;
    gap: 21px
}

.checkout-form label,
.admin-form label,
.admin-login label,
.status-form label {
    display: grid;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.checkout-form label small,
.admin-form label small {
    color: var(--muted);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0
}

.checkout-form input,
.checkout-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select,
.admin-login input,
.status-form select {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--line);
    background: #fff;
    font: 14px var(--sans);
    letter-spacing: 0;
    text-transform: none;
    outline: 0
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-login input:focus,
.status-form select:focus {
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(55, 87, 68, .1)
}

.form-errors {
    background: #fbebe8;
    color: #862f20;
    padding: 13px;
    display: grid;
    gap: 4px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0
}

.checkout-line {
    font-size: 11px !important
}

.confirmation-page {
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
    padding: 130px 30px
}

.roundel.large {
    width: 65px;
    height: 65px;
    font-size: 23px
}

.confirmation-page h1 {
    font: clamp(45px, 5vw, 72px)/.94 var(--serif);
    letter-spacing: -.055em;
    margin: 0
}

.confirmation-lede {
    max-width: 570px;
    margin: 25px auto 31px;
    color: var(--muted);
    font-size: 15px
}

.confirmation-page .underline-link {
    display: block;
    width: max-content;
    margin: 27px auto
}

.redirect-note {
    font-size: 11px;
    color: var(--muted)
}

.admin-body {
    background: #f7f5ee;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr
}

.admin-sidebar {
    background: var(--olive-deep);
    color: white;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 30px 25px;
    display: flex;
    flex-direction: column
}

.admin-sidebar::-webkit-scrollbar {
    display: none
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0
}

.admin-nav-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1
}

.admin-nav-close {
    display: none
}

.admin-sidebar .brand {
    margin-bottom: 61px
}

.admin-sidebar nav {
    display: grid;
    gap: 2px
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, .1);
    margin: 12px 0
}

.admin-sidebar nav a {
    padding: 8px 0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.admin-sidebar nav a:hover {
    color: #e1bf6e
}

/* Active nav item — subtle highlight instead of a full-width underline */
.admin-sidebar nav a.active {
    color: #fff;
}

.admin-sidebar form {
    margin-top: auto
}

.admin-sidebar button {
    border: 0;
    background: none;
    color: #dce8dd;
    padding: 0;
    font: 11px var(--sans);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.admin-main {
    padding: 55px clamp(25px, 5vw, 80px)
}

.admin-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 25px;
    margin-bottom: 40px
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 42px
}

.stat-grid article {
    background: white;
    padding: 22px;
    min-height: 150px;
    border-top: 3px solid var(--brass);
    display: flex;
    flex-direction: column
}

.stat-grid span,
.stat-grid small {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.stat-grid b {
    font: clamp(26px, 2.4vw, 37px)/1.1 var(--serif);
    letter-spacing: -.04em;
    margin: auto 0 6px
}

.admin-panel {
    background: white;
    padding: 28px;
    margin-bottom: 25px
}

.panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 20px
}

.panel-heading h2 {
    font: 30px var(--serif);
    letter-spacing: -.03em;
    margin: 0
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left
}

th {
    font-size: 9px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 10px 13px;
    font-weight: 800
}

td {
    border-top: 1px solid var(--line);
    padding: 14px 10px;
    font-size: 12px
}

td strong {
    display: block
}

td small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px
}

td a {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--olive)
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.table-actions form {
    display: inline
}

.table-actions button {
    border: 0;
    background: none;
    color: var(--clay);
    padding: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase
}

.status-chip {
    display: inline-block;
    padding: 4px 8px;
    background: #eef2eb;
    color: var(--olive);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase
}

.status-new {
    background: #fff0d2;
    color: #845609
}

.status-cancelled {
    background: #f9e3df;
    color: #8b2f21
}

.status-completed {
    background: #e3f1e6;
    color: #265638
}

.pagination {
    margin-top: 23px
}

.pagination nav {
    display: flex;
    gap: 7px
}

.pagination a,
.pagination span {
    font-size: 11px
}

.admin-form {
    background: white;
    padding: 32px;
    max-width: 930px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.admin-form .wide {
    grid-column: 1/-1
}

.checkbox-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0
}

.checkbox-row label,
.remember {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    font-size: 11px !important;
    letter-spacing: 0 !important;
    text-transform: none !important
}

.checkbox-row input,
.remember input {
    width: auto !important
}

.admin-order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 25px
}

.order-detail-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--line)
}

.order-detail-line strong,
.order-detail-line small {
    display: block
}

.order-detail-line small {
    color: var(--muted);
    font-size: 11px
}

.note-box {
    padding: 13px;
    background: var(--limestone);
    font-size: 12px
}

.status-form {
    display: grid;
    gap: 16px;
    margin-top: 25px
}

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--limestone);
    padding: 25px
}

.admin-login {
    width: min(100%, 430px);
    background: white;
    padding: 48px
}

.admin-login .brand {
    margin-bottom: 55px
}

.admin-login h1 {
    font: 53px/.95 var(--serif);
    letter-spacing: -.05em;
    margin: 0 0 36px
}

.admin-login form {
    display: grid;
    gap: 20px
}

.admin-login .button {
    margin-top: 6px
}

.muted-text {
    color: var(--muted)
}

.product-cover.polaroid {
    padding: 12px;
    justify-content: flex-start;
    border-radius: 2px
}

.product-cover.polaroid:before {
    display: none
}

.polaroid-img-wrap {
    width: 100%;
    height: 58%;
    position: relative;
    overflow: hidden;
    border-radius: 1px
}

.polaroid-img-wrap img.p-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease)
}

.product-card:hover .polaroid-img-wrap img.p-img {
    transform: scale(1.05)
}

.product-cover.polaroid .p-img-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .05)
}

.product-cover.polaroid .p-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 4px 6px;
    text-align: center;
    z-index: 1
}

.product-cover.polaroid .p-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255, 255, 255, 0.75)
}

.product-cover.polaroid .p-title {
    font: clamp(22px, 2.5vw, 32px)/1.05 var(--serif);
    color: #fffdf8;
    margin: auto 0
}

.polaroid-btn {
    width: 100%;
    background: 0 0;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 10px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .15em;
    cursor: pointer;
    transition: all .2s var(--ease)
}

.polaroid-btn:hover:not(:disabled) {
    background: var(--olive);
    border-color: var(--olive);
    color: #fff
}

.polaroid-btn:disabled {
    color: var(--muted);
    cursor: not-allowed;
    background: rgba(0, 0, 0, .03)
}

.polaroid-btn span {
    margin-left: 5px;
    font-size: 14px;
    vertical-align: -1px;
    transition: margin .2s var(--ease)
}

.polaroid-btn:hover:not(:disabled) span {
    margin-left: 10px
}

@media (max-width:900px) {
    .site-header {
        padding: 8px 22px;
        min-height: 62px
    }

    /* Keep the mobile header compact even if the desktop logo is set large */
    .site-header .brand-mark {
        max-height: 42px !important;
    }

    .site-nav {
        position: absolute;
        display: none;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        padding: 20px 22px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 22px rgba(24, 35, 29, .08);
        gap: 18px;
        flex-direction: column;
        align-items: flex-start
    }

    .site-nav.is-open {
        display: flex
    }

    .menu-toggle {
        display: block;
        margin-left: auto
    }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: 610px
    }

    .hero-visual {
        grid-area: 1/1;
        background-position: 58% center;
        opacity: .72
    }

    .hero-copy {
        grid-area: 1/1;
        padding: 80px 28px 65px
    }

    .hero-copy h1 {
        font-size: clamp(54px, 11vw, 78px)
    }

    .service-rail {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 27px 28px
    }

    .service-rail>div {
        padding: 0 !important;
        border: 0 !important
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px
    }

    .essay-section {
        grid-template-columns: 1fr 1fr
    }

    .essay-copy {
        padding: 64px 38px
    }

    .essay-image {
        min-height: 300px
    }

    .essay-note {
        grid-column: 1/-1;
        padding: 36px 38px
    }

    .family-section {
        grid-template-columns: 1fr;
        padding: 50px 4.2vw;
        gap: 30px
    }

    .family-copy {
        padding: 0;
        max-width: 100%
    }

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 35px
    }

    .order-summary {
        max-width: 520px
    }

    .admin-body {
        grid-template-columns: 1fr
    }

    .admin-sidebar {
        height: auto;
        min-height: auto;
        padding: 20px;
        display: block
    }

    .sidebar-mobile-header {
        margin-bottom: 0 !important
    }

    .admin-sidebar .brand {
        margin-bottom: 0
    }

    .admin-menu-toggle {
        display: block
    }

    .admin-nav-group {
        position: fixed;
        top: 0;
        right: -280px;
        width: 250px;
        height: 100vh;
        background: var(--olive-deep);
        padding: 30px 25px;
        margin: 0;
        border: none;
        z-index: 1000;
        transition: right .3s var(--ease);
        display: flex;
        flex-direction: column;
        box-shadow: -5px 0 30px rgba(0, 0, 0, .5)
    }

    .admin-nav-group.is-open {
        right: 0
    }

    .admin-nav-close {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 20px
    }

    .admin-nav-close button {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0
    }

    .sidebar-divider {
        display: none
    }

    .admin-sidebar nav {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 20px
    }

    .admin-sidebar nav a {
        border: 0
    }

    .admin-sidebar form {
        margin-top: auto
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr
    }

    .admin-order-layout {
        grid-template-columns: 1fr
    }
}

@media (max-width:600px) {
    .announcement {
        font-size: 8px;
        padding: 9px 12px
    }

    .announcement span {
        display: none
    }

    .brand-mark {
        width: 37px;
        height: 37px
    }

    .brand-copy strong {
        font-size: 15px
    }

    .site-header {
        gap: 12px
    }

    .shelf-link {
        margin-left: 0
    }

    .hero-index {
        right: 28px
    }

    .service-rail {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 28px;
        padding: 25px 28px;
        gap: 30px;
        scrollbar-width: none
    }

    .service-rail::-webkit-scrollbar {
        display: none
    }

    .service-rail>div {
        flex: 0 0 85%;
        scroll-snap-align: start
    }

    .category-section,
    .catalogue-section,
    .arrival-section {
        padding: 75px 24px
    }

    .section-heading {
        display: block;
        margin-bottom: 32px
    }

    .section-heading>p {
        margin-top: 15px
    }

    .category-row {
        grid-template-columns: 35px minmax(0, 1fr) 20px;
        gap: 8px
    }

    .category-row em {
        display: none
    }

    .category-row strong {
        font-size: 28px
    }

    .product-cover {
        padding: 15px
    }

    .product-cover strong {
        font-size: 25px
    }

    .cover-category,
    .cover-author {
        font-size: 7px
    }

    .product-copy {
        padding-top: 12px
    }

    .product-title {
        font-size: 19px
    }

    .essay-section {
        display: flex;
        flex-direction: column
    }

    .essay-copy {
        padding: 70px 25px
    }

    .essay-image {
        height: 240px;
        min-height: auto;
        order: 2
    }

    .essay-note {
        padding: 44px 25px;
        order: 3
    }

    .family-section {
        display: flex;
        flex-direction: column;
        padding: 40px 24px;
        gap: 25px
    }

    .family-image {
        aspect-ratio: 4/3;
        height: auto;
        width: 100%
    }

    .family-copy {
        padding: 0
    }

    .site-footer {
        padding: 60px 25px 30px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .footer-nav-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .footer-legal {
        flex-wrap: wrap;
    }

    .product-detail {
        grid-template-columns: 1fr;
        padding: 55px 25px 80px;
        gap: 42px
    }

    .detail-cover {
        width: 100%
    }

    .back-link {
        margin-bottom: 33px
    }

    .detail-form {
        align-items: stretch
    }

    .detail-form .button {
        width: 100%
    }

    .shop-page {
        padding: 40px 24px 80px
    }

    .cart-page,
    .checkout-page {
        padding: 65px 24px 85px
    }

    .cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 15px
    }

    .cart-cover {
        width: 70px
    }

    .cart-item .quantity-form {
        grid-column: 1
    }

    .cart-item>form:last-child {
        grid-column: 2;
        grid-row: 2;
        align-self: end
    }

    .admin-main {
        padding: 35px 18px
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr
    }

    .admin-panel,
    .admin-form {
        padding: 19px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .admin-form .wide {
        grid-column: auto
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column
    }

    .admin-login {
        padding: 35px 25px
    }

    .admin-login h1 {
        font-size: 47px
    }

    .product-cover.polaroid .p-title {
        font-size: 16px !important;
        line-height: 1.1 !important
    }

    .product-cover.polaroid .p-meta {
        flex-direction: column;
        gap: 3px;
        font-size: 6px !important;
        letter-spacing: 0.1em !important
    }
}

@media (prefers-reduced-motion:no-preference) {

    .hero-copy,
    .hero-visual {
        animation: enter .55s var(--ease) both
    }

    .hero-visual {
        animation-delay: .08s
    }

    @keyframes enter {
        from {
            opacity: 0;
            transform: translateY(8px)
        }

        to {
            opacity: 1;
            transform: translateY(0)
        }
    }
}

.image-note {
    grid-column: 1/-1;
    padding: 11px 14px;
    background: var(--limestone);
    font-size: 11px;
    color: var(--muted)
}

.image-note a {
    color: var(--olive);
    font-weight: 800
}

.admin-panel a {
    color: var(--olive);
    font-weight: 700
}

.category-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 15px;
    grid-column: 2;
    grid-row: 1
}

.category-row:has(.category-thumb) {
    grid-template-columns: 70px 58px minmax(0, 1fr) 130px 20px
}

.category-row:has(.category-thumb) strong {
    grid-column: 3
}

.category-row:has(.category-thumb) em {
    grid-column: 4
}

.category-row:has(.category-thumb) i {
    grid-column: 5
}

@media(max-width:600px) {
    .category-row:has(.category-thumb) {
        grid-template-columns: 35px 50px minmax(0, 1fr) 20px
    }

    .category-row:has(.category-thumb) strong {
        grid-column: 3
    }

    .category-row:has(.category-thumb) em {
        display: none
    }

    .category-row:has(.category-thumb) i {
        grid-column: 4
    }
}

html.sidebar-collapsed .admin-sidebar {
    width: 75px;
    padding: 30px 15px
}

html.sidebar-collapsed .sidebar-mobile-header {
    flex-direction: column;
    gap: 20px;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 40px !important
}

html.sidebar-collapsed .nav-text {
    display: none !important
}

html.sidebar-collapsed .nav-label {
    display: none !important
}

html.sidebar-collapsed .desktop-toggle .icon-collapse {
    display: none
}

html.sidebar-collapsed .desktop-toggle .icon-expand {
    display: block !important
}

html.sidebar-collapsed .brand-mark {
    width: 35px;
    height: 35px;
    margin: 0 auto
}

html.sidebar-collapsed .brand {
    justify-content: center
}

html.sidebar-collapsed .sub-nav {
    display: none !important
}

html.sidebar-collapsed .admin-sidebar nav a,
html.sidebar-collapsed .admin-sidebar nav button,
html.sidebar-collapsed .admin-sidebar form button {
    justify-content: center !important;
    padding: 12px 0 !important
}

html.sidebar-collapsed .admin-main {
    padding-left: max(25px, 5vw)
}

html.sidebar-collapsed .admin-body {
    grid-template-columns: 75px 1fr
}

.admin-body {
    transition: grid-template-columns .3s var(--ease)
}

.admin-sidebar {
    transition: width .3s var(--ease), padding .3s var(--ease)
}

.admin-sidebar nav a,
.admin-sidebar nav button,
.admin-sidebar form button {
    display: flex;
    align-items: center;
    gap: 12px
}

@media (max-width:900px) {
    .desktop-toggle {
        display: none !important
    }
}
