/* the divide / — storefront styles
   Warm-white editorial look matching the approved mockup:
   petrol vs. wine as the only accent colors, thin hairline borders,
   generous whitespace, no rounded cards/gradients.
   Typography: sans (Inter) is the base for all body copy, buttons, forms,
   nav and UI text. Serif (Fraunces) is reserved for titles only — headings
   (h1/h2/h3), the logo, and the product detail price — never for
   paragraphs, labels, inputs or controls. */

:root {
    --bg: #F5F2EB;
    --ink: #171715;
    --ink-soft: #55534c;
    --line: #d9d4c7;
    --pro: #153B3E;
    --anti: #641D25;
    --cream: #FBF9F4;
    --max-width: 1320px;
    --gutter: clamp(28px, 5vw, 64px);
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: 1.5;
}

/* Titles only — everything else (nav, buttons, forms, body copy) stays sans. */
h1, h2, h3, .logo {
    font-family: var(--serif);
}

img { max-width: 100%; display: block; }

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

button { font-family: inherit; cursor: pointer; }

.prose {
    max-width: 70ch;
    margin: 0 auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 2px solid var(--pro);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    padding: 0.85em 1.6em;
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn-light { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--ink); color: var(--cream); }
.btn-accent { background: var(--anti); border-color: var(--anti); color: var(--cream); }
.btn-accent:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn-full { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 50;
}
.site-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding-top: 22px;
    padding-bottom: 22px;
}
.logo {
    justify-self: start;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
    font-weight: 900;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 30;
}
.main-nav { display: flex; gap: 2.5rem; justify-self: center; }
.main-nav a {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.header-right { display: flex; align-items: center; justify-self: end; gap: 1.5rem; }
.bag-link { position: relative; display: inline-flex; align-items: center; color: var(--ink); }
.bag-icon { width: 24px; height: 24px; color: var(--ink); }
.bag-count {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--anti);
    color: var(--cream);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50%;
    line-height: 1;
}
.menu-toggle {
    display: none;
    background: none; border: none; color: var(--ink);
    font-size: 1rem; letter-spacing: 0.04em;
}
.menu-icon { width: 20px; height: 20px; color: var(--ink); }
.mobile-nav {
    display: none;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
    padding: 14px var(--gutter);
    border-top: 1px solid var(--line);
    font-size: 1rem;
}

@media (max-width: 760px) {
    .main-nav { display: none; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
    .site-header .container { display: flex; justify-content: space-between; align-items: center; }
    .logo { font-size: 1.05rem; line-height: 1.2; white-space: nowrap; }
    .header-right { flex-shrink: 0; gap: 18px; }
}

/* ---------- Bold display type ----------
   Fraunces gets increasingly eccentric letterforms (a famously "wonky"
   capital F among them) as the optical-size axis auto-interpolates toward
   its display extreme at large rendered sizes. Pinning a moderate opsz on
   every heavy headline below keeps them readable while still using the
   heavy end of the weight axis for impact. */

/* ---------- Mobile teaser (phones only, shown under the hero split) ---------- */
.mobile-teaser { display: none; }
@media (max-width: 760px) {
    .mobile-teaser { display: block; padding: 14px 14px 0; margin-top: 14px; }
    .mobile-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .mobile-teaser-grid .product-card .title { font-size: 0.72rem; }
    .mobile-teaser-grid .product-card .meta-row { font-size: 0.72rem; }
    .mobile-teaser-grid .product-card .side-tag { font-size: 0.6rem; padding: 2px 6px; }
    .mobile-teaser-grid .product-card .swatches { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(24px, 4vw, 44px); text-align: center; }
.hero h1 {
    font-family: var(--serif);
    font-size: clamp(3.2rem, 9vw, 6.4rem);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    font-style: italic;
    line-height: 0.92;
    margin: 0 0 0.25em;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.hero .subtagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 20px);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-style: italic;
    color: var(--ink-soft);
    margin: 0 0 clamp(14px, 2vw, 22px);
}
.hero .subtagline::before, .hero .subtagline::after {
    content: '';
    display: block;
    width: clamp(36px, 6vw, 90px);
    height: 1px;
    background: var(--anti);
}
.hero-split {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.hero-panel {
    position: relative;
    aspect-ratio: 900 / 718;
    overflow: hidden;
    color: var(--cream);
}
.hero-panel img {
    width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%;
}
.hero-panel.pro, .hero-panel.anti { background: var(--bg); }
.hero-panel .hero-label {
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    line-height: 0.95;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    padding: 20px 24px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.hero-panel .hero-cta {
    position: absolute;
    left: 24px; bottom: 24px;
    z-index: 1;
}
.vs-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: clamp(56px, 7vw, 84px);
    height: clamp(56px, 7vw, 84px);
    border-radius: 50%;
    background: var(--cream);
    border: 3px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.95rem, 1.6vw, 1.3rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--ink);
}

@media (max-width: 760px) {
    .hero-panel { display: flex; flex-direction: column; aspect-ratio: auto; }
    .hero-panel img { aspect-ratio: 900 / 718; }
    .hero-panel .hero-cta {
        position: static;
        margin: 8px;
        text-align: center;
        justify-content: center;
        background: var(--cream);
        border: 1.5px solid var(--anti);
        color: var(--anti);
    }
    .hero-panel .hero-cta:hover { background: var(--anti); color: var(--cream); }
}

/* ---------- Statement banner ---------- */
.statement-banner {
    background: var(--anti);
    padding: clamp(14px, 2.4vw, 22px) var(--gutter);
    text-align: center;
}
.statement-banner p {
    margin: 0;
    color: var(--cream);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 30;
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

/* ---------- Scoreboard ---------- */
.scoreboard {
    padding: clamp(28px, 4vw, 48px) 0 clamp(16px, 2.5vw, 28px);
    text-align: center;
}
.scoreboard h2 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    font-style: italic;
    margin: 0 0 14px;
}
.score-range-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: clamp(14px, 2vw, 22px);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.score-range-toggle a {
    padding: 4px 12px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.score-range-toggle a.active { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.score-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 4vw, 40px);
}
.score-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-figure {
    font-family: var(--serif);
    font-size: clamp(3.4rem, 9vw, 6rem);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    line-height: 1;
}
.score-figure.pro { color: var(--pro); }
.score-figure.anti { color: var(--anti); }
.score-label { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.score-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: clamp(140px, 22vw, 260px); }
.score-caption {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0;
}
.score-caption::before, .score-caption::after {
    content: '';
    width: clamp(14px, 2.4vw, 26px);
    height: 1px;
    background: var(--anti);
}
.score-caption-lg { font-size: clamp(1rem, 1.8vw, 1.3rem); font-weight: 600; }
.score-bar {
    max-width: 720px;
    margin: clamp(14px, 2.5vw, 22px) auto 10px;
    height: 9px;
    display: flex;
    background: var(--line);
    overflow: hidden;
}
.score-bar .pro-bar { background: var(--pro); }
.score-bar .anti-bar { background: var(--anti); }

@media (max-width: 480px) {
    .score-row { gap: 10px; }
    .score-figure { font-size: clamp(2rem, 11vw, 3.4rem); }
    .score-center { min-width: 0; }
    .score-caption::before, .score-caption::after { width: 10px; }
}

/* ---------- Product section ---------- */
.products-section { padding: clamp(10px, 2vw, 20px) 0 clamp(60px, 8vw, 90px); }
.products-header h1 em, .products-header h2 em { font-style: italic; }
.quick-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: clamp(14px, 2.5vw, 22px) 0 clamp(20px, 3vw, 32px);
}
.quick-filter a {
    border: 1px solid var(--ink);
    padding: 8px 22px;
    font-size: 1rem;
    color: var(--ink);
}
.quick-filter a.active { background: var(--ink); color: var(--cream); }
.products-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}
.products-header.with-gap { margin-bottom: clamp(24px, 4vw, 40px); }
.products-header.centered { justify-content: center; text-align: center; }
.products-header h1, .products-header h2 {
    font-size: clamp(2.4rem, 4.6vw, 3.6rem);
    font-weight: 800;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    text-transform: uppercase;
    margin: 0;
}
.filters {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.filters .filter-group { display: flex; gap: 1rem; }
.filters a, .filters label { color: var(--ink-soft); }
.filters a[aria-current="true"], .filters .filter-group a.active { color: var(--ink); border-bottom: 1px solid var(--ink); }
.filters select {
    font-family: var(--sans);
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 6px 10px;
    color: var(--ink);
}
.filter-sep { color: var(--line); }

.filter-dropdown { position: relative; }
.filter-dropdown summary {
    cursor: pointer;
    color: var(--ink-soft);
    list-style: none;
}
.filter-dropdown summary::-webkit-details-marker { display: none; }
.filter-dropdown summary::after { content: ' \25BE'; font-size: 0.75em; }
.filter-dropdown[open] summary { color: var(--ink); }
.filter-dropdown .filter-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 5;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    padding: 14px;
    min-width: 180px;
}
.filter-panel a { display: block; padding: 4px 0; color: var(--ink-soft); white-space: nowrap; }
.filter-panel a.active { color: var(--ink); font-weight: 600; }
.filter-panel.color-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 18px; min-width: 300px; }
.color-option { display: flex !important; align-items: center; gap: 8px; }
.color-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); flex-shrink: 0; }
.color-swatch-all { display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-soft); font-size: 0.8rem; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px 28px;
}
@media (max-width: 1040px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}

.product-card { display: block; }
.product-card .thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--cream);
    overflow: hidden;
    margin-bottom: 14px;
}
.product-card .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .thumb img { transform: scale(1.03); }
.side-tag {
    position: absolute;
    top: 0; left: 0;
    z-index: 2;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--cream);
    padding: 8px 10px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
.side-tag.pro_ai { background: var(--pro); }
.side-tag.anti_ai { background: var(--anti); }
.product-card .title {
    font-size: 0.98rem;
    font-weight: 600;
    margin: 0 0 2px;
}
.product-card .meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-card .price { font-size: 0.92rem; color: var(--ink-soft); }
.swatches { display: flex; gap: 6px; }
.swatch {
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
}

.explore-more { text-align: center; margin-top: clamp(32px, 5vw, 56px); }
.explore-more a { font-size: 0.95rem; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ---------- Family gift guide ---------- */
.family-gifts { background: var(--bg); padding: clamp(50px, 8vw, 96px) 0; }
.family-gifts-grid {
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.family-gifts-media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.family-gifts-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.family-gifts-content { display: flex; flex-direction: column; }
.family-gifts-content .eyebrow {
    color: var(--anti);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin: 0 0 0.6em;
}
.family-gifts-content h2 {
    font-size: clamp(2.1rem, 4.2vw, 3.1rem);
    font-weight: 800;
    font-style: italic;
    font-optical-sizing: none;
    font-variation-settings: 'opsz' 40;
    line-height: 1.08;
    margin: 0 0 0.45em;
}
.family-gifts-text { color: var(--ink-soft); line-height: 1.55; margin: 0 0 1.6em; }
.family-gift-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 20px 16px;
    max-width: 460px;
    margin-bottom: 1.8em;
}
.family-gift-cards .product-card .title { font-size: 0.85rem; }
.family-gift-cards .product-card .price { font-size: 0.82rem; }
.family-gifts-cta {
    align-self: flex-start;
    background: var(--anti);
    border-color: var(--anti);
    color: var(--cream);
    margin-bottom: 1.2em;
}
.family-gifts-cta:hover { background: var(--ink); border-color: var(--ink); }
.family-gifts-closing { font-style: italic; color: var(--ink-soft); margin: 0; padding-top: 1.2em; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
    .family-gifts-grid { grid-template-columns: 1fr; }
    .family-gifts-media { aspect-ratio: 16 / 10; }
}

/* ---------- Gifts band (compact) ---------- */
.gifts-band {
    display: grid;
    grid-template-columns: 2fr 3fr;
    background: var(--cream);
}
.gifts-band .gift-image { aspect-ratio: 16 / 7; overflow: hidden; }
.gifts-band .gift-image img { width: 100%; height: 100%; object-fit: cover; }
.gifts-band .gift-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
}
.gifts-band h2 {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 700;
    font-style: italic;
    line-height: 1.1;
    margin: 0 0 0.3em;
}
.gifts-band p { color: var(--ink-soft); margin: 0 0 1em; }
.gifts-band .btn {
    align-self: flex-start;
    background: var(--anti);
    border-color: var(--anti);
    color: var(--cream);
}
.gifts-band .btn:hover { background: var(--ink); border-color: var(--ink); }

@media (max-width: 760px) {
    .gifts-band { grid-template-columns: 1fr; }
    .gifts-band .gift-image { aspect-ratio: 16 / 9; }
}

/* ---------- FAQ ---------- */
.faq-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding-block: clamp(50px, 7vw, 90px);
    border-top: 1px solid var(--line);
}
.faq-section h2 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); font-weight: 500; margin: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    font-size: 1rem;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--ink-soft); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 0 0 20px; color: var(--ink-soft); max-width: 60ch; }

@media (max-width: 760px) {
    .faq-section { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: clamp(28px, 4vw, 40px) 0;
}
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.2rem;
}
.footer-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Generic page sections (shop/product/cart/faq-ish pages) ---------- */
.page-header { padding-top: clamp(40px, 6vw, 64px); }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 500; margin: 0 0 0.3em; }
.page-header p { color: var(--ink-soft); max-width: 60ch; }
.section-pad { padding-block: clamp(36px, 5vw, 56px); }

/* Order confirmation (success.php) runs noticeably shorter than other
   section-pad pages — the same clamp()-based padding plus the footer's own
   padding stacks into a lot of dead air on mobile, so it gets a tighter
   mobile-only override instead of changing section-pad everywhere. */
#order-items .cart-item { border-bottom: none; padding: 10px 0; }
@media (max-width: 560px) {
    #order-items.section-pad { padding-top: 20px; padding-bottom: 24px; }
}

/* ---------- Browse everything ---------- */
.browse-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 20px;
    padding-bottom: 32px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.browse-jump a { font-size: 0.92rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.browse-group { padding-block: 40px; border-bottom: 1px solid var(--line); }
.browse-group:last-of-type { border-bottom: none; }
.browse-group-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 500; margin: 0 0 24px; scroll-margin-top: 90px; }
.browse-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 20px; }
@media (max-width: 1200px) { .browse-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .browse-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .browse-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; } }
.browse-tile { display: block; }
.browse-tile .thumb { aspect-ratio: 4 / 5; background: var(--cream); overflow: hidden; margin-bottom: 10px; }
.browse-tile .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.browse-tile:hover .thumb img { transform: scale(1.03); }
.browse-tile-title { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

/* ---------- Blog list ---------- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 28px;
}
@media (max-width: 1040px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .article-grid { grid-template-columns: 1fr; } }
.article-card { display: block; }
.article-card-thumb { aspect-ratio: 3/2; background: var(--cream); overflow: hidden; margin-bottom: 14px; }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.article-card:hover .article-card-thumb img { transform: scale(1.03); }
.article-card-date { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
.article-card h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.article-card-excerpt { color: var(--ink-soft); font-size: 0.92rem; margin: 0; max-width: 42ch; }

/* ---------- Article detail ---------- */
.article-page { max-width: 1100px; padding-bottom: clamp(24px, 4vw, 40px); }
.article-breadcrumb { font-size: 0.82rem; color: var(--ink-soft); padding-top: 14px; margin: 0; }
.article-breadcrumb a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.article-page-title { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 500; line-height: 1.1; max-width: 900px; margin: 10px 0 8px; }
.article-page-intro { font-size: 1.1rem; color: var(--ink-soft); max-width: 680px; margin: 0 0 10px; }
.article-page-meta { font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 20px; }

.article-page-cover-wrap { aspect-ratio: 16/7; background: var(--cream); overflow: hidden; margin: 0 0 24px; }
.article-page-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .article-page-cover-wrap { aspect-ratio: 4/3; } }

.article-body { font-size: 1.02rem; line-height: 1.6; color: var(--ink); }
.article-body > p, .article-body > ul, .article-body > h2 { max-width: 680px; }
.article-body > p { margin: 0 0 14px; }
.article-body > h2 { font-size: 1.25rem; font-weight: 600; margin: 24px 0 10px; }
.article-body > ul { margin: 0 0 14px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }

/* Quick links, auto-generated from {{recommend}} sections via {{quicklinks}} */
.article-quicklinks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.article-quicklinks a { color: var(--anti); text-decoration: underline; text-underline-offset: 3px; font-size: 0.95rem; }
.article-quicklinks-sep { color: var(--ink-soft); opacity: 0.5; }

/* Large two-column product recommendation section */
.article-recommend {
    display: grid;
    grid-template-columns: minmax(0, 38%) 1fr;
    gap: clamp(16px, 3vw, 28px);
    align-items: start;
    margin: 0 0 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 90px;
}
.article-recommend:last-of-type { border-bottom: none; }
.article-recommend-media { position: relative; background: var(--cream); display: flex; }
.article-recommend-media img { width: 100%; height: auto; display: block; }
.article-recommend-media-empty { width: 100%; aspect-ratio: 4/5; }
.article-recommend-meta { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--anti); margin: 0 0 4px; }
.article-recommend-heading { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; margin: 0 0 6px; line-height: 1.2; }
.article-recommend-body { color: var(--ink-soft); margin: 0 0 10px; }
.article-recommend-body p { margin: 0 0 8px; }
.article-recommend-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-recommend-body.is-clamped.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.article-recommend-more {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--anti);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.article-recommend-product { border-top: 1px solid var(--line); padding-top: 10px; }
.article-recommend-title { display: block; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; margin-bottom: 2px; }
.article-recommend-price { color: var(--ink-soft); margin: 0 0 8px; }

@media (max-width: 760px) {
    .article-recommend { grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; padding-bottom: 20px; }
    .article-recommend-media { max-width: 300px; margin: 0 auto; }
}

/* Editorial images between text sections */
.article-editorial-image { aspect-ratio: 16/9; background: var(--cream); overflow: hidden; margin: 20px 0; }
.article-editorial-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.article-end { margin: 0 0 24px; }
.article-related { border-top: 1px solid var(--line); padding-top: 24px; }
.article-related h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 14px; }

.article-product {
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 14px;
    margin: 0 0 28px;
    max-width: 420px;
}
.article-product:hover { border-color: var(--ink); }
.article-product img { width: 76px; height: 95px; object-fit: cover; flex-shrink: 0; background: var(--cream); }
.article-product-info { display: flex; flex-direction: column; gap: 3px; }
.article-product-tag { align-self: flex-start; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); padding: 2px 7px; margin-bottom: 2px; }
.article-product-tag.pro_ai { background: var(--pro); }
.article-product-tag.anti_ai { background: var(--anti); }
.article-product-title { font-weight: 600; font-size: 0.95rem; }
.article-product-price { color: var(--ink-soft); font-size: 0.88rem; }
.article-product-cta { font-size: 0.85rem; margin-top: 4px; }

/* ---------- Product detail ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(32px, 5vw, 64px);
    padding: clamp(32px, 5vw, 56px) 0;
}
.gallery { min-width: 0; }
.gallery-main { aspect-ratio: 4/5; background: var(--cream); overflow: hidden; margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-zoom-btn { display: block; width: 100%; height: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumbs button {
    width: 68px; height: 68px; padding: 0; border: 1px solid var(--line); background: var(--cream); overflow: hidden;
}
.gallery-thumbs button.active { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
    .product-detail { grid-template-columns: 1fr; row-gap: 14px; }
    .gallery-main { aspect-ratio: 1/1; max-height: 70vh; }
    .product-info .side-pill { margin-bottom: 8px; }
    .product-info h1 { margin: 0 0 6px; }
    .product-info .price { margin: 0 0 12px; }
    .option-group { margin-bottom: 14px; }
    .qty-row { margin: 14px 0; }
    .gallery-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .gallery-thumbs::-webkit-scrollbar { display: none; }
    .gallery-thumbs button { flex: 0 0 auto; }
}

.lightbox {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(23, 23, 21, 0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
    position: absolute; top: 18px; right: 24px;
    background: none; border: none; color: var(--cream);
    font-size: 2.2rem; line-height: 1; cursor: pointer;
}

.product-info .side-pill {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--cream);
    padding: 5px 10px;
    margin-bottom: 14px;
}
.product-info .side-pill.pro_ai { background: var(--pro); }
.product-info .side-pill.anti_ai { background: var(--anti); }
.product-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; margin: 0 0 8px; }
.product-info .price { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 16px; }
.product-info .description { color: var(--ink-soft); margin: 0 0 20px; max-width: 54ch; font-family: var(--sans); }

.option-group { margin-bottom: 16px; }
.option-group .option-label { font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 8px; display: flex; gap: 0.5em; }
.option-group .option-label .value { color: var(--ink-soft); }
.color-options { display: flex; gap: 10px; flex-wrap: wrap; }
.color-options button {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.18);
    position: relative;
}
.color-options button.active::after {
    content: '';
    position: absolute; inset: -4px;
    border: 1px solid var(--ink); border-radius: 50%;
}
.size-options { display: flex; gap: 10px; flex-wrap: wrap; }
.size-options button {
    font-family: var(--sans);
    min-width: 46px; padding: 8px 12px;
    border: 1px solid var(--line); background: transparent; color: var(--ink);
}
.size-options button.active { border-color: var(--pro); background: var(--pro); color: var(--cream); }
.size-options button[disabled] { color: var(--line); border-color: var(--line); text-decoration: line-through; cursor: not-allowed; }

.qty-row { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line); flex-shrink: 0; }
.qty-control button { border: none; background: none; width: 36px; height: 40px; font-size: 1.1rem; }
.qty-control input { width: 42px; text-align: center; border: none; background: none; font-family: var(--sans); font-size: 1rem; }
.qty-row .btn { white-space: nowrap; }
.btn-addtobag {
    background: var(--pro);
    border-color: var(--pro);
    color: var(--cream);
    flex: 1 1 auto;
    justify-content: center;
    gap: 0.6em;
}
.btn-addtobag:hover { background: var(--ink); border-color: var(--ink); }
.btn-addtobag .bag-icon { width: 18px; height: 18px; color: currentColor; }
.order-note { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); text-align: center; margin: 8px 0 0; }

@media (max-width: 420px) {
    .qty-row { flex-wrap: wrap; }
    .qty-row .btn { flex: 1 1 100%; justify-content: center; }
}

.availability-note { font-family: var(--sans); font-size: 0.85rem; margin-top: 8px; }
.availability-note.in-stock { color: var(--pro); }
.availability-note.out-of-stock { color: var(--anti); }

.shipping-note { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

.product-accordion { margin-top: 20px; border-top: 1px solid var(--line); }
.specs-item { border-bottom: 1px solid var(--line); }
.specs-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-family: var(--sans);
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}
.specs-item summary::-webkit-details-marker { display: none; }
.specs-item summary::after { content: '+'; font-size: 1.3rem; color: var(--ink-soft); }
.specs-item[open] summary::after { content: '\2212'; }
.specs-item .description, .specs-item .shipping-note { padding-bottom: 18px; }
.specs-item .description { font-family: var(--sans); color: var(--ink-soft); max-width: 60ch; margin: 0; }

/* ---------- Cart drawer (mini-cart after "Add to bag") ---------- */
.cart-drawer-backdrop {
    position: fixed; inset: 0; background: rgba(23, 23, 21, 0.45); z-index: 300;
    opacity: 0; transition: opacity 0.25s ease;
}
.cart-drawer-backdrop.open { opacity: 1; }
.cart-drawer-backdrop[hidden] { display: none; }

.cart-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%);
    background: var(--cream); z-index: 301; box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    padding: 24px; display: flex; flex-direction: column; gap: 16px;
    transform: translateX(100%); transition: transform 0.3s ease;
    font-family: var(--sans);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; justify-content: space-between; align-items: center; }
.cart-drawer-head h2 { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; margin: 0; }
.cart-drawer-close { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); padding: 0; }
.cart-drawer-item { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
.cart-drawer-item img { width: 64px; height: 80px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.cart-drawer-title { font-size: 0.9rem; margin: 0 0 4px; }
.cart-drawer-variant { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }
.cart-drawer-price { font-size: 0.9rem; white-space: nowrap; margin-left: auto; }
.cart-drawer-subtotal { display: flex; justify-content: space-between; font-size: 0.95rem; }
.cart-drawer-continue { background: none; border: none; text-decoration: underline; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; margin-top: -4px; }

@media (max-width: 560px) {
    .cart-drawer {
        top: auto; bottom: 0; right: 0; left: 0; width: 100%; height: auto; max-height: 85vh;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
        overflow-y: auto;
    }
    .cart-drawer.open { transform: translateY(0); }
}

.related-section { border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px); }
.related-section h2 { font-size: 1.4rem; font-weight: 500; margin: 0 0 24px; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 56px); align-items: start; padding-block: clamp(32px, 5vw, 56px); }
.cart-items { border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 90px; height: 108px; object-fit: cover; background: var(--cream); }
.cart-item .item-title { font-size: 1rem; margin: 0 0 4px; }
.cart-item .item-variant { color: var(--ink-soft); font-size: 0.85rem; }
.cart-item .item-side { font-size: 0.72rem; letter-spacing: 0.08em; margin-top: 6px; }
.cart-item .item-side.pro_ai { color: var(--pro); }
.cart-item .item-side.anti_ai { color: var(--anti); }
.cart-item .item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item .remove-btn { background: none; border: none; color: var(--ink-soft); font-size: 0.82rem; text-decoration: underline; }
.cart-empty { padding: 60px 0; text-align: center; color: var(--ink-soft); }

@media (max-width: 760px) {
    .cart-layout { grid-template-columns: 1fr; row-gap: 32px; }
    .cart-item { grid-template-columns: 72px 1fr; grid-template-rows: auto auto; }
    .cart-item img { width: 72px; height: 86px; }
    .cart-item .item-actions {
        grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between;
        margin-top: 4px;
    }
}

.summary-box { border: 1px solid var(--line); background: var(--cream); padding: 26px; }
.summary-box h2 { font-size: 1.2rem; font-weight: 500; margin: 0 0 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.95rem; padding: 8px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.05rem; font-weight: 700; }
.summary-box .field { margin-bottom: 14px; }
.summary-box label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; }
.summary-box select, .summary-box input {
    width: 100%; font-family: var(--sans); border: 1px solid var(--line); background: var(--bg);
    padding: 10px 12px; color: var(--ink);
}
.shipping-estimate-btn {
    display: block;
    width: 100%;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    border: 1px solid var(--ink);
    color: var(--ink);
    padding: 10px 16px;
    margin-bottom: 14px;
    cursor: pointer;
}
.shipping-estimate-btn:hover { background: var(--ink); color: var(--cream); }
.form-error { color: var(--anti); font-size: 0.85rem; margin: 6px 0 0; }
.form-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 14px; }

/* ---------- Generic forms (admin uses this too) ---------- */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 0.85rem; margin-bottom: 6px; }
.field-group input, .field-group select, .field-group textarea {
    width: 100%; font-family: var(--sans); border: 1px solid var(--line); background: var(--bg);
    padding: 10px 12px; color: var(--ink);
}

/* ---------- Badges / small bits ---------- */
.badge-side {
    display: inline-block; font-size: 0.68rem; letter-spacing: 0.08em; padding: 3px 8px; color: var(--cream);
}
.badge-side.pro_ai { background: var(--pro); }
.badge-side.anti_ai { background: var(--anti); }

/* ---------- Scoreboard standalone page extras ---------- */
.scoreboard-page .score-history { max-width: 640px; margin: 40px auto 0; font-size: 0.9rem; color: var(--ink-soft); text-align: left; }

/* ---------- Flash / notices ---------- */
.notice { border: 1px solid var(--line); padding: 14px 18px; margin: 20px 0; font-size: 0.9rem; }
.notice.success { border-color: var(--pro); color: var(--pro); }
.notice.error { border-color: var(--anti); color: var(--anti); }

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; border-right: 1px solid var(--line); padding: 28px 20px; flex-shrink: 0;
}
.admin-sidebar .logo { display: block; margin-bottom: 30px; }
.admin-sidebar nav a { display: block; padding: 10px 0; font-size: 0.95rem; color: var(--ink-soft); }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: var(--ink); }
.admin-main { flex: 1; padding: 32px var(--gutter); max-width: 1100px; }
.admin-main h1 { font-size: 1.8rem; font-weight: 500; margin: 0 0 24px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--ink-soft); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.03em; }
.ajax-inline-form.saved-flash select,
.ajax-inline-form.saved-flash .status-pill { outline: 2px solid #3a8a4a; outline-offset: 1px; transition: outline-color 0.5s ease; }
.admin-login { max-width: 360px; margin: 10vh auto; padding: 0 20px; }
.status-pill { font-size: 0.72rem; padding: 3px 8px; border: 1px solid var(--line); display: inline-block; }
.status-pill.ok { border-color: var(--pro); color: var(--pro); }
.status-pill.warn { border-color: var(--anti); color: var(--anti); }
@media (max-width: 760px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
}
