:root {
  color-scheme: dark;
  --bg: #050a12;
  --panel: #191c22;
  --panel-2: #232832;
  --line: rgba(255,255,255,.12);
  --text: #f8fafc;
  --muted: #a5a8af;
  --green: #2bd861;
  --cyan: #21d7ec;
  --orange: #ff922e;
  --blue: #6478ff;
  --accent: var(--cyan);
  --accent-soft: rgba(33,215,236,.13);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(33,215,236,.16), transparent 34rem),
    radial-gradient(circle at 100% 10%, rgba(43,216,97,.1), transparent 30rem),
    var(--bg);
  padding-bottom: 108px;
}

button, input { font: inherit; }
button { cursor: pointer; }
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}
.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(33,215,236,.45);
  background: linear-gradient(145deg, rgba(33,215,236,.26), rgba(100,120,255,.12));
  color: var(--cyan);
  font-weight: 900;
  font-size: 24px;
}
.eyebrow {
  margin: 0 0 2px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 82px);
  line-height: .95;
  letter-spacing: 0;
}
.subtitle {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.35;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 12px 0 18px;
  background: linear-gradient(180deg, var(--bg) 80%, transparent);
}
.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.search input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(25,28,34,.92);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}
.search input:focus { border-color: rgba(33,215,236,.7); }
.toggles {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(25,28,34,.88);
}
.filter {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 800;
}
.filter.active {
  color: #07110b;
  background: var(--green);
}

.category-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: -4px 0 18px;
}
.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.category-filters::-webkit-scrollbar { display: none; }
.category-chip {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, rgba(255,255,255,.12));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, rgba(25,28,34,.9));
  color: color-mix(in srgb, var(--accent) 86%, white);
  padding: 0 15px;
  font-size: 14px;
  font-weight: 900;
}
.category-chip.active {
  color: #061015;
  background: color-mix(in srgb, var(--accent) 86%, white);
  border-color: color-mix(in srgb, var(--accent) 80%, white);
}

.status-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(25,28,34,.86);
  color: var(--muted);
  padding: 18px;
}
.status-card.hidden { display: none; }
.catalog {
  display: grid;
  gap: 28px;
}
.section {
  display: grid;
  gap: 14px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--accent);
  font-size: 24px;
}
.section-title span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.03));
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px 76px 1fr;
  gap: 14px;
  min-height: 172px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 8%, rgba(35,40,50,.95)), rgba(25,28,34,.92));
  padding: 16px;
  overflow: hidden;
}
.product-card.unavailable { opacity: .78; }
.pick {
  display: grid;
  place-items: start center;
  padding-top: 7px;
}
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,.55);
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.product-card.selected {
  border-color: rgba(43,216,97,.8);
  background: linear-gradient(145deg, rgba(35,70,48,.78), rgba(25,28,34,.94));
}
.product-card.selected .pick span {
  border-color: var(--green);
  background: var(--green);
}
.product-card.selected .pick span::after {
  content: "✓";
  color: #07110b;
  font-weight: 900;
}
.product-card.disabled .pick span {
  border-color: rgba(255,255,255,.24);
}
.product-image {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  padding: 4px;
}
.product-body { min-width: 0; }
.product-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.section-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.08;
}
.price {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 18px;
}
.description {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.32;
}
.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.variant {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(5,10,18,.45);
  color: #d9dce3;
  min-height: 34px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 800;
}
.variant.active {
  border-color: var(--accent);
  color: color-mix(in srgb, var(--accent) 84%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.variant.out {
  border-color: rgba(255,146,46,.35);
  color: rgba(255,146,46,.72);
  background: rgba(255,146,46,.08);
}
.variant.out::after {
  content: " out";
  color: rgba(255,146,46,.7);
  font-size: 11px;
  font-weight: 900;
}
.variant.out.active {
  border-color: var(--orange);
  color: var(--orange);
}
.stock-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}
.stock-pill.out { color: var(--orange); }
.notify {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(33,150,255,.5);
  border-radius: 10px;
  background: rgba(33,150,255,.14);
  color: #20a7ff;
  padding: 0;
  font-weight: 900;
  font-size: 19px;
}
.notify:hover { background: rgba(33,150,255,.24); }

.tone-repair { --accent: #21d7ec; }
.tone-metabolic { --accent: #ff922e; }
.tone-gh { --accent: #b942f5; }
.tone-focus { --accent: #66a6ff; }
.tone-immune { --accent: #f4c400; }
.tone-supply { --accent: #2bd861; }
.tone-default { --accent: #21d7ec; }

.cart {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  width: min(760px, calc(100% - 24px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  background: rgba(25,28,34,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
  padding: 14px;
}
.cart-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.cart-total {
  color: var(--green);
  font-size: 26px;
  font-weight: 900;
}
.checkout {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--green);
  color: #07110b;
  padding: 0 24px;
  font-weight: 900;
}
.checkout:disabled {
  opacity: .42;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 22px, 560px); padding-top: 20px; }
  .hero { grid-template-columns: 58px 1fr; gap: 12px; }
  .brand-mark { width: 58px; height: 58px; border-radius: 18px; }
  .toolbar { grid-template-columns: 1fr; }
  .toggles { width: 100%; }
  .filter { flex: 1; }
  .category-strip { grid-template-columns: 1fr; }
  .category-chip { min-height: 36px; font-size: 13px; }
  .grid { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 30px 62px 1fr; gap: 10px; padding: 14px; }
  .product-image { width: 62px; height: 62px; }
  h2 { font-size: 21px; }
  .cart { grid-template-columns: 1fr auto; }
  .checkout { grid-column: 1 / -1; }
}
