/* CompX — глубокий чёрный фон, фиолетово-сиреневый неон, лёгкое «стекло» без тяжёлых эффектов */
:root {
  --bg: #0b0b10;
  --text: #f1eefa;
  --muted: #9d97b4;
  --violet: #a855f7;
  --lilac: #c084fc;
  --purple: #9333ea;
  --deep: #7c3aed;
  --danger: #ff5d7a;
  --ok: #34d399;
  --warn: #fbbf24;

  /* поверхности: тёмный полупрозрачный фон + тонкая фиолетовая обводка + внутренний блик (без blur) */
  --surf: rgba(22, 22, 32, 0.72);
  --surf-strong: rgba(18, 18, 26, 0.96);
  --line: rgba(168, 85, 247, 0.22);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --grad-accent: linear-gradient(135deg, rgba(147, 51, 234, 0.62), rgba(124, 58, 237, 0.78));
  --grad-violet: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(109, 40, 217, 0.66));
  --glow: 0 0 12px rgba(168, 85, 247, 0.32);
  --glow-soft: 0 0 0 1px rgba(168, 85, 247, 0.6), 0 0 12px rgba(168, 85, 247, 0.28);

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Montserrat", "Manrope", system-ui, sans-serif;

  --r: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 60px;
  --bar-offset: var(--safe-b);
}
body.has-tabs { --bar-offset: calc(var(--tabbar-h) + var(--safe-b)); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
img { display: block; max-width: 100%; }
main { position: relative; }

/* ======================= SPLASH SCREEN (чёрный фон, контурный логотип, волна света) ======================= */
.splash {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: #0b0b10; overflow: hidden;
  opacity: 1; visibility: visible;
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
.sp-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; transition: transform 0.8s ease;
}
.splash.out .sp-stage { transform: scale(1.06); }
.sp-glow {
  position: absolute; left: 50%; top: 50%; width: 170%; height: 300%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.34), rgba(147, 51, 234, 0.1) 55%, rgba(11, 11, 16, 0) 100%);
  transform: translate(-50%, -50%);
  animation: spGlow 2.6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes spGlow {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  to { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}
.sp-wordwrap { position: relative; display: inline-block; animation: spIn 0.8s ease both; }
@keyframes spIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.sp-word {
  display: block; white-space: nowrap; line-height: 1;
  font-family: var(--font-logo); font-weight: 800; letter-spacing: 0.02em;
  font-size: clamp(54px, 20vw, 132px);
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px #a855f7;
}
/* размытая световая волна: двигается только transform (GPU), blur(18px) */
.sp-wave {
  position: absolute; left: 0; top: -15%; width: 40%; height: 130%;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.95), rgba(124, 58, 237, 0.45) 55%, rgba(124, 58, 237, 0) 100%);
  filter: blur(18px);
  will-change: transform;
  animation: spWave 2.8s linear infinite;
}
@keyframes spWave {
  0% { transform: translateX(-100%) scale(0.8); }
  37.5% { transform: translateX(75%) scale(1.25); }
  75%, 100% { transform: translateX(250%) scale(0.8); }
}
/* яркий контур, «пробегающий» по буквам: окно едет вправо, текст внутри едет влево — выглядит как неподвижный */
.sp-win {
  position: absolute; left: 0; top: 0; bottom: 0; width: 40%; overflow: hidden;
  will-change: transform; animation: spWin 2.8s linear infinite;
}
.sp-lit {
  position: absolute; left: 0; top: 0; width: 250%;
  -webkit-text-stroke-color: #ddd6fe;
  will-change: transform; animation: spWinIn 2.8s linear infinite;
}
@keyframes spWin {
  0% { transform: translateX(-100%); }
  75%, 100% { transform: translateX(250%); }
}
@keyframes spWinIn {
  0% { transform: translateX(40%); }
  75%, 100% { transform: translateX(-100%); }
}

/* ======================= НЕОНОВЫЙ ФОН (статичный: растеризуется один раз) ======================= */
.neon-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  contain: layout paint size; transform: translateZ(0);
  opacity: 0; transition: opacity 1.2s ease 0.1s;
}
body.ready .neon-bg { opacity: 1; }
.neon-txt {
  position: absolute; left: 50%; top: 48%;
  white-space: nowrap; line-height: 1; letter-spacing: -0.02em;
  font-family: var(--font-logo); font-size: clamp(110px, 36vw, 280px); font-weight: 800;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: linear-gradient(90deg, #9333ea 0%, #a855f7 55%, #7c3aed 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.neon-core { filter: blur(8px); opacity: 0.22; }
.neon-glow { filter: blur(45px); opacity: 0.35; transform: translate(-50%, -50%) rotate(-15deg) scale(1.06); }

/* ======================= ПОВЕРХНОСТИ-«СТЕКЛО» (без backdrop-filter) ======================= */
.searchbar, .chip, .card, .panel, .cart-row, .select-wrap select, select.inp, .inp, .icon-btn,
.stepper, .quiz-budget, .glass-note, .fps-pill, .rel-card, .switch, .a-row, .subtabs, .toast,
.ac-list, .gallery, .fav-btn, .gate-box, .banner-go, .gal-count, .btn, .stat, .seg, .grad-chip, .thumb, .thumb-add {
  background: var(--surf);
  border: 1px solid var(--line);
  box-shadow: var(--hi);
}

/* ======================= ШАПКА (фиксированная — лёгкий blur 10px) ======================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  background: rgba(14, 14, 20, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--hi);
}
.home-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 2px 12px 2px 2px; border-radius: 999px;
  transition: transform 0.1s, background 0.2s;
}
.home-btn:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.06); }
.logo-av {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(124, 58, 237, 0.8));
  border: 1px solid rgba(196, 181, 253, 0.4);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.logo-av.lg { width: 64px; height: 64px; }
.logo-av img { width: 100%; height: 100%; object-fit: cover; animation: fade 0.25s; }
.av-cx { font-family: var(--font-logo); font-weight: 800; font-size: 13px; letter-spacing: 0.5px; color: #fff; }
.logo-av.lg .av-cx { font-size: 20px; }
.logo {
  display: inline-block; font-family: var(--font-logo); font-weight: 800; font-size: 21px; letter-spacing: 0.3px; color: #f5f3ff;
  text-shadow: 0 0 6px rgba(168, 85, 247, 0.9), 0 0 16px rgba(124, 58, 237, 0.7);
}
.logo.big { font-size: 38px; }

/* ======================= ЭКРАНЫ ======================= */
.view { padding: 14px 14px calc(var(--bar-offset) + 96px); max-width: 720px; margin: 0 auto; }
.h { font-size: 22px; font-weight: 700; margin: 4px 2px 14px; }
.muted { color: var(--muted); }
.price { font-weight: 700; color: #ede9fe; }
.link { color: var(--lilac); text-decoration: none; }

/* ======================= КНОПКИ ======================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: var(--r);
  color: var(--text); font-weight: 600; text-align: center;
  transition: transform 0.08s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.accent, .btn.primary {
  background: var(--grad-accent); color: #fff;
  border-color: rgba(196, 181, 253, 0.4);
  box-shadow: var(--hi), var(--glow);
}
.btn.violet {
  background: var(--grad-violet); color: #fff;
  border-color: rgba(196, 181, 253, 0.32);
  box-shadow: var(--hi), 0 0 10px rgba(124, 58, 237, 0.3);
}
.btn.glass.on { background: var(--grad-accent); border-color: rgba(196, 181, 253, 0.5); }
.btn.glass.on .heart { fill: var(--violet); stroke: var(--violet); }
.btn.ghost { background: transparent; box-shadow: none; border: 1.5px solid var(--line); }
.btn.danger { background: rgba(255, 93, 122, 0.14); color: var(--danger); border-color: rgba(255, 93, 122, 0.35); box-shadow: none; }
.btn.sm { min-height: 42px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { flex: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 17px;
}
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }
.row-btns { display: flex; gap: 10px; margin-top: 16px; }
.row-btns .btn { flex: 1; }

/* ======================= ПОИСК, ФИЛЬТРЫ ======================= */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 50px; border-radius: var(--r);
  color: var(--muted); transition: border-color 0.2s, color 0.2s;
}
.searchbar:focus-within { border-color: rgba(168, 85, 247, 0.7); box-shadow: var(--hi), var(--glow-soft); color: var(--lilac); }
.searchbar input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 16px; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar input::-webkit-search-cancel-button, .searchbar input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.filters { display: flex; align-items: center; gap: 8px; margin: 14px 0 12px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.08s;
}
.chip:active { transform: scale(0.96); }
.chip.chip-active, .chip.on { background: var(--grad-accent); color: #fff; border-color: rgba(196, 181, 253, 0.5); }
.select-wrap { margin-left: auto; position: relative; background: none; border: 0; box-shadow: none; }
.select-wrap select, select.inp {
  appearance: none; -webkit-appearance: none;
  min-height: 40px; padding: 0 34px 0 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c084fc' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  border-radius: 999px; outline: 0; font-size: 14px; font-weight: 600;
}
select.inp { border-radius: var(--r); min-height: 48px; width: 100%; font-weight: 400; font-size: 16px; }
.select-wrap select:focus, select.inp:focus { border-color: rgba(168, 85, 247, 0.7); }
select option { background: #16161f; color: var(--text); }

/* ======================= БАННЕРЫ ======================= */
.banners { margin: 14px 0 0; }
.banner-track {
  display: flex; gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner {
  position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  min-height: 132px; padding: 16px 18px; border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid rgba(196, 181, 253, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.1s;
}
.banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%);
}
.banner.clickable { cursor: pointer; }
.banner.clickable:active { transform: scale(0.985); }
/* коды градиентов остаются прежними (pink/violet/fuchsia/blue), цвета — только фиолетовые */
.g-pink { background: linear-gradient(135deg, #9333ea, #6d28d9); }
.g-violet { background: linear-gradient(135deg, #a855f7, #5b21b6); }
.g-fuchsia { background: linear-gradient(135deg, #7c3aed, #312e81); }
.g-blue { background: linear-gradient(135deg, #6366f1, #7c3aed); }
.banner-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.banner-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 16, 0.1), rgba(11, 11, 16, 0.72)); }
.banner-txt { position: relative; z-index: 2; padding-right: 36px; }
.banner-t { font-size: 19px; font-weight: 800; line-height: 1.2; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.banner-s { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.88); text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); }
.banner-go {
  position: absolute; z-index: 2; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  background: rgba(11, 11, 16, 0.4); border-color: rgba(255, 255, 255, 0.25);
}
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); transition: width 0.25s, background 0.25s; }
.dots i.on { width: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--violet), var(--deep)); }

.cta-col { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }
.cta-col .btn { width: 100%; min-height: 54px; font-size: 16px; }

/* ======================= СЕТКА ТОВАРОВ ======================= */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer;
  transition: border-color 0.2s, transform 0.08s;
}
.card:active { transform: scale(0.98); border-color: rgba(168, 85, 247, 0.65); }
.card-ph { position: relative; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card-prices { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.card-stock { font-size: 12px; color: var(--ok); }
.card.oos .card-stock { color: var(--danger); }
.card.oos .ph img { opacity: 0.4; filter: grayscale(0.8); }
.card.oos .card-title, .card.oos .card-prices { opacity: 0.6; }
.oos-tag {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(11, 11, 16, 0.82); color: var(--danger);
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
  border: 1px solid rgba(255, 93, 122, 0.5);
}

/* плашки цен и бейджи */
.price-pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 5px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  border: 1px solid rgba(196, 181, 253, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.price-pill.sm { padding: 3px 9px; font-size: 12.5px; }
.price-pill.lg { padding: 8px 18px; font-size: 24px; }
.old-price { color: #7d7893; font-size: 13px; font-weight: 500; text-decoration: line-through; }
.old-price.lg { font-size: 17px; }
.badge-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.badge-tag.sm { top: 6px; left: 6px; padding: 3px 7px; font-size: 10px; }

/* избранное */
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(11, 11, 16, 0.6); transition: transform 0.15s, color 0.2s;
}
.fav-btn:active { transform: scale(0.88); }
.fav-btn .heart { width: 18px; height: 18px; transition: fill 0.2s, stroke 0.2s; }
.fav-btn.on { color: var(--violet); border-color: rgba(168, 85, 247, 0.6); }
.fav-btn.on .heart { fill: var(--violet); stroke: var(--violet); }

/* ======================= ФОТО ======================= */
.ph {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.2); overflow: hidden;
}
.ph img { width: 100%; height: 100%; object-fit: cover; animation: fade 0.25s; }
.ph .ph-ico { width: 38%; height: 38%; }
.ph.sm { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 12px; flex: none; }
.ph.round { border-radius: 14px; }
.ph.big { aspect-ratio: 4 / 3; max-height: 46vh; }
.ph.big img { object-fit: contain; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ======================= ПУСТЫЕ СОСТОЯНИЯ / ЗАГРУЗКА ======================= */
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .btn { margin-top: 16px; }
.empty-ico { font-size: 40px; margin-bottom: 8px; }
.skeleton { position: relative; overflow: hidden; background: var(--surf); border: 1px solid var(--line); border-radius: 20px; min-height: 210px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.12), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.spinner {
  width: 28px; height: 28px; margin: 40px auto; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--violet);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================= КАРТОЧКА ТОВАРА ======================= */
.gallery { position: relative; border-radius: 22px; overflow: hidden; }
.gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery .badge-tag { top: 12px; left: 12px; }
.gal-count {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(11, 11, 16, 0.7);
}
.gal-dots { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; z-index: 3; }
.item-title { font-size: 22px; font-weight: 700; margin: 16px 2px 10px; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 2px 8px; }
.stock-line { margin: 0 2px 12px; font-size: 14px; color: var(--ok); }
.stock-line.out { color: var(--danger); }
.item-actions { display: flex; gap: 10px; margin: 0 0 14px; }
.item-actions .btn { flex: 1; }

.panel { border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; }
.panel h3 { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.6px; }
.desc { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; color: #cfc9de; }

/* характеристики — заметно крупнее и контрастнее описания */
.panel.spec h3 { color: var(--lilac); font-size: 14px; }
.speclist { margin: 0; display: flex; flex-direction: column; }
.spec-row {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr); gap: 4px 14px;
  padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); align-items: baseline;
}
.spec-row:first-child { padding-top: 2px; }
.spec-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.spec-row dt { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.spec-row dd { margin: 0; font-size: 16px; font-weight: 500; color: #ede9fe; line-height: 1.35; word-break: break-word; }

/* FPS в играх */
.fps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fps-pill { border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fps-g { font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.fps-v { font-size: 15px; font-weight: 800; color: var(--lilac); }

/* похожие товары */
.sec-h { font-size: 16px; font-weight: 700; margin: 20px 2px 10px; }
.rel-row {
  display: flex; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rel-row::-webkit-scrollbar { display: none; }
.rel-card { flex: 0 0 142px; border-radius: 18px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform 0.08s, border-color 0.2s; }
.rel-card:active { transform: scale(0.97); border-color: rgba(168, 85, 247, 0.65); }
.rel-ph { position: relative; border-radius: 12px; overflow: hidden; }
.rel-t { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rel-card .price-pill { align-self: flex-start; }

/* ======================= НИЖНЯЯ ПАНЕЛЬ ДЕЙСТВИЙ (без blur) ======================= */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: var(--bar-offset); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surf-strong);
  border-top: 1px solid var(--line);
  box-shadow: var(--hi);
}
.actionbar .btn { flex: 1; }
.actionbar .total { display: flex; flex-direction: column; line-height: 1.2; min-width: 96px; }
.actionbar .total small { color: var(--muted); font-size: 12px; }
.actionbar .total b { font-size: 19px; }
@media (min-width: 760px) {
  .actionbar { left: 50%; right: auto; width: 720px; transform: translateX(-50%); border-radius: 22px 22px 0 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.stepper { display: inline-flex; align-items: center; border-radius: var(--r); height: 44px; flex: none; }
.stepper button { width: 44px; height: 44px; font-size: 22px; line-height: 1; color: var(--lilac); }
.stepper button:active { transform: scale(0.9); }
.stepper button:disabled { color: #4a4660; }
.stepper span { min-width: 28px; text-align: center; font-weight: 700; }

/* ======================= КОРЗИНА ======================= */
.cart-row { display: flex; gap: 12px; align-items: center; border-radius: 20px; padding: 10px; margin-bottom: 10px; }
.cart-row.bad { border-color: rgba(255, 93, 122, 0.6); }
.cart-info { flex: 1; min-width: 0; }
.cart-title { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.cart-sub { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.cart-sub.err { color: var(--danger); }
.cart-ctl { display: flex; align-items: center; gap: 8px; }
.cart-ctl .stepper { height: 36px; }
.cart-ctl .stepper button { width: 36px; height: 36px; }
.cart-ctl .icon-btn { width: 36px; height: 36px; font-size: 15px; }
.cart-line-total { margin-left: auto; font-weight: 700; }

.promo-box { margin-top: 4px; }
.promo-form { display: flex; gap: 8px; align-items: center; }
.promo-form .inp { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 1px; }
.promo-form .btn { flex: none; }
.promo-on { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promo-on b { color: var(--lilac); letter-spacing: 0.5px; }

/* ======================= ФОРМЫ ======================= */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.inp {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r);
  outline: 0; font-size: 16px; transition: border-color 0.2s;
}
.inp::placeholder { color: #6f6a85; }
.inp:disabled { opacity: 0.6; }
textarea.inp { min-height: 88px; resize: vertical; }
.inp:focus { border-color: rgba(168, 85, 247, 0.75); box-shadow: var(--hi), var(--glow-soft); }
.inp.bad { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(255, 93, 122, 0.5); }
.err { color: var(--danger); font-size: 13px; margin: 6px 2px 0; min-height: 0; }
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 2px 0; }
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  background: var(--surf-strong); border-radius: var(--r); overflow: hidden;
  border-color: rgba(168, 85, 247, 0.55);
}
.ac-item { padding: 13px 14px; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ac-item:last-child { border-bottom: 0; }
.ac-item b { color: var(--lilac); font-weight: 700; }
.ac-item.active, .ac-item:active { background: rgba(168, 85, 247, 0.2); }

/* ======================= КВИЗ ПОДБОРА ПК ======================= */
.quiz-budget { border-radius: 20px; padding: 14px 16px 12px; }
.qb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 14px; }
.qb-top b { font-size: 26px; font-weight: 800; color: var(--lilac); }
.qb-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 2px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px;
  margin: 8px 0 0; background: transparent; outline: 0; --p: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7 var(--p), rgba(255, 255, 255, 0.14) var(--p));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--violet);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #7c3aed, #a855f7); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); }
.sec-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 18px 2px 8px; font-weight: 600; }
.sec-note { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.75; margin-left: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.glass-note {
  border-radius: 16px; padding: 12px 14px; margin-top: 4px;
  font-size: 13.5px; line-height: 1.5; color: #e4dcf4;
  border-left: 3px solid var(--violet);
}

/* ======================= СВОДКА / ЗАКАЗ ======================= */
.sum-line { display: flex; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; }
.sum-line:last-child { border-bottom: 0; }
.sum-line span:last-child { white-space: nowrap; font-weight: 600; }
.sum-line.disc { color: var(--ok); }
.sum-total { display: flex; justify-content: space-between; font-size: 19px; font-weight: 800; padding-top: 12px; }
.info-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row span:first-child { color: var(--muted); flex: none; }
.info-row span:last-child { text-align: right; word-break: break-word; }

.done { text-align: center; padding: 48px 12px 0; }
.done-ico {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  background: var(--grad-accent); border: 1px solid rgba(196, 181, 253, 0.4);
  box-shadow: var(--hi), var(--glow);
}
.done .btn { margin-top: 12px; width: 100%; }

/* ======================= НИЖНИЕ ВКЛАДКИ (TabBar — фиксированный, blur 10px) ======================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(14, 14, 20, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: var(--hi);
}
body.has-tabs .tabbar { display: flex; }
.tab {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; color: var(--muted); transition: color 0.2s;
}
.tab:active { transform: scale(0.94); }
.tab.active { color: var(--lilac); }
.tab.active svg { filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.9)); }
.badge {
  position: absolute; top: 5px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: linear-gradient(135deg, var(--violet), var(--deep)); color: #fff;
  font-style: normal; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.badge.inline { position: static; margin-left: 4px; vertical-align: 1px; }

/* ======================= МОДАЛЬНЫЕ ЛИСТЫ (без blur) ======================= */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(4, 3, 10, 0.62); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: relative; width: 100%; max-width: 720px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: rgba(19, 19, 28, 0.98);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0;
  box-shadow: var(--hi);
  transform: translateY(100%); transition: transform 0.22s ease-out;
  padding-bottom: var(--safe-b);
}
.sheet::before {
  content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.22);
}
.sheet-wrap.open { pointer-events: auto; }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 16px 8px; }
.sheet-title { font-size: 18px; font-weight: 700; }
.sheet-body { padding: 4px 16px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ======================= ДЕРЕВО КАТЕГОРИЙ ======================= */
.cat-row {
  display: flex; align-items: center; gap: 6px; min-height: 48px;
  padding: 0 8px 0 calc(8px + var(--d, 0) * 18px); border-radius: 14px; cursor: pointer;
  transition: background 0.15s;
}
.cat-row:active { background: rgba(255, 255, 255, 0.06); }
.cat-row.sel { background: var(--grad-accent); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.5); }
.cat-arrow { width: 34px; height: 34px; font-size: 22px; color: var(--lilac); transition: transform 0.15s; flex: none; }
.cat-arrow.open { transform: rotate(90deg); }
.cat-arrow.void { visibility: hidden; }
.cat-name { flex: 1; font-size: 15px; }
.cat-meta { color: var(--muted); font-size: 12.5px; }

/* ======================= ТОСТЫ ======================= */
#toasts {
  position: fixed; left: 0; right: 0; bottom: calc(var(--bar-offset) + 78px); z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast { background: var(--surf-strong); border-color: rgba(168, 85, 247, 0.6); padding: 11px 16px; border-radius: 14px; font-size: 14px; max-width: 100%; animation: fade 0.2s; }
.toast.err { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }

/* ======================= ЗАГЛУШКА ВНЕ TELEGRAM ======================= */
.gate { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.gate::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% 38%, rgba(124, 58, 237, 0.3), transparent 70%);
}
.gate-box { position: relative; border-radius: 26px; padding: 32px 24px; max-width: 360px; width: 100%; background: var(--surf-strong); }
.gate-box p { color: var(--muted); margin: 14px 0 20px; }

/* ======================= АДМИНКА ======================= */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; padding: 5px; border-radius: 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: 1 0 auto; min-height: 42px; padding: 0 14px; border-radius: 13px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.subtabs button.on { background: var(--grad-accent); color: #fff; border: 1px solid rgba(196, 181, 253, 0.4); }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.toolbar .searchbar { flex: 1; min-width: 0; }
.a-row { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 10px; margin-bottom: 8px; cursor: pointer; transition: transform 0.08s, border-color 0.2s; }
.a-row:active { transform: scale(0.99); border-color: rgba(168, 85, 247, 0.6); }
.a-row.dim { opacity: 0.55; }
.a-main { flex: 1; min-width: 0; }
.a-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 7px; background: rgba(157, 151, 180, 0.2); color: var(--muted); vertical-align: 1px; margin-left: 4px; }
.tag.warn { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.tag.bad { background: rgba(255, 93, 122, 0.15); color: var(--danger); }
.tag.ok { background: rgba(168, 85, 247, 0.18); color: var(--lilac); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 14px; background: rgba(255, 255, 255, 0.16); position: relative; transition: background 0.2s; flex: none; outline: 0; border: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked { background: linear-gradient(135deg, var(--violet), var(--deep)); }
.switch input:checked::after { transform: translateX(20px); }
.kv-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.kv-row .inp { min-height: 44px; padding: 10px 12px; }
.kv-row .kv-k { flex: 1; min-width: 0; }
.kv-row .kv-v { flex: 1.2; min-width: 0; }
.photo-prev { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.logo-row { display: flex; align-items: center; gap: 14px; }
.logo-btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* галерея товара в админке */
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; flex: none; }
.thumb .ph { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.thumb.main { border-color: rgba(196, 181, 253, 0.7); }
.thumb.main::after {
  content: "Главное"; position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0;
  font-size: 10px; font-weight: 700; text-align: center; color: #ede9fe; background: rgba(11, 11, 16, 0.78);
}
.thumb-x {
  position: absolute; top: 3px; right: 3px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; color: #fff; background: rgba(11, 11, 16, 0.78); border: 1px solid rgba(255, 255, 255, 0.28);
}
.thumb-add {
  width: 76px; height: 76px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--lilac); border: 1.5px dashed rgba(168, 85, 247, 0.6); box-shadow: none;
}

.swatch { display: inline-block; width: 56px; height: 56px; border-radius: 12px; flex: none; border: 1px solid rgba(196, 181, 253, 0.3); }
.grad-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.grad-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.grad-chip .swatch { width: 22px; height: 22px; border-radius: 50%; }
.grad-chip.on { border-color: rgba(196, 181, 253, 0.8); background: var(--grad-accent); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; }
.seg button { flex: 1; min-height: 40px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--grad-accent); color: #fff; }
.progress { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #a855f7); transition: width 0.4s; }

.menu-btn { width: 100%; justify-content: flex-start; margin-bottom: 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st-new { background: rgba(168, 85, 247, 0.22); color: #ddd6fe; }
.st-accepted { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.st-paid { background: rgba(52, 211, 153, 0.16); color: var(--ok); }
.st-shipped { background: rgba(251, 191, 36, 0.16); color: var(--warn); }
.st-done { background: rgba(157, 151, 180, 0.2); color: #cfc9de; }
.st-canceled { background: rgba(255, 93, 122, 0.16); color: var(--danger); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-name { font-weight: 600; }
.order-sum { font-weight: 700; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { padding: 12px 14px; border-radius: 16px; }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .inp { flex: 1; min-width: 0; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
  .sp-glow, .sp-wave, .sp-win, .sp-lit { animation: none; }
  .sp-win { display: none; }
}
