:root {
  --bg: #0b0d10;
  --panel: rgba(23, 27, 33, 0.88);
  --panel-solid: #171b21;
  --muted: #98a0ab;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f7f8;
  --accent: #b7ff55;
  --accent-dark: #1a2d0d;
  --purple: #b393ff;
  --radius: 22px;
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .14;
}
.ambient-one { top: -70px; right: -70px; background: var(--accent); }
.ambient-two { top: 250px; left: -150px; background: #7355ff; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 14px;
}
.brand { display: flex; align-items: center; gap: 3px; font-size: 21px; font-weight: 800; letter-spacing: -.9px; }
.brand-mark { color: var(--accent); }
.round-button, .sheet-close {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.round-button { width: 42px; height: 42px; }
.round-button svg { width: 19px; fill: var(--accent); }
main { padding: 0 16px 42px; }
.hero {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 14px;
  padding: 26px 0 22px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: 38px; line-height: .98; letter-spacing: -2.3px; }
h1 span { color: var(--accent); }
.hero-copy > p:last-child { max-width: 250px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.gift-card {
  position: relative;
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(183,255,85,.24);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(183,255,85,.19), rgba(183,255,85,.04));
}
.gift-glow { position: absolute; top: -34px; right: -30px; width: 94px; height: 94px; border-radius: 50%; background: var(--accent); filter: blur(34px); opacity: .35; }
.gift-icon { position: absolute; top: 13px; right: 16px; color: var(--accent); font-size: 27px; }
.gift-card strong { font-size: 18px; letter-spacing: -.8px; }
.gift-card small { color: var(--muted); font-size: 11px; }
.search-wrap { position: sticky; z-index: 4; top: 0; padding: 9px 0 15px; background: linear-gradient(var(--bg) 78%, transparent); }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(24,28,34,.94);
  backdrop-filter: blur(20px);
}
.search svg { width: 18px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 2; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; }
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 12px 0 12px; }
h2 { margin-bottom: 0; font-size: 25px; letter-spacing: -1.2px; }
.counter { color: var(--muted); font-size: 12px; }
.category-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 3px; scrollbar-width: none; }
.category-strip::-webkit-scrollbar { display: none; }
.category-chip {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 12px;
  font-weight: 700;
}
.category-chip.active { border-color: rgba(183,255,85,.48); color: var(--accent); background: var(--accent-dark); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(23,27,33,.82); }
.product-card-button { width: 100%; padding: 0; border: 0; color: inherit; text-align: left; background: transparent; }
.product-image-wrap { position: relative; aspect-ratio: 1 / .94; overflow: hidden; background: #f6f6f4; }
.product-image { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.product-card:active .product-image { transform: scale(1.04); }
.sale-badge { position: absolute; top: 9px; left: 9px; padding: 5px 7px; border-radius: 7px; color: #182108; background: var(--accent); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.sale-badge.out { color: #fff; background: #353b44; }
.product-info { padding: 11px; }
.product-category { margin-bottom: 5px; overflow: hidden; color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .7px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.product-title { display: -webkit-box; min-height: 35px; margin-bottom: 12px; overflow: hidden; font-size: 13px; line-height: 1.32; letter-spacing: -.35px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.product-price { font-size: 14px; letter-spacing: -.5px; }
.arrow { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--accent); background: rgba(183,255,85,.1); font-size: 13px; }
.load-more, .primary-button, .secondary-button {
  border-radius: 14px;
  font-weight: 800;
}
.load-more { display: block; margin: 18px auto 0; padding: 12px 22px; border: 1px solid var(--line); color: var(--text); background: var(--panel); }
.backdrop { position: fixed; z-index: 9; inset: 0; background: rgba(0,0,0,.58); backdrop-filter: blur(5px); }
.sheet {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 18px max(22px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #171b20;
  box-shadow: 0 -18px 50px rgba(0,0,0,.28);
}
.sheet-close { position: absolute; z-index: 2; top: 15px; right: 15px; width: 34px; height: 34px; font-size: 23px; line-height: 1; }
.sheet-image-wrap { height: 220px; margin: -5px -4px 18px; overflow: hidden; border-radius: 18px; background: #f8f8f6; }
.sheet-image-wrap img { width: 100%; height: 100%; object-fit: contain; }
.sheet-description { margin: 13px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.sheet-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-bottom small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.sheet-bottom strong { font-size: 22px; letter-spacing: -1px; }
.primary-button { padding: 13px 18px; border: 0; color: #142007; background: var(--accent); }
.secondary-button { padding: 13px 18px; border: 1px solid var(--line); color: var(--text); background: transparent; }
.wide { width: 100%; }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0; }
.payment-option { padding: 13px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-align: left; background: rgba(255,255,255,.02); }
.payment-option.selected { border-color: rgba(183,255,85,.54); background: var(--accent-dark); }
.payment-icon { display: grid; width: 31px; height: 31px; margin-bottom: 15px; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(183,255,85,.11); font-weight: 900; }
.payment-option strong, .payment-option small { display: block; }
.payment-option strong { margin-bottom: 5px; font-size: 13px; }
.payment-option small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.field { display: block; margin: 18px 0; }
.field span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.field input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; outline: none; color: var(--text); background: rgba(255,255,255,.04); }
.field input:focus { border-color: var(--accent); }
.sheet-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.success-icon { display: grid; width: 58px; height: 58px; margin-bottom: 17px; place-items: center; border-radius: 18px; color: #1b2c0e; background: var(--accent); font-size: 32px; font-weight: 900; }
.qr-wrap { margin: 16px 0; padding: 13px; border: 1px solid var(--line); border-radius: 17px; text-align: center; background: rgba(255,255,255,.035); }
.qr-wrap img { max-width: 230px; width: 100%; margin-bottom: 10px; border-radius: 12px; background: white; }
.qr-wrap p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.qr-wrap + .secondary-button { margin-top: 10px; }
.toast { position: fixed; z-index: 20; right: 16px; bottom: 20px; left: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #242a32; box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(15px); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }
@media (min-width: 680px) {
  main { max-width: 760px; margin: auto; }
  .topbar { max-width: 800px; margin: auto; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet { max-width: 520px; margin: auto; }
}
