/* ==========================================================================
   Gaddum storefront — design system

   Organised as tokens first, then primitives (buttons, fields, badges), then
   components, then page-specific blocks. Page templates should reach for these
   classes rather than adding their own CSS, so spacing, colour and motion stay
   consistent across the store.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Surfaces & ink */
    --bg: #0C0A09;
    --surface: #171412;
    --surface-2: #1E1A17;
    --surface-3: #262119;
    --text: #FAFAF9;
    --muted: #A8A29E;
    --muted-2: #78716C;
    --border: #292524;
    --border-strong: #3B3531;

    /* Brand */
    --accent: #D6A756;
    --accent-strong: #E3BA6E;
    --accent-soft: rgba(214, 167, 86, 0.10);
    --accent-line: rgba(214, 167, 86, 0.35);
    --on-accent: #1C1208;

    /* Feedback */
    --danger: #F87171;
    --danger-soft: rgba(248, 113, 113, 0.08);
    --danger-line: rgba(248, 113, 113, 0.35);
    --success: #6EE7A0;
    --success-soft: rgba(110, 231, 160, 0.08);
    --success-line: rgba(110, 231, 160, 0.35);
    --info: #7DD3FC;
    --info-soft: rgba(125, 211, 252, 0.08);
    --info-line: rgba(125, 211, 252, 0.35);

    /* Spacing scale */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;
    --s-8: 4.5rem;

    /* Shape */
    --radius: 4px;
    --radius-lg: 10px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.30);
    --shadow-2: 0 18px 36px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 32px 70px rgba(0, 0, 0, 0.62);

    /* Motion — one place to tune the whole store's feel */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --fast: 0.15s;
    --base: 0.25s;
    --slow: 0.45s;

    /* Type */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --container: 1160px;
    --header-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}
::selection { background: var(--accent); color: var(--on-accent); }

/* Screen-reader-only text that still reaches assistive tech. */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: var(--s-4); top: -100px; z-index: 300;
    background: var(--accent); color: var(--on-accent);
    padding: var(--s-3) var(--s-5); border-radius: var(--radius);
    font-weight: 600; transition: top var(--fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

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

/* Numbers that line up in columns. */
.tnum { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
.page-head { margin-bottom: var(--s-6); }
.page-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.15;
}
.page-head p { color: var(--muted); margin-top: var(--s-1); }

.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 500;
}
.section-head a {
    font-size: 0.9rem; color: var(--accent); font-weight: 600;
    transition: color var(--base) var(--ease);
}
.section-head a:hover { color: var(--accent-strong); }

.crumbs {
    font-size: 0.875rem; color: var(--muted);
    margin-bottom: var(--s-5); display: flex; flex-wrap: wrap;
    gap: var(--s-1) var(--s-2); align-items: center;
}
.crumbs a { transition: color var(--base) var(--ease); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--muted-2); }

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
header.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(12, 10, 9, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex; align-items: center; gap: var(--s-4);
    min-height: var(--header-h);
    padding: var(--s-3) 0;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    flex-shrink: 0;
}
.logo em { font-style: normal; color: var(--accent); }

.nav-main { display: flex; align-items: center; gap: var(--s-5); margin-left: auto; }

.nav-link {
    color: var(--muted); font-weight: 500; font-size: 0.95rem;
    padding: var(--s-2) 0; position: relative;
    transition: color var(--base) var(--ease);
    display: inline-flex; align-items: center; gap: var(--s-2);
    white-space: nowrap;
}
.nav-link::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1px; background: var(--accent);
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--base) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.cart-badge {
    min-width: 1.5em; text-align: center;
    background: var(--accent); color: var(--on-accent);
    font-size: 0.72rem; font-weight: 700;
    border-radius: var(--radius-pill); padding: 0.12em 0.45em;
    font-variant-numeric: tabular-nums;
}

/* Search */
.search-form { position: relative; flex-shrink: 0; }
.search-form svg {
    position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.search-form input {
    background: var(--surface); color: var(--text);
    padding: 0.55rem 1rem 0.55rem 2.3rem;
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    /* Wide enough that the placeholder isn't clipped mid-word. */
    font-size: 0.9rem; width: 210px; outline: none;
    transition: width var(--base) var(--ease), border-color var(--base) var(--ease);
}
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus { border-color: var(--accent); width: 260px; }

/* Mobile menu toggle — hidden on desktop, revealed in the media query below. */
.nav-toggle {
    display: none;
    background: transparent; border: 1px solid var(--border-strong);
    border-radius: var(--radius); color: var(--text);
    width: 42px; height: 42px; place-items: center;
    transition: border-color var(--base) var(--ease), background var(--base) var(--ease);
}
.nav-toggle:hover { border-color: var(--muted); background: var(--surface-2); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }
.nav-toggle[aria-expanded='true'] .icon-open { display: none; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--s-2);
    background: var(--accent); color: var(--on-accent);
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--accent); border-radius: 2px;
    font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em;
    min-height: 44px; text-align: center;
    transition: background var(--base) var(--ease),
                border-color var(--base) var(--ease),
                transform var(--fast) var(--ease),
                opacity var(--base) var(--ease);
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 17px; height: 17px; }

.btn-ghost {
    background: transparent; color: var(--text); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }

.btn-quiet {
    background: transparent; color: var(--muted); border-color: transparent;
    padding: 0.5rem 0.75rem; min-height: 40px;
}
.btn-quiet:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; min-height: 38px; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.2rem; min-height: 52px; font-size: 1rem; }

.btn:disabled, .btn[aria-disabled='true'], .btn.is-disabled {
    background: var(--surface-2); color: var(--muted-2);
    border-color: var(--border); cursor: not-allowed;
    transform: none; opacity: 1;
}
.btn:disabled:hover, .btn.is-disabled:hover {
    background: var(--surface-2); border-color: var(--border);
}

/* Pending state — the label is swapped for a spinner while a form submits, so
   a slow network never looks like a dead button. */
.btn.is-loading { pointer-events: none; position: relative; color: transparent; }
.btn.is-loading::after {
    content: ''; position: absolute; width: 17px; height: 17px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; color: var(--on-accent);
    animation: spin 0.7s linear infinite;
}
.btn-ghost.is-loading::after, .btn-danger.is-loading::after { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6. Chips, badges & pills
   -------------------------------------------------------------------------- */
.chip {
    display: inline-flex; align-items: center; gap: var(--s-2);
    padding: 0.45rem 1.05rem; min-height: 38px;
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    background: var(--surface); font-size: 0.88rem; font-weight: 500;
    color: var(--muted);
    transition: color var(--base) var(--ease),
                border-color var(--base) var(--ease),
                background var(--base) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
    background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}

.status-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill); border: 1px solid;
    white-space: nowrap; line-height: 1.4;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-available { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.status-coming-soon { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.status-out-of-stock { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }

.badge {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.2em 0.85em; border-radius: var(--radius-pill);
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
    border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.paid, .badge.delivered { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.badge.pending, .badge.new, .badge.processing { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.badge.shipped { color: var(--info); border-color: var(--info-line); background: var(--info-soft); }
.badge.cancelled { color: var(--muted); border-color: var(--border-strong); background: var(--surface-2); }

/* Corner flag on a product card. */
.card-flag {
    position: absolute; top: var(--s-3); left: var(--s-3); z-index: 2;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   7. Cards & grids
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--s-5);
}

.card {
    position: relative;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column;
    transition: border-color var(--base) var(--ease),
                transform var(--base) var(--ease),
                box-shadow var(--base) var(--ease);
}
.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}
.card.is-unavailable .thumb img { opacity: 0.45; filter: grayscale(0.5); }

.thumb {
    aspect-ratio: 1 / 1; background: var(--surface-2);
    display: grid; place-items: center; overflow: hidden;
}
.thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--slow) var(--ease), opacity var(--base) var(--ease);
}
.card:hover .thumb img { transform: scale(1.05); }
.ph-icon { width: 42px; height: 42px; color: var(--border-strong); }

.card-body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); flex: 1; }
.card-cat {
    font-size: 0.72rem; color: var(--muted);
    letter-spacing: 0.12em; text-transform: uppercase;
}
.card-body h3 { font-size: 1rem; font-weight: 500; line-height: 1.35; }
.card-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s-2); margin-top: auto; padding-top: var(--s-2);
}
.price { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.card-sizes {
    font-size: 0.72rem; color: var(--muted-2); letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Wishlist heart on a card. */
.wish-btn {
    position: absolute; top: var(--s-3); right: var(--s-3); z-index: 2;
    width: 36px; height: 36px; display: grid; place-items: center;
    background: rgba(12, 10, 9, 0.62); backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong); border-radius: 50%;
    color: var(--text);
    transition: color var(--base) var(--ease), border-color var(--base) var(--ease),
                transform var(--fast) var(--ease);
}
.wish-btn:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.wish-btn svg { width: 16px; height: 16px; }
.wish-btn.is-saved { color: var(--accent); border-color: var(--accent); }
.wish-btn.is-saved svg { fill: currentColor; }

/* --------------------------------------------------------------------------
   8. Loading skeletons
   -------------------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(
        90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%
    );
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius);
}
@keyframes shimmer {
    from { background-position: 100% 50%; }
    to { background-position: 0 50%; }
}
.skeleton-card .thumb { aspect-ratio: 1 / 1; }
.skeleton-line { height: 0.75rem; margin-top: var(--s-2); }
.skeleton-line.short { width: 45%; }
.skeleton-line.medium { width: 70%; }

/* --------------------------------------------------------------------------
   9. Empty states
   -------------------------------------------------------------------------- */
.empty {
    text-align: center; color: var(--muted);
    padding: var(--s-8) var(--s-5);
    background: var(--surface); border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}
.empty .ph-icon { width: 44px; height: 44px; margin: 0 auto var(--s-4); }
.empty h2 {
    font-family: var(--font-display); font-size: 1.35rem;
    font-weight: 500; color: var(--text); margin-bottom: var(--s-2);
}
.empty p { max-width: 44ch; margin: 0 auto; }
.empty .empty-actions {
    display: flex; gap: var(--s-3); justify-content: center;
    margin-top: var(--s-5); flex-wrap: wrap;
}
.empty a.inline { color: var(--accent); font-weight: 600; }
.empty a.inline:hover { color: var(--accent-strong); }

/* --------------------------------------------------------------------------
   10. Messages / toasts
   -------------------------------------------------------------------------- */
.messages { display: grid; gap: var(--s-3); margin-bottom: var(--s-5); }
.msg {
    display: flex; align-items: flex-start; gap: var(--s-3);
    padding: 0.85rem 1.15rem; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface);
    font-size: 0.92rem; font-weight: 500;
    animation: msg-in var(--base) var(--ease) both;
}
.msg svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }
.msg.success { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.msg.error { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.msg.warning, .msg.info { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.msg-dismiss {
    margin-left: auto; background: none; border: none; color: inherit;
    opacity: 0.6; padding: 0 var(--s-1); line-height: 1;
    transition: opacity var(--base) var(--ease);
}
.msg-dismiss:hover { opacity: 1; }
@keyframes msg-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }
.field label, .field-label {
    display: block; font-size: 0.85rem; font-weight: 600;
    margin-bottom: var(--s-2); color: var(--text);
}
.field input, .field select, .field textarea {
    width: 100%; padding: 0.7rem 0.95rem; min-height: 44px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 2px;
    font-size: 1rem; outline: none;
    transition: border-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 0; resize: vertical; line-height: 1.5; }
.field select { cursor: pointer; }
.field .help { color: var(--muted); font-size: 0.8rem; margin-top: var(--s-2); }
.field .help ul { padding-left: 1.1rem; }

/* Validation. `.has-error` is set server-side; :user-invalid covers the
   client-side pass so a mistake is flagged before the form is submitted —
   but only after the customer has actually typed, never on first paint. */
.field.has-error input, .field.has-error select, .field.has-error textarea,
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid {
    border-color: var(--danger);
}
.field.has-error input:focus, .field input:user-invalid:focus {
    box-shadow: 0 0 0 3px var(--danger-soft);
}
.errors { color: var(--danger); font-size: 0.85rem; margin-top: var(--s-2); }
.req { color: var(--accent); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.check-field {
    display: flex; align-items: center; gap: 0.6rem;
    margin: var(--s-2) 0; cursor: pointer;
    color: var(--muted); font-size: 0.9rem;
}
.check-field input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; min-height: 0; }

/* Address-type chips (Home / Work / Other) */
.label-chips { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.label-chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem; min-height: 44px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
    background: var(--surface); color: var(--muted);
    font-size: 0.9rem; font-weight: 600;
    transition: color var(--base) var(--ease), border-color var(--base) var(--ease),
                background var(--base) var(--ease);
}
.label-chip:hover { color: var(--text); border-color: var(--muted); }
.label-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.label-chip:has(input:checked) {
    color: var(--on-accent); background: var(--accent); border-color: var(--accent);
}
.label-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   12. Panels
   -------------------------------------------------------------------------- */
.panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem;
}
.panel h2 {
    font-family: var(--font-display); font-size: 1.25rem;
    font-weight: 500; margin-bottom: 1.4rem;
}
.panel h2.section {
    font-size: 1.05rem; margin-top: var(--s-6); margin-bottom: var(--s-4);
    padding-top: 1.4rem; border-top: 1px solid var(--border);
}
.panel-sticky { position: sticky; top: calc(var(--header-h) + var(--s-4)); }

/* --------------------------------------------------------------------------
   13. Money summary (cart, checkout, order)
   -------------------------------------------------------------------------- */
.summary-line {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: var(--s-4); padding: 0.45rem 0;
    font-size: 0.95rem; color: var(--muted);
}
.summary-line strong { color: var(--text); font-weight: 600; }
.summary-line > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-line.discount { color: var(--success); }
.summary-line.free { color: var(--success); }
.summary-line .was {
    text-decoration: line-through; color: var(--muted-2);
    margin-right: var(--s-2); font-size: 0.85em;
}
.summary-line.total {
    border-top: 1px solid var(--border);
    margin-top: var(--s-2); padding-top: 1.1rem;
    font-weight: 600; font-size: 1.15rem; color: var(--text);
}
.summary-line.total > span:last-child { color: var(--accent); }

.summary-note {
    display: flex; align-items: center; gap: 0.45rem;
    margin-top: var(--s-4); color: var(--muted); font-size: 0.82rem;
}
.summary-note svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* Promo code entry */
.promo-form { display: flex; gap: var(--s-2); }
.promo-form input {
    flex: 1; min-width: 0; padding: 0.6rem 0.9rem; min-height: 44px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 2px;
    outline: none; text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 600; font-size: 0.9rem;
}
.promo-form input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--muted-2); }
.promo-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.promo-applied {
    display: flex; align-items: center; gap: var(--s-3);
    padding: 0.7rem 0.95rem; border-radius: var(--radius);
    background: var(--success-soft); border: 1px solid var(--success-line);
    color: var(--success); font-size: 0.9rem; font-weight: 600;
}
.promo-applied .code { letter-spacing: 0.1em; }
.promo-applied .detail { color: var(--muted); font-weight: 500; }
.promo-applied form { margin-left: auto; }
.promo-applied button {
    background: none; border: none; color: var(--muted);
    font-size: 0.85rem; text-decoration: underline; padding: var(--s-1);
}
.promo-applied button:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   14. Quantity stepper
   -------------------------------------------------------------------------- */
.qty-stepper {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    overflow: hidden; background: var(--surface);
}
.step-btn {
    width: 38px; min-height: 40px; padding: 0;
    background: var(--bg); color: var(--text); border: none;
    display: grid; place-items: center;
    transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.step-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--accent); }
.step-btn:active:not(:disabled) { background: var(--border); }
.step-btn:disabled { color: var(--muted-2); cursor: not-allowed; }
.step-btn svg { width: 15px; height: 15px; }
.qty-num {
    min-width: 46px; display: grid; place-items: center;
    font-weight: 600; font-variant-numeric: tabular-nums;
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
    background: var(--surface);
}

/* --------------------------------------------------------------------------
   15. Size selector
   -------------------------------------------------------------------------- */
.size-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--s-3); margin-bottom: var(--s-3);
}
.size-head .field-label { margin-bottom: 0; }
.size-guide-btn {
    background: none; border: none; color: var(--accent);
    font-size: 0.82rem; font-weight: 600; text-decoration: underline;
    text-underline-offset: 3px; padding: 0;
}
.size-guide-btn:hover { color: var(--accent-strong); }

.size-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.size-option { position: relative; }
.size-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size-option label {
    display: grid; place-items: center;
    min-width: 56px; min-height: 46px; padding: 0 var(--s-3);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: border-color var(--base) var(--ease), background var(--base) var(--ease),
                color var(--base) var(--ease), transform var(--fast) var(--ease);
}
.size-option label:hover { border-color: var(--muted); transform: translateY(-1px); }
.size-option input:checked + label {
    background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}
.size-option input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A size that's sold out stays visible but can't be chosen — the customer can
   see the shop stocks it, just not right now. */
.size-option input:disabled + label {
    color: var(--muted-2); background: var(--surface-2);
    border-color: var(--border); cursor: not-allowed;
    text-decoration: line-through; transform: none;
}
.size-error { color: var(--danger); font-size: 0.85rem; margin-top: var(--s-3); }

/* --------------------------------------------------------------------------
   16. Modal (welcome offer, size guide, confirmations)
   -------------------------------------------------------------------------- */
dialog.modal {
    padding: 0; border: none; background: transparent;
    max-width: min(520px, calc(100vw - 2rem)); width: 100%;
    color: var(--text);
    /* The reset above zeroes every margin, which also wipes out the `margin:
       auto` the browser uses to centre an open <dialog> — without this the
       modal sits jammed in the top-left corner. */
    position: fixed; inset: 0; margin: auto;
    max-height: calc(100vh - 2rem);
}
dialog.modal::backdrop {
    background: rgba(6, 5, 4, 0.78);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: fade-in var(--base) var(--ease) both;
}
dialog.modal[open] { animation: modal-in var(--slow) var(--ease) both; }

.modal-panel {
    position: relative;
    background: linear-gradient(165deg, var(--surface-3) 0%, var(--surface) 55%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: clamp(1.75rem, 5vw, 2.75rem);
    overflow: hidden;
}
/* Soft gold wash in the corner, so the offer feels like an event. */
.modal-panel::before {
    content: ''; position: absolute; top: -60%; right: -30%;
    width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(214,167,86,0.18) 0%, transparent 68%);
    pointer-events: none;
}
.modal-close {
    position: absolute; top: var(--s-4); right: var(--s-4); z-index: 2;
    width: 34px; height: 34px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--border-strong);
    border-radius: 50%; color: var(--muted);
    transition: color var(--base) var(--ease), border-color var(--base) var(--ease);
}
.modal-close:hover { color: var(--text); border-color: var(--muted); }
.modal-close svg { width: 15px; height: 15px; }

.modal-body { position: relative; text-align: center; }
.modal-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 500;
    line-height: 1.2; margin: var(--s-3) 0 var(--s-3);
}
.modal-body > p { color: var(--muted); max-width: 40ch; margin: 0 auto; }
.modal-actions { margin-top: var(--s-6); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(22px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Revealed promo codes */
.code-reveal { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.code-reveal[hidden] { display: none; }
.code-card {
    display: flex; align-items: center; gap: var(--s-4);
    padding: var(--s-4); text-align: left;
    background: var(--bg); border: 1px dashed var(--accent-line);
    border-radius: var(--radius);
    animation: code-in var(--slow) var(--ease) both;
}
.code-card:nth-child(2) { animation-delay: 0.09s; }
.code-card .code-info { min-width: 0; }
.code-card .code-value {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
    letter-spacing: 0.16em; color: var(--accent); word-break: break-all;
}
.code-card .code-terms { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.copy-btn {
    margin-left: auto; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: var(--s-2);
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: 0.5rem 0.9rem; min-height: 40px;
    font-size: 0.83rem; font-weight: 600;
    transition: border-color var(--base) var(--ease), color var(--base) var(--ease),
                background var(--base) var(--ease);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.is-copied { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.copy-btn .label-copied { display: none; }
.copy-btn.is-copied .label-copied { display: inline; }
.copy-btn.is-copied .label-copy { display: none; }
@keyframes code-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.modal-fineprint { color: var(--muted-2); font-size: 0.78rem; margin-top: var(--s-5); }

/* Size guide body text keeps its original line breaks. */
.guide-body {
    text-align: left; white-space: pre-line;
    font-size: 0.88rem; color: var(--muted); line-height: 1.7;
    max-height: 60vh; overflow-y: auto; margin-top: var(--s-4);
}

/* --------------------------------------------------------------------------
   17. Layout blocks
   -------------------------------------------------------------------------- */
main { padding: var(--s-6) 0 var(--s-8); min-height: 55vh; }

.two-col {
    display: grid; grid-template-columns: 1.35fr 1fr;
    gap: var(--s-6); align-items: start;
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
footer.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--s-7) 0 var(--s-6);
    background: var(--surface);
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: var(--s-6); margin-bottom: var(--s-6);
}
.footer-brand .footer-logo {
    font-family: var(--font-display); font-size: 1.3rem;
    letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: var(--s-3);
}
.footer-brand .footer-logo em { font-style: normal; color: var(--accent); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 32ch; }
.footer-col h3 {
    font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--muted-2); margin-bottom: var(--s-3); font-weight: 600;
}
.footer-col ul { list-style: none; display: grid; gap: var(--s-2); }
.footer-col a {
    color: var(--muted); font-size: 0.9rem;
    transition: color var(--base) var(--ease);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    border-top: 1px solid var(--border); padding-top: var(--s-5);
    display: flex; justify-content: space-between; gap: var(--s-4);
    flex-wrap: wrap; color: var(--muted-2); font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .two-col { grid-template-columns: 1fr; }
    .panel-sticky { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
}

@media (max-width: 860px) {
    /* Collapse the nav behind a toggle. */
    .nav-toggle { display: grid; margin-left: auto; }
    .nav-main {
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: var(--s-3) var(--s-5) var(--s-5);
        background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-2);
        margin-left: 0;
    }
    .nav-main.is-open { display: flex; animation: nav-in var(--base) var(--ease) both; }
    .nav-main .nav-link {
        padding: var(--s-3) 0; border-bottom: 1px solid var(--border);
        font-size: 1rem;
    }
    .nav-main .nav-link::after { display: none; }
    .search-form { width: 100%; margin-top: var(--s-3); }
    .search-form input, .search-form input:focus { width: 100%; }
    header.site-header { position: sticky; }
    .header-inner { position: relative; }
}
@keyframes nav-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
    :root { --s-6: 1.5rem; --s-7: 2.25rem; --s-8: 3rem; }
    .container { padding: 0 var(--s-4); }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
    .card-body { padding: var(--s-3); }
    .card-body h3 { font-size: 0.92rem; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .panel { padding: var(--s-4); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    .btn { width: 100%; }
    .btn.btn-auto { width: auto; }
}

/* --------------------------------------------------------------------------
   20. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@media print {
    header.site-header, footer.site-footer, .btn, .messages { display: none !important; }
    body { background: #fff; color: #000; }
}
