/* ===========================================================
   VOLT.STORE — дизайн-система «Ряды»
   Плотная светлая витрина: белые карточки на сером поле,
   чёрный интерфейс, оранжевый только на действии и скидке.
   =========================================================== */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #181a1f;
  --ink-2: #22252c;

  --text: #181a1f;
  --muted: #4a4f5a;
  --dim: #7a8089;
  --faint: #9aa0ab;

  --action: #cf3d0b;
  --action-hot: #ff7a45;
  --action-tint: #fff1eb;

  --ok: #1a8a4f;
  --ok-tint: #e9f6ee;
  --star: #ffab00;
  --warn: #c98a00;
  --warn-tint: #fff7e6;
  --bad: #d63a3a;
  --bad-tint: #fdeaea;
  --info: #2f6fd0;
  --info-tint: #e9f0fb;

  --line: #e2e4e9;
  --line-strong: #d9dce2;
  --neutral-tint: #eef1f6;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(24, 26, 31, 0.06);
  --maxw: 1320px;
  --sticky-h: 110px;  /* фактическая высота закреплённой шапки со строкой категорий */

  /* тайминги анимаций */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 0.16s;
  --mid: 0.26s;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Якорные ссылки не должны уезжать под закреплённую шапку */
[id] { scroll-margin-top: calc(var(--sticky-h) + 16px); }

/* Футер прижат к низу экрана даже на коротких страницах: body — колонка
   на всю высоту окна, main забирает свободное место */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.82; }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.14; letter-spacing: -0.025em; }
h1 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 900; letter-spacing: -0.035em; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }

.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.section { padding: 26px 0 0; }
.section-sm { padding: 14px 0 0; }
.section:last-child, .section-sm:last-child { padding-bottom: 28px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 12.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------- Иконки ---------------- */

.ic {
  display: inline-block; vertical-align: middle; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-thin { stroke-width: 1.4; }
.ic-text { display: inline-block; vertical-align: middle; line-height: 1; }

main { flex: 1 0 auto; }
body > .sticky-top, body > .footer { flex: none; }

/* ---------------- Шапка ---------------- */

/* Шапка и строка категорий закреплены единым блоком при прокрутке */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  box-shadow: 0 6px 18px -16px rgba(24, 26, 31, 0.75);
}

.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 18px; padding: 12px 0; }

.logo { display: flex; align-items: center; gap: 9px; flex: none; }
.logo-img { height: 34px; width: auto; display: block; }
.footer .logo-img { height: 32px; }

.catalog-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 15px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
}
.catalog-btn .bars { display: grid; gap: 3px; }
.catalog-btn .bars i { display: block; width: 13px; height: 1.6px; background: #fff; }

.search { flex: 1; display: flex; max-width: 640px; position: relative; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* подсказки поиска */
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(24, 26, 31, 0.5);
  overflow: hidden; display: none;
}
.search-drop.open { display: block; }
.search-drop a { display: flex; gap: 11px; align-items: center; padding: 9px 12px; }
.search-drop a:hover, .search-drop a.active { background: var(--bg); opacity: 1; }
.search-drop .thumb {
  width: 34px; height: 34px; flex: none; overflow: hidden; border-radius: 5px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, #2f6fd0) 12%, #fff); color: var(--accent, #2f6fd0);
}
.search-drop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-drop a > span:nth-child(2) { min-width: 0; }
.search-drop .t { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.search-drop .s {
  display: block; font-size: 11.5px; color: var(--dim); line-height: 1.3; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-drop .p { margin-left: auto; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.search-drop .note { padding: 12px; font-size: 13px; color: var(--dim); }
.search-drop .all {
  display: block; text-align: center; padding: 10px; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--action);
}
.search input {
  flex: 1; min-width: 0; padding: 10px 14px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--ink); border-right: none; border-radius: 8px 0 0 8px;
}
.search input:focus { outline: none; }
.search button {
  padding: 10px 22px; border: 1.5px solid var(--action); border-radius: 0 8px 8px 0;
  background: var(--action); color: #fff; font-family: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; white-space: nowrap;
}

.header-links { margin-left: auto; display: flex; gap: 20px; font-size: 12px; color: var(--muted); }
.header-links a { display: grid; justify-items: center; gap: 4px; position: relative; text-align: center; }
.header-links a:hover { color: var(--action); opacity: 1; }
.cart-badge {
  position: absolute; top: -5px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--action); color: #fff;
  font-size: 10.5px; font-weight: 800; display: grid; place-items: center;
}

.burger {
  display: none; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; border: none; font-size: 15px; cursor: pointer;
}

.catnav {
  background: var(--surface); border-bottom: 1px solid var(--line);
  overflow: hidden;   /* нужно для плавного сворачивания на мобильном */
}
.catnav .wrap {
  display: flex; gap: 4px; align-items: center; padding: 5px 0 10px;
  font-size: 13.5px; color: var(--muted); overflow-x: auto; scrollbar-width: none;
}
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav a {
  white-space: nowrap; padding: 7px 11px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500;
}
.catnav a:hover { background: var(--bg); color: var(--ink); opacity: 1; }
.catnav a.active { background: var(--bg); color: var(--ink); font-weight: 700; }

/* «Скидки дня» — единственный акцент в ряду */
.catnav a.hot { display: inline-flex; align-items: center; gap: 6px; color: var(--action); font-weight: 700; }
.catnav a.hot .ic { fill: currentColor; stroke: none; }
.catnav a.hot:hover, .catnav a.hot.active { background: var(--action-tint); color: var(--action); }

/* служебные ссылки уходят к правому краю */
.catnav .spacer { margin-left: auto; }

/* ---------------- Кнопки ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 9px; border: 1px solid transparent;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--neutral-tint); color: var(--ink); transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.86; }
.btn-primary { background: var(--action); color: #fff; }
.btn-mint { background: var(--action-tint); color: var(--action); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.btn-soft { background: #fff; border-color: var(--line); color: var(--muted); font-weight: 600; }
.btn-danger { background: var(--bad-tint); color: var(--bad); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 14px 24px; font-size: 15px; font-weight: 800; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------------- Чипы ---------------- */

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 5px; font-size: 11.5px; font-weight: 700;
  background: var(--neutral-tint); color: var(--muted);
}
.chip-hit { background: var(--action-tint); color: var(--action); font-weight: 800; }
.chip-ok { background: var(--ok-tint); color: var(--ok); }
.chip-bad { background: var(--bad-tint); color: var(--bad); }
.chip-warn { background: var(--warn-tint); color: var(--warn); }
.chip-info { background: var(--info-tint); color: var(--info); }
.chip-volt { background: var(--action-tint); color: var(--action); }
.chip-dark { background: var(--ink); color: #fff; }
.discount { background: var(--action); color: #fff; }

/* ---------------- Карточки ---------------- */

.card, .panel {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  border: none; box-shadow: var(--shadow);
}
.panel { padding: 16px 18px; }
.card-flat { background: var(--surface); }

.grid { display: grid; gap: 10px; }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------------- Витрина товара ---------------- */

.prod {
  position: relative; display: flex; flex-direction: column; gap: 7px;
  background: var(--surface); border-radius: 11px; padding: 12px;
  box-shadow: var(--shadow);
}

.prod-art {
  height: 104px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, #2f6fd0) 12%, #fff);
  color: var(--accent, #2f6fd0);
  overflow: hidden;
}
.prod-art .ic { stroke-width: 1.6; }
.prod-art.poster { height: auto; aspect-ratio: 3 / 4; background: var(--neutral-tint); }
.prod-art.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prod-top { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
.prod h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.prod .sub { font-size: 12px; color: var(--dim); line-height: 1.4; flex: 1; }
.prod-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); }
.prod-foot { display: flex; align-items: baseline; gap: 7px; }
.prod .buy { display: block; text-align: center; padding: 9px; border-radius: var(--radius-sm);
  background: var(--action-tint); color: var(--action); font-size: 13px; font-weight: 700; }

.price { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.price small { display: block; font-size: 11.5px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.price-old { font-size: 12.5px; color: var(--faint); text-decoration: line-through; }
.stars { color: var(--star); display: inline-flex; }
.stars .ic { fill: currentColor; stroke: none; }

/* ---------------- Главная ---------------- */

.hero-grid { display: grid; grid-template-columns: 2.15fr 1fr; gap: 10px; }
.hero-main {
  border-radius: var(--radius); padding: 34px 36px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(105deg, #181a1f 0%, #22252c 58%, #2c2019 100%);
}
.hero-main h1 { margin: 0 0 12px; max-width: 520px; line-height: 1.08; text-wrap: balance; }
.hero-main p { color: #c2c5cc; font-size: 15px; max-width: 440px; margin-bottom: 24px; }
.hero-main p b { color: #fff; font-family: var(--mono); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
  padding: 5px 11px; border-radius: 6px; background: var(--action); color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-badge .ic { fill: currentColor; stroke: none; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn-ghost { border-color: #4a4e58; color: #fff; }

/* Баннер-спецпредложение GTA VI */
.hero-gta {
  display: block; text-decoration: none; min-height: 340px;
  padding: 30px 34px; background-size: cover; background-position: center right;
  background-repeat: no-repeat;
}
.hero-gta::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(100deg, rgba(10,8,20,.92) 0%, rgba(14,10,28,.78) 42%,
      rgba(20,12,40,.30) 66%, rgba(20,12,40,0) 100%),
    linear-gradient(0deg, rgba(10,8,20,.65) 0%, rgba(10,8,20,0) 45%);
}
.hero-gta > * { position: relative; z-index: 1; }
.hero-gta:hover { opacity: 1; }
.hero-gta .hero-badge {
  background: #e0218a; box-shadow: 0 4px 18px rgba(224,33,138,.45);
}
.hero-gta h1 {
  margin: 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 900;
  letter-spacing: -0.02em; line-height: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.hero-edition {
  margin: 6px 0 14px; font-weight: 800; font-size: 15px; letter-spacing: 0.32em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff5aa7, #ffb14e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-gta p { color: #d9d2e8; max-width: 420px; }
.hero-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.hero-price-now { font-size: 30px; font-weight: 900; color: #fff; letter-spacing: -0.01em; }
.hero-price-old { font-size: 17px; color: #b3a9c6; text-decoration: line-through; }
.hero-gta .hero-actions .btn-primary { background: #e0218a; }
.hero-gta .hero-actions .btn-ghost { border-color: rgba(255,255,255,.4); }

@media (max-width: 720px) {
  .hero-gta { min-height: 300px; background-position: center top; }
  .hero-gta::before {
    background: linear-gradient(180deg, rgba(10,8,20,.30) 0%,
      rgba(10,8,20,.82) 55%, rgba(10,8,20,.96) 100%);
  }
}

/* подарок справа в баннере: картинка декоративная, текст всегда поверх и левее */
.hero-main.has-gift { --gift-w: clamp(186px, 27.5%, 270px); }
.hero-main.has-gift::before {
  content: ""; position: absolute; right: calc(var(--gift-w) * 0.08); top: 50%;
  width: calc(var(--gift-w) * 1.05); aspect-ratio: 1; transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(255, 122, 69, 0.28), rgba(255, 122, 69, 0.08) 55%, transparent 72%);
  pointer-events: none;
}
.hero-main.has-gift > :not(.hero-gift) { position: relative; z-index: 1; }
.hero-main.has-gift h1, .hero-main.has-gift p { max-width: min(520px, calc(100% - var(--gift-w) + 24px)); }
.hero-gift {
  position: absolute; right: 6%; top: 50%; width: var(--gift-w); height: auto;
  transform: translateY(-50%); pointer-events: none; user-select: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
  animation: gift-float 6s ease-in-out infinite;
}
@keyframes gift-float {
  0%, 100% { transform: translateY(-50%) rotate(-1.5deg); }
  50% { transform: translateY(calc(-50% - 8px)) rotate(1.5deg); }
}
@keyframes gift-float-flow {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) { .hero-gift { animation: none; } }

.usp { background: var(--surface); border-radius: var(--radius); padding: 16px 18px;
  display: flex; gap: 13px; align-items: center; box-shadow: var(--shadow); }
.usp-ico { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: var(--action-tint); color: var(--action); }
.usp b { display: block; font-size: 14.5px; font-weight: 700; }
.usp span { font-size: 12.5px; color: var(--dim); }

.cat-card { background: var(--surface); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.cat-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--action-tint); color: var(--action); }
.cat-card b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.015em; }
.cat-card .tagline { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; line-height: 1.4; }
.cat-card .count { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--action); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

.step-row { background: var(--surface); border-radius: var(--radius); padding: 20px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; box-shadow: var(--shadow); }
.step { display: flex; gap: 13px; align-items: flex-start; }
.step-n { width: 26px; height: 26px; flex: none; border-radius: var(--radius-sm); background: var(--ink);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.step b { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.step span { font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.step .step-n { color: var(--action-hot); font-size: 13px; line-height: 1; }

.feature { display: flex; gap: 13px; align-items: center; padding: 16px 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature .ico { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid;
  place-items: center; background: var(--action-tint); color: var(--action); }
.feature b { display: block; font-size: 14.5px; font-weight: 700; }
.feature p { margin: 0; font-size: 12.5px; color: var(--dim); }

/* ---------------- Отзывы и FAQ ---------------- */

.review { background: var(--surface); border-radius: 11px; padding: 15px; box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--neutral-tint); color: #3d4757;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.review p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.faq-item { background: var(--surface); border-radius: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.faq-item summary { padding: 13px 15px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--action); font-weight: 800; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 15px 14px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ---------------- Каталог: фильтры ---------------- */

.catalog-layout { display: flex; gap: 12px; align-items: flex-start; }
.filters { width: 232px; flex: none; display: grid; gap: 10px; align-content: start; }
/* Все фильтры — одна панель: блоки разделены линией в 1px (это просвечивает
   фон формы сквозь gap), без отдельных теней и зазоров между карточками */
#filter-form { display: grid; gap: 1px; background: var(--line); border-radius: 11px;
  overflow: hidden; box-shadow: var(--shadow); }
.filter-box { background: var(--surface); padding: 15px; }
.filter-box .title { font-size: 13.5px; font-weight: 700; margin-bottom: 11px; }
.filter-list { display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.filter-list label { display: flex; gap: 9px; align-items: center; cursor: pointer; }

.filter-list .num { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 12px; }
.filter-price { display: flex; gap: 8px; margin-bottom: 11px; }
.filter-price input { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 7px; font-size: 13px; font-family: var(--mono); }
.promo-box { background: var(--ink); color: #fff; border-radius: 11px; padding: 16px; }
.promo-box .code { font-family: var(--mono); font-size: 14px; color: var(--action-hot); margin-bottom: 6px; }
.promo-box .text { font-size: 12.5px; color: #b6bac2; line-height: 1.55; }

.toolbar { background: var(--surface); border-radius: 11px; padding: 13px 16px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: var(--shadow); }
.toolbar .count { font-size: 13.5px; color: var(--dim); }
.sorts { display: flex; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.sorts a { padding: 7px 13px; border-radius: 7px; background: var(--bg); color: var(--muted); }
.sorts a.active { background: var(--ink); color: #fff; font-weight: 600; }

.active-filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-tag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  background: var(--surface); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); }
.filter-tag .x { color: var(--faint); }
.filter-reset { padding: 6px 11px; font-size: 12.5px; color: var(--action); font-weight: 600; }

/* ---------------- Карточка товара ---------------- */

.product-layout { display: grid; grid-template-columns: 1fr 348px; gap: 12px; align-items: start; }
.product-head { background: var(--surface); border-radius: var(--radius); padding: 20px;
  display: flex; gap: 20px; align-items: flex-start; box-shadow: var(--shadow); }
.gallery { width: 190px; flex: none; display: grid; gap: 8px; }
.gallery-main { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--accent, #2f6fd0) 12%, #fff); color: var(--accent, #2f6fd0); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-thumbs div { aspect-ratio: 1; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--bg); color: var(--dim); }
.gallery-thumbs div.on { background: color-mix(in srgb, var(--accent, #2f6fd0) 12%, #fff);
  color: var(--accent, #2f6fd0); border: 1.5px solid var(--accent, #2f6fd0); }

.product-title { margin: 0 0 7px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.product-lead { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); line-height: 1.6; max-width: 600px; }
.product-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.product-meta span { display: inline-flex; align-items: center; gap: 6px; }
.assurance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.assurance div { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 9px;
  background: var(--bg); font-size: 12.5px; line-height: 1.4; }
.assurance .ic { color: var(--ok); }

.tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line); margin: 0;
  overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  padding: 14px 4px; margin-right: 22px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--dim);
  border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.tabs a.active, .tabs button.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--action); }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.specs div { background: #fff; padding: 12px 14px; }
.specs .k { font-size: 11.5px; color: var(--dim); margin-bottom: 3px; }
.specs .v { font-size: 13.5px; font-weight: 600; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow div { border-radius: 10px; background: var(--bg); padding: 14px; }
.flow .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 800; margin-bottom: 9px; }
.flow b { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.flow span { font-size: 12.5px; color: var(--dim); line-height: 1.5; }

.buy-panel { position: sticky; top: calc(var(--sticky-h) + 12px); display: grid; gap: 10px; }

/* Тарифы / номиналы */
.variants { display: grid; gap: 8px; }
.variant {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 10px;
  cursor: pointer; background: #fff; border: 1.5px solid var(--line); transition: border-color 0.15s ease;
}
.variant:hover { border-color: var(--action-hot); }
.variant.checked { background: var(--action-tint); border-color: var(--action); }

.variant .v-title { display: block; font-size: 13.5px; font-weight: 700; }
.variant .v-note { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.variant .v-price { margin-left: auto; text-align: right; }
.variant .v-price b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.variant.out { opacity: 0.45; pointer-events: none; }

.radio-tiles { display: grid; gap: 8px; }
.radio-tile { display: flex; gap: 11px; align-items: center; padding: 12px 13px; border-radius: 10px;
  cursor: pointer; background: #fff; border: 1.5px solid var(--line); }
.radio-tile:hover { border-color: var(--action-hot); }
.radio-tile.checked { background: var(--action-tint); border-color: var(--action); }

.radio-tile b { display: block; font-size: 13.5px; font-weight: 700; }
.radio-tile span { font-size: 11.5px; color: var(--dim); }

.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0;
  font-size: 13px; color: var(--dim); }
.summary-row span:last-child { font-family: var(--mono); color: var(--ink); }
.summary-row.total { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 3px;
  align-items: baseline; }
.summary-row.total span:first-child { font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font); }
.summary-row.total span:last-child { font-size: 23px; font-weight: 900; letter-spacing: -0.03em; font-family: var(--font); }

.guarantees { display: grid; gap: 11px; }
.guarantees div { display: flex; gap: 11px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; }
.guarantees .ic { color: var(--ok); margin-top: 1px; }

.upsell { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 18px; }
.upsell b { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.upsell p { font-size: 12.5px; color: #b6bac2; line-height: 1.55; margin-bottom: 11px; }

/* ---------------- Формы ---------------- */

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; padding: 10px 13px; font-family: inherit; font-size: 14px;
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink); border-radius: 10px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(24, 26, 31, 0.06); }
textarea { resize: vertical; min-height: 92px; }
/* поиск в шапке склеен с кнопкой «Найти» — правый край у поля прямой */
.search input[type="search"] { border-radius: 8px 0 0 8px; }
.hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }


/* --- select: стрелка своя, а не системная --- */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8089' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* --- собственный выпадающий список: main.js оборачивает каждый <select>,
   сам select остаётся в форме скрытым и по-прежнему отправляет значение --- */
.csel { position: relative; }
.csel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.csel-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.csel-btn:hover { border-color: var(--faint); }
.csel.open .csel-btn { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24, 26, 31, 0.06); }
.csel-btn .ic { color: var(--dim); flex: none; transform: rotate(90deg); transition: transform var(--fast) var(--ease); }
.csel.open .csel-btn .ic { transform: rotate(-90deg); }
.csel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 90;
  margin: 0; padding: 5px; list-style: none; max-height: 264px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(24, 26, 31, 0.45);
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility 0s linear var(--fast);
}
.csel.up .csel-list { top: auto; bottom: calc(100% + 6px); transform: translateY(4px); }
.csel.open .csel-list { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.csel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer;
}
.csel-opt.active { background: var(--bg); color: var(--ink); }
.csel-opt[aria-selected="true"] { color: var(--action); font-weight: 600; }
.csel-opt[aria-selected="true"]::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor; -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
}
.csel-opt[aria-disabled="true"] { opacity: 0.45; cursor: default; }

/* --- чекбоксы и радио в цветах магазина вместо системных --- */
:root {
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 17px; height: 17px; display: inline-grid; place-items: center; vertical-align: middle;
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 5px;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--action-hot); }
input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px; background: #fff; transform: scale(0);
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
  transition: transform var(--fast) var(--ease);
}
input[type="radio"]::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
  transform: scale(0); transition: transform var(--fast) var(--ease);
}
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--action); border-color: var(--action); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: default; }
.check input { margin-top: 1px; }

/* --- ошибки в полях (рисует main.js вместо системной всплывашки) --- */
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--bad); background-color: #fffafa; }
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
  border-color: var(--bad); box-shadow: 0 0 0 3px rgba(214, 58, 58, 0.14); }
.check.is-invalid input[type="checkbox"], .check.is-invalid input[type="radio"] {
  border-color: var(--bad); box-shadow: 0 0 0 3px rgba(214, 58, 58, 0.14); }
.check.is-invalid { color: var(--text); }
.radio-tiles.is-invalid .radio-tile { border-color: var(--bad); }
.field-error { display: flex; align-items: center; gap: 7px; margin: 7px 0 0; padding: 7px 10px;
  font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--bad);
  background: var(--bad-tint); border-radius: var(--radius-sm);
  animation: field-error-in var(--mid) var(--ease); }
.field-error::before { content: "!"; flex: none; width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bad); color: #fff;
  font-size: 11.5px; font-weight: 800; }
.check + .field-error { margin: -4px 0 12px; }
@keyframes field-error-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .field-error { animation: none; } }

/* --- мелочи, которые браузер иначе рисует по-своему --- */
::selection { background: var(--action-tint); color: var(--ink); }
::placeholder { color: var(--faint); opacity: 1; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px #fff inset; caret-color: var(--ink);
}
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-track { background: transparent; }

/* --- карточка баланса в кошельке --- */
.hero-card {
  position: relative; overflow: hidden; padding: 22px 24px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: var(--shadow);
}
.hero-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 69, 0.45), transparent 70%); pointer-events: none;
}
.hero-card .dim { color: #b6bac2; font-size: 13px; }
.hero-card p { margin: 0; font-size: 13px; line-height: 1.55; color: #c2c5cc; }

/* ---------------- Сообщения ---------------- */

.flashes { position: fixed; top: calc(var(--sticky-h) + 12px); right: 16px; z-index: 200; display: grid; gap: 10px;
  width: min(360px, calc(100vw - 32px)); }
.flash { padding: 13px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  background: #fff; border-left: 3px solid var(--ink);
  box-shadow: 0 12px 32px -12px rgba(24, 26, 31, 0.4); animation: slide-in 0.25s ease; }
.flash.ok { border-left-color: var(--ok); color: var(--ok); }
.flash.bad { border-left-color: var(--bad); color: var(--bad); }
.flash.warn { border-left-color: var(--warn); color: var(--warn); }
.flash.info { border-left-color: var(--info); color: var(--info); }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* ---------------- Таблицы ---------------- */

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 10px 12px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--dim); border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }
.table-wrap { overflow-x: auto; }

/* ---------------- Прочее ---------------- */

.breadcrumbs { display: flex; gap: 7px; font-size: 12.5px; color: var(--dim);
  align-items: center; flex-wrap: wrap; padding: 12px 0 0; }
.breadcrumbs .current { color: var(--ink); }

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; }
.pager-num { min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  display: inline-grid; place-items: center; background: #fff; color: var(--muted);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); }
.pager-num.active { background: var(--ink); color: #fff; font-weight: 700; }
.pager-gap { color: var(--faint); padding: 0 4px; }

.code-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px dashed var(--line-strong);
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.04em; }
.code-box b { color: var(--ink); font-weight: 500; }
.copy { margin-left: auto; }

.timeline { display: grid; margin: 16px 0; }
.tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: var(--neutral-tint); color: var(--dim); flex: none; }
.tl-item.done .tl-dot { background: var(--ok-tint); color: var(--ok); }
.tl-item.active .tl-dot { background: var(--action-tint); color: var(--action); }
.tl-item b { display: block; font-size: 14px; }
.tl-item span { font-size: 12.5px; color: var(--dim); }

.empty { text-align: center; padding: 56px 20px; }
.empty .big { color: var(--faint); margin-bottom: 12px; }

.kpi { background: var(--surface); border-radius: 11px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.kpi span { font-size: 12px; color: var(--dim); }

.sticky-side { position: sticky; top: calc(var(--sticky-h) + 12px); }
.pay-icons { display: flex; gap: 7px; flex-wrap: wrap; }
.pay-icons span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: 7px; background: var(--ink-2); font-size: 11.5px; }

/* ---------------- Поддержка ---------------- */

.ticket-row { display: flex; align-items: center; gap: 14px; }
.ticket-row:hover { opacity: 1; background: #fff; box-shadow: 0 10px 24px -16px rgba(24, 26, 31, 0.4); }
.ticket-main { flex: 1; min-width: 0; }
.ticket-arrow { color: var(--dim); flex: none; }

.ticket-mini { display: block; }
.ticket-mini:hover { opacity: 1; background: #fff; }
.ticket-mini.active { outline: 2px solid var(--ink); }

.chat { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 78%; padding: 11px 13px; border-radius: 12px;
  background: var(--bg); font-size: 13.5px; line-height: 1.5;
}
.bubble-row.mine .bubble { background: var(--action-tint); }
.bubble-head { font-size: 11.5px; color: var(--dim); margin-bottom: 4px; }
.bubble-body { white-space: pre-wrap; word-break: break-word; }

/* плавающая кнопка и панель */
.support-widget { position: fixed; right: 20px; bottom: 20px; z-index: 120; }
.support-fab {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--action); color: #fff; position: relative;
  box-shadow: 0 14px 30px -12px rgba(207, 61, 11, 0.85);
  transition: transform var(--fast) var(--ease);
}
.support-fab:hover { opacity: 1; transform: translateY(-2px); }
.support-badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}

/* при открытом чате кругляш прячется — он же и есть свёрнутый вид */
.support-widget.open .support-fab { display: none; }

/* Атрибут hidden должен побеждать display из правил ниже, иначе панель
   висит открытой всегда, а счётчик светится пустым кружком. */
.support-panel[hidden], .support-badge[hidden] { display: none !important; }

.support-panel {
  position: absolute; right: 0; bottom: 0; width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 26px 60px -24px rgba(24, 26, 31, 0.6);
  display: flex; flex-direction: column; overflow: hidden;
}
.support-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--ink); color: #fff; flex: none;
}
.support-head b { display: block; font-size: 15px; }
.support-head .dim { color: #b6bac2; font-size: 12px; }
.support-close {
  background: none; border: none; color: #fff; font-size: 16px; cursor: pointer;
  line-height: 1; padding: 2px 4px; border-radius: 6px;
}
.support-close:hover { background: rgba(255, 255, 255, 0.12); }

.support-body { padding: 14px 16px; overflow-y: auto; flex: 1; display: grid; gap: 8px; align-content: start; }
.support-body .bubble { max-width: 88%; border-radius: 12px; }

.support-foot { padding: 10px 12px; border-top: 1px solid var(--line); flex: none; background: var(--surface); }
.sw-email {
  width: 100%; margin-bottom: 8px; padding: 9px 11px; font-size: 13px;
  border: 1px solid var(--line-strong); border-radius: 10px; font-family: inherit;
}
.sw-send { display: flex; gap: 8px; align-items: flex-end; }
.sw-send textarea {
  flex: 1; min-height: 40px; max-height: 110px; padding: 10px 12px; font-size: 13.5px;
  border: 1px solid var(--line-strong); border-radius: 12px; resize: none; font-family: inherit;
}
.sw-go {
  width: 40px; height: 40px; flex: none; border: none; border-radius: 50%; cursor: pointer;
  background: var(--action); color: #fff; display: grid; place-items: center;
}
.sw-go:hover { filter: brightness(1.07); }
.sw-go:disabled { opacity: 0.5; cursor: default; }
.sw-note { font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.sw-error { font-size: 12.5px; color: var(--bad); margin-top: 8px; }

.sw-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.sw-quick button {
  padding: 7px 12px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink);
}
.sw-quick button:hover { border-color: var(--action); color: var(--action); }

@media (max-width: 640px) {
  .support-widget { right: 14px; bottom: 14px; }
  /* На телефоне чат — полноэкранный: dvh учитывает адресную строку браузера,
     safe-area — вырез и полоску «домой» у iPhone */
  .support-panel {
    position: fixed; inset: 0; width: auto; height: 100vh; height: 100dvh;
    border: none; border-radius: 0; box-shadow: none;
  }
  .support-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .support-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .support-close { font-size: 20px; padding: 4px 8px; }
  .sw-send textarea { font-size: 16px; } /* меньше 16px iOS зумит страницу при фокусе */
  html.chat-open, html.chat-open body { overflow: hidden; }
}

/* --- таймер «Скидок дня» --- */
.countdown { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.deal-timer {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--action-tint); color: var(--action); font-size: 13px; font-weight: 700;
}
a.hero-badge:hover { opacity: 1; filter: brightness(1.05); }

/* ---------------- Юридические документы ---------------- */

.doc { max-width: 860px; }
.doc h1 { margin-bottom: 6px; }
.doc-meta { color: var(--dim); font-size: 13.5px; line-height: 1.55; margin: 0 0 18px; }
.doc-toc { margin-bottom: 14px; }
.doc-toc b { display: block; font-size: 14px; margin-bottom: 8px; }
.doc-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 13.5px; line-height: 1.9; }
.doc-toc a { color: var(--muted); }
.doc-toc a:hover { color: var(--action); }
.doc-body { font-size: 14.5px; line-height: 1.65; color: var(--text); }
.doc-body h2 { font-size: 18px; margin: 26px 0 10px; scroll-margin-top: calc(var(--sticky-h) + 16px); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 10px; }
.doc-body ul { margin: 0 0 12px; padding-left: 20px; }
.doc-body li { margin-bottom: 5px; }
.doc-body a { color: var(--action); }
.doc-table { margin: 6px 0 14px; font-size: 13.5px; }
.doc-table td:first-child { width: 32%; font-weight: 600; color: var(--ink); vertical-align: top; }
.doc-table td { vertical-align: top; }
.doc-req { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.doc-req dt { color: var(--dim); }
.doc-req dd { margin: 0; color: var(--ink); font-weight: 600; }
.legal-todo { background: #fff3c4; color: #7a5b00; padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.sw-legal { margin: 0; padding: 0 14px 10px; font-size: 11px; line-height: 1.45; color: var(--faint); background: var(--surface); flex: none; }
.sw-legal a { color: var(--dim); text-decoration: underline; }
@media (max-width: 640px) {
  .doc-toc ol { columns: 1; }
  .doc-req { grid-template-columns: 1fr; gap: 2px; }
  .doc-req dd { margin-bottom: 8px; }
  .doc-table td:first-child { width: 40%; }
  .sw-legal { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .support-foot { padding-bottom: 8px; }
}

/* ---------------- Подвал ---------------- */

.footer { margin-top: 28px; background: var(--ink); color: #c2c5cc; padding: 30px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 26px; }
.footer .logo { color: #fff; margin-bottom: 11px; }
.footer p { font-size: 13px; line-height: 1.6; max-width: 320px; color: var(--faint); }
.footer h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.footer a { display: block; padding: 4px 0; font-size: 13.5px; }
.footer-bottom { margin-top: 22px; padding-top: 16px; border-top: 1px solid #2a2d34;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }

/* ---------------- Админка ---------------- */

.admin-layout { display: grid; grid-template-columns: 216px 1fr; gap: 12px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--sticky-h) + 12px); display: grid; gap: 4px; background: var(--surface);
  border-radius: 11px; padding: 10px; box-shadow: var(--shadow); }
.admin-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 7px;
  font-size: 13.5px; color: var(--muted); }
.admin-nav a:hover { background: var(--bg); opacity: 1; }
.admin-nav a.active { background: var(--ink); color: #fff; font-weight: 600; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 14px; flex-wrap: wrap; }

/* ===========================================================
   Анимации и микровзаимодействия
   Только transform и opacity — чтобы не вызывать перерисовку.
   =========================================================== */

/* --- карточка товара ---
   Карточка — это ссылка, поэтому общее правило a:hover её выцвечивало.
   Гасим это: единственный отклик на наведение — кнопка меняет цвет. */
.prod:hover, .cat-card:hover { opacity: 1; }
.prod .buy { transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.prod:hover .buy { background: var(--action); color: #fff; }

/* Картинка проявляется после загрузки, до этого — мягкое мерцание подложки.
   Правила действуют только при работающем JS (класс .js на html): иначе
   обложки остались бы скрытыми навсегда. */
.prod-art.poster { position: relative; }
.js .prod-art.poster::after {
  content: ""; position: absolute; inset: 0; opacity: 1;
  background: linear-gradient(100deg, #eef1f6 30%, #f7f8fa 50%, #eef1f6 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
  transition: opacity 0.3s var(--ease);
}
.js .prod-art.poster.ready::after { opacity: 0; animation: none; }
.js .prod-art img { opacity: 0; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); }
.js .prod-art img.loaded { opacity: 1; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* --- кнопки --- */
.btn { transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease),
                   box-shadow var(--mid) var(--ease), background var(--fast) var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary:hover { box-shadow: 0 10px 22px -12px rgba(207, 61, 11, 0.9); }
.btn-dark:hover { box-shadow: 0 10px 22px -12px rgba(24, 26, 31, 0.8); }
.search button { transition: filter var(--fast) var(--ease); }
.search button:hover { filter: brightness(1.08); }
.search input { transition: box-shadow var(--fast) var(--ease); }
.search input:focus { box-shadow: 0 0 0 3px rgba(24, 26, 31, 0.1); }

/* --- выбор тарифа и способа оплаты --- */
.variant, .radio-tile {
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}

/* --- фильтры, сортировки, пагинация --- */
.sorts a, .pager-num, .filter-tag, .link-more {
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.sorts a:hover, .pager-num:hover { background: var(--ink); color: #fff; opacity: 1; }
.filter-tag:hover { opacity: 1; }
.filter-tag:hover .x { color: var(--action); }
.link-more:hover { color: var(--action); opacity: 1; }
.filter-list label { transition: color var(--fast) var(--ease); }
.filter-list label:hover { color: var(--ink); }

/* --- шапка --- */
.sticky-top { transition: box-shadow var(--mid) var(--ease); }
.header-links a .ic { transition: color var(--fast) var(--ease); }
.catnav a { transition: color var(--fast) var(--ease); }

/* --- таблицы, вкладки, детали --- */
.table tr td { transition: background var(--fast) var(--ease); }
.tabs a { transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.faq-item { transition: box-shadow var(--mid) var(--ease); }
.faq-item[open] { box-shadow: 0 8px 20px -16px rgba(24, 26, 31, 0.5); }
.faq-item summary::after { transition: transform var(--mid) var(--ease); }
.faq-item[open] summary::after { transform: rotate(180deg); }
.code-box { transition: border-color var(--fast) var(--ease); }
.code-box:hover { border-color: var(--action); }

/* --- доступность: видимый фокус с клавиатуры --- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, label.variant:focus-within {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- уважаем системную настройку «меньше движения» --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .prod-art.poster::after { display: none; }
  .prod-art img { opacity: 1; }
}

/* ---------------- Адаптив ---------------- */

@media (max-width: 1240px) {
  .grid-6 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .product-layout { grid-template-columns: 1fr 320px; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .product-layout { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .catalog-layout { flex-direction: column; }
  .filters { width: 100%; grid-template-columns: 1fr; }
  /* На планшете блоки фильтров встают в две колонки внутри той же панели,
     а промо остаётся короткой плашкой под ней и не растягивается */
  #filter-form { grid-template-columns: repeat(2, 1fr); }
  .filter-box:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; overflow-x: auto; }
  .step-row { grid-template-columns: repeat(2, 1fr); }
  .specs, .flow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* На узком экране шапка тоже закреплена, но при прокрутке сворачивается:
     строка категорий убирается, остаются логотип, поиск и корзина */
  :root { --sticky-h: 98px; }
  /* fixed вместо sticky: высота шапки больше не влияет на поток страницы,
     место под развёрнутую шапку держит padding body (высоту меряет main.js) */
  .sticky-top { position: fixed; top: 0; left: 0; right: 0; transition: box-shadow 0.2s ease; }
  body { padding-top: var(--header-full, 150px); }
  .sticky-top.no-anim, .sticky-top.no-anim * { transition: none !important; }
  .sticky-top.compact { box-shadow: 0 8px 20px -14px rgba(24, 26, 31, 0.8); }
  /* Строка категорий сворачивается плавно: display:none анимировать нельзя,
     поэтому одновременно гасим высоту, прозрачность и рамку.
     Кнопка «Каталог» остаётся — в свёрнутом виде это вход в разделы. */
  .catnav {
    max-height: 48px;
    transition: max-height 0.28s var(--ease), opacity 0.2s var(--ease),
                border-bottom-width 0.28s var(--ease);
  }
  .catnav .wrap { transition: transform 0.28s var(--ease); }
  .sticky-top.compact .catnav { max-height: 0; opacity: 0; border-bottom-width: 0; }
  .sticky-top.compact .catnav .wrap { transform: translateY(-6px); }

  .header .wrap { transition: padding 0.28s var(--ease); }
  .sticky-top.compact .header .wrap { padding: 8px 0; gap: 10px; }

  .header .wrap { flex-wrap: wrap; gap: 12px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .catalog-btn span:last-child { display: none; }
  .logo-img { height: 28px; }
  .grid-6, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .product-head { flex-direction: column; }
  .gallery { width: 100%; }
  .assurance { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .grid-6, .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
  #filter-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .step-row, .specs, .flow { grid-template-columns: 1fr; }
  .header-links a span.lbl { display: none; }
  .hero-main { padding: 26px 22px; }
  .hero-main.has-gift { --gift-w: 168px; }
  .hero-gift { position: relative; display: block; right: auto; top: auto; margin: -8px auto 6px;
    animation-name: gift-float-flow; }
  .hero-main.has-gift::before { top: 86px; left: 50%; right: auto; transform: translate(-50%, -50%); }
  .hero-main.has-gift h1, .hero-main.has-gift p { max-width: none; }
  .product-title { font-size: 24px; }
}
