/* ==========================================================================
   KAALVOET KAOS MERCH — design system
   Dark, loud, South African. One stylesheet, no framework, no build step.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* --- Team colours ----------------------------------------------------
     Sampled straight off the Kaalvoet Kaos crest:
       plum   #2e1342  the shield field
       orange #f57e25  the footprint
       gold   #fbaa18  the outer ring
     Every surface and accent below is derived from those three.       */
  --plum:       #2e1342;
  --plum-2:     #4a1f63;
  --plum-3:     #6b2f86;

  --ink:        #1c0f2d;   /* page background   */
  --ink-2:      #2a1343;   /* cards, surfaces   */
  --ink-3:      #371b55;   /* raised            */
  --ink-4:      #47246b;   /* hover             */
  --line:       rgba(214, 186, 240, 0.16);
  --line-2:     rgba(214, 186, 240, 0.28);

  --sand:       #f8f3ed;
  --muted:      #c0aed2;
  --muted-2:    #9684aa;

  --ember:      #f57e25;   /* crest orange      */
  --flame:      #f2541f;   /* primary action    */
  --flame-dim:  #c93f18;
  --gold:       #fbaa18;   /* secondary accent  */
  --violet:     #a473d6;   /* informational     */
  --on-gold:    #2b1140;   /* text on gold      */

  --ok:         #2fc98a;
  --warn:       #fbaa18;
  --bad:        #ff5f6d;

  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  22px;

  --shadow:     0 18px 50px rgba(0, 0, 0, 0.55);
  --shadow-sm:  0 6px 20px rgba(0, 0, 0, 0.35);

  --header-h:   68px;
  --maxw:       1360px;

  --font-display: 'Anton', 'Arial Narrow', 'Haettenschweiler', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', 'Consolas', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #2b1443 0%, transparent 58%),
    var(--ink);
  background-attachment: fixed;
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

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

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

/* --- 3. Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 900px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.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;
}
.hidden { display: none !important; }

/* The hidden attribute must beat any class that sets a display value,
   otherwise .bank-grid{display:grid} and .admin-bar{display:flex} keep
   showing elements the JS has hidden. */
[hidden] { display: none !important; }

/* --- 4. Announcement bar ------------------------------------------------- */
.announce {
  background: linear-gradient(90deg, var(--plum-2), var(--flame) 45%, var(--ember) 78%, var(--gold));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 20px;
  text-align: center;
  position: relative;
  z-index: 60;
}

/* --- 5. Header ----------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 15, 45, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--plum-3), var(--flame) 40%, var(--ember) 70%, var(--gold));
  opacity: 0.85;
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo__mark {
  width: 40px; height: 40px; flex-shrink: 0;
  background: url('../img/logo-128.png') center / contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s var(--ease);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.04); }
.logo__text { line-height: 1; }
.logo__name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: block;
}
.logo__sub {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: block;
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.nav__link:hover { color: var(--sand); background: var(--ink-3); }
.nav__link.is-active { color: var(--ink); background: var(--sand); }

.cart-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.18s var(--ease), background 0.18s;
  white-space: nowrap;
}
.cart-btn:hover { transform: translateY(-1px); background: #fff; }
.cart-btn__count {
  min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: 999px;
  background: var(--flame);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  display: grid; place-items: center;
}
.cart-btn__count.is-empty { background: var(--ink-4); color: var(--muted); }
@keyframes bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.35); } }
.cart-btn__count.bump { animation: bump 0.4s var(--ease); }

/* --- 6. Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  perspective: 1100px;
  padding-block: clamp(48px, 8vw, 96px) clamp(36px, 5vw, 60px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute; inset: -40% -10% auto -10%; height: 120%;
  background:
    radial-gradient(52% 62% at 12% 4%, rgba(126, 56, 158, 0.85), transparent 62%),
    radial-gradient(48% 56% at 88% 6%, rgba(245, 126, 37, 0.42), transparent 64%),
    radial-gradient(50% 50% at 60% 100%, rgba(242, 84, 31, 0.34), transparent 68%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; display: grid; gap: 30px; }
/* --- The disc ------------------------------------------------------------
   Built like an actual ultimate disc: a flight plate, a raised rim, real
   extruded thickness (stacked layers on the Z axis) and a moulded stamp.
   JS drives the transform; everything here is the look.                   */
.hero__disc {
  position: absolute;
  right: 2%; top: 50%;
  width: min(46vw, 500px); aspect-ratio: 1;
  margin-top: calc(min(46vw, 500px) / -2);
  pointer-events: none;
  z-index: 1;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.6));
  transition: filter 0.45s var(--ease);
}
.hero__disc.is-hot {
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(245, 126, 37, 0.5));
}
.disc {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}

/* Extruded side wall. JS stacks these behind the face. */
.disc__layer {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--layer-tint, #2a1240);
}

/* The top surface. */
.disc__face {
  position: absolute; inset: 0;
  border-radius: 50%;
  transform: translateZ(1px);
  overflow: hidden;
  background:
    /* dome highlight, off-centre so it reads as lit from upper left */
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.26), transparent 44%),
    /* plate -> groove -> rim band */
    radial-gradient(circle closest-side at 50% 50%,
      #3a1b57  0 46%,
      #2c1243 46% 48%,
      #3f1e5e 48% 74%,
      #240f38 74% 77%,
      #f57e25 77% 88%,
      #d8631d 88% 94%,
      #a4430f 94% 100%);
  box-shadow:
    inset 0 -14px 34px rgba(0, 0, 0, 0.5),
    inset 0 10px 26px rgba(255, 255, 255, 0.09),
    inset 0 0 0 2px rgba(251, 170, 24, 0.35);
}

/* Concentric moulding rings across the flight plate only. */
.disc__grooves {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle closest-side at 50% 50%,
    rgba(0, 0, 0, 0) 0 2.6%,
    rgba(0, 0, 0, 0.13) 2.6% 3.1%,
    rgba(255, 255, 255, 0.05) 3.1% 3.5%);
  -webkit-mask: radial-gradient(circle closest-side at 50% 50%, #000 0 73%, transparent 75%);
  mask: radial-gradient(circle closest-side at 50% 50%, #000 0 73%, transparent 75%);
  opacity: 0.85;
}

/* The crest, printed on the plate rather than filling the disc. */
.disc__stamp {
  position: absolute;
  left: 50%; top: 50%;
  width: 62%; height: 62%;
  transform: translate(-50%, -50%);
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

/* Specular sweep across the plastic. */
.disc__gloss {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(116deg,
    transparent 26%,
    rgba(255, 255, 255, 0.20) 42%,
    rgba(255, 255, 255, 0.06) 52%,
    transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* Until the script takes over, sit at a readable angle. */
.hero__disc:not(.is-live) { transform: rotateX(30deg); }

/* Behind the copy on narrow screens so the headline always wins. */
@media (max-width: 900px) {
  .hero__disc {
    right: -18%;
    width: min(78vw, 440px);
    margin-top: calc(min(78vw, 440px) / -2);
    opacity: 0.34;
    z-index: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__disc { opacity: 0.22; }
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
}
.hero__eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(251, 170, 24, 0.18);
}
.hero h1 {
  font-size: clamp(46px, 11vw, 132px);
  letter-spacing: -0.015em;
  margin: 14px 0 0;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--flame);
  paint-order: stroke fill;
}
.hero__lede {
  max-width: 54ch;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
  margin-top: 18px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}
.stat { background: var(--ink-2); padding: 18px 20px; }
.stat__num {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  background: linear-gradient(120deg, var(--gold), var(--ember) 55%, var(--flame));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-2); margin-top: 7px;
}

/* --- 7. Marquee ---------------------------------------------------------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  padding: 11px 0;
  display: flex;
  user-select: none;
}
.marquee__track {
  display: flex; flex-shrink: 0; gap: 34px; padding-right: 34px;
  animation: slide 38s linear infinite;
}
@keyframes slide { to { transform: translateX(-100%); } }
.marquee span {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  white-space: nowrap;
  display: flex; align-items: center; gap: 34px;
}
.marquee span::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--flame);
}

/* --- 8. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background 0.16s, border-color 0.16s, opacity 0.16s;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--flame); color: #fff; }
.btn--primary:hover { background: #ff6146; }
.btn--gold { background: var(--gold); color: var(--on-gold); }
.btn--gold:hover { background: #ffbe45; }
.btn--sand { background: var(--sand); color: var(--ink); }
.btn--sand:hover { background: #fff; }
.btn--ghost { border-color: var(--line-2); color: var(--sand); }
.btn--ghost:hover { background: var(--ink-3); border-color: var(--muted-2); }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 12.5px; }
.btn--lg { padding: 16px 32px; font-size: 15.5px; }

/* --- 9. Section headers -------------------------------------------------- */
.section { padding-block: clamp(40px, 6vw, 72px); }
.section--band {
  background:
    linear-gradient(180deg, rgba(126, 56, 158, 0.28), transparent 70%),
    var(--ink-2);
  border-block: 1px solid var(--line);
}
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
.section__title { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -0.01em; }
.section__note { color: var(--muted); font-size: 14px; max-width: 46ch; }

/* --- 10. Filter / toolbar ------------------------------------------------ */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(28, 15, 45, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
  padding: 13px 0;
}
.toolbar__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.search {
  position: relative; flex: 1 1 230px; min-width: 190px; max-width: 380px;
}
.search input {
  width: 100%;
  padding: 11px 15px 11px 40px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  transition: border-color 0.16s, background 0.16s;
}
.search input:focus { outline: none; border-color: var(--gold); background: var(--ink-3); }
.search input::placeholder { color: var(--muted-2); }
.search__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted-2); pointer-events: none;
}
.search__clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); font-size: 15px;
}
.search__clear:hover { background: var(--ink-4); color: var(--sand); }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.16s;
}
.chip:hover { color: var(--sand); border-color: var(--muted-2); }
.chip.is-active { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.chip__n { opacity: 0.55; margin-left: 5px; font-variant-numeric: tabular-nums; }

.select {
  appearance: none;
  padding: 10px 34px 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--ink-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ba2ad' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 13px center;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.select:focus { outline: none; border-color: var(--gold); }

.toggle-stock {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.toggle-stock input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-stock__track {
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--ink-4); border: 1px solid var(--line-2);
  position: relative; transition: background 0.18s;
  flex-shrink: 0;
}
.toggle-stock__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform 0.2s var(--ease), background 0.18s;
}
.toggle-stock input:checked + .toggle-stock__track { background: var(--gold); border-color: var(--gold); }
.toggle-stock input:checked + .toggle-stock__track::after { transform: translateX(16px); background: var(--on-gold); }
.toggle-stock input:focus-visible + .toggle-stock__track { outline: 2px solid var(--gold); outline-offset: 3px; }

.result-count {
  font-size: 12.5px; color: var(--muted-2); margin-left: auto;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* --- 11. Product grid ---------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 126, 37, 0.55);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 126, 37, 0.18);
}
.card.is-out { opacity: 0.5; }
.card.is-out:hover { transform: none; }

.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--ink-3);
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 100%;
}
.card__media img,
.card__media svg {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); }

.card__badges {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none;
}
.badge {
  padding: 4.5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.badge--unique { background: rgba(251, 170, 24, 0.92); color: var(--on-gold); }
.badge--deal   { background: rgba(255, 77, 46, 0.92); color: #fff; }
.badge--out    { background: rgba(28, 15, 45, 0.88); color: var(--muted); border: 1px solid var(--line-2); }
.badge--new    { background: rgba(246, 241, 234, 0.92); color: var(--ink); }
.badge--low    { background: rgba(255, 183, 3, 0.92); color: #2a1c00; }

.card__quick {
  position: absolute; inset: auto 10px 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(28, 15, 45, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  color: var(--sand);
  font-size: 12px; font-weight: 700;
  text-align: center;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: translateY(0); }
@media (hover: none) { .card__quick { display: none; } }

.card__body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.card__meta {
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted-2);
  display: flex; gap: 7px; align-items: center;
}
.card__name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.005em;
  line-height: 1.08;
}
.card__specs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.spec {
  font-size: 10.5px; padding: 3.5px 8px; border-radius: 6px;
  background: var(--ink-3); border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap;
}
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.01em; }
.price__was {
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  color: var(--muted-2); text-decoration: line-through; margin-left: 7px;
}
.add-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sand); color: var(--ink);
  display: grid; place-items: center; flex-shrink: 0;
  transition: transform 0.16s var(--ease), background 0.16s;
}
.add-btn:hover { background: var(--gold); transform: scale(1.1) rotate(90deg); }
.add-btn:disabled { background: var(--ink-4); color: var(--muted-2); cursor: not-allowed; transform: none; }
.add-btn.is-added { background: var(--ok); color: #fff; }

/* --- 12. Empty state ----------------------------------------------------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty h3 { font-size: 25px; margin-bottom: 9px; color: var(--sand); }

/* --- 13. Skeletons ------------------------------------------------------- */
@keyframes shimmer { to { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--ink-2) 25%, var(--ink-3) 50%, var(--ink-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius);
}
.skeleton-card { height: 350px; }

/* --- 14. Drawer (cart) --------------------------------------------------- */
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(14, 6, 24, 0.78);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(430px, 100vw);
  background: var(--ink-2);
  border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.34s var(--ease);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.drawer__title { font-size: 23px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  transition: background 0.16s, color 0.16s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--ink-4); color: var(--sand); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 18px 20px 22px; background: var(--ink-2); }

.line-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: none; }
.line-item__media {
  width: 68px; height: 68px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--ink-3); flex-shrink: 0;
}
.line-item__media img, .line-item__media svg { width: 100%; height: 100%; object-fit: cover; }
.line-item__info { flex: 1; min-width: 0; }
.line-item__name { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.line-item__sub { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.line-item__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 10px; }

.qty { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 999px; }
.qty button {
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); font-size: 15px; line-height: 1;
}
.qty button:hover:not(:disabled) { background: var(--ink-4); color: var(--sand); }
.qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty span {
  min-width: 22px; text-align: center; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.line-item__price { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.line-item__remove { font-size: 11.5px; color: var(--muted-2); text-decoration: underline; }
.line-item__remove:hover { color: var(--bad); }

.totals { display: grid; gap: 8px; margin-bottom: 15px; }
.totals__row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.totals__row--grand {
  color: var(--sand); font-size: 17px; font-weight: 800;
  padding-top: 11px; border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

/* --- 15. Modal (quick view) ---------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.24s;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(88vh, 760px);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s var(--ease);
  box-shadow: var(--shadow);
}
.modal.is-open .modal__panel { transform: scale(1) translateY(0); }
.modal__media { background: var(--ink-3); position: relative; min-height: 260px; }
.modal__media img, .modal__media svg { width: 100%; height: 100%; object-fit: cover; }
.modal__thumbs {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px;
}
.modal__thumb {
  width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  border: 2px solid transparent; background: var(--ink-4);
  transition: border-color 0.16s;
}
.modal__thumb.is-active { border-color: var(--gold); }
.modal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal__content { padding: 26px 26px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(28, 15, 45, 0.84); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--sand);
}
.modal__close:hover { background: var(--flame); border-color: var(--flame); }
.modal__title { font-size: 30px; line-height: 1; }
.modal__desc { color: var(--muted); font-size: 14px; }

.spec-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table__row { display: grid; grid-template-columns: 108px 1fr; gap: 1px; background: var(--line); }
.spec-table__row > * { background: var(--ink-3); padding: 9px 13px; font-size: 12.5px; }
.spec-table__k { color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; }

/* --- 16. Forms ----------------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--muted);
}
.field__label .req { color: var(--flame); margin-left: 3px; }
.field__hint { font-size: 11.5px; color: var(--muted-2); }
.field__error { font-size: 11.5px; color: var(--bad); display: none; }
.field.has-error .field__error { display: block; }
.field.has-error .input, .field.has-error .select-full { border-color: var(--bad); }

.input, .select-full, textarea.input {
  width: 100%;
  padding: 12px 15px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  transition: border-color 0.16s, background 0.16s;
}
.input:focus, .select-full:focus, textarea.input:focus {
  outline: none; border-color: var(--gold); background: var(--ink-3);
}
.input::placeholder { color: var(--muted-2); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.55; }
.select-full {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ba2ad' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.select-full option { background: var(--ink-2); color: var(--sand); }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; }

/* Radio cards (delivery) */
.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 17px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.radio-card:hover { border-color: var(--muted-2); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card__dot {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--muted-2); position: relative; transition: border-color 0.16s;
}
.radio-card input:checked ~ .radio-card__dot { border-color: var(--gold); }
.radio-card input:checked ~ .radio-card__dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold);
}
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(251, 170, 24, 0.05); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.radio-card__title { font-weight: 700; font-size: 14px; display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.radio-card__price { color: var(--gold); font-weight: 800; font-size: 13px; }
.radio-card__note { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }

/* Checkbox */
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  width: 19px; height: 19px; border-radius: 5px; flex-shrink: 0; margin-top: 1px;
  border: 2px solid var(--muted-2); display: grid; place-items: center;
  transition: all 0.16s;
}
.check input:checked + .check__box { background: var(--gold); border-color: var(--gold); }
.check input:checked + .check__box::after {
  content: ''; width: 5px; height: 9px; border: solid var(--on-gold);
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px);
}
.check input:focus-visible + .check__box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- 17. Panels / cards -------------------------------------------------- */
.panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.panel__title { font-size: 21px; margin-bottom: 4px; }
.panel__note { font-size: 13px; color: var(--muted-2); margin-bottom: 18px; }
.panel--flame { border-color: rgba(255, 77, 46, 0.35); background: rgba(255, 77, 46, 0.05); }
.panel--gold  { border-color: rgba(251, 170, 24, 0.3);  background: rgba(251, 170, 24, 0.04); }

.step-num {
  display: inline-grid; place-items: center;
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--flame); color: #fff;
  font-family: var(--font-display); font-size: 14px;
  margin-right: 11px; flex-shrink: 0;
}

/* Bank details */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bank-cell { background: var(--ink-3); padding: 13px 15px; }
.bank-cell__k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.bank-cell__v { font-family: var(--font-mono); font-size: 14.5px; font-weight: 600; margin-top: 5px; word-break: break-all; }

.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--gold); margin-top: 6px; font-weight: 600;
}
.copy-btn:hover { text-decoration: underline; }

/* --- 18. Dropzone (POP upload) ------------------------------------------- */
.dropzone {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  background: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); background: rgba(251, 170, 24, 0.05); }
.dropzone__icon { color: var(--muted-2); margin-bottom: 11px; }
.dropzone__title { font-weight: 700; font-size: 14.5px; }
.dropzone__hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }

.file-chip {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px;
  background: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
}
.file-chip__thumb {
  width: 46px; height: 46px; border-radius: 7px; overflow: hidden;
  background: var(--ink-4); flex-shrink: 0; display: grid; place-items: center;
  color: var(--muted-2); font-size: 10px; font-weight: 700;
}
.file-chip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-chip__name { font-size: 13px; font-weight: 600; word-break: break-all; }
.file-chip__size { font-size: 11.5px; color: var(--muted-2); }

/* --- 19. Order summary rail ---------------------------------------------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 26px; align-items: start; }
.order-rail { position: sticky; top: calc(var(--header-h) + 20px); }

.summary-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-item:last-of-type { border-bottom: none; }
.summary-item__media { width: 50px; height: 50px; border-radius: 8px; overflow: hidden; background: var(--ink-3); flex-shrink: 0; }
.summary-item__media img, .summary-item__media svg { width: 100%; height: 100%; object-fit: cover; }
.summary-item__name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.summary-item__meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.summary-item__price { font-size: 13px; font-weight: 700; margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --- 20. Confirmation ---------------------------------------------------- */
.confirm { text-align: center; padding: 40px 20px; }
.confirm__mark {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 22px;
  background: rgba(31, 191, 117, 0.14); border: 2px solid var(--ok);
  display: grid; place-items: center; color: var(--ok);
}
.confirm__title { font-size: clamp(30px, 5vw, 48px); }
.order-ref {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700; letter-spacing: 0.05em;
  padding: 13px 26px; margin: 20px 0;
  background: var(--ink-3); border: 1px dashed var(--gold);
  border-radius: var(--radius); color: var(--gold);
}

/* --- 21. Toast ----------------------------------------------------------- */
.toasts {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: grid; gap: 9px; width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  background: var(--ink-3);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px;
  animation: toast-in 0.3s var(--ease);
}
.toast--bad { border-left-color: var(--bad); }
.toast--info { border-left-color: var(--violet); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
.toast.is-out { animation: toast-out 0.25s forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* --- 22. Footer ---------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 46px 32px; margin-top: 40px;
  background: linear-gradient(180deg, var(--ink-2), var(--plum));
}
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 30px; }
.footer__title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 13px; font-family: var(--font-body); font-weight: 700; }
.footer__list { display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.footer__list a:hover { color: var(--gold); }
.footer__bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted-2);
}

/* --- 23. Admin (manage.html) --------------------------------------------- */
.admin-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 18px;
}
.admin-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; background: var(--ink-3);
  border: 1px solid var(--line-2);
}
.admin-status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.admin-status.is-live .admin-status__dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 191, 117, 0.2); }

.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 10px 11px; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; background: var(--ink); z-index: 2; white-space: nowrap;
}
.admin-table td { padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:hover td { background: var(--ink-2); }
.admin-table .cell-input {
  width: 100%; padding: 7px 9px; background: var(--ink-2);
  border: 1px solid transparent; border-radius: 6px; font-size: 13px;
}
.admin-table .cell-input:hover { border-color: var(--line-2); }
.admin-table .cell-input:focus { outline: none; border-color: var(--gold); background: var(--ink-3); }
.admin-thumb {
  width: 52px; height: 52px; border-radius: 8px; overflow: hidden;
  background: var(--ink-3); cursor: pointer; position: relative;
  border: 1px solid var(--line-2); flex-shrink: 0;
}
.admin-thumb img, .admin-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.admin-thumb::after {
  content: 'EDIT'; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(28, 15, 45, 0.8); color: var(--gold);
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
  opacity: 0; transition: opacity 0.16s;
}
.admin-thumb:hover::after { opacity: 1; }
.admin-count-pill {
  position: absolute; top: -5px; right: -5px; z-index: 2;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--gold); color: var(--on-gold);
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
}

.photo-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 11px; }
.photo-tile {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--ink-3); border: 1px solid var(--line-2);
  cursor: grab;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile.is-assigned { opacity: 0.4; }
.photo-tile__label {
  position: absolute; inset: auto 0 0 0; padding: 5px 7px;
  background: linear-gradient(transparent, rgba(28, 15, 45, 0.95));
  font-size: 10px; color: var(--sand); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-tile__x {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(28, 15, 45, 0.84); color: var(--sand);
  display: grid; place-items: center; font-size: 12px;
}
.photo-tile__x:hover { background: var(--bad); }

.progress {
  height: 6px; border-radius: 999px; background: var(--ink-4); overflow: hidden;
}
.progress__bar { height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.25s; }

/* --- 24. Responsive ------------------------------------------------------ */
@media (max-width: 1080px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-rail { position: static; }
}
@media (max-width: 780px) {
  .modal__panel { grid-template-columns: 1fr; max-height: 92vh; }
  .modal__media { min-height: 230px; max-height: 46vh; }
  .nav { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; }
  .card__name { font-size: 15px; }
  .price { font-size: 18px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .result-count { width: 100%; margin-left: 0; }
}
@media (max-width: 520px) {
  .toolbar { top: 0; }
  .bank-grid, .field-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
}

/* --- 25. Print ----------------------------------------------------------- */
@media print {
  .header, .toolbar, .footer, .drawer, .scrim, .toasts, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border-color: #ccc; }
}
