:root {
    --brand-navy: #132444;
    --brand-navy-deep: #080f20;
    --brand-silver: #bfbfbb;
    --brand-white: #f7f7f4;
    --dealer-red: #8b3d32;
    --success: #286044;
    --danger: #923b3f;
    --content: 1240px;
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

:root,
[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0f1c35;
    --paper-deep: #080f20;
    --paper-light: #132444;
    --photo-well: #0f1c35;
    --surface: #132444;
    --surface-soft: rgba(19, 36, 68, .92);
    --page-glass: rgba(8, 15, 32, .76);
    --header-bg: rgba(8, 15, 32, .95);
    --ink: #f7f7f4;
    --muted: #bfbfbb;
    --rule: #46536c;
    --rule-dark: #7e8798;
    --dealer-green: #bfbfbb;
    --dealer-green-dark: #080f20;
    --focus: #f7f7f4;
    /* v3: navy painted beadboard from gemini "new" reference (cache-busted filename) */
    --store-wallpaper: url("/img/backgrounds/beadboard-navy-dark.jpg?v=3");
    color: var(--ink);
    background: var(--paper);
}

[data-theme="light"] {
    color-scheme: light;
    --paper: #b8c0c8;
    --paper-deep: #8f98a4;
    --paper-light: #e8ecf1;
    --photo-well: #c5cbd4;
    --surface: #f7f7f4;
    --surface-soft: rgba(247, 247, 244, .93);
    --page-glass: rgba(247, 247, 244, .86);
    --header-bg: rgba(247, 247, 244, .95);
    --ink: #132444;
    --muted: #4d586b;
    --rule: #999da3;
    --rule-dark: #666d78;
    --dealer-green: #132444;
    --dealer-green-dark: #0f1c35;
    --focus: #132444;
    /* v4: the nickel beadboard flat-fielded to an even, light surface that settles
       into solid colour toward the footer. Keeps the beading, drops the hotspot. */
    --store-wallpaper: url("/img/backgrounds/beadboard-nickel-light-soft.jpg?v=4");
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tabular { font-variant-numeric: tabular-nums; }
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.store-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--store-wallpaper);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* iOS/Safari: fixed backgrounds can glitch; cover still fills the page. */
@supports (-webkit-touch-callout: none) {
    .store-body {
        background-attachment: scroll;
    }
}

/* ═══ Shared add-to-cart button state ════════════════════════════════════════
   Keyed off [data-add-btn] rather than any page's own class, so the shop grid, the
   shop list and the card detail page all confirm an add the same way. The
   attribute+class selector (0,2,0) outranks .shop-add-icon / .cd-add (0,1,0), so it
   wins wherever it lands without needing !important. */
[data-add-btn].added {
    background: linear-gradient(135deg, #7ee2a0, #3fae6b 60%, #74dd97);
    color: #07231a;
    cursor: default;
    box-shadow: 0 6px 18px rgba(63, 174, 107, .32);
}
[data-add-btn].added:hover { transform: none; filter: none; }
[data-add-btn][disabled] { cursor: default; }
[data-add-btn].shake { animation: sgcAddShake .4s; }
@keyframes sgcAddShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Family shells: give the topbar arrow/burger a content column to align to.
   .checkout-shell is used by checkout + confirmation; .info-shell by the customer
   information pages, My orders, About and Donate. */
.checkout-shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 72px; color: var(--ink); }
.info-shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 72px; color: var(--ink); }
/* The info pages set their own narrower reading measure inside the shell. */
.info-shell .store-info-page, .info-shell .about-shop { width: 100%; margin-inline: auto; }

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: var(--ink);
    color: #fff;
    transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.store-header {
    position: relative;
    z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ink);
}

.market-search-shell {
    max-width: var(--content);
    margin: 0 auto;
    padding: 0 20px 16px;
}
.market-search {
    min-height: 56px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(145px, 190px) 124px;
    align-items: stretch;
    overflow: hidden;
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 0 7px 24px rgba(0,0,0,.14);
}
.market-search-icon { position: relative; }
.market-search-icon::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 15px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--muted);
    border-radius: 50%;
}
.market-search-icon::after {
    content: "";
    position: absolute;
    top: 31px;
    left: 27px;
    width: 7px;
    height: 2px;
    background: var(--muted);
    transform: rotate(45deg);
}
.market-search input,
.market-search select,
.market-search button {
    min-width: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
}
.market-search input { padding: 0 13px 0 4px; font-size: 1rem; }
.market-search input:focus,
.market-search select:focus { outline: 0; box-shadow: inset 0 0 0 3px var(--focus); }
.market-search select { padding: 0 36px 0 16px; border-left: 1px solid var(--rule); cursor: pointer; }
.market-search button {
    margin: 5px;
    color: var(--brand-white);
    background: var(--brand-navy);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 750;
}
.market-search button:hover { background: var(--brand-navy-deep); }

.store-header-inner {
    max-width: var(--content);
    min-height: 76px;
    margin: auto;
    padding: 10px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 34px;
}

.store-brand {
    position: relative;
    min-width: 188px;
    display: flex;
    gap: 11px;
    justify-content: start;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
}
.store-brand img { object-fit: contain; }
.store-brand-main { width: 188px; height: 64px; flex: 0 0 188px; border: 1px solid var(--rule); }
.store-brand-main-light { display: none; }
[data-theme="light"] .store-brand-main-dark { display: none; }
[data-theme="light"] .store-brand-main-light { display: block; }
.store-brand-compact { display: none; width: 58px; height: 58px; flex: 0 0 58px; }
.store-brand > span { display: grid; align-content: center; }
.store-brand strong {
    font-family: "Arial Narrow", "Franklin Gothic Medium", "Segoe UI", sans-serif;
    font-size: 1.42rem;
    letter-spacing: -.045em;
}
.store-brand small {
    margin-top: 5px;
    color: var(--muted);
    font-size: .62rem;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.store-nav {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 26px;
}
.store-nav a,
.store-account-nav > a,
.store-account-menu summary {
    color: var(--ink);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 650;
}
.store-nav a { position: relative; padding: 28px 0 25px; }
.store-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    background: transparent;
}
.store-nav a:hover::after,
.store-nav a.active::after { background: var(--dealer-green); }

.store-account-nav { display: flex; align-items: center; gap: 18px; }
.store-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 999px;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 700;
}
.store-theme-toggle:hover { border-color: var(--ink); }
.store-theme-track {
    position: relative;
    width: 38px;
    height: 20px;
    display: block;
    background: var(--brand-navy);
    border: 1px solid var(--brand-silver);
    border-radius: 999px;
}
.store-theme-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--brand-white);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    transition: transform .18s ease;
}
.store-theme-thumb::before {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--brand-navy);
    border-radius: 50%;
    transform: translate(3px, -2px);
}
.store-theme-toggle.is-light .store-theme-thumb { transform: translateX(18px); background: var(--brand-white); }
.store-theme-toggle.is-light .store-theme-thumb::before {
    inset: 4px;
    background: var(--brand-silver);
    transform: none;
}
.store-theme-toggle-mobile { display: none; padding: 5px; }
.store-cart-link { display: inline-flex; align-items: center; gap: 7px; }
.store-cart-count {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    color: #fff;
    background: var(--dealer-green);
    border-radius: 50%;
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
}

.store-account-menu { position: relative; }
.store-account-menu summary { cursor: pointer; list-style: none; padding: 10px 0; }
.store-account-menu summary::-webkit-details-marker { display: none; }
.store-account-menu summary::after { content: " ↓"; color: var(--muted); }
.store-account-menu[open] > div {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: 220px;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--ink);
}
.store-account-menu a,
.store-account-menu button {
    width: 100%;
    display: block;
    padding: 10px 11px;
    color: var(--ink);
    background: transparent;
    border: 0;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
}
.store-account-menu a:hover,
.store-account-menu button:hover { background: var(--paper); }
.store-account-menu form { margin: 0; border-top: 1px solid var(--rule); }

.store-mobile-menu { display: none; }

.operations-bar {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 max(20px, calc((100vw - var(--content)) / 2));
    color: #e7e9e4;
    background: var(--dealer-green-dark);
    border-bottom: 1px solid #0b211a;
}
.operations-bar span {
    margin-right: 5px;
    color: #bfcbbf;
    font-size: .63rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.operations-bar a {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    color: #eef2ed;
    text-decoration: none;
    font-size: .75rem;
}
.operations-bar a:hover,
.operations-bar a.active { border-bottom-color: #d2c295; }

.support-view-banner {
    position: sticky;
    top: 76px;
    z-index: 45;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 10px max(20px, calc((100vw - var(--content)) / 2));
    color: #352900;
    background: #f2df9e;
    border-bottom: 1px solid #8f761e;
}
.support-view-banner div { display: flex; flex-direction: column; }
.support-view-banner span { font-size: .77rem; }
.support-view-banner button {
    padding: 7px 10px;
    color: #352900;
    background: #fff9e9;
    border: 1px solid #6f5c18;
    cursor: pointer;
    font-weight: 700;
}

.store-main {
    flex: 1;
    width: min(calc(100% - 32px), calc(var(--content) + 48px));
    margin: 24px auto;
    background: var(--page-glass);
    border: 1px solid var(--rule);
    box-shadow: 0 22px 65px rgba(0,0,0,.25);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.store-main > * { max-width: var(--content); margin-right: auto; margin-left: auto; }

.marketplace-features { padding: 42px 20px 18px; }
.marketplace-section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 18px;
}
.marketplace-section-header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
    letter-spacing: -.035em;
}
.marketplace-section-header > a { color: var(--muted); font-size: .78rem; font-weight: 700; }
.marketplace-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
    gap: 14px;
}
.marketplace-feature-grid.single { grid-template-columns: minmax(0, 1fr); }
.marketplace-feature-card {
    min-width: 0;
    display: grid;
    background: var(--surface);
    border: 1px solid var(--rule-dark);
}
.marketplace-feature-card.primary { grid-template-columns: minmax(250px, 1.08fr) minmax(270px, .92fr); }
.marketplace-feature-card.secondary { grid-template-rows: auto minmax(220px, 1fr) auto; }
.marketplace-feature-label {
    grid-column: 1 / -1;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rule);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-align: center;
    text-transform: uppercase;
}
.marketplace-feature-image,
.marketplace-deal-image { display: grid; place-items: center; padding: 22px; background: var(--photo-well); text-decoration: none; }
.marketplace-slab-placeholder {
    width: min(240px, 80%);
    aspect-ratio: 4 / 5;
    display: grid;
    place-content: center;
    gap: 6px;
    color: var(--brand-white);
    background: var(--brand-navy);
    border: 9px solid var(--brand-silver);
    box-shadow: 0 12px 26px rgba(0,0,0,.24);
    text-align: center;
}
.marketplace-slab-placeholder span,
.marketplace-slab-placeholder small { font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; }
.marketplace-slab-placeholder strong { font-size: clamp(3rem, 6vw, 5rem); font-weight: 600; }
.marketplace-feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 28px; }
.marketplace-feature-copy > p,
.marketplace-deal-card p { margin: 0 0 7px; color: var(--muted); font-size: .7rem; }
.marketplace-feature-copy h2 { margin: 0 0 24px; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.15; }
.marketplace-feature-copy h2 a,
.marketplace-deal-card h3 a { text-decoration: none; }
.marketplace-feature-copy h2 a:hover,
.marketplace-deal-card h3 a:hover { text-decoration: underline; }
.marketplace-feature-price { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-top: 24px; }
.marketplace-feature-price strong { font-size: 1.55rem; }
.marketplace-feature-price a { color: var(--dealer-green); font-size: .76rem; font-weight: 750; }
.marketplace-feature-empty { padding: 34px; background: var(--surface-soft); border: 1px solid var(--rule); }
.marketplace-feature-empty h2 { margin: 0 0 8px; }
.marketplace-feature-empty > p:last-child { max-width: 700px; margin-bottom: 0; color: var(--muted); }

.marketplace-deals { padding: 18px 20px 24px; }
.marketplace-deals-heading { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); }
.marketplace-deals-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; }
.marketplace-deals-heading span { color: var(--muted); font-size: .7rem; }
.marketplace-deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--rule); }
.marketplace-deal-card { min-width: 0; display: grid; grid-template-columns: minmax(110px, .85fr) minmax(0, 1.15fr); background: var(--surface); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.marketplace-deal-image { padding: 14px; }
.marketplace-deal-placeholder { width: 100%; aspect-ratio: 4 / 5; display: grid; place-content: center; color: var(--brand-white); background: var(--brand-navy); border: 5px solid var(--brand-silver); text-align: center; }
.marketplace-deal-placeholder span { font-size: .55rem; text-transform: uppercase; }
.marketplace-deal-placeholder strong { font-size: 2.3rem; }
.marketplace-deal-card > div:last-child { padding: 18px 14px; }
.marketplace-deal-card h3 { min-height: 3.8em; margin: 0 0 15px; font-size: .92rem; line-height: 1.3; }
.marketplace-catalog-filters { grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; }
/* ═══ Unified glassy banner — ported from the basketball .global-status-alert ═══
   One system: rendered by _GlobalFlash in the layout, auto-dismisses after 5s. */
.global-flash {
    display: flex; align-items: center; gap: 11px;
    width: min(1180px, calc(100% - 32px)); margin: 16px auto 0;
    padding: 13px 16px; border-radius: 12px;
    background: rgba(7, 15, 31, .78);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--isl-shadow-card-sm, 0 8px 30px rgba(0,0,0,.38));
    color: #fff; font-weight: 700; font-size: .9rem;
    animation: globalFlashIn .4s ease-out;
}
.global-flash.success { border-left: 5px solid #28a745; }
.global-flash.error { border-left: 5px solid #ff4d5a; }
.global-flash > i:first-child { font-size: 1rem; }
.global-flash.success > i:first-child { color: #4ade80; }
.global-flash.error > i:first-child { color: #ff8791; }
.global-flash > span { flex: 1; min-width: 0; }
.global-flash-close { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #cfd6e2; cursor: pointer; }
.global-flash-close:hover { background: rgba(255,255,255,.16); color: #fff; }
.global-flash.out { animation: globalFlashOut .3s ease-in forwards; }
@keyframes globalFlashIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes globalFlashOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-14px); opacity: 0; } }
[data-theme="light"] .global-flash { background: rgba(19, 36, 68, .9); }
@media (prefers-reduced-motion: reduce) { .global-flash { animation: none; } }

.catalog-intro {
    padding: 70px 20px 58px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 70px;
    border-bottom: 1px solid var(--ink);
}
.store-section-label {
    margin: 0 0 12px;
    color: var(--dealer-green);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .115em;
    text-transform: uppercase;
}
.catalog-intro h1 {
    max-width: 760px;
    margin: 0;
    font-family: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(3.1rem, 6.4vw, 5.7rem);
    font-weight: 720;
    line-height: .96;
    letter-spacing: -.038em;
}
.catalog-intro-note { align-self: end; border-top: 4px solid var(--dealer-green); }
.catalog-intro-note > p { margin: 16px 0 24px; line-height: 1.65; }
.catalog-intro-note dl { margin: 0; border-top: 1px solid var(--rule-dark); }
.catalog-intro-note dl div {
    display: grid;
    grid-template-columns: 90px 1fr;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
}
.catalog-intro-note dt { color: var(--muted); font-size: .72rem; }
.catalog-intro-note dd { margin: 0; font-size: .78rem; font-weight: 650; }

.store-shop-section { padding: 48px 20px 90px; }
.collection-lead {
    max-width: 1240px; margin: 0 auto; padding: 68px 20px 36px;
    border-bottom: 1px solid var(--rule-dark);
}
.collection-lead h1 { max-width: 920px; margin: 12px 0 22px; font-size: clamp(3.5rem, 7vw, 7rem); line-height: .88; letter-spacing: -.065em; font-weight: 650; }
.collection-lead > p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.collection-highlights { max-width: 1240px; margin: 0 auto; padding: 48px 20px 12px; }
.highlight-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.highlight-card { min-width: 0; border: 1px solid var(--rule); background: var(--paper-light); }
.highlight-slab { min-height: 210px; padding: 24px; display: grid; align-content: space-between; color: #f6f2e8; background: var(--dealer-green); }
.highlight-slab span,.highlight-slab small { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.highlight-slab strong { font-size: 4.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.highlight-copy { padding: 20px; }
.highlight-copy > p,.highlight-copy > small { color: var(--muted); font-size: .72rem; }
.highlight-copy h3 { min-height: 3.2em; margin: 8px 0 18px; font-size: 1.08rem; line-height: 1.35; }
.store-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 17px;
}
.store-section-heading h2,
.store-page-heading h1 {
    margin: 0;
    font-family: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -.03em;
}
.store-section-heading > span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }

.store-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}
.store-filter-bar label,
.store-form-grid label { display: block; }
.store-filter-bar label > span,
.store-form-grid label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 700;
}
.store-filter-bar input,
.store-filter-bar select,
.store-form-grid input,
.store-form-grid select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--rule-dark);
    border-radius: 0;
}
.store-filter-bar input:focus,
.store-filter-bar select:focus,
.store-form-grid input:focus,
.store-form-grid select:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }

.store-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid var(--ink);
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
}
.store-button.primary { color: var(--brand-white); background: var(--brand-navy); border-color: var(--brand-silver); }
.store-button.primary:hover { background: var(--brand-navy-deep); }
.store-button.secondary { color: var(--ink); background: var(--surface); }
.store-button.wide { width: 100%; }

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    font-size: .72rem;
}
.active-filters > span { color: var(--muted); }
.active-filters a { padding: 4px 7px; background: var(--paper-deep); text-decoration: none; }
.active-filters a:hover { text-decoration: line-through; }
.active-filters a.clear { margin-left: auto; background: transparent; text-decoration: underline; }

.store-empty-catalog {
    max-width: 700px;
    margin: 54px 0 30px;
    padding: 25px 0 30px 26px;
    border-left: 4px solid var(--dealer-green);
}
.store-empty-catalog h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 550; letter-spacing: -.035em; }
.store-empty-catalog > p:not(.store-section-label) { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.7; }
.store-text-link { display: inline-block; margin-top: 16px; color: var(--dealer-green); font-weight: 700; }

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 28px;
    border-top: 1px solid var(--ink);
    border-left: 1px solid var(--ink);
}
.store-product-card {
    min-width: 0;
    background: var(--surface);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}
.store-product-image { display: block; padding: 20px; background: var(--photo-well); text-decoration: none; }
.store-image-placeholder {
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f1eee3;
    background: #333b36;
    border: 8px solid #bfc1ba;
    outline: 1px solid #575d58;
}
.store-image-placeholder span,
.store-image-placeholder small { font-size: .65rem; letter-spacing: .07em; text-transform: uppercase; }
.store-image-placeholder b { margin: 4px 0; font-size: 3.4rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.store-product-copy { padding: 17px 18px 18px; }
.store-product-meta,
.store-product-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: .7rem; }
.store-product-meta { color: var(--muted); }
.store-product-copy h3 { min-height: 48px; margin: 7px 0 16px; font-size: .95rem; line-height: 1.45; }
.store-product-copy h3 a { text-decoration: none; }
.store-product-copy h3 a:hover { text-decoration: underline; }
.store-card-subgrades { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.store-card-subgrades span { padding: 7px 4px; border-right: 1px solid var(--rule); text-align: center; }
.store-card-subgrades span:last-child { border-right: 0; }
.store-card-subgrades i,
.store-card-subgrades b { display: block; font-style: normal; }
.store-card-subgrades i { color: var(--muted); font-size: .56rem; }
.store-card-subgrades b { margin-top: 2px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.store-product-bottom { align-items: baseline; margin-top: 14px; }
.store-product-bottom strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.store-product-bottom a { color: var(--dealer-green); font-weight: 700; }

.store-breadcrumb,
.store-page-heading,
.store-detail,
.store-cart-layout,
.store-checkout-layout { padding-right: 20px; padding-left: 20px; }
.store-breadcrumb { display: flex; gap: 8px; padding-top: 24px; color: var(--muted); font-size: .72rem; }
.store-breadcrumb a { color: var(--dealer-green); }
.store-detail {
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr);
    gap: 64px;
    padding-top: 28px;
    padding-bottom: 86px;
}
.store-detail-media { max-width: 540px; }
.store-detail-placeholder {
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f4f1e8;
    background: #343c37;
    border: 12px solid #b9bcb6;
    outline: 1px solid #5e635f;
}
.store-detail-placeholder strong { margin: 7px 0; font-size: 4rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.store-detail-placeholder span,
.store-detail-placeholder small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.store-detail-media > p { color: var(--muted); font-size: .75rem; line-height: 1.6; }
.store-detail-copy h1 {
    margin: 5px 0 26px;
    font-family: "Arial Narrow", "Franklin Gothic Medium", "Segoe UI", sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.05em;
}
.grade-record { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.grade-overall { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.grade-overall span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.grade-overall strong { font-size: 2.3rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.store-subgrade-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.store-subgrade-grid div { padding: 11px 8px; border-right: 1px solid var(--rule); }
.store-subgrade-grid div:last-child { border-right: 0; }
.store-subgrade-grid span,
.store-subgrade-grid strong { display: block; }
.store-subgrade-grid span { color: var(--muted); font-size: .65rem; }
.store-subgrade-grid strong { margin-top: 3px; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.store-card-facts { margin: 26px 0; }
.store-card-facts div { display: grid; grid-template-columns: 150px 1fr; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.store-card-facts dt { color: var(--muted); font-size: .75rem; }
.store-card-facts dd { margin: 0; font-size: .83rem; font-weight: 650; }
.store-purchase-panel { display: grid; grid-template-columns: 150px 1fr; gap: 12px 20px; padding: 18px; background: var(--surface); border: 1px solid var(--ink); }
.store-purchase-panel > div span,
.store-purchase-panel > div small { display: block; color: var(--muted); font-size: .66rem; }
.store-purchase-panel > div strong { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.store-purchase-panel > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .67rem; }

.store-page-heading { padding-top: 52px; padding-bottom: 24px; }
.store-page-heading .store-kicker { margin: 0 0 8px; color: var(--dealer-green); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.store-page-heading > p:last-child { color: var(--muted); }
.store-cart-layout,
.store-checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 28px; padding-bottom: 80px; }
.store-cart-items { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.store-cart-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.store-cart-item.unavailable { opacity: .62; }
.store-cart-grade { width: 54px; height: 54px; display: grid; place-items: center; color: #fff; background: var(--dealer-green-dark); font-variant-numeric: tabular-nums; }
.store-cart-item span { color: var(--muted); font-size: .68rem; }
.store-cart-item h2 { margin: 3px 0; font-size: .9rem; }
.store-unavailable { color: var(--danger); font-size: .7rem; }
.store-link-button { color: var(--danger); background: none; border: 0; cursor: pointer; font-weight: 700; }
.store-order-summary { align-self: start; position: sticky; top: 94px; padding: 20px; background: var(--surface); border: 1px solid var(--ink); }
.store-order-summary h2 { margin: 0 0 15px; }
.store-order-summary > div,
.store-confirmation-items > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; }
.store-order-summary small { display: block; color: var(--muted); font-size: .66rem; }
.store-order-summary hr { border: 0; border-top: 1px solid var(--rule); }
.store-total { font-size: 1.15rem; border-top: 1px solid var(--ink); }
.store-warning,
.store-payment-note { padding: 12px; color: #5c4b17; background: #f5e9c6; border-left: 3px solid #9b7c22; font-size: .78rem; }
.store-checkout-form { padding: 22px; background: var(--surface); border: 1px solid var(--ink); }
.store-checkout-form h2 { margin-top: 0; }
.store-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.store-form-grid .span-2 { grid-column: span 2; }
.store-form-grid em { display: block; margin-top: 3px; color: var(--danger); font-size: .68rem; font-style: normal; }
.store-payment-note { margin-top: 20px; }
.store-payment-note p { margin: 5px 0 0; line-height: 1.5; }
.store-validation { color: var(--danger); background: #f3dede; }
.store-validation:empty,
.validation-summary-valid { display: none; }
.store-empty-cart,
.store-confirmation { max-width: 720px !important; margin: 38px auto 70px !important; padding: 45px 25px; background: var(--surface); border-top: 4px solid var(--dealer-green); text-align: center; }
.store-empty-cart h2,
.store-confirmation h1 { margin: 0 0 10px; font-size: 2rem; font-weight: 550; }
.store-empty-cart p,
.store-confirmation > p { color: var(--muted); }

.store-footer {
    margin-top: auto;
    padding: 40px max(20px, calc((100vw - var(--content)) / 2));
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 26px 60px;
    color: #e9ebe6;
    background: #202a25;
    border-top: 5px solid var(--dealer-green);
}
.store-footer-identity { display: flex; align-items: center; gap: 20px; }
.store-footer-identity img { width: 132px; height: 132px; flex: 0 0 132px; object-fit: contain; }
.store-footer-identity strong { font-size: 1.05rem; }
.store-footer p { max-width: 600px; margin: 8px 0 0; color: #bfc7c0; font-size: .76rem; line-height: 1.6; }
.store-footer nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px 20px; }
.store-footer a { color: #edf0eb; font-size: .76rem; }
.store-footer small { grid-column: 1 / -1; padding-top: 18px; color: #9ca79f; border-top: 1px solid #47534c; font-size: .68rem; }

@media (max-width: 1060px) {
    .store-header-inner { gap: 20px; }
    .store-nav { gap: 17px; }
    .store-theme-toggle-desktop > [data-store-theme-label] { display: none; }
    .store-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-filter-search { grid-column: span 2; }
    .marketplace-feature-grid { grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); }
    .marketplace-feature-card.primary { grid-template-columns: minmax(210px, 1fr) minmax(240px, 1fr); }
    .marketplace-deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .store-header-inner { min-height: 68px; grid-template-columns: 1fr auto auto auto; padding: 9px 14px; }
    .store-brand { min-width: 0; }
    .store-brand-main,
    [data-theme="light"] .store-brand-main-light { display: none; }
    .store-brand-compact { display: block; width: 50px; height: 50px; flex-basis: 50px; }
    .store-brand small { display: none; }
    .store-nav { display: none; }
    .store-theme-toggle-desktop { display: none; }
    .store-theme-toggle-mobile { display: inline-flex; }
    .store-account-nav > :not(.store-cart-link) { display: none; }
    .store-mobile-menu { display: block; position: relative; }
    .store-mobile-menu summary { padding: 8px 0 8px 10px; cursor: pointer; list-style: none; font-size: .78rem; font-weight: 700; }
    .store-mobile-menu summary::-webkit-details-marker { display: none; }
    .store-mobile-menu[open] nav { position: absolute; top: calc(100% + 12px); right: 0; width: min(300px, calc(100vw - 28px)); padding: 7px; background: var(--surface); border: 1px solid var(--ink); }
    .store-mobile-menu nav a { display: block; padding: 11px; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: .82rem; }
    .operations-bar { overflow-x: auto; gap: 18px; padding: 0 14px; white-space: nowrap; }
    .catalog-intro { grid-template-columns: 1fr; gap: 42px; padding-top: 50px; }
    .highlight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .store-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .marketplace-feature-grid { grid-template-columns: 1fr; }
    .marketplace-feature-card.secondary { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; }
    .marketplace-feature-card.secondary .marketplace-feature-label { grid-column: 1 / -1; }
    .store-detail,
    .store-cart-layout,
    .store-checkout-layout { grid-template-columns: 1fr; }
    .store-order-summary { position: static; }
    .store-detail { gap: 30px; }
    .store-detail-media { width: 100%; margin: auto; }
    .store-footer { grid-template-columns: 1fr; }
    .store-footer-identity img { width: 104px; height: 104px; flex-basis: 104px; }
    .store-footer nav { justify-content: start; }
    .store-footer small { grid-column: auto; }
    .support-view-banner { top: 68px; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .store-brand > span { display: none; }
    .store-brand-compact { width: 54px; height: 54px; flex-basis: 54px; }
    .store-main { width: calc(100% - 16px); margin-top: 10px; margin-bottom: 10px; }
}

@media (max-width: 560px) {
    .market-search-shell { padding: 0 10px 12px; }
    .market-search {
        grid-template-columns: 34px minmax(0, 1fr) 94px;
        grid-template-rows: 50px 44px;
        border-radius: 19px;
    }
    .market-search-icon { grid-column: 1; grid-row: 1; }
    .market-search-icon::before { top: 15px; left: 12px; }
    .market-search-icon::after { top: 28px; left: 24px; }
    .market-search input { grid-column: 2; grid-row: 1; font-size: .88rem; }
    .market-search button { grid-column: 3; grid-row: 1; }
    .market-search select { grid-column: 1 / -1; grid-row: 2; padding-left: 16px; border-top: 1px solid var(--rule); border-left: 0; }
    .marketplace-features { padding: 30px 10px 12px; }
    .marketplace-section-header { align-items: flex-start; flex-direction: column; gap: 10px; }
    .marketplace-feature-card.primary,
    .marketplace-feature-card.secondary { grid-template-columns: 1fr; grid-template-rows: auto; }
    .marketplace-feature-card.secondary .marketplace-feature-label { grid-column: 1; }
    .marketplace-feature-image { min-height: 280px; }
    .marketplace-feature-copy { padding: 22px 16px; }
    .marketplace-feature-price { align-items: flex-start; flex-direction: column; }
    .marketplace-deals { padding: 12px 10px 18px; }
    .marketplace-deals-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .marketplace-deal-grid { grid-template-columns: 1fr; }
    .marketplace-catalog-filters { grid-template-columns: 1fr; }
    .store-account-nav { gap: 9px; }
    .catalog-intro { padding: 42px 13px 40px; }
    .catalog-intro h1 { font-size: clamp(2.9rem, 16vw, 4.4rem); }
    .store-shop-section { padding: 38px 13px 65px; }
    .collection-lead { padding: 48px 13px 30px; }
    .collection-lead h1 { font-size: clamp(3.1rem,15vw,5rem); }
    .collection-highlights { padding: 38px 13px 8px; }
    .highlight-grid { grid-template-columns: 1fr; }
    .store-section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .store-filter-bar { grid-template-columns: 1fr; }
    .store-filter-search { grid-column: auto; }
    .active-filters a.clear { margin-left: 0; }
    .store-product-grid { grid-template-columns: 1fr; }
    .store-product-image { padding: 16px 32px; }
    .store-detail,
    .store-breadcrumb,
    .store-page-heading,
    .store-cart-layout,
    .store-checkout-layout { padding-right: 13px; padding-left: 13px; }
    .store-subgrade-grid { grid-template-columns: repeat(2, 1fr); }
    .store-subgrade-grid div:nth-child(2) { border-right: 0; }
    .store-subgrade-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
    .store-card-facts div { grid-template-columns: 125px 1fr; }
    .store-purchase-panel { grid-template-columns: 1fr; }
    .store-purchase-panel > p { grid-column: auto; }
    .store-cart-item { grid-template-columns: 48px 1fr auto; }
    .store-cart-item > form { grid-column: 2 / -1; }
    .store-form-grid { grid-template-columns: 1fr; }
    .store-form-grid .span-2 { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
.store-shipping-quote { display: grid !important; gap: 2px; padding: 10px 0 !important; color: var(--dealer-green); }
.store-shipping-quote small { color: var(--muted); font-size: .7rem; }

/* Card photography ---------------------------------------------------------- */
.marketplace-feature-image img,
.marketplace-deal-image img,
.store-product-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 7;
    /* Never crop or stretch a card photo: show the whole card, letterboxed on the photo well. */
    object-fit: contain;
    image-orientation: from-image;
}
.marketplace-feature-card.primary .marketplace-feature-image img { aspect-ratio: 4 / 5; }
.store-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}
.store-detail-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    image-orientation: from-image;
}

/* Footer division line ------------------------------------------------------ */
.store-footer-division {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Unified navigation: back | identity | page | theme | cart | global menu. */
.store-header-inner { display: flex; gap: 16px; }
.store-back-button {
    width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-content: center;
    color: var(--ink); border: 1px solid var(--rule); text-decoration: none;
}
.store-back-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.store-back-button:hover { border-color: var(--ink); }
.store-page-title {
    min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--muted);
    font-size: .75rem; font-weight: 800; letter-spacing: .06em;
    text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.store-cart-icon {
    position: relative; width: 42px; height: 42px; flex: 0 0 42px;
    display: grid; place-content: center; color: var(--ink);
    border: 1px solid var(--rule); text-decoration: none;
}
.store-cart-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.store-cart-icon .store-cart-count {
    position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; font-size: .6rem;
}
.store-global-menu, .operations-menu { position: relative; flex: 0 0 auto; }
.store-global-menu > summary, .operations-menu > summary {
    list-style: none; display: grid; place-content: center; gap: 4px;
    width: 46px; height: 46px; padding: 0; color: var(--ink);
    border: 1px solid var(--rule); cursor: pointer;
}
.store-global-menu > summary::-webkit-details-marker,
.operations-menu > summary::-webkit-details-marker { display: none; }
.store-global-menu > summary span, .operations-menu > summary span {
    width: 20px; height: 2px; display: block; background: currentColor;
}
.store-global-menu[open] > nav, .operations-menu[open] > nav {
    position: absolute; z-index: 100; top: calc(100% + 7px); right: 0;
    width: 230px; padding: 7px; color: var(--ink); background: var(--surface);
    border: 1px solid var(--ink); box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.store-global-menu nav a, .store-global-menu nav button, .operations-menu nav a {
    width: 100%; box-sizing: border-box; display: block; padding: 11px 12px;
    color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--rule);
    text-align: left; text-decoration: none; font: inherit; font-size: .82rem; cursor: pointer;
}
.store-global-menu nav a:hover, .store-global-menu nav button:hover,
.operations-menu nav a:hover { background: var(--paper); }
.store-global-menu nav form { margin: 0; }
.operations-bar { justify-content: space-between; padding-top: 5px; padding-bottom: 5px; overflow: visible; }
.operations-menu > summary { width: 34px; height: 30px; color: #eef2ed; border-color: #63758b; }
.operations-menu > summary span { width: 15px; height: 1px; }
.operations-menu[open] > nav { top: calc(100% + 6px); }

@media (max-width: 760px) {
    .store-header-inner { min-height: 64px; gap: 9px; padding: 8px 10px; }
    .store-brand { min-width: 0; margin-right: auto; }
    .store-brand-main, [data-theme="light"] .store-brand-main-light { display: none; }
    .store-brand-compact { display: block; width: 46px; height: 46px; flex-basis: 46px; }
    .store-page-title { display: none; }
    .store-theme-toggle-desktop { display: none; }
    .store-theme-toggle-mobile { display: inline-flex; }
    .store-back-button, .store-cart-icon { width: 40px; height: 40px; flex-basis: 40px; }
    .store-global-menu > summary { width: 40px; height: 40px; }
    .store-global-menu[open] > nav {
        position: fixed; top: 66px; right: 10px; width: min(320px, calc(100vw - 20px));
        max-height: calc(100dvh - 78px); overflow-y: auto;
    }
    .operations-bar { padding-right: 10px; padding-left: 10px; }
}
