@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ============ RESET ============ */

*, *::before, *::after {
    padding: 0; margin: 0;
    box-sizing: border-box;
}

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html.no-scroll { overflow: hidden; }

:root {
    --bg:          #1a1a1a;
    --card-bg:     #dddde8;
    --text:        #f0f0f0;
    --text-dim:    #888;
    /* Army green. #8A9A5B gives 5.7:1 as text on --bg and 6.9:1 as a button
       background under black text — both clear WCAG AA (4.5:1) for normal-size
       text, which is what this site uses everywhere (nothing here qualifies as
       "large text"). #6F7E4A (hover/active) still clears 4.5:1 against black. */
    --accent:      #8A9A5B;
    --accent-dark: #6F7E4A;
    --border:      rgba(255,255,255,0.10);
    --font:        'JetBrains Mono', monospace;
    --header-h:    60px;
    --footer-h:    42px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    overflow-x: hidden;
}

body, button, input, select, textarea {
    font-family: var(--font) !important;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text);
    word-wrap: break-word;
}

/* Themed dropdowns sitewide — strip the OS-native arrow/box and draw our
   own, so selects match the rest of the UI instead of looking like browser
   chrome. #v97-fx-sel (footer currency picker) is excluded here since it's
   a deliberately compact, minimal control with its own tuned styling
   (injected by currency.js) — it gets a matching but smaller arrow there. */
select:not(#v97-fx-sel) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    padding-right: 32px !important;
    cursor: pointer;
}

select:not(#v97-fx-sel)::-ms-expand {
    display: none;
}

select:not(#v97-fx-sel) option {
    background: var(--bg);
    color: var(--text);
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
img.refferal_badge { visibility: hidden; }


/* ============================================================
   HEADER  —  transparent
   ============================================================ */

header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 90;
    background: transparent;
    /* needed so absolutely-positioned children (mobile BAG) anchor here */
    /* desktop-header already uses position:absolute for nav-center — no change needed */
}

/* ---- Desktop ---- */
.desktop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 2.5em;
}

.desktop-header .logo img {
    width: 250px;
    height: auto;
    margin-top: 0px;
    /* filter: drop-shadow(0 2px 10px rgba(0,0,0,0.7)); */
}

/* Centre nav — absolutely centred so BAG can be far right */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 3.5em;
    list-style: none;
}

.nav-center a {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s;
}

.nav-center a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.25s;
}

.nav-center a:hover { color: var(--accent); }
.nav-center a:hover::after { width: 100%; }

.bag-link {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font) !important;
    transition: color 0.2s;
}
.bag-link:hover { color: var(--accent); }

/* ---- Mobile ---- */
/* Three equal flex columns: [logo] [BAG] [hamburger]
   Each takes flex:1 so BAG is always the true visual midpoint */
.mobile-header {
    display: flex;
    align-items: center;
    height: var(--header-h);
    padding: 0 1.4em;
}

.mobile-header .logo-mobile {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.mobile-header .logo-mobile img {
    width: 130px;
    height: auto;
    margin-top: -4px;
}

/* BAG — middle third, perfectly centred */
.mobile-bag {
    flex: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

/* Hamburger — right third, right-aligned, 44px tall touch target */
.menu-button {
    flex: 1;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.menu-line {
    width: 22px;
    height: 1.5px;
    background: var(--text);
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger → X: driven off aria-expanded (already toggled by openNav/
   closeNav) rather than a separate class, so the two states can't drift
   apart. 3.75px = half of (line height + gap), so each line's rotation
   pivots land on the same point and form a clean X. */
.menu-button[aria-expanded="true"] .menu-line:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-line:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}


/* ============================================================
   MOBILE MENU OVERLAY
   z-index < footer (95) so footer is always visible on top
   ============================================================ */

.mobile-menu {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    inset: 0;
    z-index: 80;           /* below footer at 95 */
    background: var(--bg);
    display: flex;
    flex-direction: column;
    /* leave room for header at top, footer at bottom */
    padding-top: var(--header-h);
    padding-bottom: var(--footer-h);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mobile-menu.open {
    visibility: visible;
    opacity: 1;
}

/* Nav links */
.mobile-menu-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobile-menu li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding: 1.15em 0;
}

.mobile-menu li:first-child { border-top: 1px solid var(--border); }

.mobile-menu a {
    font-size: 25px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--accent); }


/* ============================================================
   FOOTER  —  transparent, always on top (above mobile menu)
   ============================================================ */

footer {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 95;          /* above mobile menu (80) and header (90) */
}

footer .social-icon { display: none !important; }

footer p {
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

/* ---- Mobile footer: currency + language on one row, tagline below ----
   Both widgets are appended as separate <footer> children by their own
   scripts (currency.js, langSwitcher.js), so a fixed-height column stack
   of all three (widget, widget, tagline) ran taller than --footer-h and
   got clipped by the viewport edge. Row + wrap keeps the two compact
   widgets side by side and pushes the tagline (flex-basis:100%) onto its
   own line, so two rows fit comfortably instead of three. Height is
   min-height (not a fixed height) so it never clips real content. */
@media only screen and (max-width: 768px) {
    :root {
        --footer-h: 76px;
    }

    footer {
        height: auto !important;
        min-height: var(--footer-h);
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        row-gap: 8px !important;
        column-gap: 16px !important;
        padding: 10px 1.4em !important;
    }

    footer p {
        font-size: 8.5px;
        letter-spacing: 0.16em;
        opacity: 0.55;
        order: 2;
        flex-basis: 100%;
    }

    /* Currency widget row */
    #v97-fx {
        order: 1;
        justify-content: center !important;
        gap: 12px !important;
        padding: 0 !important;
        border: none !important;
    }

    #v97-fx-sel {
        font-size: 10px !important;
        letter-spacing: 0.18em !important;
        padding: 4px 14px 4px 12px !important;
        border-left: 1px solid var(--border) !important;
        min-width: 64px !important;
    }

    #v97-lang-switcher {
        order: 1;
        justify-content: center !important;
    }
}


/* ============================================================
   LANGUAGE SWITCHER (footer)
   ============================================================ */

#v97-lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

#v97-lang-switcher button {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font) !important;
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    cursor: pointer;
}

#v97-lang-switcher button.active {
    color: var(--accent);
}

#v97-lang-switcher button:hover {
    color: var(--text);
}

#v97-lang-switcher button + button {
    border-left: 1px solid var(--border);
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-container {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
    padding-bottom: calc(var(--footer-h) + 16px);
}


/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ============================================================
   RESPONSIVE — MOBILE  ≤ 768px
   ============================================================ */

@media only screen and (max-width: 768px) {

    .desktop-header { display: none !important; }
    .mobile-header  { display: flex; }

    .main-container {
        padding-top: var(--header-h);
        padding-bottom: calc(var(--footer-h) + 10px);
    }

    /* iOS Safari auto-zooms the page on focus when a form field's
       font-size is under 16px — every input/select/textarea here runs
       9-11px for the site's aesthetic, so force 16px just on mobile to
       stop the zoom without changing the desktop look. */
    input, select, textarea {
        font-size: 16px !important;
    }
}


/* ============================================================
   RESPONSIVE — DESKTOP  ≥ 769px
   ============================================================ */

@media only screen and (min-width: 769px) {

    .mobile-header { display: none !important; }
    .mobile-menu   { display: none !important; }
    .desktop-header { display: flex !important; }
}


/* focus ring */
input:focus, textarea:focus, select:focus {
    outline: 1px solid var(--accent);
    outline-offset: 0;
}

/* Keyboard-only focus ring for everything clickable — :focus-visible skips
   this on mouse/touch clicks, so it doesn't add an outline the mouse-driven
   design wasn't built around, only when someone's actually tabbing. */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ============================================================
   SUPABASE CATALOG  —  replaces the Ecwid grid (Phase 1)
   Same visual language as the .grid-product rules above,
   but self-contained (no Ecwid ancestor classes required).
   ============================================================ */

.v97-catalog-page {
    padding: 0 2.5em;
}

.v97-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6em;
    padding: 0 0 1.4em;
    border-bottom: 1px solid var(--border);
    /* The header logo (width:250px / 130px, height:auto against a 1029x743
       source) renders taller than the 60px header and overflows below it —
       this clears that overflow so the filter row doesn't sit under it. */
    margin: 20px 0 0;
}

@media only screen and (min-width: 769px) {
    .v97-filters {
        margin-top: 64px;
    }
}

.v97-filter-btn {
    background: none;
    border: none;
    font-family: var(--font) !important;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0 0 2px;
    position: relative;
}

.v97-filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.2s;
}

.v97-filter-btn:hover { color: var(--text); }
.v97-filter-btn.active { color: var(--accent); }
.v97-filter-btn.active::after { width: 100%; }

.v97-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    width: 100%;
}

.v97-product {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-right: 1px solid var(--border);
    cursor: pointer;
}

.v97-product:nth-child(4n) { border-right: none; }

.v97-product__image-wrap {
    background-color: var(--card-bg);
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v97-product__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v97-product__info {
    padding: 10px 10px 20px;
    border-bottom: 1px solid var(--border);
    flex: 1;
}

.v97-product__title {
    color: var(--text);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}

.v97-product__price {
    color: var(--accent);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.03em;
    display: block;
    margin-top: 4px;
}

.v97-catalog-empty, .v97-catalog-error {
    padding: 3em 0;
    color: var(--text-dim);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    grid-column: 1 / -1;
}

@media only screen and (max-width: 768px) {
    .v97-grid { grid-template-columns: repeat(2, 1fr); }
    .v97-product:nth-child(4n) { border-right: 1px solid var(--border); }
    .v97-product:nth-child(2n) { border-right: none; }
    .v97-product__title { font-size: 10px; }
    .v97-product__price { font-size: 13px; }
}


/* ============================================================
   PRODUCT PAGE
   ============================================================ */

.v97-product-page {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3em;
    padding: 1em 0 3em;
}

.v97-product-page__main-image {
    background: var(--card-bg);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.v97-product-page__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v97-product-page__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.v97-product-page__thumb {
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 1px solid transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.v97-product-page__thumb.active { border-color: var(--accent); }

.v97-product-page__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v97-product-page__back {
    display: inline-block;
    color: var(--text-dim);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.4em;
}

.v97-product-page__back:hover { color: var(--accent); }

.v97-product-page__title {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6em;
}

.v97-product-page__price {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 1.2em;
}

.v97-product-page__desc {
    color: var(--text-dim);
    font-size: 10.5px;
    line-height: 1.8;
    margin-bottom: 1.6em;
}

/* Description is admin-authored rich text (Quill) rendered as real HTML —
   style the elements it actually produces (paragraphs, bold/italic/
   underline, lists) instead of relying on inherited defaults. */
.v97-product-page__desc p { margin: 0 0 1em; }
.v97-product-page__desc p:last-child { margin-bottom: 0; }
.v97-product-page__desc strong { color: var(--text); font-weight: 700; }
.v97-product-page__desc em { font-style: italic; }
.v97-product-page__desc u { text-decoration: underline; }
.v97-product-page__desc ul, .v97-product-page__desc ol {
    margin: 0 0 1em 1.4em;
}
.v97-product-page__desc li { margin-bottom: 0.4em; }

.v97-product-page__option-group {
    margin-bottom: 1.2em;
}

.v97-product-page__option-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.6em;
}

.v97-product-page__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v97-product-page__swatch {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    font-family: var(--font) !important;
    font-size: 10.5px;
    letter-spacing: 0.03em;
    padding: 8px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.v97-product-page__swatch:hover {
    border-color: rgba(255,255,255,0.4);
}

.v97-product-page__swatch.selected {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 700;
}

.v97-product-page__qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.4em;
}

.v97-product-page__qty label {
    color: var(--text-dim);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    margin-right: 6px;
}

.v97-product-page__qty button {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.v97-product-page__add {
    display: block;
    width: 100%;
    background-color: var(--accent);
    border: none;
    color: #000;
    font-weight: 700;
    font-family: var(--font) !important;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px;
    cursor: pointer;
}

.v97-product-page__add:disabled {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-dim);
    cursor: not-allowed;
}

@media only screen and (max-width: 768px) {
    .v97-product-page {
        grid-template-columns: 1fr;
        gap: 1.6em;
    }
}

/* ── Gallery: zoom-on-hover + lightbox ── */

.v97-product-page__main-image--zoomable {
    cursor: zoom-in;
}

.v97-product-page__main-image--zoomable img {
    transition: transform 0.25s ease;
}

.v97-product-page__main-image--zoomable img.zoomed {
    transform: scale(1.7);
}

@media (hover: none) {
    /* Hover-to-zoom doesn't translate to touch — swipe is the mobile
       equivalent, wired separately — so drop the zoom cursor/affordance
       there instead of showing a desktop-only interaction hint. */
    .v97-product-page__main-image--zoomable { cursor: default; }
}

.v97-lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v97-lightbox.open {
    visibility: visible;
    opacity: 1;
}

.v97-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.92);
}

.v97-lightbox__panel {
    position: relative;
    max-width: min(90vw, 900px);
    max-height: 85vh;
    display: flex;
    touch-action: pan-y;
}

.v97-lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.v97-lightbox__close,
.v97-lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text);
    cursor: pointer;
}

.v97-lightbox__close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.v97-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.v97-lightbox__prev { left: 20px; }
.v97-lightbox__next { right: 20px; }

@media only screen and (max-width: 768px) {
    .v97-lightbox__prev { left: 8px; }
    .v97-lightbox__next { right: 8px; }
    .v97-lightbox__close { top: 12px; right: 12px; }
}

/* ── Product page discovery (related / complete the look / recently viewed) ── */

.v97-product-page__section {
    border-top: 1px solid var(--border);
    margin-top: 1em;
    padding: 2em 0 2.5em;
}


/* ============================================================
   404
   ============================================================ */

.v97-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4em 1em 5em;
}

.v97-404__mark {
    font-size: clamp(90px, 22vw, 220px);
    line-height: 0.85;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    margin: 0;
    transform: rotate(-3deg);
    animation: v97-404-in 0.6s cubic-bezier(.16,1,.3,1);
}

@keyframes v97-404-in {
    from { transform: rotate(-3deg) scale(0.85); opacity: 0; }
    to { transform: rotate(-3deg) scale(1); opacity: 1; }
}

.v97-404__title {
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0.6em 0 0.5em;
}

.v97-404__desc {
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.8;
    max-width: 380px;
    margin: 0 0 1.8em;
}

.v97-404__cta {
    display: inline-block;
    background-color: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 28px;
}

.v97-404__cta:hover { background-color: var(--accent-dark); }

@media (prefers-reduced-motion: reduce) {
    .v97-404__mark { animation: none; }
}

@media only screen and (max-width: 768px) {
    .v97-404 { padding: 2.5em 1em 4em; }
}


/* ============================================================
   CHECKOUT + ORDER CONFIRMATION (Phase 3)
   ============================================================ */

.v97-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;
    padding: 1em 0 3em;
}

.v97-checkout__summary,
.v97-checkout__form {
    display: flex;
    flex-direction: column;
    gap: 0.9em;
}

.v97-checkout h2 {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.6em;
}

.v97-checkout__line {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.v97-checkout__total {
    color: var(--accent);
    font-size: 12px;
    border-bottom: none;
    padding-top: 12px;
}

.v97-checkout__form label {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.v97-checkout__form input,
.v97-checkout__form select {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    font-family: var(--font) !important;
    font-size: 10.5px;
    padding: 11px;
    width: 100%;
}

.v97-checkout__form button {
    background-color: var(--accent);
    border: none;
    color: #000;
    font-weight: 700;
    font-family: var(--font) !important;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px;
    cursor: pointer;
    margin-top: 0.6em;
}

.v97-checkout__form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.v97-checkout__error {
    color: #ff6b6b;
    font-size: 10px;
}

.v97-phone-row {
    display: flex;
    gap: 0.5em;
}

.v97-phone-row select {
    flex: 0 0 auto;
    width: auto !important;
    max-width: 8em;
}

.v97-phone-row input {
    flex: 1;
    min-width: 0;
}

/* At mobile's forced 16px input font-size (iOS zoom guard, above), the
   country select's "Country (+code)" text and the tel input's
   placeholder no longer fit side by side in an 8em column — stack them
   full-width instead of clipping. */
@media only screen and (max-width: 768px) {
    .v97-phone-row {
        flex-direction: column;
    }

    .v97-phone-row select {
        max-width: none;
        width: 100% !important;
    }
}

.v97-address-field {
    position: relative;
}

.v97-address-hint {
    font-size: 8.5px !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    color: #555 !important;
    margin-top: 0.4em;
}

.v97-address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--bg);
    border: 1px solid rgba(255,255,255,0.18);
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
}

.v97-address-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font) !important;
    font-size: 10px;
    line-height: 1.5;
    padding: 10px 12px;
    cursor: pointer;
}

.v97-address-suggestion:last-child {
    border-bottom: none;
}

.v97-address-suggestion:hover,
.v97-address-suggestion:focus {
    background: rgba(255,255,255,0.06);
    color: var(--accent);
}

@media only screen and (max-width: 768px) {
    .v97-checkout { grid-template-columns: 1fr; gap: 2em; }
}

.v97-confirmation {
    max-width: 480px;
    padding: 2em 0 4em;
}

.v97-confirmation h1 {
    font-size: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1em;
    color: var(--accent);
}

.v97-confirmation p {
    font-size: 10.5px;
    margin-bottom: 1em;
}

.v97-order-number-block {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    border: 1px solid var(--border);
    padding: 1em 1.2em;
    margin-bottom: 1.5em;
}

.v97-order-number-block span {
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.v97-order-number-block strong {
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.v97-order-number-block small {
    font-size: 9px;
    color: var(--text-dim);
}

/* ── Delivery options + promo code (checkout) ── */

.v97-delivery-options {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.v97-delivery-option {
    display: flex;
    align-items: center;
    gap: 0.8em;
    border: 1px solid var(--border);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 10.5px;
}

.v97-delivery-option:has(input:checked) {
    border-color: var(--accent);
}

.v97-delivery-option__name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.v97-delivery-option__name small {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: none;
    letter-spacing: 0.02em;
}

.v97-delivery-option__fee {
    font-weight: 700;
    color: var(--accent);
}

.v97-promo-field {
    display: flex;
    gap: 0.5em;
    margin-top: 1em;
}

.v97-promo-field input {
    flex: 1;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    font-family: var(--font) !important;
    font-size: 10.5px;
    padding: 10px;
}

.v97-promo-field button {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 16px;
    cursor: pointer;
}

.v97-promo-field button:hover {
    background-color: var(--accent);
    color: #000;
}

.v97-points-toggle {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin-top: 0.8em;
    font-size: 9.5px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    cursor: pointer;
}

.v97-points-toggle input {
    width: auto;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ── Order tracking timeline ── */

.v97-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.v97-timeline__step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.8em;
    padding: 6px 0;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.v97-timeline__step--done {
    opacity: 1;
}

/* Connecting line behind each dot, running down to the next step — filled
   in for completed steps so progress reads as one continuous bar, not just
   isolated dots lighting up. */
.v97-timeline__step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 12px;
    width: 1px;
    height: calc(100% - 6px);
    background: var(--border);
}

.v97-timeline__step--done:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 12px;
    width: 1px;
    height: calc(100% - 6px);
    background: var(--accent);
    transform: scaleY(1);
    transform-origin: top;
    animation: v97-timeline-fill 0.5s ease;
}

@keyframes v97-timeline-fill {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.v97-timeline__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-dim);
    margin-top: 3px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.v97-timeline__step--done .v97-timeline__dot {
    background: var(--accent);
}

.v97-timeline__step--active .v97-timeline__dot {
    box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.25);
    animation: v97-timeline-pulse 1.8s ease-in-out infinite;
}

@keyframes v97-timeline-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(138, 154, 91, 0.12); }
}

.v97-timeline__label {
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.v97-timeline__label small {
    font-size: 9px;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
    .v97-timeline__step--done:not(:last-child)::after,
    .v97-timeline__step--active .v97-timeline__dot {
        animation: none;
    }
}

/* ── Order tracking search ── */

.v97-track-search {
    max-width: 460px;
    margin-bottom: 2em;
    padding: 1.6em;
    border: 1px solid var(--border);
}

.v97-track-search__icon {
    color: var(--accent);
    font-size: 20px;
    margin-bottom: 0.7em;
}

/* ── Shared empty state (empty cart, no orders, no results, not found) ── */

.v97-empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7em;
    padding: 2.4em 0;
    max-width: 360px;
}

.v97-empty-state__icon {
    color: var(--text-dim);
    opacity: 0.85;
}

.v97-empty-state__icon svg {
    display: block;
    width: 36px;
    height: 36px;
}

.v97-empty-state__title {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
}

.v97-empty-state__desc {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.6;
}

.v97-empty-state__cta {
    display: inline-block;
    margin-top: 0.3em;
    background: none;
    border: none;
    padding: 0 0 2px;
    color: var(--accent);
    font-family: var(--font) !important;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent);
    cursor: pointer;
}

.v97-empty-state__cta:hover { opacity: 0.8; }

/* ── Section heading (small-caps label used above content blocks) ── */

.v97-section-heading {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 1.5em 0 0.6em;
}

.v97-section-heading--title {
    font-size: 15px;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1em;
}


/* ============================================================
   CART DRAWER (Phase 2)
   ============================================================ */

.v97-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
    pointer-events: none;
}

.v97-cart-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

.v97-cart-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.v97-cart-drawer.open .v97-cart-drawer__backdrop {
    opacity: 1;
}

.v97-cart-drawer__panel {
    position: absolute;
    top: 0; right: 0;
    height: 100%;
    width: 380px;
    max-width: 100%;
    background: var(--bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.v97-cart-drawer.open .v97-cart-drawer__panel {
    transform: translateX(0);
}

.v97-cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4em 1.4em 1em;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.v97-cart-drawer__close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.v97-cart-drawer__items {
    flex: 1;
    overflow-y: auto;
    padding: 1em 1.4em;
}

.v97-cart-drawer__empty {
    color: var(--text-dim);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2em;
}

.v97-cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.v97-cart-item__image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: var(--card-bg);
}

.v97-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v97-cart-item__info { flex: 1; min-width: 0; }

.v97-cart-item__title {
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.v97-cart-item__variant {
    color: var(--text-dim);
    font-size: 9.5px;
    margin-top: 2px;
}

.v97-cart-item__price {
    color: var(--accent);
    font-size: 11px;
    margin-top: 4px;
}

.v97-cart-item__qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.v97-cart-item__qty button {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
}

.v97-cart-item__remove {
    margin-left: auto;
    border: none !important;
    width: auto !important;
    color: var(--text-dim) !important;
    font-size: 8.5px !important;
    letter-spacing: 0.08em;
    text-decoration: underline;
}

.v97-cart-drawer__footer {
    padding: 1.2em 1.4em 1.6em;
    border-top: 1px solid var(--border);
}

.v97-cart-drawer__total {
    font-size: 12px;
    letter-spacing: 0.06em;
    margin-bottom: 1em;
}

.v97-cart-drawer__checkout {
    display: block;
    text-align: center;
    background-color: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 13px;
}

.v97-cart-drawer__checkout.disabled {
    pointer-events: none;
    opacity: 0.4;
}


/* ============================================================
   ADMIN DASHBOARD

   Deliberately diverges from the storefront's stark, sharp-edged brand
   look — this is a tool used all day, not a shopfront. Same accent color
   and typeface, but a real type/spacing scale, elevated surfaces, soft
   corners, and an actual button hierarchy (one filled/primary action per
   toolbar, everything else stays a quiet ghost outline) so the eye can
   find what matters instead of every element competing at equal weight.
   ============================================================ */

:root {
    --a-sidebar-bg:    #141414;
    --a-surface:       #1f1f1f;
    --a-surface-2:     #262626;
    --a-border:        rgba(255,255,255,0.08);
    --a-border-strong: rgba(255,255,255,0.16);
    --a-radius-sm:     4px;
    --a-radius:        7px;
    --a-radius-lg:     10px;
    --a-danger:        #e0685c;
    --a-danger-bg:     rgba(224,104,92,0.12);
    --a-on-accent:     #14170d;
}

.v97-admin-body {
    font-size: 13px;
    line-height: 1.55;
    overflow-x: hidden;
}

.v97-admin-body, .v97-admin-body button, .v97-admin-body input,
.v97-admin-body select, .v97-admin-body textarea {
    font-size: 13px !important;
}

.v97-admin-root { min-height: 100vh; }

/* ── Login ── */

.v97-admin-login {
    max-width: 340px;
    margin: 16vh auto 0;
    padding: 2.6em 2.2em 2.2em;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-lg);
}

.v97-admin-login__logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto 0.6em;
}

.v97-admin-login form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.v97-admin-error {
    color: var(--a-danger);
    font-size: 11.5px;
    letter-spacing: 0.01em;
    background: var(--a-danger-bg);
    border-radius: var(--a-radius-sm);
    padding: 0.7em 0.9em;
}

/* ── Sidebar shell ── */

.v97-admin-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.v97-admin-sidebar {
    width: 222px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--a-sidebar-bg);
    border-right: 1px solid var(--a-border);
    padding: 1.8em 1em 1.2em;
    display: flex;
    flex-direction: column;
}

.v97-admin-sidebar__brand {
    padding: 0 0.5em;
    margin-bottom: 2.4em;
}

.v97-admin-sidebar__logo {
    display: block;
    width: 118px;
    height: auto;
}

.v97-admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.v97-admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--a-radius);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.v97-admin-nav__icon {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.v97-admin-nav a:hover { color: var(--text); background: rgba(255,255,255,0.045); }
.v97-admin-nav a:hover .v97-admin-nav__icon { opacity: 1; }

.v97-admin-nav a.active {
    color: var(--accent);
    background: rgba(138,154,91,0.14);
    font-weight: 600;
}
.v97-admin-nav a.active .v97-admin-nav__icon { opacity: 1; }

.v97-admin-sidebar__signout {
    margin-top: 1.6em;
    padding-top: 1.2em;
    border-top: 1px solid var(--a-border);
}

.v97-admin-sidebar__signout button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-dim);
    font-weight: 500;
    padding: 8px 12px;
    margin: 0;
    border-radius: var(--a-radius);
}

.v97-admin-sidebar__signout button:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

.v97-admin-main {
    flex: 1;
    min-width: 0;
    padding: 2.6em 3em 5em;
}

.v97-admin-main-title {
    font-size: clamp(19px, 1.6vw, 23px);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text);
    margin-bottom: 1.8em;
}

@media only screen and (max-width: 768px) {
    .v97-admin-shell { flex-direction: column; }
    .v97-admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        padding: 0.8em;
        gap: 2px;
    }
    .v97-admin-sidebar__brand { margin-bottom: 0; margin-right: 0.6em; flex-shrink: 0; padding: 0; }
    .v97-admin-sidebar__logo { width: 84px; }
    .v97-admin-nav { flex-direction: row; flex-shrink: 0; }
    .v97-admin-nav a { white-space: nowrap; padding: 8px 10px; }
    .v97-admin-sidebar__signout { margin-top: 0; padding-top: 0; border-top: none; flex-shrink: 0; margin-left: auto; padding-left: 0.6em; }
    .v97-admin-sidebar__signout button { width: auto; white-space: nowrap; padding: 8px; }
    .v97-admin-main { padding: 1.8em 1.2em 3em; }
}

/* ── Dashboard tiles ── */

.v97-dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(192px, 1fr));
    gap: 1px;
    margin-bottom: 2.4em;
    background: var(--a-border);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-lg);
    overflow: hidden;
}

.v97-dashboard-tile {
    background: var(--a-surface);
    padding: 1.3em 1.4em;
    transition: background-color 0.15s ease;
}

.v97-dashboard-tile:hover { background: var(--a-surface-2); }

.v97-dashboard-tile span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.7em;
}

.v97-dashboard-tile strong {
    display: block;
    font-size: clamp(19px, 1.7vw, 25px);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The first tile in each row is always the headline KPI (total revenue,
   total users, ...) — giving it the accent color creates one clear focal
   point per dashboard instead of every number shouting equally. */
.v97-dashboard-tile:first-child strong { color: var(--accent); }

.v97-tile-delta {
    display: inline-block;
    margin-top: 0.5em;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.v97-tile-delta--good { color: var(--accent); }
.v97-tile-delta--bad { color: var(--a-danger); }

/* .v97-admin-bar isn't admin-only — account.js reuses it for the customer
   account page's "SIGNED IN AS ... / SIGN OUT" bar, so it can't depend on
   .v97-admin-body-scoped state; every value here is a global token. */
.v97-admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8em;
    padding-bottom: 1.4em;
    margin-bottom: 2em;
    border-bottom: 1px solid var(--border);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

/* ── Sections / panel headers ── */

.v97-admin-section { margin-bottom: 3em; }

.v97-admin-section h2 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text);
    margin-bottom: 1.1em;
    padding-bottom: 0.7em;
    border-bottom: 1px solid var(--a-border);
}

.v97-admin-panel h3 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-dim);
    margin: 1.8em 0 0.9em;
}

/* ── Tables ── */

.v97-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-lg);
}

.v97-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: var(--a-surface);
}

.v97-admin-table th {
    text-align: left;
    background: var(--a-surface-2);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid var(--a-border-strong);
    white-space: nowrap;
}

.v97-admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--a-border);
    vertical-align: middle;
}

.v97-admin-table tbody tr:last-child td { border-bottom: none; }
.v97-admin-table tbody tr:hover td { background: rgba(255,255,255,0.03); }

/* A row currently in "click EDIT to reveal fields" mode — makes it obvious
   at a glance which row's inputs are live vs. every other row's plain text. */
.v97-admin-table tbody tr.v97-row-editing td {
    background: rgba(138,154,91,0.07);
    box-shadow: inset 3px 0 0 var(--accent);
}
.v97-admin-table tbody tr.v97-row-editing:hover td { background: rgba(138,154,91,0.1); }

.v97-admin-thumb {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
}

.v97-admin-thumb--empty {
    border: 1px dashed var(--a-border-strong);
}

/* ── Form controls ── */

.v97-admin-root input,
.v97-admin-root select,
.v97-admin-root textarea,
.v97-admin-root button {
    font-family: var(--font) !important;
    font-size: 12px;
    border-radius: var(--a-radius-sm);
    padding: 8px 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.v97-admin-root input,
.v97-admin-root select,
.v97-admin-root textarea {
    width: 100%;
    background-color: rgba(255,255,255,0.04);
    border: 1px solid var(--a-border-strong);
    color: var(--text);
}

.v97-admin-root input::placeholder,
.v97-admin-root textarea::placeholder {
    color: rgba(255,255,255,0.28);
}

.v97-admin-root input:focus,
.v97-admin-root select:focus,
.v97-admin-root textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(138,154,91,0.07);
}

.v97-admin-root input:disabled,
.v97-admin-root select:disabled,
.v97-admin-root textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.v97-admin-root textarea {
    min-height: 110px;
    line-height: 1.6;
    resize: vertical;
}

.v97-admin-root input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Buttons default to a quiet ghost outline — the primary rules below give
   exactly one filled action per toolbar/form, so it actually stands out
   instead of every button competing at the same weight. */
.v97-admin-root button {
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    background-color: transparent;
    border: 1px solid var(--a-border-strong);
    color: var(--text-dim);
    margin-right: 6px;
}

.v97-admin-root button:hover {
    background-color: rgba(255,255,255,0.06);
    border-color: var(--text-dim);
    color: var(--text);
}

/* Primary — the login/sign-in submit, "+ NEW X" toolbar actions, editor
   form submits, and the inline "ADD" row commits (products, promos,
   delivery options, categories, variants all follow the same
   data-action="add-*" naming). */
.v97-admin-bar button,
.v97-admin-login button,
.v97-admin-actions button:first-child,
.v97-admin-panel form button[type="submit"],
.v97-admin-root button[data-action^="add-"] {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--a-on-accent);
    font-weight: 600;
}

.v97-admin-bar button:hover,
.v97-admin-login button:hover,
.v97-admin-actions button:first-child:hover,
.v97-admin-panel form button[type="submit"]:hover,
.v97-admin-root button[data-action^="add-"]:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--a-on-accent);
}

/* Destructive — a quiet warning tint on hover rather than a shouting red
   button by default; DELETE stays visually calm until you actually reach
   for it. */
.v97-admin-root button[data-action^="delete-"]:hover {
    background-color: var(--a-danger-bg);
    border-color: var(--a-danger);
    color: var(--a-danger);
}

.v97-editor-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-bottom: 1.8em;
    background: none !important;
    border: none !important;
    color: var(--text-dim) !important;
    padding: 0 !important;
    font-size: 11px !important;
}

.v97-editor-back:hover { color: var(--accent) !important; }

.v97-product-editor { max-width: 640px; }

.v97-admin-panel form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.v97-admin-panel label {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── Rich text editor (Quill, snow theme) — re-themed to match the dark
   admin instead of its light-mode default. ── */

/* The label wrapper is uppercase (.v97-admin-panel label); the editor's
   own content and toolbar shouldn't inherit that. */
.v97-rte { text-transform: none; letter-spacing: normal; }
.v97-rte .ql-toolbar.ql-snow {
    border-color: var(--a-border-strong);
    border-radius: var(--a-radius-sm) var(--a-radius-sm) 0 0;
    background: var(--a-surface-2);
}
.v97-rte .ql-container.ql-snow {
    border-color: var(--a-border-strong);
    border-radius: 0 0 var(--a-radius-sm) var(--a-radius-sm);
    background: rgba(255,255,255,0.04);
}
.v97-rte .ql-editor {
    min-height: 130px;
    color: var(--text);
    font-family: var(--font);
    font-size: 12px;
    text-transform: none;
    letter-spacing: normal;
}
.v97-rte .ql-editor.ql-blank::before {
    color: rgba(255,255,255,0.28);
    font-style: normal;
    font-family: var(--font);
}
.v97-rte .ql-snow .ql-stroke { stroke: var(--text-dim); }
.v97-rte .ql-snow .ql-fill { fill: var(--text-dim); }
.v97-rte .ql-snow .ql-picker { color: var(--text-dim); }
.v97-rte .ql-snow.ql-toolbar button:hover .ql-stroke,
.v97-rte .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.v97-rte .ql-snow.ql-toolbar button:hover .ql-fill,
.v97-rte .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }
.v97-rte .ql-snow.ql-toolbar button:hover,
.v97-rte .ql-snow.ql-toolbar button.ql-active { color: var(--accent); }
.v97-rte .ql-snow .ql-picker-options {
    background: var(--a-surface-2);
    border-color: var(--a-border-strong) !important;
}

.v97-admin-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 0.6em !important;
}

.v97-admin-checkbox input { flex: none; width: auto; }

.v97-admin-hint {
    color: var(--text-dim);
    font-size: 11px;
    margin-top: 1.2em;
}

.v97-admin-upload {
    display: inline-block;
    margin-top: 0.8em;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--a-radius-sm);
    padding: 8px 14px;
}

.v97-admin-upload:hover { background: rgba(138,154,91,0.12); }

.v97-admin-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v97-admin-image {
    position: relative;
    width: 92px;
    height: 92px;
    background: var(--a-surface-2);
    border-radius: var(--a-radius-sm);
    overflow: hidden;
}

.v97-admin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v97-admin-image button {
    position: absolute;
    top: 3px; right: 3px;
    background: rgba(10,10,10,0.75);
    border: none;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    margin: 0;
    border-radius: 3px;
}

.v97-admin-image--staged {
    outline: 2px dashed var(--a-accent, #8a9a5b);
    outline-offset: 2px;
}

.v97-admin-image--staged::after {
    content: 'UNSAVED';
    position: absolute;
    left: 0; bottom: 0; right: 0;
    background: rgba(10,10,10,0.75);
    color: #fff;
    font-size: 8px;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 2px 0;
}

/* ── Variant option chips (Size / Colour) ── */

.v97-option-group {
    margin-bottom: 1.2em;
}

.v97-option-group__label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5em;
}

.v97-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.v97-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 11px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(138,154,91,0.14);
    color: var(--accent);
}

.v97-chip__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0 !important;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12) !important;
    color: var(--accent) !important;
    font-size: 9px !important;
    line-height: 1;
}

.v97-chip__remove:hover { background: var(--accent) !important; color: var(--a-on-accent) !important; }

.v97-chip-input {
    min-width: 160px;
    flex: 1;
    border: 1px dashed var(--a-border-strong) !important;
    background: transparent !important;
}

/* ── Toolbars ── */

.v97-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8em 1em;
    margin-bottom: 1.2em;
}

.v97-admin-search { max-width: 280px; }

.v97-admin-toolbar-check {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5em !important;
    white-space: nowrap;
}

.v97-admin-toolbar-check input { flex: none; width: auto; }

.v97-admin-toolbar-count {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

.v97-admin-toolbar__trail {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-left: auto;
}

.v97-admin-toolbar__trail button { margin-right: 0; white-space: nowrap; }

.v97-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v97-status-chips--standalone { margin-bottom: 1.2em; }

.v97-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    margin-bottom: 1.4em;
}

.v97-status-chip {
    font-size: 10px !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 6px 12px !important;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--a-border-strong) !important;
    color: var(--text-dim) !important;
}

.v97-status-chip:hover { background: rgba(255,255,255,0.06); color: var(--text) !important; }

.v97-status-chip.active {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: rgba(138,154,91,0.14);
    font-weight: 600;
}

/* ── Order line-item detail row ── */

.v97-order-detail-row td {
    background: rgba(255,255,255,0.02);
    padding: 1.3em 14px;
}

.v97-order-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8em;
    align-items: flex-start;
}

.v97-order-detail__address {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-dim);
    min-width: 170px;
}

.v97-order-detail__address strong {
    color: var(--text);
    letter-spacing: 0.04em;
    font-size: 10px;
}

.v97-order-detail table {
    flex: 1;
    min-width: 260px;
}

/* ── Status badges ── */

.v97-badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}

.v97-badge--good { background: rgba(138,154,91,0.16); color: var(--accent); }
.v97-badge--neutral { background: rgba(255,255,255,0.09); color: var(--text-dim); }
.v97-badge--bad { background: var(--a-danger-bg); color: var(--a-danger); }
.v97-badge--warn { background: rgba(255,183,77,0.15); color: #ffb74d; }

/* Toggle buttons (product/promo/delivery active state) get the same tinted
   pill treatment but stay real buttons — higher specificity than the
   generic .v97-admin-root button rule so it wins without !important. */
.v97-admin-root button.v97-badge-btn {
    padding: 3px 9px;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border-color: transparent;
}

.v97-admin-root button.v97-badge-btn--good { background: rgba(138,154,91,0.16); color: var(--accent); }
.v97-admin-root button.v97-badge-btn--good:hover { background: var(--accent); color: var(--a-on-accent); }
.v97-admin-root button.v97-badge-btn--neutral { background: rgba(255,255,255,0.09); color: var(--text-dim); }
.v97-admin-root button.v97-badge-btn--neutral:hover { background: var(--text-dim); color: var(--a-on-accent); }

/* ── Charts (hand-rolled SVG — no charting library) ── */

.v97-chart-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 1em;
}

.v97-chart-row .v97-chart-panel { flex: 1 1 280px; }

.v97-chart-panel {
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-lg);
    background: var(--a-surface);
    padding: 1.2em 1.3em;
    margin-bottom: 1em;
    max-width: 640px;
}

.v97-chart-panel__title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 1em;
}

.v97-chart {
    display: block;
    width: 100%;
    height: 150px;
}

.v97-chart-grid { stroke: rgba(255,255,255,0.07); stroke-width: 1; }

.v97-chart-axis-label {
    fill: var(--text-dim);
    font-size: 9px;
    font-family: var(--font);
}

.v97-chart-line { fill: none; stroke-width: 1.75; }
.v97-chart-area { opacity: 0.14; }

.v97-chart-bar { transition: opacity 0.15s ease; }
.v97-chart-bar:hover { opacity: 0.75; }

.v97-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2em;
    margin-top: 0.9em;
    font-size: 10px;
    letter-spacing: 0.02em;
    color: var(--text-dim);
}

.v97-chart-legend__item { display: inline-flex; align-items: center; gap: 6px; }

.v97-chart-legend__item i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* ── Fulfillment status proportion bar ── */

.v97-stackbar {
    display: flex;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}

.v97-stackbar__seg { min-width: 2px; }

/* ── Inline "sparkbar" table cells (Analytics top pages) ── */

.v97-inline-bar {
    position: relative;
    padding: 4px 8px;
    z-index: 0;
}

.v97-inline-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    width: var(--pct, 0%);
    background: rgba(138,154,91,0.16);
    z-index: -1;
}


/* ============================================================
   CUSTOMER ACCOUNT
   ============================================================ */

.v97-account-title {
    font-size: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1em 0;
    color: var(--accent);
}

.v97-account-message {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-bottom: 1.5em;
}

.v97-account-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8em;
    padding-bottom: 1.4em;
    margin-bottom: 2em;
    border-bottom: 1px solid var(--border);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

/* Signing out is a quiet, secondary action — a ghost outline keeps it from
   competing with the accent-filled "add address" CTA below it. */
.v97-account-bar__signout {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font) !important;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 9px 16px;
    cursor: pointer;
}

.v97-account-bar__signout:hover {
    border-color: var(--text-dim);
    color: var(--text);
}

.v97-account-actions {
    margin-bottom: 1.5em;
}

.v97-account-actions button {
    background-color: var(--accent);
    border: none;
    color: #000;
    font-family: var(--font) !important;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 20px;
    cursor: pointer;
}

.v97-account-actions button:hover {
    background-color: var(--accent-dark);
}

.v97-account-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;
    padding-bottom: 3em;
}

.v97-account-forms h2 {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1em;
}

.v97-account-points-balance {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.4em;
}

.v97-account-points-history-title {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 1.5em 0 0.6em;
}

.v97-account-order {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1em;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    color: var(--text);
    text-transform: uppercase;
}

.v97-account-order:hover {
    background: rgba(255,255,255,0.04);
    color: var(--accent);
}

/* ── Modal (address edit form) — was previously unstyled entirely. ── */

.v97-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5em;
    background: rgba(10,10,10,0.72);
}

.v97-modal__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--a-surface, #1f1f1f);
    border: 1px solid var(--border);
    border-radius: var(--a-radius-lg, 10px);
    padding: 2em 1.8em 1.8em;
}

.v97-modal__close {
    position: absolute;
    top: 1em; right: 1em;
    background: none !important;
    border: none !important;
    color: var(--text-dim) !important;
    padding: 4px !important;
    font-size: 13px !important;
    line-height: 1;
    cursor: pointer;
}

.v97-modal__close:hover { color: var(--text) !important; }

.v97-address-card {
    display: inline-block;
    vertical-align: top;
    width: 280px;
    border: 1px solid var(--border);
    padding: 1.2em;
    margin: 0 1em 1em 0;
}

.v97-address-card__label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6em;
}

.v97-address-card p {
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 0.6em;
}

@media only screen and (max-width: 768px) {
    .v97-account-forms {
        grid-template-columns: 1fr;
        gap: 2em;
    }

    .v97-account-order {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .v97-address-card {
        width: 100%;
        margin-right: 0;
    }
}