:root {
  --primary: #22d3ee;
  --primary-strong: #06b6d4;
  --background: #0b0f14;
  --surface: #121821;
  --surface-2: #1a222e;
  --text: #e8eef6;
  --text-muted: #8b98a9;
  --border: #1f2937;
  --accent: #a78bfa;
  --success: #34d399;
  --danger: #f87171;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --header-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.logo__mark { color: var(--primary); display: inline-flex; }
.logo__text { font-size: 18px; }
.header__nav { display: flex; gap: 20px; }
.header__nav a { color: var(--text-muted); font-weight: 500; transition: color .2s; }
.header__nav a:hover, .header__nav a.is-active { color: var(--text); }
.header__actions { display: flex; gap: 8px; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--primary);
  color: #05131a;
  font-size: 11px; font-weight: 800;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}

.search-bar {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 0;
}
.search-bar[hidden] { display: none; }
.search-bar .container { display: flex; gap: 8px; }
.search-bar input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 15px;
}
.search-bar input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s, background .2s, border-color .2s, opacity .2s;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #05131a; }
.btn--primary:hover { background: var(--primary-strong); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: rgba(248, 113, 113, .1); }
.btn--block { width: 100%; }

.link { color: var(--primary); font-weight: 600; font-size: 14px; }
.muted { color: var(--text-muted); }

/* HERO */
.hero { padding: 48px 0 24px; position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero__content h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.03em; margin: 16px 0 12px; }
.hero__content p { color: var(--text-muted); max-width: 520px; }
.hero__actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.pill {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(34, 211, 238, .12);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.hero__visual { position: relative; height: 320px; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.orb--1 { width: 220px; height: 220px; background: var(--primary); top: 10%; right: 10%; }
.orb--2 { width: 180px; height: 180px; background: var(--accent); bottom: 10%; left: 10%; }
.hero__device {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hero__device-body {
  width: 110px; height: 240px;
  border-radius: 28px;
  background: linear-gradient(160deg, #1a222e, #0b0f14);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 0 30px rgba(34, 211, 238, .15);
}
.hero__device-glow {
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%);
}

/* SECTIONS */
.section { padding: 32px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section__head h2 { font-size: clamp(20px, 3vw, 28px); letter-spacing: -0.02em; margin: 0; }
h1 { letter-spacing: -0.02em; }

/* CHIPS */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--primary); color: #05131a; border-color: var(--primary); }

/* GRID */
.grid { display: grid; gap: 16px; }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* PRODUCT CARD */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s;
  position: relative;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  display: flex; align-items: center; justify-content: center;
}
.card__media a { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__fav {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(11, 15, 20, .7);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s, background .2s;
}
.card__fav:hover { color: var(--danger); }
.card__fav.is-active { color: var(--danger); background: rgba(248,113,113,.12); }
.card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__category { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.card__title { font-size: 15px; font-weight: 700; margin: 0; }
.card__desc { font-size: 13px; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__price { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.card__stock { font-size: 12px; font-weight: 600; }
.card__stock.is-in { color: var(--success); }
.card__stock.is-out { color: var(--danger); }

/* AGE GATE */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6, 9, 12, .92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.age-gate[hidden] { display: none; }
.age-gate__card {
  max-width: 420px; width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.age-gate__badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(248,113,113,.15);
  color: var(--danger);
  border-radius: 999px;
  font-weight: 800;
  margin-bottom: 12px;
}
.age-gate h2 { margin: 0 0 8px; }
.age-gate p { color: var(--text-muted); margin: 0 0 20px; font-size: 14px; }
.age-gate__actions { display: flex; gap: 10px; flex-direction: column; }

/* PRODUCT PAGE */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}
.product-page .card__media { aspect-ratio: 1 / 1; }
.product-page h1 { font-size: clamp(24px, 4vw, 36px); margin: 8px 0 8px; }

/* CART */
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
}
.cart-item__img { width: 80px; height: 80px; background: var(--surface-2); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cart-item__img img { width: 80%; height: 80%; object-fit: contain; }
.cart-item__title { font-weight: 700; margin: 0 0 4px; }
.cart-item__price { color: var(--text-muted); font-size: 14px; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 16px; }
.qty button:hover { background: var(--border); }
.cart-summary {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.cart-summary__total { font-size: 20px; font-weight: 800; }

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
}
.empty .btn { margin-top: 12px; }

/* TOAST */
.toast-stack {
  position: fixed; bottom: 96px; right: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 90;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
  max-width: 320px;
}
.toast--danger { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--success); }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(11, 15, 20, .95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: none;
  z-index: 50;
}
.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0;
  background: transparent; border: none; color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  transition: color .2s;
  text-decoration: none;
}
.bottom-nav__item.is-active { color: var(--primary); }

/* FORM */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-muted); }
.form input, .form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.success-card {
  margin-top: 24px; padding: 24px;
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: var(--radius);
}
.success-card h2 { margin-top: 0; }

/* CATALOG TOOLBAR */
.catalog-toolbar { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.catalog-toolbar input, .catalog-toolbar select {
  flex: 1; min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.catalog-toolbar input:focus, .catalog-toolbar select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }