/* ==========================================================================
   TopUpify design system
   --------------------------------------------------------------------------
   1.  Tokens & theming        9.  Listing & filters
   2.  Reset & base           10.  Product detail
   3.  Layout utilities      11.  Cart & checkout
   4.  Buttons & forms       12.  Account & auth
   5.  Chips, badges, cards  13.  Admin
   6.  Header & nav          14.  Footer
   7.  Hero & home           15.  Page blocks & form extras
   8.  Product card          16.  Motion, a11y, responsive, print
   ========================================================================== */

/* ============================== 1. TOKENS ============================== */
:root {
  /* brand */
  --violet:  #7c5cff;
  --indigo:  #5b4bff;
  --cyan:    #22d3ee;
  --teal:    #2dd4bf;
  --pink:    #ff4d94;
  --amber:   #fbbf24;
  --lime:    #a3e635;
  --red:     #fb5b6b;

  --grad-brand:   linear-gradient(115deg, var(--violet) 0%, var(--cyan) 100%);
  --grad-brand-2: linear-gradient(115deg, var(--pink) 0%, var(--violet) 55%, var(--cyan) 100%);
  --grad-warm:    linear-gradient(115deg, var(--amber) 0%, var(--pink) 100%);
  --grad-fresh:   linear-gradient(115deg, var(--teal) 0%, var(--lime) 100%);

  /* type */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* radii */
  --r-xs: 8px;  --r-sm: 12px; --r-md: 16px;
  --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;

  /* spacing rhythm */
  --gap: 1.25rem;
  --section: clamp(3.5rem, 7vw, 6.5rem);
  --container: 1280px;

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur: .32s;

  /* Overwritten by assets/js/app.js with the header's real height, so the
     sticky offsets below (.filters, .gallery, .checkout__aside, .acct-nav,
     .flash-stack) stay correct when the search wraps to a second row. */
  --header-h: 105px;
}

/* ------------------------------ dark (default) ------------------------- */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg:          #06060c;
  --bg-2:        #0a0a14;
  --surface:     rgba(255, 255, 255, .045);
  --surface-2:   rgba(255, 255, 255, .07);
  --surface-3:   rgba(255, 255, 255, .10);
  --surface-op:  #10101c;
  --border:      rgba(255, 255, 255, .09);
  --border-2:    rgba(255, 255, 255, .16);
  --text:        #f2f3f8;
  --text-2:      #b3b6c6;
  --text-3:      #7e8296;
  --brand:       var(--violet);
  --brand-ink:   #ffffff;
  --success:     #34d399;
  --warning:     var(--amber);
  --danger:      var(--red);
  --ring:        rgba(124, 92, 255, .55);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 10px 30px -8px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.85);
    --glow:        0 0 0 1px rgba(124,92,255,.28), 0 12px 40px -12px rgba(124,92,255,.55);
    /* Chevron for <select>. Data URIs cannot read currentColor, so each theme
       supplies its own arrow tinted to --text. */
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9ccdb' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --hero-orb-1: rgba(124, 92, 255, .55);
  --hero-orb-2: rgba(34, 211, 238, .38);
  --hero-orb-3: rgba(255, 77, 148, .34);
  --glass-blur: 18px;
}

/* ------------------------------ light ---------------------------------- */
[data-theme="light"] {
  color-scheme: light;
  --bg:          #f7f7fb;
  --bg-2:        #ffffff;
  --surface:     rgba(16, 16, 32, .035);
  --surface-2:   rgba(16, 16, 32, .055);
  --surface-3:   rgba(16, 16, 32, .08);
  --surface-op:  #ffffff;
  --border:      rgba(16, 16, 32, .10);
  --border-2:    rgba(16, 16, 32, .18);
  --text:        #14142a;
  --text-2:      #4c4f66;
  --text-3:      #7b7f96;
  --brand-ink:   #ffffff;
  --success:     #059669;
  --warning:     #b45309;
  --danger:      #dc2626;
  --ring:        rgba(91, 75, 255, .5);
  --shadow-sm: 0 1px 2px rgba(20,20,42,.07);
  --shadow-md: 0 12px 32px -10px rgba(20,20,42,.18);
  --shadow-lg: 0 30px 70px -24px rgba(20,20,42,.28);
    --glow:        0 0 0 1px rgba(91,75,255,.22), 0 14px 40px -14px rgba(91,75,255,.40);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545770' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --hero-orb-1: rgba(124, 92, 255, .30);
  --hero-orb-2: rgba(34, 211, 238, .26);
  --hero-orb-3: rgba(255, 77, 148, .22);
  --glass-blur: 14px;
}

/* ============================ 2. RESET & BASE =========================== */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
a:not([class]) { transition: color .2s var(--ease); }
a:not([class]):hover { color: var(--brand); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

ul, ol { padding: 0; list-style: none; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

::selection { background: var(--violet); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-2); border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 200;
  background: var(--brand); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ========================== 3. LAYOUT UTILITIES ========================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--narrow { max-width: 820px; }

.site-main { min-height: 60vh; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section--alt { background: var(--bg-2); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.25rem;
}
.section-head__text { max-width: 60ch; }
.section-head h2 { margin-bottom: .4rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: .7rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-brand);
}

.lede { color: var(--text-2); font-size: 1.05rem; }

.grad-text {
  background: var(--grad-brand-2);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.grid { display: grid; gap: var(--gap); }
.grid--products {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1 1 auto; }

.text-muted { color: var(--text-2); }
.text-dim   { color: var(--text-3); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .78rem; }
.text-center{ text-align: center; }
.mono       { font-family: var(--font-mono); }

.hide { display: none !important; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========================== 4. BUTTONS & FORMS ========================= */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.35rem;
  font-family: var(--font-body);
  font-size: .93rem; font-weight: 600; letter-spacing: -.005em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  white-space: nowrap; text-align: center;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease),
              background-color .22s var(--ease), border-color .22s var(--ease),
              opacity .2s var(--ease);
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px); border-color: var(--border-2); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .ico { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary {
  --btn-fg: #fff; --btn-bg: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 6px 20px -6px rgba(124, 92, 255, .65);
}
.btn--primary:hover {
  box-shadow: 0 12px 34px -8px rgba(124, 92, 255, .85);
  filter: saturate(1.12);
}
.btn--hot { --btn-fg: #fff; --btn-bg: var(--grad-brand-2); border-color: transparent;
            box-shadow: 0 6px 20px -6px rgba(255, 77, 148, .6); }
.btn--dark  { --btn-fg: #fff; --btn-bg: #14141f; border-color: transparent; }
[data-theme="light"] .btn--dark { --btn-bg: #14141f; }
.btn--ghost { --btn-bg: transparent; border-color: var(--border-2); }
.btn--ghost:hover { --btn-bg: var(--surface-2); }
.btn--quiet { --btn-bg: transparent; border-color: transparent; color: var(--text-2); }
.btn--quiet:hover { --btn-bg: var(--surface-2); color: var(--text); }
.btn--danger { --btn-fg: #fff; --btn-bg: linear-gradient(115deg, #f0526b, #e11d48);
               border-color: transparent; }
.btn--success { --btn-fg: #04231a; --btn-bg: var(--grad-fresh); border-color: transparent; }

.btn--sm  { padding: .5rem 1rem; font-size: .84rem; }
.btn--xs  { padding: .34rem .7rem; font-size: .76rem; gap: .3rem; }
.btn--lg  { padding: .95rem 1.9rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: .6rem; aspect-ratio: 1; }

.link-btn {
  color: var(--brand); font-size: .85rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--cyan); }

.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: 42px; height: 42px; flex: none;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text);
  transition: background-color .2s var(--ease), transform .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover {
  background: var(--surface-2); transform: translateY(-2px);
  border-color: var(--border-2); color: var(--brand);
}
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .ico { width: 16px; height: 16px; }
.icon-btn.is-on { color: var(--pink); border-color: rgba(255,77,148,.4);
                  background: rgba(255,77,148,.12); }
.icon-btn.is-on .ico { fill: currentColor; }
.icon-btn__dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 2px var(--bg);
}
.icon-btn--cart .ico { width: 21px; height: 21px; }

.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico--sm { width: 1em; height: 1em; }
.ico--xs { width: .85em; height: .85em; }
.ico--lg { width: 1.75rem; height: 1.75rem; }
.ico--xxl { width: 3.5rem; height: 3.5rem; }

/* --------------------------------- forms -------------------------------- */
.field { display: grid; gap: .4rem; }
.field__label {
  font-size: .82rem; font-weight: 600; color: var(--text-2);
  letter-spacing: .01em;
}
.field__hint  { font-size: .78rem; color: var(--text-3); }
.field__error { font-size: .8rem; color: var(--danger); font-weight: 500; }

.input, .select, .textarea {
  width: 100%;
  padding: .78rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
  background: var(--surface-2);
}
.input--sm { padding: .5rem .75rem; font-size: .88rem; }
.input--lg { padding: 1rem 1.2rem; font-size: 1.02rem; }
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 16px;
}
/* A native <select> popup does not inherit the page background, and --surface
   is translucent, so the list would otherwise render half-transparent and pick
   up whatever sits behind it. Pin every option to an opaque surface. */
select option,
select optgroup {
  background-color: var(--surface-op);
  color: var(--text);
}
select option:checked {
  background-color: var(--brand);
  color: #fff;
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(251, 91, 107, .2);
}

.checkbox, .radio { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.checkbox input, .radio input {
  width: 18px; height: 18px; flex: none; accent-color: var(--brand); cursor: pointer;
}

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 44px; height: 25px; flex: none; position: relative;
  background: var(--surface-3); border-radius: 99px;
  transition: background-color .24s var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .24s var(--ease);
}
.switch input:checked + .switch__track { background: var(--grad-brand); }
.switch input:checked + .switch__track::after { transform: translateX(19px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px var(--ring); }

/* quantity stepper */
.qty {
  display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); overflow: hidden;
}
.qty__btn {
  width: 32px; height: 34px; display: grid; place-items: center;
  color: var(--text-2); font-size: 1rem; line-height: 1;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.qty__btn:hover { background: var(--surface-3); color: var(--brand); }
.qty__input {
  width: 42px; height: 34px; border: 0; background: none; text-align: center;
  font-weight: 700; font-size: .9rem; padding: 0;
  -moz-appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus { outline: none; }

/* ==================== 5. CHIPS, BADGES, CARDS, MISC ==================== */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .68rem; font-size: .74rem; font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); white-space: nowrap;
}
.chip--denom { background: rgba(124, 92, 255, .14); border-color: rgba(124,92,255,.3);
               color: var(--text); font-variant-numeric: tabular-nums; }
.chip--brand { background: var(--surface-2); }
.chip--type  { background: rgba(34, 211, 238, .13); border-color: rgba(34,211,238,.3); }
.chip--type[data-type="topup"]        { background: rgba(163,230,53,.13); border-color: rgba(163,230,53,.3); }
.chip--type[data-type="subscription"] { background: rgba(255,77,148,.13); border-color: rgba(255,77,148,.3); }
.chip--removable button { color: var(--text-3); line-height: 1; font-size: 1rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: .22rem .55rem; font-size: .68rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--r-xs);
}
.badge--sale  { background: var(--grad-warm); color: #2b1400; }
.badge--new   { background: var(--grad-fresh); color: #04231a; }
.badge--hot   { background: var(--grad-brand-2); color: #fff; }
.badge--out   { background: var(--surface-3); color: var(--text-3); }
.badge--low   { background: rgba(251, 191, 36, .16); color: var(--warning);
                border: 1px solid rgba(251,191,36,.35); }
.badge--ok    { background: rgba(52, 211, 153, .15); color: var(--success);
                border: 1px solid rgba(52,211,153,.35); }
.badge--info  { background: rgba(124, 92, 255, .15); color: var(--brand);
                border: 1px solid rgba(124,92,255,.32); }
.badge--danger{ background: rgba(251, 91, 107, .15); color: var(--danger);
                border: 1px solid rgba(251,91,107,.35); }
.badge--info, .badge--ok, .badge--danger, .badge--low { text-transform: none;
                letter-spacing: 0; font-size: .74rem; }

/* glass card with a gradient hairline border */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg-2), var(--bg-2)),
                    linear-gradient(140deg, var(--border-2), transparent 45%, var(--border));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 2.5vw, 1.9rem);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border);
}
.panel__head h2, .panel__head h3 { font-size: 1.05rem; }
.panel__body { padding: 1.4rem; }
.panel__foot { padding: 1.1rem 1.4rem; border-top: 1px solid var(--border); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}

/* stars */
.stars { display: inline-flex; gap: 1px; }
.star {
  width: 13px; height: 13px; display: block;
  background: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 3 6.1 6.7 1-4.9 4.7 1.2 6.7L12 17.8 6 21.1l1.2-6.7L2.3 9.7l6.7-1 3-6.1Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 3 6.1 6.7 1-4.9 4.7 1.2 6.7L12 17.8 6 21.1l1.2-6.7L2.3 9.7l6.7-1 3-6.1Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.star.is-on  { background: var(--amber); }
.star.is-half{ background: linear-gradient(90deg, var(--amber) 50%, var(--text-3) 50%); }

/* Interactive star picker, used by the review form. The radios stay in the DOM
   (so the form works without JavaScript and keyboard navigation is native),
   but only their star glyphs are painted. */
.star-pick {
  display: inline-flex; cursor: pointer; position: relative;
  padding: .1rem;
}
.star-pick .star {
  width: 22px; height: 22px;
  transition: transform .15s var(--ease), background-color .15s var(--ease);
}
.star-pick:hover .star { transform: scale(1.12); }
/* Fill every star up to the highest checked one. CSS cannot select "previous
   siblings of a checked input" without :has(), so the fallback colour is set on
   hover and the persistent state comes from the :has() rule below. */
.star-pick:hover .star,
.star-pick:hover ~ .star-pick .star { background: var(--amber); }
.star-pick:has(input:checked) .star,
.star-pick:has(input:checked) ~ .star-pick .star { background: var(--amber); }
.star-pick:focus-within .star { outline: 2px solid var(--brand); outline-offset: 2px; }

.price {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.15rem; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.price-was { color: var(--text-3); font-size: .85rem; text-decoration: line-through; }

/* A region-locked tier Riot does not sell in the visitor's market. Not an
   error state, but it must not read like a price. */
.price--na { color: var(--text-3); font-size: .9rem; font-weight: 600; }

/* Which regional list a quoted price came from. */
.product-card__region {
  display: block; margin-top: .15rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text-3);
}

/* The exact-local-price note and the per-tier currency picker on the PDP. */
.pdp__price-note { margin: .3rem 0 0; }

/* What the customer must actually send, under the quoted total. Distinct from
   the total itself because it is a different currency and a different number. */
.summary__usdt {
  padding-top: .5rem; margin-top: .5rem; border-top: 1px dashed var(--line-2);
}
.summary__usdt dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.summary__usdt dd { font-family: var(--font-display); font-weight: 800; color: var(--accent); }

.qty-note { font-size: .78rem; color: var(--text-3); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 1rem;
  display: grid; gap: .8rem; justify-items: center;
}
.empty-state__art { color: var(--text-3); opacity: .55; width: 96px; }
.empty-state p { color: var(--text-2); max-width: 44ch; }
.empty-state h3 { font-size: 1.25rem; }

/* flash messages */
.flash-stack {
  position: fixed; top: calc(var(--header-h) + 1rem); right: 1rem; z-index: 120;
  display: grid; gap: .6rem; width: min(390px, calc(100vw - 2rem));
}
.flash {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1.1rem; font-size: .9rem; font-weight: 500;
  background: var(--surface-op); border: 1px solid var(--border-2);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  animation: slideInRight .4s var(--ease);
  border-left: 3px solid var(--text-3);
}
.flash__icon { display: grid; place-items: center; flex: none; }
.flash__icon .ico { width: 19px; height: 19px; }
.flash--success { border-left-color: var(--success); }
.flash--success .flash__icon { color: var(--success); }
.flash--error { border-left-color: var(--danger); }
.flash--error .flash__icon { color: var(--danger); }
.flash--warn { border-left-color: var(--warning); }
.flash--warn .flash__icon { color: var(--warning); }
.flash--info { border-left-color: var(--cyan); }
.flash--info .flash__icon { color: var(--cyan); }

/* toasts */
.toast-stack {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 300;
  display: grid; gap: .6rem; width: min(360px, calc(100vw - 2.5rem));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .85rem 1rem; pointer-events: auto;
  background: var(--surface-op); border: 1px solid var(--border-2);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  animation: toastIn .38s var(--ease);
  border-left: 3px solid var(--brand);
}
.toast.is-out { animation: toastOut .28s var(--ease) forwards; }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warn { border-left-color: var(--warning); }
.toast__icon { display: grid; place-items: center; flex: none; }
.toast__body { display: grid; gap: .1rem; font-size: .88rem; }
.toast__body span { color: var(--text-2); font-size: .82rem; }
.toast__close {
  margin-left: auto; color: var(--text-3); font-size: 1.3rem;
  line-height: 1; padding: 0 .2rem;
}
.toast__close:hover { color: var(--text); }

/* modal + drawer */
.drawer { position: fixed; inset: 0; z-index: 250; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(3, 3, 8, .62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .3s var(--ease);
}
.drawer__panel {
  position: absolute; top: 0; bottom: 0;
  width: min(430px, 100vw);
  display: flex; flex-direction: column;
  background: var(--surface-op);
  box-shadow: var(--shadow-lg);
}
.drawer__panel--right { right: 0; border-left: 1px solid var(--border);
                       animation: slideInRight .38s var(--ease); }
.drawer__panel--left  { left: 0;  border-right: 1px solid var(--border);
                       animation: slideInLeft .38s var(--ease); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); flex: none;
}
.drawer__title { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; }
.drawer__badge {
  display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem;
  background: var(--grad-brand); color: #fff; border-radius: 99px;
  font-size: .72rem; font-weight: 800;
}
.drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem 1.25rem; }
.drawer__foot {
  flex: none; padding: 1.1rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--surface);
  display: grid; gap: .7rem;
}
.drawer__label {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin: 1.2rem 0 .4rem;
}
.drawer__link {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem; border-radius: var(--r-sm);
  font-weight: 500; transition: background-color .18s var(--ease), color .18s var(--ease);
}
.drawer__link:hover { background: var(--surface-2); color: var(--brand); }
.drawer__link.is-active { background: rgba(124,92,255,.12); color: var(--brand); }
.drawer__link-count {
  margin-left: auto; font-size: .75rem; color: var(--text-3);
  background: var(--surface-2); padding: .1rem .5rem; border-radius: 99px;
}
.drawer__link .ico { color: var(--text-3); }
.drawer__link:hover .ico { color: var(--brand); }

body.no-scroll { overflow: hidden; }

/* tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border);
        overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: .8rem 1.1rem; white-space: nowrap;
  font-size: .92rem; font-weight: 600; color: var(--text-3);
  transition: color .2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand); }
.tab.is-active::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--grad-brand);
}
.tab-panel { padding-top: 1.5rem; animation: fadeUp .4s var(--ease); }

/* accordion */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.acc + .acc { margin-top: .7rem; }
.acc__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; font-weight: 600; cursor: pointer; list-style: none;
  transition: background-color .2s var(--ease);
}
.acc__summary::-webkit-details-marker { display: none; }
.acc__summary:hover { background: var(--surface-2); }
.acc__summary::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .28s var(--ease);
}
.acc[open] .acc__summary::after { transform: rotate(225deg) translateY(-2px); }
.acc__body { padding: 0 1.2rem 1.2rem; color: var(--text-2); font-size: .93rem; }

/* ====================== 6. HEADER & NAVIGATION ========================= */
.announce {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--indigo), var(--violet), var(--cyan), var(--violet));
  color: #fff; font-size: .78rem; font-weight: 600;
  padding: .5rem 0;
}
.announce__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.announce__group { display: flex; align-items: center; gap: 1.4rem; padding-right: 1.4rem; }
.announce__item { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
/* flex:none, otherwise the separator flexes and drifts between the two items
   instead of sitting on the group rhythm. */
.announce__sep { opacity: .5; flex: none; }
@media (prefers-reduced-motion: reduce) { .announce__track { animation: none; } }

.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
@supports not (backdrop-filter: blur(1px)) { .header { background: var(--bg); } }
.header.is-stuck { box-shadow: var(--shadow-md); }

.header__inner {
  display: grid; align-items: center; gap: clamp(.75rem, 2vw, 1.5rem);
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-block: .85rem;
  min-height: 64px;
}
.header__burger { display: none; }
.header__actions { display: flex; align-items: center; gap: .5rem; justify-self: end; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display);
         font-weight: 800; letter-spacing: -.03em; font-size: 1.2rem; white-space: nowrap; }
.brand--sm { font-size: 1rem; }
.brand--lg { font-size: 1.5rem; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 11px; background: var(--grad-brand); color: #fff;
  font-size: 1.1rem; font-weight: 900; box-shadow: 0 4px 14px -4px rgba(124,92,255,.7);
}
.logo-img { height: 36px; width: auto; border-radius: 8px; flex: none; object-fit: contain; }
.brand--sm .logo-img { height: 26px; border-radius: 6px; }
.brand--lg .logo-img { height: 52px; border-radius: 12px; }
.brand:hover { color: var(--text); }

/* Centred in the flexible middle column, so the gap either side of the search
   stays even instead of everything bunching up next to the logo. */
.search { position: relative; display: flex; align-items: center; max-width: 560px;
          width: 100%; justify-self: center; }
.search__icon {
  position: absolute; left: .95rem; display: grid; place-items: center;
  color: var(--text-3); pointer-events: none; transition: color .2s var(--ease);
}
.search__icon .ico { width: 18px; height: 18px; }
.search__input {
  width: 100%; padding: .7rem 2.6rem .7rem 2.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); font-size: .92rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus { outline: none; border-color: var(--brand);
                       box-shadow: 0 0 0 4px var(--ring); background: var(--surface-2); }
.search:focus-within .search__icon { color: var(--brand); }
.search__clear {
  position: absolute; right: .7rem; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; color: var(--text-3);
  background: var(--surface-2);
}
.search__clear:hover { color: var(--text); }
.search__suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface-op); border: 1px solid var(--border-2);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  overflow: hidden; max-height: 380px; overflow-y: auto;
  animation: fadeUp .22s var(--ease);
}
.suggest__item {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  padding: .65rem .85rem; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background-color .15s var(--ease);
}
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover, .suggest__item.is-active { background: var(--surface-2); }
.suggest__item img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; }
.suggest__name { font-size: .89rem; font-weight: 600; }
.suggest__brand { font-size: .74rem; color: var(--text-3); }
.suggest__price { margin-left: auto; font-weight: 700; font-size: .86rem; flex: none; }
.suggest__empty { padding: 1.1rem; text-align: center; color: var(--text-3); font-size: .88rem; }

.currency-switch {
  display: flex; align-items: center; gap: .25rem; position: relative;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 0 .5rem 0 .8rem; height: 42px;
}
.currency-switch__icon { color: var(--text-3); display: grid; place-items: center; }
.currency-switch__select {
  appearance: none; background: none; border: 0; font-size: .82rem; font-weight: 700;
  padding: 0 1.1rem 0 .3rem; cursor: pointer; color: var(--text);
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right .1rem center; background-size: 13px;
}
.currency-switch__select:hover { color: var(--brand); }
.currency-switch__select:focus { outline: none; }
[dir="rtl"] .currency-switch__select { padding: 0 .3rem 0 1.1rem; }

.theme-icon { display: grid; place-items: center; transition: transform .4s var(--ease), opacity .3s; }
.theme-icon--moon { display: none; }
[data-theme="light"] .theme-icon--sun  { display: none; }
[data-theme="light"] .theme-icon--moon { display: grid; }
[data-theme="light"] .icon-btn:hover .theme-icon { transform: rotate(-25deg) scale(1.1); }

.cart-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--grad-brand-2); color: #fff;
  border-radius: 99px; font-size: .68rem; font-weight: 800;
  border: 2px solid var(--bg);
  transition: transform .3s var(--ease);
}
.cart-count.is-empty { display: none; }
.cart-count.is-bump { animation: bump .45s var(--ease); }

.mainnav { border-top: 1px solid var(--border); }
.mainnav__inner {
  display: flex; align-items: center; gap: .3rem;
  overflow-x: auto; scrollbar-width: none; padding-block: .1rem;
}
.mainnav__inner::-webkit-scrollbar { display: none; }
.mainnav__item {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .6rem .75rem; white-space: nowrap; flex: none;
  font-size: .86rem; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.mainnav__item:hover { color: var(--text); }
.mainnav__item.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.mainnav__count {
  font-size: .68rem; color: var(--text-3); background: var(--surface-2);
  padding: .05rem .35rem; border-radius: 99px; font-weight: 700;
}
.mainnav__item--right { margin-left: auto; color: var(--brand); }
.mainnav__item--right.is-active { border-bottom-color: var(--brand); }

/* ========================= 7. HERO & HOME ============================== */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 6rem);
  isolation: isolate;
}
.hero__orbs { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: .85; will-change: transform;
}
.hero__orb--1 {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  top: -14%; left: -8%;
  background: radial-gradient(circle at 30% 30%, var(--hero-orb-1), transparent 68%);
  animation: float1 19s var(--ease-in-out) infinite;
}
.hero__orb--2 {
  width: 40vw; height: 40vw; max-width: 500px; max-height: 500px;
  top: 4%; right: -10%;
  background: radial-gradient(circle at 60% 40%, var(--hero-orb-2), transparent 68%);
  animation: float2 23s var(--ease-in-out) infinite;
}
.hero__orb--3 {
  width: 34vw; height: 34vw; max-width: 430px; max-height: 430px;
  bottom: -18%; left: 34%;
  background: radial-gradient(circle at 50% 50%, var(--hero-orb-3), transparent 68%);
  animation: float3 27s var(--ease-in-out) infinite;
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, #000 20%, transparent 75%);
  opacity: .6;
}

.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero__title { margin-bottom: 1.1rem; }
.hero__title .line { display: block; }
.hero__lede { font-size: clamp(1rem, 1.6vw, 1.14rem); color: var(--text-2);
              max-width: 54ch; margin-bottom: 1.9rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2.2rem; }

.hero__stats { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); flex-wrap: wrap; }
.hero__stat strong {
  display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
}
.hero__stat span { font-size: .8rem; color: var(--text-3); }

/* floating product stack in the hero */
.hero__art { position: relative; height: clamp(340px, 46vw, 480px); }
.hero__card {
  position: absolute; width: 218px; padding: 1rem;
  background: var(--surface-op); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: bob 7s var(--ease-in-out) infinite;
}
/* nth-of-type, not nth-child: .hero__card-glow is the first child of
   .hero__art and is a <span>, so :nth-child(1) would land on the glow and
   leave the third card with no offsets at all (all three stacking). */
.hero__card:nth-of-type(1) { top: 4%;   left: 2%;   z-index: 3; animation-delay: 0s; }
.hero__card:nth-of-type(2) { top: 34%;  right: 0;   z-index: 2; animation-delay: -2.4s; }
.hero__card:nth-of-type(3) { bottom: 2%; left: 16%; z-index: 4; animation-delay: -4.6s; }
.hero__card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md);
                  margin-bottom: .7rem; background: var(--surface-2); }
.hero__card-name { font-size: .85rem; font-weight: 700; margin-bottom: .2rem; }
.hero__card-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.hero__card-price { font-size: .92rem; font-weight: 800; font-family: var(--font-display); }
.hero__card .chip { font-size: .68rem; }
.hero__card-glow {
  position: absolute; inset: 20% -10% -20%; z-index: -1; filter: blur(50px);
  background: var(--grad-brand); opacity: .35; border-radius: 50%;
}

/* trust strip */
.trust-strip { padding-block: 1.6rem; border-block: 1px solid var(--border);
               background: var(--bg-2); }
.trust-strip__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.4rem;
}
.trust-item { display: flex; align-items: center; gap: .85rem; }
.trust-item__icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 13px; background: var(--surface-2); color: var(--brand);
  border: 1px solid var(--border);
}
.trust-item strong { display: block; font-size: .89rem; font-weight: 700; }
.trust-item span  { font-size: .78rem; color: var(--text-3); }

/* category tiles */
.cat-grid { display: grid; gap: 1rem;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cat-tile {
  position: relative; overflow: hidden;
  display: grid; gap: .3rem; align-content: end;
  min-height: 158px; padding: 1.1rem;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .32s var(--ease), border-color .32s var(--ease), box-shadow .32s;
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .35;
  background: radial-gradient(circle at 78% 18%, var(--tile, var(--violet)), transparent 62%);
  transition: opacity .32s var(--ease), transform .5s var(--ease);
}
.cat-tile:hover {
  transform: translateY(-5px); border-color: var(--border-2); box-shadow: var(--shadow-lg);
}
.cat-tile:hover::before { opacity: .55; transform: scale(1.15); }
.cat-tile > * { position: relative; z-index: 1; }
.cat-tile__icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: .4rem;
  border-radius: 12px; background: color-mix(in srgb, var(--tile, var(--violet)) 22%, transparent);
  color: #fff; border: 1px solid color-mix(in srgb, var(--tile, var(--violet)) 45%, transparent);
}
.cat-tile__name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.cat-tile__count { font-size: .78rem; color: var(--text-3); }

/* how it works */
.steps { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding: 1.5rem 1.3rem; }
.step__num {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .9rem;
  border-radius: 12px; background: var(--grad-brand); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 18px -6px rgba(124,92,255,.8);
}
.step h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.step p  { font-size: .88rem; color: var(--text-2); }

/* value props */
.value-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.value {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1.25rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.value:hover { transform: translateY(-3px); border-color: var(--border-2); }
.value__icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; background: var(--surface-2); color: var(--brand);
}
.value h3 { font-size: .98rem; margin-bottom: .2rem; }
.value p  { font-size: .84rem; color: var(--text-3); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.6rem);
  background: var(--grad-brand-2); color: #fff; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.28), transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(255,255,255,.18), transparent 45%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: .6rem; }
.cta-band p  { color: rgba(255,255,255,.9); max-width: 52ch; margin: 0 auto 1.6rem; }
.cta-band .btn--primary { --btn-bg: #fff; --btn-fg: #2b1a6b; box-shadow: var(--shadow-md); }

/* ======================== 8. PRODUCT CARD ============================== */
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .34s var(--ease), box-shadow .34s var(--ease), border-color .34s var(--ease);
  isolation: isolate;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-lg);
}
.product-card.is-out { opacity: .72; }
.product-card__media {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  background: var(--surface-2);
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.07); }
.product-card__glow {
  position: absolute; inset: auto -20% -45% -20%; height: 70%;
  background: radial-gradient(ellipse at center, var(--brand, #7c5cff), transparent 70%);
  opacity: 0; filter: blur(28px); transition: opacity .4s var(--ease);
  pointer-events: none;
}
.product-card:hover .product-card__glow { opacity: .32; }

.product-card__badges {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
}
.product-card__fav { position: absolute; top: .6rem; right: .6rem; z-index: 3; }

.product-card__body {
  display: flex; flex-direction: column; gap: .45rem;
  padding: .95rem 1rem 1.1rem; flex: 1 1 auto;
}
.product-card__brand {
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
}
.product-card__title { font-size: .96rem; line-height: 1.35; }
.product-card__title a:hover { color: var(--brand); }
.product-card__title a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; margin-top: auto; padding-top: .3rem;
}
.product-card__price { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.product-card__rating .stars { opacity: .9; }
.product-card__add { margin-top: .55rem; }
.product-card__add .btn .ico { stroke-width: 2.4; }

/* ===================== 9. LISTING & FILTERS ============================ */
.page-head { padding-block: clamp(1.6rem, 3vw, 2.6rem) 1.2rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: .35rem; }
.page-head__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem;
}

.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; }
.crumbs li { display: flex; align-items: center; gap: .4rem; color: var(--text-3); }
.crumbs li + li::before { content: "/"; color: var(--text-3); opacity: .55; }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current] { color: var(--text-2); }

.listing { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 2rem; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 1rem); }
.filters__group + .filters__group { margin-top: 1.4rem; padding-top: 1.4rem;
                                    border-top: 1px solid var(--border); }
.filters__title {
  font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: .8rem;
}
.filters__list { display: grid; gap: .55rem; }
.filters__check { display: flex; align-items: center; gap: .55rem; font-size: .89rem; cursor: pointer; }
.filters__check input { width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
/* Only the trailing count gets pushed right. Targeting :last-child would also
   catch the label on rows that have no count ("Hide sold out", product types),
   yanking the text away from its own checkbox. */
.filters__check span + span { margin-left: auto; color: var(--text-3); font-size: .8rem;
                              font-variant-numeric: tabular-nums; }
.filters__check:hover { color: var(--brand); }
.filters__check:hover span + span { color: var(--text-2); }
.filters__check.is-active { color: var(--brand); font-weight: 600; }
.filters__check.is-active span + span { color: var(--brand); }

.range { display: grid; gap: .6rem; }
.range__values { display: flex; align-items: center; gap: .5rem; }
.range__values .input { padding: .45rem .6rem; font-size: .84rem; }
.range input[type="range"] {
  width: 100%; accent-color: var(--brand); pointer-events: auto;
}

.sort-select { display: flex; align-items: center; gap: .5rem; }
.sort-select .select { padding-block: .55rem; min-width: 190px; }

.active-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.active-filters a.chip { transition: border-color .2s, color .2s; }
.active-filters a.chip:hover { border-color: var(--danger); color: var(--danger); }

.pagination { display: flex; align-items: center; justify-content: center; gap: .35rem;
              flex-wrap: wrap; margin-top: 2.5rem; }
.pagination__btn {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); font-size: .9rem; font-weight: 600;
  transition: background-color .2s var(--ease), border-color .2s, transform .2s, color .2s;
}
.pagination__btn:hover { background: var(--surface-2); border-color: var(--border-2);
                        transform: translateY(-2px); color: var(--brand); }
.pagination__btn.is-current { background: var(--grad-brand); color: #fff; border-color: transparent; }
.pagination__btn.is-disabled { opacity: .35; pointer-events: none; }
.pagination__gap { color: var(--text-3); padding: 0 .2rem; }

/* product rail (horizontal scroller) */
.rail { position: relative; }
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(216px, 1fr);
  gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .8rem; scrollbar-width: thin;
}
.rail__track > * { scroll-snap-align: start; }
.rail__nav { display: flex; gap: .4rem; }

/* ====================== 10. PRODUCT DETAIL ============================= */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
       gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }

.gallery { position: sticky; top: calc(var(--header-h) + 1rem); }
.gallery__main {
  position: relative; aspect-ratio: 1; border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.gallery__thumb {
  width: 68px; height: 68px; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid var(--border); background: var(--surface-2);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { transform: translateY(-2px); }
.gallery__thumb.is-active { border-color: var(--brand); }

.pdp__brand { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.pdp__title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .6rem; }
.pdp__meta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
             font-size: .85rem; color: var(--text-3); margin-bottom: 1.1rem; }
.pdp__price-row { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.pdp__price { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem);
              font-weight: 800; letter-spacing: -.03em; }
.pdp__price-was { font-size: 1.05rem; color: var(--text-3); text-decoration: line-through; }
.pdp__save {
  padding: .2rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 800;
  background: rgba(52,211,153,.15); color: var(--success);
  border: 1px solid rgba(52,211,153,.35);
}

.buybox { display: grid; gap: 1rem; padding: clamp(1.2rem, 2.5vw, 1.7rem); }
.buybox__row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.buybox__row .btn { flex: 1 1 160px; }

.denom-grid { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.denom {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .7rem .85rem; border-radius: var(--r-sm);
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: .88rem; font-weight: 600; text-align: left;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s;
}
.denom:hover { border-color: var(--border-2); transform: translateY(-2px); }
.denom.is-active { border-color: var(--brand); background: rgba(124,92,255,.12); }
.denom__price { font-size: .82rem; color: var(--text-2); font-weight: 700; }

.stock-line { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; }
.stock-line--ok    { color: var(--success); }
.stock-line--low   { color: var(--warning); }
.stock-line--out   { color: var(--danger); }

.info-list { display: grid; gap: .7rem; }
.info-list__row {
  display: flex; align-items: flex-start; gap: .7rem; font-size: .9rem;
  color: var(--text-2);
}
.info-list__row .ico { color: var(--brand); margin-top: .15rem; flex: none; }
.info-list__row strong { color: var(--text); font-weight: 600; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { padding: .7rem .3rem; text-align: left;
                                border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--text-3); font-weight: 500; width: 42%; }
.spec-table td { font-weight: 600; }

.review {
  padding: 1.1rem 0; border-bottom: 1px solid var(--border);
}
.review:last-child { border-bottom: 0; }
.review__head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.review__avatar {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; background: var(--grad-brand); color: #fff;
  font-weight: 800; font-size: .85rem;
}
.review__author { font-weight: 600; font-size: .9rem; }
.review__date { font-size: .76rem; color: var(--text-3); }
.review__body { font-size: .9rem; color: var(--text-2); }

/* ====================== 11. CART & CHECKOUT ============================ */
.cart-empty { text-align: center; padding: 2.5rem 1rem; display: grid;
              gap: .7rem; justify-items: center; }
.cart-empty__art { color: var(--text-3); opacity: .4; }
.cart-empty p { color: var(--text-2); font-size: .9rem; max-width: 34ch; }

.cart-lines { display: grid; gap: .9rem; }
.cart-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem; align-items: start;
  padding-bottom: .9rem; border-bottom: 1px solid var(--border);
}
.cart-line:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-line__img {
  width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover;
  background: var(--surface-2); flex: none;
}
.cart-line__info { display: grid; gap: .2rem; min-width: 0; }
.cart-line__name { font-size: .9rem; font-weight: 600; line-height: 1.35; }
.cart-line__name:hover { color: var(--brand); }
.cart-line__meta { font-size: .76rem; color: var(--text-3); }
.cart-line__foot { display: flex; align-items: center; justify-content: space-between;
                   gap: .7rem; margin-top: .4rem; flex-wrap: wrap; }
.cart-line__price { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cart-line.is-busy { opacity: .5; pointer-events: none; }

.summary { display: grid; gap: .55rem; }
.summary > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.summary dt { color: var(--text-2); font-size: .9rem; }
.summary dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.summary__total { padding-top: .6rem; margin-top: .2rem; border-top: 1px solid var(--border); }
.summary__total dt { color: var(--text); font-weight: 700; font-size: 1rem; }
.summary__total dd { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }

.coupon__row { display: flex; gap: .5rem; }
.coupon__applied {
  display: flex; align-items: center; gap: .5rem; font-size: .82rem;
  color: var(--success); padding: .5rem .7rem; border-radius: var(--r-sm);
  background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.28);
}
.coupon__applied .link-btn { margin-left: auto; color: var(--text-3); }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px;
            gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; }
.checkout__aside { position: sticky; top: calc(var(--header-h) + 1rem); display: grid; gap: 1rem; }

.stepper { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.stepper__item { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--text-3); }
.stepper__num {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 700;
}
.stepper__item.is-active { color: var(--text); font-weight: 600; }
.stepper__item.is-active .stepper__num { background: var(--grad-brand); color: #fff;
                                          border-color: transparent; }
.stepper__item.is-done .stepper__num { background: rgba(52,211,153,.16); color: var(--success);
                                        border-color: rgba(52,211,153,.4); }
.stepper__line { width: 26px; height: 1px; background: var(--border); }

.pay-list { display: grid; gap: .7rem; }
.pay-option {
  position: relative; display: flex; align-items: flex-start; gap: .9rem;
  padding: 1rem 1.1rem; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s;
}
.pay-option:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option:has(input:checked) { border-color: var(--brand); background: rgba(124,92,255,.1); }
.pay-option:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--ring); }
.pay-option__mark {
  display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: .1rem;
  border-radius: 50%; border: 2px solid var(--border-2);
  transition: border-color .2s var(--ease);
}
.pay-option:has(input:checked) .pay-option__mark { border-color: var(--brand); }
.pay-option:has(input:checked) .pay-option__mark::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
}
.pay-option__name { font-weight: 700; font-size: .95rem; }
.pay-option__desc { font-size: .82rem; color: var(--text-3); }
.pay-option__icon { margin-left: auto; color: var(--text-3); }

.instructions {
  margin-top: .9rem; padding: 1rem 1.1rem; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .87rem; color: var(--text-2);
}
.instructions dl { display: grid; gap: .5rem; margin-top: .6rem; }
.instructions dl > div { display: flex; gap: .6rem; justify-content: space-between; }
.instructions dt { color: var(--text-3); }
.instructions dd { font-weight: 600; text-align: right; word-break: break-word; }
.copy-field { display: flex; align-items: center; gap: .5rem; }
.copy-field code {
  flex: 1; padding: .35rem .5rem; border-radius: 6px; background: var(--bg-2);
  font-family: var(--font-mono); font-size: .84rem; word-break: break-all;
}

.order-lines { display: grid; gap: .8rem; }
/* Flex rather than a 3-column grid: the order confirmation renders a thumbnail,
   a stacked name/meta block and a price, while track-order renders only the
   name and the price. A fixed column track would drop that price into the
   flexible middle column and stop it lining up with the totals above. */
.order-line { display: flex; align-items: center; gap: .7rem; font-size: .88rem; }
.order-line > :not(.order-line__price) { min-width: 0; }
.order-line__thumb {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 9px;
  background: var(--surface-2); color: var(--brand);
}
.order-line img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex: none; }
.order-line__name { font-weight: 600; }
.order-line__meta { font-size: .75rem; color: var(--text-3); }
.order-line__price { font-weight: 700; font-variant-numeric: tabular-nums;
                     margin-left: auto; text-align: right; flex: none; }

.success-hero { text-align: center; display: grid; gap: 1rem; justify-items: center;
                padding-block: clamp(2rem, 5vw, 3.5rem); }
.success-ring {
  display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%;
  background: var(--grad-fresh); color: #fff;
  box-shadow: 0 0 0 10px rgba(45, 212, 191, .14), 0 18px 44px -12px rgba(45,212,191,.6);
  animation: popIn .5s var(--ease);
}
.success-ring .ico { width: 42px; height: 42px; stroke-width: 2.6; }
.ref-box {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .8rem 1.2rem; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px dashed var(--border-2);
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; letter-spacing: .04em;
}

.timeline { display: grid; gap: 0; }
.timeline__item { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: .9rem; }
.timeline__rail { display: grid; justify-items: center; }
.timeline__dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3);
  border: 2px solid var(--border-2); margin-top: 5px;
}
.timeline__item.is-done .timeline__dot { background: var(--success); border-color: var(--success); }
.timeline__item.is-current .timeline__dot {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(124,92,255,.22);
}
.timeline__line { width: 2px; flex: 1; background: var(--border); min-height: 26px; }
.timeline__body { padding-bottom: 1.1rem; }
.timeline__title { font-weight: 600; font-size: .92rem; }
.timeline__note { font-size: .82rem; color: var(--text-3); }

/* ==================== 12. ACCOUNT & AUTH ============================== */
/* Centred column rather than centred items: place-items:center would shrink
   every child to its content, so the order panel on track-order rendered
   narrower than the card above it. */
.auth-wrap { display: grid; justify-items: center; gap: 1rem; min-height: 68vh; padding-block: 3rem; }
.auth-wrap > * { width: 100%; max-width: 440px; }
.auth-card { width: min(440px, 100%); }
.auth-card .panel__head { text-align: center; display: block; }
.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.2rem 0;
                color: var(--text-3); font-size: .78rem; text-transform: uppercase;
                letter-spacing: .1em; }
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.acct-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 2rem; align-items: start; }
.acct-nav { display: grid; gap: .2rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.acct-nav a {
  display: flex; align-items: center; gap: .6rem; padding: .65rem .85rem;
  border-radius: var(--r-sm); font-size: .9rem; font-weight: 500; color: var(--text-2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.acct-nav a:hover { background: var(--surface-2); color: var(--text); }
.acct-nav a.is-active { background: rgba(124,92,255,.13); color: var(--brand); font-weight: 600; }

.order-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem;
  padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border);
  transition: background-color .2s var(--ease);
}
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: var(--surface); }
.order-row__ref { font-family: var(--font-mono); font-weight: 700; font-size: .95rem; }
.order-row__date { font-size: .8rem; color: var(--text-3); }
.order-row__total { font-weight: 800; font-family: var(--font-display); }

/* ========================== 13. ADMIN ================================== */
.admin-body { background: var(--bg-2); }
.admin-shell { display: grid; grid-template-columns: 258px minmax(0,1fr); min-height: 100vh; }

.admin-side {
  background: var(--surface-op); border-right: 1px solid var(--border);
  padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side__brand { padding: .4rem .6rem 1.2rem; }
.admin-side__group {
  font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); padding: 1.1rem .7rem .45rem;
}
.admin-link {
  display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem;
  border-radius: var(--r-sm); font-size: .89rem; font-weight: 500; color: var(--text-2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.admin-link:hover { background: var(--surface-2); color: var(--text); }
.admin-link.is-active { background: var(--grad-brand); color: #fff; font-weight: 600; }
.admin-link__badge {
  margin-left: auto; font-size: .7rem; font-weight: 800; padding: .1rem .45rem;
  border-radius: 99px; background: var(--danger); color: #fff;
}

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: var(--surface-op); position: sticky; top: 0; z-index: 50;
  flex-wrap: wrap;
}
.admin-top h1 { font-size: 1.25rem; }
.admin-content { padding: clamp(1rem, 3vw, 2rem); display: grid; gap: 1.4rem; }

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat {
  position: relative; overflow: hidden;
  padding: 1.2rem 1.3rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 110px; height: 110px;
  border-radius: 50%; background: var(--stat-color, var(--violet));
  opacity: .16; filter: blur(22px);
}
.stat__label { font-size: .76rem; color: var(--text-3); font-weight: 600;
                text-transform: uppercase; letter-spacing: .07em; }
.stat__value {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.2; margin-top: .2rem;
  font-variant-numeric: tabular-nums;
}
.stat__delta { font-size: .78rem; color: var(--text-3); display: flex;
               align-items: center; gap: .3rem; }
.stat__delta.is-up { color: var(--success); }
.stat__delta.is-down { color: var(--danger); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  text-align: left; padding: .8rem 1rem; font-size: .72rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
  position: sticky; top: 0; z-index: 1;
}
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border);
                 vertical-align: middle; }
.data-table tbody tr { transition: background-color .15s var(--ease); }
.data-table tbody tr:hover { background: var(--surface); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table__thumb {
  width: 38px; height: 38px; border-radius: 9px; object-fit: cover;
  background: var(--surface-2); flex: none;
}
.cell-media { display: flex; align-items: center; gap: .7rem; min-width: 220px; }
.cell-media__name { font-weight: 600; line-height: 1.3; }
.cell-media__sku { font-size: .74rem; color: var(--text-3); font-family: var(--font-mono); }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }

.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { display: grid; gap: 1.1rem; }
.form-section__title {
  font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}

.image-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.image-picker__item {
  position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid var(--border); background: var(--surface-2);
}
.image-picker__item img { width: 100%; height: 100%; object-fit: cover; }
.image-picker__del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0,0,0,.72); color: #fff; font-size: 1rem; line-height: 1;
}
.image-picker__primary {
  position: absolute; bottom: 0; left: 0; right: 0; text-align: center;
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  background: var(--grad-brand); color: #fff; padding: .15rem;
}

.admin-login { display: grid; place-items: center; min-height: 100vh; padding: 2rem; }

/* ---- admin layout helpers ------------------------------------------ */
.admin-grid-2 { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.admin-grid-3 { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.form-actions {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding-top: 1.1rem; border-top: 1px solid var(--border);
}
.form-actions--end { justify-content: flex-end; }
.inline-form { display: inline; margin: 0; }

/* A labelled checkbox, used all over the product and settings forms. */
.check {
  display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
  padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.check:hover { border-color: var(--border-2); background: var(--surface-2); }
.check input { margin-top: .18rem; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.check > span { display: grid; gap: .2rem; font-size: .88rem; font-weight: 500; }
.check-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Filter bar above the admin tables. */
.toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem;
}
.toolbar .input { width: auto; min-width: 200px; flex: 1 1 200px; }

/* Sortable table headers. */
.th-sort { display: inline-flex; align-items: center; gap: .2rem; color: inherit; }
.th-sort:hover { color: var(--text); }
th.is-sorted .th-sort { color: var(--brand); }
th.is-sorted .ico { transform: rotate(90deg); }

/* ---- dashboard chart ------------------------------------------------ */
.chart { display: flex; align-items: flex-end; gap: .5rem; height: 170px; }
.chart__col { flex: 1; display: grid; gap: .45rem; justify-items: center; height: 100%;
              grid-template-rows: minmax(0, 1fr) auto; }
.chart__bar {
  width: 100%; max-width: 42px; align-self: end; border-radius: 7px 7px 3px 3px;
  background: var(--grad-brand); min-height: 3px;
  transition: filter .18s var(--ease);
}
.chart__col:hover .chart__bar { filter: brightness(1.15); }
.chart__label { font-size: .7rem; color: var(--text-3); font-weight: 600; }

/* Admin tables sit inside a flush panel, so the header row has no rounding. */
.data-table thead th { border-top: 0; }
.admin-content .panel--flush { overflow: hidden; }

/* Sidebar links wrap their label so a long badge never pushes the text out. */
.admin-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-top { position: static; }
}

/* ============================= 14. FOOTER ================================ */
.footer {
  position: relative; overflow: hidden;
  margin-top: var(--section);
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-block: clamp(2.5rem, 5vw, 4rem) 0;
}
/* A single soft brand wash so the footer does not read as a flat slab. */
.footer::before {
  content: ""; position: absolute; inset: -40% 0 auto; height: 340px; z-index: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0, var(--hero-orb-1), transparent 70%);
  opacity: .5; pointer-events: none;
}
.footer > .container { position: relative; z-index: 1; }

.footer__top {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.9fr) minmax(0, 1.25fr);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.footer__brand { display: grid; gap: 1rem; align-content: start; }
.footer__tagline { color: var(--text-2); font-size: .92rem; max-width: 34ch; }

.footer__contact { display: grid; gap: .55rem; font-size: .87rem; }
.footer__contact li { display: flex; align-items: center; gap: .55rem; color: var(--text-2); }
.footer__contact .ico { color: var(--text-3); flex: none; }
.footer__contact a:hover { color: var(--brand); }
.footer__contact a:hover .ico { color: var(--brand); }

.footer__social { display: flex; gap: .5rem; margin-top: .3rem; }

.footer__cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer__col h3 {
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: .9rem;
}
.footer__col ul { display: grid; gap: .55rem; font-size: .89rem; }
.footer__col a { color: var(--text-2); transition: color .18s var(--ease); }
.footer__col a:hover { color: var(--brand); }

.footer__news { display: grid; gap: .7rem; align-content: start; }
.footer__news h3 { font-size: 1.05rem; }
.footer__news p { font-size: .87rem; color: var(--text-2); }
.newsletter { display: flex; gap: .5rem; margin-top: .3rem; }
.newsletter .input { flex: 1 1 auto; min-width: 0; }
.newsletter .btn { flex: none; }

.footer__pay {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.3rem; border-top: 1px solid var(--border);
}
.footer__pay-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); flex: none;
}
.pay-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.pay-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pay-chip .ico { color: var(--text-3); }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
  padding-block: 1.3rem 1.6rem; border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-3);
}
.footer__legal { max-width: 68ch; }

/* ==================== 15. PAGE BLOCKS & FORM EXTRAS ====================== */

/* long-form content (about / terms / privacy / refund, product description) */
.prose-wrap { max-width: 760px; margin-inline: auto; }
.prose { display: grid; gap: 1.1rem; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); color: var(--text);
  margin-top: .8rem;
}
.prose p { max-width: 68ch; }
/* The global reset strips list markers, so bullet lists need them back. */
.prose ul, .prose ol { display: grid; gap: .55rem; padding-left: 1.25rem; list-style: revert; }
.prose li { max-width: 68ch; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--cyan); }
.prose strong { color: var(--text); }

/* panel-flavoured empty state: faq, wishlist, maintenance */
.empty { text-align: center; display: grid; gap: .7rem; justify-items: center; }
.empty__icon {
  display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: var(--r-md); margin-bottom: .3rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--brand);
}
.empty__icon .ico { width: 26px; height: 26px; }
.empty p { color: var(--text-2); font-size: .92rem; max-width: 46ch; }
.empty h2 { font-size: 1.2rem; }

/* 404 / 500 */
.error-panel { text-align: center; justify-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.error-code {
  font-family: var(--font-display); font-size: clamp(3.4rem, 12vw, 5.5rem);
  font-weight: 800; line-height: 1; letter-spacing: -.05em;
  background: var(--grad-brand-2);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: .5rem;
}
.error-panel p { color: var(--text-2); max-width: 46ch; }
.page-error { display: grid; place-items: center; min-height: 100vh; }
.page-error .panel { width: min(560px, 100%); }
/* is-bare pages ship no header, footer or drawer chrome. */
.is-bare .site-main { min-height: 0; }

/* FAQ */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip--tab { cursor: pointer; transition: color .18s var(--ease), border-color .18s, background-color .18s; }
.chip--tab:hover { color: var(--text); border-color: var(--border-2); }
.chip--tab.is-on {
  background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 700;
}
.chip-row a.chip { text-decoration: none; }

.faq-list { display: grid; gap: .7rem; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.faq-item:hover { border-color: var(--border-2); }
.faq-item[open] { border-color: var(--border-2); background: var(--surface-2); }
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; font-weight: 600; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: .98rem; letter-spacing: -.01em;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q:hover { color: var(--brand); }
.faq-item__chev {
  display: grid; place-items: center; flex: none;
  color: var(--text-3); transform: rotate(90deg);
  transition: transform .28s var(--ease), color .2s var(--ease);
}
.faq-item[open] .faq-item__chev { transform: rotate(-90deg); color: var(--brand); }
.faq-item__a {
  padding: 0 1.2rem 1.15rem; color: var(--text-2); font-size: .93rem;
  border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 0;
}

/* auth form extras */
.input-group { position: relative; display: flex; }
.input-group .input { padding-right: 3.1rem; }
.input-group .icon-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; background: none; border: 0;
}
.input-group .icon-btn:hover { transform: translateY(-50%); background: var(--surface-2); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* account */
.account-grid { display: grid; gap: 1.5rem; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: .8rem 1.4rem; font-size: .72rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: .85rem 1.4rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s var(--ease); }
.table tbody tr:hover { background: var(--surface); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* listing */
.listing__main { display: grid; gap: 1.5rem; align-content: start; min-width: 0; }
.filters-toggle { display: none; }
.filters__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}

/* contact */
.info-list__icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--brand);
}
.info-list__row:has(.info-list__icon) { align-items: center; }

/* cart + drawer */
.cart-line__remove { color: var(--text-3); margin-top: -.1rem; }
.cart-line__remove:hover { color: var(--danger); border-color: rgba(251,91,107,.4);
                           background: rgba(251,91,107,.1); }
.cart-line__meta:has(.chip) { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.coupon { display: grid; gap: .6rem; }
.coupon__row .input { flex: 1 1 auto; min-width: 0; }
.summary--compact { font-size: .92rem; }
.drawer--cart .drawer__panel { width: min(440px, 100vw); }
.cart-drawer__body { display: flex; flex-direction: column; }
.cart-drawer__body .cart-empty { margin: auto 0; }
.cart-drawer__foot { gap: .9rem; }

/* misc */
.row--tight { gap: .5rem; flex-wrap: nowrap; }
.row--tight > .input { flex: 1 1 auto; min-width: 0; }
.success-ring--sm { width: 62px; height: 62px; margin-inline: auto; }
.success-ring--sm .ico { width: 30px; height: 30px; }
.hero__copy { display: grid; gap: 0; align-content: center; }
.mt-4 { margin-top: 2.5rem; }

/* ================ 16. MOTION, A11Y, RESPONSIVE, PRINT ================== */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn    { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bump     { 0%,100% { transform: scale(1); } 40% { transform: scale(1.45); } }
@keyframes slideInRight { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideInLeft  { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn  { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(8px) scale(.97); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes bob     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }
@keyframes float1  { 0%,100% { transform: translate(0,0) scale(1); }
                     50% { transform: translate(6%, -7%) scale(1.1); } }
@keyframes float2  { 0%,100% { transform: translate(0,0) scale(1.05); }
                     50% { transform: translate(-8%, 6%) scale(.95); } }
@keyframes float3  { 0%,100% { transform: translate(0,0) scale(1); }
                     50% { transform: translate(4%, 5%) scale(1.12); } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes spin    { to { transform: rotate(360deg); } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.no-js .reveal { opacity: 1; transform: none; }

/* skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-sm);
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--border-2); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading .btn__label { opacity: .6; }

/* responsive */
@media (max-width: 1080px) {
  .listing { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters__body { display: none; }
  .filters.is-open .filters__body { display: grid; }
  /* Only needed once the filter panel collapses. */
  .filters-toggle { display: inline-flex; }
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; max-width: 460px; }
  .checkout { grid-template-columns: 1fr; }
  .checkout__aside { position: static; }
  .acct-layout { grid-template-columns: 1fr; }
  .acct-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0;
                border-bottom: 1px solid var(--border); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { height: 330px; order: -1; }
  .footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__news { grid-column: 1 / -1; }
  .newsletter { max-width: 460px; }
}

@media (max-width: 860px) {
  .mainnav { display: none; }
  .header__burger { display: inline-grid; }
  /* Named areas, because the burger is the first child on mobile only: with
     bare column counts the actions would auto-place into the 1fr track. */
  .header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "burger brand actions" "search search search";
    row-gap: .7rem;
  }
  .header__burger { grid-area: burger; }
  .brand         { grid-area: brand; justify-self: start; }
  .search        { grid-area: search; justify-self: stretch; max-width: none; }
  .header__actions { grid-area: actions; }
  .flash-stack { top: auto; bottom: 1rem; right: 1rem; left: 1rem; width: auto; }
  .toast-stack { left: 1rem; right: 1rem; width: auto; bottom: 1rem; }

  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__bottom { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .grid--products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .product-card__body { padding: .75rem .8rem .9rem; }
  .product-card__title { font-size: .86rem; }
  .price { font-size: 1rem; }
  .hero__card { width: 168px; }
  .drawer__panel { width: 100vw; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .trust-strip__grid { grid-template-columns: 1fr 1fr; }
  .currency-switch { display: none; }
  .footer__cols { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: stretch; }
  .newsletter .btn { width: 100%; }
  .row--tight { flex-wrap: wrap; }
  .auth-wrap > * { max-width: 100%; }
}

/* accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__orb, .hero__card { animation: none; }
}

@media (prefers-contrast: more) {
  :root { --border: rgba(255,255,255,.35); --text-2: #d6d8e4; --text-3: #b6b9c8; }
  [data-theme="light"] { --border: rgba(0,0,0,.4); --text-2: #2a2d40; --text-3: #4a4d63; }
}

@media print {
  .header, .footer, .announce, .drawer, .toast-stack, .flash-stack,
  .btn, .mainnav, .hero__orbs { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .card { box-shadow: none; border: 1px solid #ccc; }
}
