:root {
  --bg: #04070a;
  --panel: rgba(10, 14, 19, 0.92);
  --panel-2: #0e141b;
  --line: #1b252f;
  --line-2: #26323e;
  --ice: #22d3ee;
  --ice-2: #0ea5c6;
  --ice-glow: rgba(34, 211, 238, 0.35);
  --mint: #aee9e1;
  --text: #e6eef3;
  --muted: #8a99a6;
  --danger: #f87171;
  --bronze: #d08a4f;
  --silver: #c5d0da;
  --gold: #f5c542;
  --radius: 4px;
  --head: 'Exo 2', system-ui, sans-serif;
  --body: 'Saira', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; flex: none; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.poly {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.9), transparent 60%);
}
header, main, footer { position: relative; z-index: 1; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 20; padding: 24px 16px 0; }
.nav {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.brand img { height: 46px; width: auto; mix-blend-mode: screen; }
.footer img { width: 120px; }
.nav-links { display: flex; gap: 32px; margin-left: auto; font-family: var(--head); font-weight: 500; }
.nav-links a { color: #cdd6dd; transition: color .15s; }
.nav-links a:hover { color: var(--ice); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.currency {
  font-family: var(--head); font-weight: 700; font-size: 14px;
  padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); color: #cdd6dd;
}
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; font-size: 20px;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--ice); color: var(--ice); }
.cart-btn { border-color: var(--ice); color: var(--ice); }
.badge {
  position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--ice); color: #00141a; border-radius: 10px;
}
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 110px 16px 90px; }
.hero h1 {
  margin: 0 0 8px; font-family: var(--head); font-weight: 800;
  font-size: clamp(34px, 6vw, 54px); color: var(--mint); letter-spacing: .5px;
}
.hero h1 span { color: var(--ice); text-shadow: 0 0 24px var(--ice-glow); }
.hero-sub { margin: 0 0 36px; color: var(--muted); }
.search {
  display: flex; align-items: center; gap: 12px;
  width: min(490px, 100%); margin: 0 auto 44px; padding: 0 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: #c1ccd5; font-size: 18px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--ice); }
.search input {
  flex: 1; padding: 13px 0; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 14px;
}
.search input::placeholder { color: #9aa7b2; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 24px; border-radius: 2px;
  font-family: var(--head); font-weight: 700; font-size: 15px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn-outline { border: 1px solid var(--ice); color: var(--ice); background: rgba(4, 7, 10, .6); }
.btn-outline:hover { background: var(--ice); color: #00141a; box-shadow: 0 0 22px var(--ice-glow); }
.btn-solid { width: 100%; border: 0; background: var(--ice); color: #00141a; padding: 13px; }
.btn-solid:hover { box-shadow: 0 0 22px var(--ice-glow); }
.btn-solid:disabled { opacity: .5; cursor: wait; }

/* ---------- Category cards ---------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  scroll-margin-top: 110px;
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); }
}
#products { scroll-margin-top: 110px; }
.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card h2 {
  margin: 0; padding: 12px; text-align: center;
  font-family: var(--head); font-weight: 700; font-size: 17px; color: #dde6ec;
  border-bottom: 1px solid var(--line);
}
.art {
  position: relative; margin: 8px; aspect-ratio: 16 / 9; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(140, 220, 240, .55), transparent 55%),
    radial-gradient(ellipse at 15% 20%, rgba(70, 150, 180, .5), transparent 45%),
    radial-gradient(ellipse at 85% 25%, rgba(70, 150, 180, .45), transparent 45%),
    linear-gradient(180deg, #0f2b3a, #0a1b26 70%, #071118);
}
.art::before { /* frost / storm */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 60%, rgba(255,255,255,.12), transparent 25%),
    radial-gradient(circle at 70% 55%, rgba(255,255,255,.10), transparent 22%),
    radial-gradient(circle at 50% 15%, rgba(255,255,255,.08), transparent 30%);
  filter: blur(6px);
}
.art .wm { position: absolute; z-index: 1; top: 6px; left: 50%; transform: translateX(-50%); width: 30%; opacity: .95; filter: drop-shadow(0 0 6px rgba(34,211,238,.4)); }
.art .pedestal {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  width: 62%; height: 15%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #6d8796, #2a3a45 60%, #111a20);
  box-shadow: 0 6px 16px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.15);
}
.art .icon {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  height: 52%; color: var(--ice);
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, .55)) drop-shadow(0 6px 8px rgba(0,0,0,.6));
  transition: transform .3s;
}
.art .icon svg { height: 100%; width: auto; display: block; }
.art .item-img {
  position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%);
  height: 66%; width: auto; max-width: 80%; object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.65)); transition: transform .3s;
}
.card:hover .art .item-img { transform: translateX(-50%) translateY(-4px) scale(1.04); }
.art.banner { background: #0a1b26; }
.art.banner::before { display: none; }
.art .banner-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .art .banner-img { transform: scale(1.04); }
.card:hover .art .icon { transform: translateX(-50%) translateY(-4px) scale(1.04); }
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 12px; border-top: 1px solid var(--line); margin-top: auto;
}
.price { font-family: var(--head); font-weight: 700; color: var(--ice); }
.stock { color: var(--muted); font-size: 14px; }
.card .btn { margin: 0 16px 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Features ---------- */
.features {
  display: grid; gap: 18px; margin-top: 70px; margin-bottom: 70px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature {
  text-align: center; padding: 30px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.feature svg { font-size: 34px; color: var(--ice); }
.feature h3 { margin: 12px 0 8px; font-family: var(--head); font-weight: 700; text-transform: uppercase; color: var(--mint); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.footer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 16px 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; text-align: center; background: rgba(4,7,10,.8);
}
.footer p { margin: 0; }

/* ---------- Category overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto;
  background: rgba(2, 4, 6, .78); backdrop-filter: blur(4px);
  padding: 40px 16px;
}
.panel {
  position: relative; width: min(980px, 100%); margin: 0 auto;
  background: #0a0e13; border: 1px solid var(--line-2); border-radius: var(--radius);
  animation: rise .25s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 36px; height: 36px; font-size: 26px; line-height: 1;
  background: rgba(0,0,0,.5); border: 1px solid var(--line-2); border-radius: var(--radius);
}
.close:hover { border-color: var(--ice); color: var(--ice); }
.cat-hero { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 24px; border-bottom: 1px solid var(--line); align-items: center; }
.cat-hero .art { margin: 0; }
.cat-hero h2 { margin: 0 0 6px; font-family: var(--head); font-size: 30px; color: var(--mint); }
.cat-hero p { margin: 0; color: var(--muted); }
.rules { margin: 16px 24px 0; padding: 16px 20px; border: 1px solid rgba(34,211,238,.35); background: rgba(34,211,238,.05); border-radius: var(--radius); }
.rules h3 { margin: 0 0 8px; font-family: var(--head); font-size: 15px; color: var(--ice); text-transform: uppercase; letter-spacing: 1px; }
.rules ul { margin: 0; padding-left: 18px; color: #c9d4dc; font-size: 14px; }
.products { display: grid; gap: 16px; padding: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product {
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.product h3 { margin: 0; font-family: var(--head); font-size: 19px; }
.product.bronze { border-top: 3px solid var(--bronze); } .product.bronze h3 { color: var(--bronze); }
.product.silver { border-top: 3px solid var(--silver); } .product.silver h3 { color: var(--silver); }
.product.gold { border-top: 3px solid var(--gold); box-shadow: 0 0 30px rgba(245,197,66,.08); } .product.gold h3 { color: var(--gold); }
.note { margin: 0; font-size: 13px; color: #f3c98b; }
.includes { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: #c9d4dc; }
.includes li { display: flex; gap: 8px; }
.includes li::before { content: '❄'; color: var(--ice); font-size: 11px; line-height: 22px; }
.options { display: grid; gap: 8px; }
.opt-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; text-align: left;
  background: #0a0f14; border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.opt-btn:hover { border-color: #3c5160; }
.opt-btn[aria-pressed="true"] { border-color: var(--ice); background: rgba(34,211,238,.08); }
.opt-btn small { display: block; color: var(--muted); font-size: 12px; }
.opt-btn b { font-family: var(--head); color: var(--ice); white-space: nowrap; }
.big-price { font-family: var(--head); font-weight: 800; font-size: 28px; color: var(--ice); }
.product .btn-outline { margin-top: auto; }

/* ---------- Drawer ---------- */
.drawer-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: min(420px, 100%); display: flex; flex-direction: column;
  background: #090d12; border-left: 1px solid var(--line-2);
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--head); font-size: 20px; }
.drawer-head .close { position: static; }
.drawer-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .name { font-weight: 600; }
.line .sub { color: var(--muted); font-size: 13px; }
.line .amt { font-family: var(--head); font-weight: 700; color: var(--ice); text-align: right; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 26px; height: 26px; background: #111821; border: 1px solid var(--line-2); border-radius: 3px; }
.qty button:hover { border-color: var(--ice); }
.qty span { min-width: 20px; text-align: center; }
.remove { background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; justify-self: end; }
.drawer-empty { text-align: center; color: var(--muted); padding: 60px 0; }
.drawer-foot { display: grid; gap: 10px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.drawer-foot[hidden] { display: none; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--head); font-size: 18px; }
.total strong { color: var(--ice); font-size: 22px; }
.drawer-foot label { display: grid; gap: 4px; font-size: 13px; color: #c1ccd5; }
.drawer-foot .opt { color: var(--muted); }
.drawer-foot input {
  padding: 10px 12px; background: #0e141b; border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--text); font: inherit; outline: 0;
}
.drawer-foot input:focus { border-color: var(--ice); }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }
.fine { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; background: #0e1a22; border: 1px solid var(--ice); border-radius: var(--radius);
  color: var(--text); font-size: 14px; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Result pages ---------- */
.result { width: min(560px, 100% - 32px); margin: 70px auto; padding: 32px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.result h1 { margin: 0 0 8px; font-family: var(--head); color: var(--mint); }
.result .tick { font-size: 54px; color: var(--ice); }
.result ul { list-style: none; padding: 0; margin: 20px 0; text-align: left; }
.result li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav-wrap { padding: 12px 12px 0; }
  .nav { gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
  .brand img { height: 36px; }
  .menu-btn { display: grid; }
  .currency { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-links { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; margin: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 4px; border-top: 1px solid var(--line); }
  .hero { padding: 70px 16px 60px; }
  .cat-hero { grid-template-columns: 1fr; }
  .overlay { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
