:root {
  --ink: #0f1218;
  --ink-2: #2a2f3a;
  --muted: #687082;
  --line: #e4e6eb;
  --line-2: #eef0f3;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --accent: #c8f031;       /* «заряд» */
  --accent-ink: #1b2400;
  --accent-soft: #f2fbd3;
  --blue: #2557ff;
  --danger: #e5383b;
  --danger-soft: #fdecec;
  --ok: #129b5b;
  --ok-soft: #e4f6ec;
  --warn: #c27c00;
  --warn-soft: #fff4dc;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,18,24,.04), 0 6px 24px rgba(15,18,24,.06);
  --container: 1280px;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
h1, h2, h3 { font-family: var(--display); }
h3 { font-weight: 500; }
.mono { font-family: var(--mono); }
h1 { font-size: clamp(26px, 3.2vw, 38px); }
h2 { font-size: clamp(20px, 2.2vw, 26px); }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 20px; height: 20px; flex: none; }
.stack > * + * { margin-top: 16px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--ink-2); }
.btn:active { transform: scale(.98); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #bde41f; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: #cfd3da; }
.btn-danger { background: transparent; color: var(--danger); border-color: #f4c5c6; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.link { color: var(--blue); }
.link:hover { text-decoration: underline; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,18,24,.08); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.check.consent { align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); margin: 4px 0 14px; }
.check.consent input { flex: none; margin-top: 1px; }
.legal { min-width: 0; padding: clamp(20px, 4vw, 44px); }
.legal-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 40px; }
.legal-nav { position: sticky; top: 88px; padding: 18px; }
.legal-nav h4 { margin: 0 0 10px; font-size: 14px; }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal-nav a, .legal-nav .link-btn { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink); }
.legal-nav a:hover, .legal-nav .link-btn:hover { background: var(--bg); }
.legal-nav a.active { background: var(--accent-soft); font-weight: 600; }
.legal-nav .link-btn { color: var(--muted); }
.legal-table td:first-child { width: 34%; vertical-align: top; }
.legal code { font-family: var(--mono); font-size: 13px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; }
  .legal-table td:first-child { width: auto; }
}
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 18px; }
.hint { font-size: 12px; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }

.choice-list { display: grid; gap: 10px; }
.choice { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.choice b { display: block; }

/* ---------- Уведомления ---------- */
.alerts { display: grid; gap: 8px; margin: 16px 0; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.alert-success { background: var(--ok-soft); border-color: #bfe7d0; color: #0b5c37; }
.alert-error { background: var(--danger-soft); border-color: #f4c5c6; color: #9a1c1f; }
.alert-info { background: #eaf0ff; border-color: #c9d6ff; color: #1b3ea8; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-blue { background: #eaf0ff; color: var(--blue); }
.badge-accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- Шапка ---------- */
.topbar { background: var(--ink); color: #c9ced8; font-size: 13px; }
.topbar .container { display: flex; align-items: center; gap: 24px; height: 38px; }
.topbar a:hover { color: #fff; }
.topbar .min-order { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.topbar .min-order::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(200,240,49,.18); }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 16px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; flex: none; }
/* Логотип — PNG-маска, цвет берётся из color родителя */
.brand-logo { display: block; height: 36px; aspect-ratio: 541 / 92; background: currentColor; -webkit-mask: url(/static/img/logo.png) center / contain no-repeat; mask: url(/static/img/logo.png) center / contain no-repeat; }
.catalog-btn { flex: none; }
.search { flex: 1; position: relative; max-width: 560px; }
.search .input { padding-left: 44px; border-radius: 999px; background: var(--bg); border-color: transparent; }
.search .input:focus { background: #fff; border-color: var(--ink); }
.search .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hdr-link { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.hdr-link:hover { background: var(--bg); }
.cart-link { background: var(--accent); color: var(--accent-ink); padding: 0 16px; }
.cart-link:hover { background: #bde41f; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; }
.burger { display: none; }

/* Мега-меню каталога */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(15,18,24,.12); display: none; }
.mega.open { display: block; }
.mega .container { display: grid; grid-template-columns: 280px 1fr; gap: 0; height: auto; padding-top: 16px; padding-bottom: 24px; align-items: stretch; }
.mega-roots { border-right: 1px solid var(--line); padding-right: 12px; }
.mega-roots a { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.mega-roots a.active, .mega-roots a:hover { background: var(--bg); }
.mega-panel { display: none; padding: 6px 28px; columns: 3 200px; column-gap: 32px; }
.mega-panel.active { display: block; }
.mega-group { break-inside: avoid; margin-bottom: 20px; }
.mega-group > a { font-weight: 700; display: block; margin-bottom: 6px; }
.mega-group ul { list-style: none; margin: 0; padding: 0; }
.mega-group li a { display: block; padding: 3px 0; color: var(--muted); font-size: 14px; }
.mega-group a:hover { color: var(--blue); }
.mega-empty { padding: 20px; color: var(--muted); }

/* ---------- Основное ---------- */
main { min-height: 60vh; padding-bottom: 64px; }
.page-head { padding: 28px 0 20px; }
.page-head p { color: var(--muted); margin: 8px 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span::before { content: '/'; margin-right: 6px; opacity: .5; }
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section { padding: 36px 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }

/* ---------- Главная ---------- */
.hero { position: relative; overflow: hidden; margin-top: 20px; border-radius: 24px; background: var(--ink); color: #fff; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(26px, 4vw, 48px); letter-spacing: -0.015em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: #b7bdc9; font-size: 17px; max-width: 520px; margin: 18px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.22); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 280px; }
.battery { position: relative; width: 150px; height: 270px; border: 6px solid #fff; border-radius: 28px; padding: 10px; display: flex; flex-direction: column-reverse; gap: 8px; transform: rotate(12deg); }
.battery::before { content: ''; position: absolute; top: -22px; left: 50%; width: 52px; height: 14px; transform: translateX(-50%); background: #fff; border-radius: 6px 6px 0 0; }
.battery i { flex: 1; border-radius: 10px; background: var(--accent); animation: charge 2.4s infinite; }
.battery i:nth-child(2) { animation-delay: .3s; } .battery i:nth-child(3) { animation-delay: .6s; } .battery i:nth-child(4) { animation-delay: .9s; }
@keyframes charge { 0%, 15% { opacity: .15; } 40%, 100% { opacity: 1; } }
.hero-stat { position: absolute; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.25); font-size: 13px; }
.hero-stat b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.hero-stat.s1 { left: 0; top: 18%; } .hero-stat.s2 { right: 0; bottom: 14%; }
@media (prefers-reduced-motion: reduce) { .battery i { animation: none; } }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.perk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.perk-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: #4d6400; flex: none; }
.perk b { display: block; font-size: 15px; }
.perk span { font-size: 13px; color: var(--muted); }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s, box-shadow .15s; overflow: hidden; }
.cat-tile:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile h3 { font-size: 17px; position: relative; z-index: 1; }
.cat-tile .sub { font-size: 13px; color: var(--muted); margin-top: 6px; position: relative; z-index: 1; }
.cat-tile img { position: absolute; right: -6px; bottom: -6px; width: 110px; height: 110px; object-fit: contain; }
.cat-tile .arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); position: relative; z-index: 1; }
.cat-tile.big { grid-column: span 2; background: var(--accent-soft); border-color: #e1f1a8; }

.split-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cta-card { border-radius: 20px; padding: 32px; background: var(--surface); border: 1px solid var(--line); }
.cta-card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.cta-card.dark p { color: #b7bdc9; }
.cta-card h2 { margin-bottom: 10px; }

/* ---------- Каталог ---------- */
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { display: grid; gap: 12px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-box h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 2px 0 4px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.tree a { display: block; padding: 5px 8px; border-radius: 8px; font-size: 14px; }
.tree a:hover { background: var(--bg); }
.tree a.active { background: var(--ink); color: #fff; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip img { width: 22px; height: 22px; object-fit: contain; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select.input { width: auto; height: 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.pcard:hover { box-shadow: var(--shadow); border-color: #d6d9df; }
.pcard-img { position: relative; aspect-ratio: 1; background: #fafafb; display: grid; place-items: center; padding: 16px; }
/* картинка не растягивает квадрат: высокие фото вписываются, а не удлиняют карточку */
.pcard-img img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.pcard-img .badge { position: absolute; left: 10px; top: 10px; }
.noimg { width: 64px; height: 64px; color: #cfd3da; }

/* Заглушка «Товар на фотосессии» */
.ph-stub { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center;
  background: radial-gradient(120% 80% at 50% 100%, var(--accent-soft), transparent 60%), linear-gradient(#fbfbfc, #f3f4f6); }
.ph-scene { width: min(86%, 300px); height: auto; overflow: visible; }
.ph-scene line, .ph-scene .ph-plus { stroke: #b9bfca; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.ph-floor { fill: rgba(15, 18, 24, .06); }
.ph-beam { fill: url(#phBeam); }
.ph-box { fill: var(--ink-2); }
.ph-box-in { fill: #fff; opacity: .92; }
.ph-podium { fill: #e9ebef; stroke: #d6d9df; stroke-width: 1.5; }
.ph-podium-top { fill: #f6f7f9; stroke: #d6d9df; stroke-width: 1.5; }
.ph-body { fill: #fff; stroke: var(--ink); stroke-width: 2.6; }
.ph-cap { fill: var(--ink); }
.ph-charge { fill: var(--accent); }
.ph-scene .ph-plus { stroke: var(--ink); stroke-width: 2.6; }
.ph-cam-body, .ph-cam-top { fill: var(--ink); }
.ph-lens { fill: var(--ink-2); stroke: #fff; stroke-width: 2; }
.ph-lens-in { fill: #4b5262; }
.ph-flash path { fill: var(--accent); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.ph-caption { display: flex; flex-direction: column; gap: 2px; }
.ph-caption b { font-family: var(--display); font-weight: 500; font-size: 13px; line-height: 1.25; color: var(--ink); }
.ph-caption span { font-size: 11.5px; color: var(--muted); }
.ph-stub.compact { padding: 4px; background: var(--accent-soft); }
.ph-stub.compact .ph-scene { width: 100%; }
/* вспышка камеры: раз в несколько секунд мигает и подсвечивает батарейку */
.ph-flash { transform-box: fill-box; transform-origin: center; opacity: 0; animation: ph-flash 4.5s infinite; }
.ph-beam { animation: ph-beam 4.5s infinite; }
@keyframes ph-flash { 0%, 84%, 100% { opacity: 0; transform: scale(.4); } 88% { opacity: 1; transform: scale(1.15); } 94% { opacity: 0; transform: scale(.8); } }
@keyframes ph-beam { 0%, 84%, 100% { opacity: .75; } 88% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ph-flash { animation: none; opacity: 1; transform: none; } .ph-beam { animation: none; } }
.product-gallery { position: relative; }
.product-gallery .ph-stub { border-radius: 20px; gap: 14px; }
.product-gallery .ph-scene { width: min(70%, 380px); }
.product-gallery .ph-caption b { font-size: clamp(16px, 2vw, 22px); }
.product-gallery .ph-caption span { font-size: 14px; }
.cart-thumb { position: relative; overflow: hidden; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.pcard-title { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard-title:hover { color: var(--blue); }
.price { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; }
.stock { font-size: 12px; font-weight: 600; }
.stock.in { color: var(--ok); } .stock.out { color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 40px; background: #fff; }
.qty button { width: 36px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--ink-2); border-radius: 999px; }
.qty button:hover { background: var(--bg); }
.qty input { width: 52px; text-align: center; border: 0; outline: none; height: 100%; background: none; -moz-appearance: textfield; font-weight: 600; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed #d3d7de; border-radius: var(--radius); }
.empty-ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; background: var(--accent-soft); color: #4d6400; }
.empty-ico .icon { width: 28px; height: 28px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Товар ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "media side" "desc side"; gap: 24px; align-items: start; }
.product-media { grid-area: media; }
.product-desc { grid-area: desc; }
.product-side { grid-area: side; }
.product-gallery { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; aspect-ratio: 4/3; display: grid; place-items: center; padding: 32px; }
.product-gallery img { max-height: 100%; object-fit: contain; }
.product-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.product-thumbs button { width: 72px; height: 72px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.product-thumbs button.active { border-color: var(--ink); }
.product-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.specs-card { padding: 18px 20px; }
.specs-card h3 { font-size: 15px; margin-bottom: 10px; }
.specs-compact { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 0 12px; margin: 0; font-size: 13px; line-height: 1.4; }
.specs-compact dt, .specs-compact dd { padding: 6px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.specs-compact dt { color: var(--muted); }
.specs-compact dd { font-weight: 500; overflow-wrap: anywhere; }
.specs-more summary { cursor: pointer; font-size: 13px; font-weight: 600; padding-top: 10px; list-style: none; }
.specs-more summary::-webkit-details-marker { display: none; }
.specs-more summary::after { content: ' ↓'; }
.specs-more[open] summary { display: none; }
.buybox .price { font-size: 32px; }
.buybox dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0; font-size: 14px; }
.buybox dt { color: var(--muted); }
.buybox dd { margin: 0; font-weight: 600; text-align: right; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { flex: 1; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 10px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 45%; padding-right: 16px; }
.prose { font-size: 15px; line-height: 1.65; }
.prose h2 { font-size: 21px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* ---------- Корзина / оформление ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.cart-items { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 120px 32px; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 72px; height: 72px; border-radius: 12px; background: #fafafb; display: grid; place-items: center; padding: 6px; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-thumb .noimg { width: 32px; height: 32px; }
.cart-sum { text-align: right; font-weight: 700; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.summary { position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.summary-total { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.min-note { padding: 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: #7a4e00; font-size: 13px; margin: 14px 0; }
.min-note.ok { background: var(--ok-soft); color: #0b5c37; }
.checkout-section { margin-bottom: 16px; }
.checkout-section h2 { font-size: 19px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fafbfc; }
.table .num { text-align: right; white-space: nowrap; }

/* ---------- Личный кабинет ---------- */
.account-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 92px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: 14px; border: 0; background: none; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav button:hover { background: var(--bg); }
.side-nav a.active { background: var(--ink); color: #fff; }
.side-nav hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; font-family: var(--display); font-size: 24px; letter-spacing: -0.01em; margin-top: 4px; }
.stat.accent { background: var(--accent); border-color: var(--accent); }
.stat.accent span { color: var(--accent-ink); opacity: .7; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { display: flex; gap: 0; margin: 8px 0 4px; }
.timeline div { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.timeline div::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 3px; background: var(--line); }
.timeline div::after { content: ''; position: absolute; top: 1px; left: 50%; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.timeline div.done { color: var(--ink); font-weight: 600; }
.timeline div.done::before { background: var(--ink); }
.timeline div.done::after { border-color: var(--ink); background: var(--accent); }

/* ---------- Авторизация ---------- */
.auth-wrap { max-width: 520px; margin: 40px auto; }
.auth-wrap.wide { max-width: 720px; }
.seg { display: inline-flex; padding: 4px; background: var(--bg); border-radius: 999px; gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.seg input:checked + span { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); }
[data-legal-only][hidden] { display: none !important; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: #b7bdc9; padding: 48px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.pay-logos { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-logos span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 4px 10px 4px 8px; font-size: 12px; }
.pay-mark { display: inline-flex; align-items: center; justify-content: center; height: 24px; flex-shrink: 0; }
.pay-mark img { width: auto; height: 14px; max-width: 64px; }
.pay-mark img.pay-sbp { height: 22px; }
.pay-mark-icon { color: #fff; }
.pay-mark-icon svg { width: 16px; height: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; display: flex; gap: 10px; align-items: center; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .perks { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; grid-template-areas: "media" "side" "desc"; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .sidebar { display: none; } /* в ней только дерево разделов, на узких экранах есть меню «Каталог» */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .header .container { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 10; flex-basis: 100%; max-width: none; }
  .catalog-btn span, .hdr-link .lbl { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .cart-layout, .account-layout { grid-template-columns: 1fr; }
  .summary, .side-nav { position: static; }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; }
  .side-nav a, .side-nav button { width: auto; white-space: nowrap; }
  .side-nav hr { display: none; }
  .split-cta { grid-template-columns: 1fr; }
  .mega .container { grid-template-columns: 1fr; }
  .mega-roots { border: 0; padding: 0; }
  .mega-panel { display: none !important; }
  .mega { max-height: calc(100vh - 120px); overflow-y: auto; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .topbar .container > :not(.min-order) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .cat-tile.big { grid-column: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard-body { padding: 10px 12px 12px; }
  .pcard-foot { flex-wrap: wrap; }
  .pcard-foot .btn { width: 100%; }
  .pcard-foot form { width: 100%; }
  .pcard-foot .btn { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
  .pcard-img .ph-stub { gap: 4px; padding: 8px; }
  .pcard-img .ph-scene { width: 92%; }
  .pcard-img .ph-caption b { font-size: 11.5px; }
  .pcard-img .ph-caption span { display: none; }
  .price { font-size: 17px; }
  .cart-item { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: 'img info del' 'img qty sum'; gap: 8px 12px; padding: 14px; }
  .cart-thumb { grid-area: img; width: 56px; height: 56px; }
  .cart-item .ci-info { grid-area: info; } .cart-item .qty { grid-area: qty; justify-self: start; } .cart-item .cart-sum { grid-area: sum; } .cart-item .icon-btn { grid-area: del; justify-self: end; } .cart-item .cart-sum { text-align: right; white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 18px; }
  .cta-card { padding: 24px; }
}

@media print {
  .topbar, .header, .footer, .no-print { display: none !important; }
  body { background: #fff; }
}

/* ---------- Админ-панель ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--ink); color: #c9ced8; padding: 20px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.admin-side .logo { color: #fff; padding: 0 8px 18px; font-size: 18px; }
.admin-side .brand-logo { height: 28px; }
.admin-side a, .admin-side button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; border: 0; background: none; color: inherit; cursor: pointer; width: 100%; text-align: left; }
.admin-side a:hover, .admin-side button:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.active { background: rgba(200,240,49,.14); color: var(--accent); }
.admin-side .grow { flex: 1; }
.admin-side .count { margin-left: auto; background: var(--accent); color: var(--ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.admin-main { padding: 24px 32px 64px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-top h1 { font-size: 28px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { width: auto; height: 40px; }
.filters input.input { min-width: 240px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: #fafafb; border: 1px solid var(--line-2); }
.col-check { width: 1%; padding-right: 0 !important; }
.row-check { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; vertical-align: middle; }
.table tr.selected td { background: var(--accent-soft); }
.inline-form { display: inline-block; }
.bulk-bar { position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px 10px 18px;
  background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.bulk-bar[hidden] { display: none; }
.bulk-bar > span { margin-right: auto; font-size: 14px; }
.bulk-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); background: transparent; }
.btn-danger-solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger-solid:hover { background: #c92c2f; }
.thumb-empty { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--bg); color: #c2c7d0; }
.quick { width: 100px; height: 34px; padding: 0 8px; text-align: right; }
.cat-tree { list-style: none; margin: 0; padding: 0; }
.cat-tree ul { list-style: none; margin: 0; padding-left: 28px; border-left: 1px dashed var(--line); margin-left: 18px; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 6px 0; }
.cat-row .name { font-weight: 600; flex: 1; min-width: 0; }
.cat-row .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.preview-img { width: 120px; height: 120px; object-fit: contain; border-radius: 12px; background: #fafafb; border: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; }
  .admin-side .logo { padding: 0 8px 0 0; }
  .admin-side .grow { display: none; }
  .admin-side .brand-logo { height: 22px; }
  .admin-side a, .admin-side button { width: auto; white-space: nowrap; }
  .admin-main { padding: 20px 16px 48px; }
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Страница доставки ---------- */
.dl-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.dl-eyebrow.dark { color: #4d6400; }
.dl-eyebrow .icon { width: 16px; height: 16px; }
.dl-hero { margin-top: 4px; border-radius: 24px; background: var(--ink); color: #fff; padding: clamp(28px, 4.5vw, 56px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; position: relative; overflow: hidden; }
.dl-hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(200,240,49,.22), transparent 70%); pointer-events: none; }
.dl-hero h1 { font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.015em; margin: 14px 0 16px; }
.dl-hero p { color: #b7bdc9; font-size: 17px; margin: 0; max-width: 560px; }
.dl-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.dl-facts li { display: flex; align-items: baseline; gap: 14px; padding: 14px 18px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.dl-facts b { font-size: 22px; letter-spacing: -0.02em; color: var(--accent); white-space: nowrap; min-width: 120px; }
.dl-facts span { color: #c9ced8; font-size: 14px; }

.dl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dl-card { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dl-card:hover { border-color: #cfd3da; box-shadow: var(--shadow); transform: translateY(-2px); }
.dl-card:nth-child(-n+2) { grid-column: span 3; }
.dl-card h2 { font-size: 24px; }
.dl-card h3 { font-size: 19px; }
.dl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dl-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: #4d6400; }
.dl-ico .icon { width: 24px; height: 24px; }
.dl-pickup { background: linear-gradient(160deg, #f6fcdf 0%, #fff 55%); border-color: #e1f1a8; }
.dl-pickup .btn { align-self: flex-start; margin-top: auto; }
.dl-addr { display: flex; gap: 8px; align-items: flex-start; font-size: 17px; font-weight: 600; margin: 0; }
.dl-addr .icon { margin-top: 3px; color: #4d6400; }
.dl-price { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.dl-price small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.dl-plus { color: #4d6400; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.dl-list li { display: flex; gap: 10px; align-items: flex-start; }
.dl-list .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--ok); flex: none; }
.dl-list li:first-child .icon { color: var(--muted); }
.dl-card:not(.dl-pickup) .dl-list li:first-child .icon { color: var(--ok); }
.dl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-chips span { padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }

.dl-calc { margin-top: 12px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; border-radius: 20px; padding: clamp(22px, 3.5vw, 36px); }
.dl-calc h2 { margin: 10px 0 6px; }
.dl-calc-form { display: grid; gap: 16px; margin-top: 18px; }
.dl-result { display: flex; flex-direction: column; gap: 6px; justify-content: center; padding: 24px; border-radius: 16px; background: var(--ink); color: #fff; }
.dl-result > span { font-size: 13px; color: #b7bdc9; }
.dl-result b { font-family: var(--display); font-size: clamp(30px, 3.6vw, 40px); letter-spacing: -0.01em; color: var(--accent); line-height: 1.1; }
.dl-result p { color: #c9ced8; font-size: 14px; min-height: 2.8em; margin: 4px 0 12px; }

.dl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: step; }
.dl-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.dl-steps li::before { content: counter(step, decimal-leading-zero); font-weight: 800; font-size: 13px; color: #4d6400; background: var(--accent-soft); border-radius: 8px; padding: 2px 8px; align-self: flex-start; margin-bottom: 6px; }
.dl-steps span { color: var(--muted); font-size: 14px; }
.dl-prose { border-radius: 20px; }
.dl-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dl-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.22); }
.dl-cta .btn-ghost:hover { background: rgba(255,255,255,.08); }

@media (max-width: 1080px) {
  .dl-hero { grid-template-columns: 1fr; align-items: start; }
  .dl-card, .dl-card:nth-child(-n+2) { grid-column: span 3; }
  .dl-card:last-child { grid-column: 1 / -1; }
  .dl-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-card, .dl-card:nth-child(-n+2), .dl-card:last-child { grid-column: auto; }
  .dl-calc { grid-template-columns: 1fr; gap: 20px; }
  .dl-steps { grid-template-columns: 1fr; }
  .dl-facts b { min-width: 0; font-size: 19px; }
  .dl-facts li { flex-direction: column; gap: 2px; }
  .dl-calc .seg { display: flex; } .dl-calc .seg label { flex: 1; text-align: center; }
}

/* ---------- Страница оплаты ---------- */
.pm-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 12px; margin-top: 12px; align-items: stretch; }
.pm-grid .dl-card { grid-column: auto; }
.pm-grid .dl-list .icon { color: #4d6400 !important; }
.pm-card-main { background: linear-gradient(160deg, #f6fcdf 0%, #fff 55%); border-color: #e1f1a8; }
.pm-options { display: grid; gap: 8px; }
.pm-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.pm-option b { display: block; font-size: 15px; }
.pm-option span { font-size: 13px; color: var(--muted); }
.pm-option-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--accent); flex: none; }
.pm-option-ico .icon { width: 18px; height: 18px; }
.pm-secure { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: auto 0 0; }
.pm-secure .icon { width: 18px; height: 18px; color: var(--ok); flex: none; }
.pm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: pm; font-size: 14px; }
.pm-steps li { counter-increment: pm; display: flex; gap: 10px; align-items: flex-start; }
.pm-steps li::before { content: counter(pm); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.pm-table th.c, .pm-table td.c { text-align: center; }
.pm-yes { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.pm-yes .icon { width: 16px; height: 16px; }
.pm-no { color: #c2c7d0; font-weight: 700; }
@media (max-width: 1080px) { .pm-grid { grid-template-columns: 1fr 1fr; } .pm-card-main { grid-column: 1 / -1; order: -1; } }
@media (max-width: 760px) { .pm-grid { grid-template-columns: 1fr; } .pm-table th, .pm-table td { padding: 10px 8px; font-size: 13px; } }

.pm-mobile { display: none; }
@media (max-width: 760px) {
  .pm-table { display: none; }
  .pm-mobile { display: grid; gap: 8px; }
  .pm-mrow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
  .pm-mrow .dl-chips span { background: var(--ok-soft); color: #0b5c37; }
}

/* ---------- Страница «О компании» ---------- */
.ab-hero { align-items: center; }
.ab-ghost { color: #fff !important; border-color: rgba(255,255,255,.22) !important; }
.ab-ghost:hover { background: rgba(255,255,255,.08) !important; }
.ab-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.ab-stats div { padding: 20px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; min-height: 130px; justify-content: flex-end; }
.ab-stats b { font-family: var(--display); font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; line-height: 1; color: var(--accent); }
.ab-stats span { color: #c9ced8; font-size: 13px; }
.ab-stats .accent { background: var(--accent); border-color: var(--accent); }
.ab-stats .accent b { color: var(--ink); }
.ab-stats .accent span { color: var(--accent-ink); }

.ab-adv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ab-adv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ab-adv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfd3da; }
.ab-adv-card h3 { font-size: 17px; margin-top: 6px; }
.ab-adv-card p { margin: 0; color: var(--muted); font-size: 14px; }
.ab-adv-card.key { background: linear-gradient(160deg, #f6fcdf 0%, #fff 60%); border-color: #e1f1a8; }

.ab-aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ab-aud-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ab-aud-item b { display: block; margin-bottom: 4px; }
.ab-aud-item span:not(.pm-option-ico) { font-size: 14px; color: var(--muted); }

.ab-brands { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-brands a { display: flex; flex-direction: column; padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 120px; transition: border-color .15s, background .15s; }
.ab-brands a:hover { border-color: var(--ink); }
.ab-brands b { font-size: 16px; letter-spacing: -0.01em; }
.ab-brands span { font-size: 12px; color: var(--muted); }

.ab-seo { border-radius: 20px; padding: clamp(24px, 4vw, 48px); }
.ab-seo > * { max-width: 820px; }
.ab-seo h2 { font-size: clamp(20px, 2vw, 24px); }
.ab-seo h3 { font-size: 17px; margin: 22px 0 8px; }
.ab-seo p, .ab-seo li { color: var(--ink-2); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

.ab-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.ab-cta { display: flex; flex-direction: column; justify-content: center; }
.ab-cta h2 { margin-bottom: 10px; }

@media (max-width: 1080px) {
  .ab-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-aud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ab-adv, .ab-aud, .ab-contacts { grid-template-columns: 1fr; }
  .ab-stats div { min-height: 104px; padding: 16px; }
  .ab-brands a { min-width: 0; flex: 1 1 calc(50% - 4px); }
}

/* ---------- Cookie ---------- */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.legal .link-btn { color: var(--blue); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 13px; }
.footer-legal .link-btn { text-decoration: none; }
.footer-legal .link-btn:hover { color: #fff; }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 120; max-width: 980px; margin: 0 auto; display: flex; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(15,18,24,.18); padding: 18px 20px; }
.cookie-banner[hidden] { display: none; }
.cookie-text { flex: 1; min-width: 0; font-size: 14px; }
.cookie-text p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.cookie-actions .btn { height: 40px; padding: 0 16px; }
@media (max-width: 760px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; left: 8px; right: 8px; bottom: 8px; padding: 16px; }
  .cookie-text { font-size: 13px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-actions .btn:first-child { grid-column: 1 / -1; }
  .cookie-actions .btn { white-space: normal; font-size: 14px; }
}
@media print { .cookie-banner { display: none !important; } }

/* ---------- Фильтры каталога ---------- */
.fbar { margin-bottom: 12px; min-width: 0; }
.catalog-layout > * { min-width: 0; }
.fbar-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fpill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; list-style: none; transition: border-color .15s, background .15s; }
.fpill::-webkit-details-marker { display: none; }
.fpill:hover { border-color: #cfd3da; }
.fpill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fpill b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.fpill svg { width: 16px; height: 16px; transform: rotate(90deg); opacity: .6; transition: transform .2s; }
.fpill-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.fpill-toggle::before { content: ''; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid currentColor; opacity: .5; }
.fpill-toggle.active::before { opacity: 1; background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--ink); }
.fpill-toggle:has(input:focus-visible), .fdrop > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fdrop { position: relative; }
.fdrop[open] > summary svg { transform: rotate(-90deg); }
.fdrop[open] > summary { border-color: var(--ink); }
/* Прозрачная подложка: клик мимо панели закрывает её */
.fdrop[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 60; cursor: default; }
.fdrop-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 61; width: 300px; max-width: calc(100vw - 32px); display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(15,18,24,.16); }
.fdrop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.fdrop-close { display: none; border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.fdrop-search { height: 38px; }
.fvalues { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.fvalues .check { font-size: 14px; align-items: flex-start; }
.fvalues .check span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fvalues .check small { color: var(--muted); font-size: 12px; padding-top: 1px; }
.fvalues .check.is-empty { opacity: .45; }
.fvalues .check[hidden] { display: none; }
.fdrop-foot { display: flex; align-items: center; gap: 14px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.fdrop-foot .btn { flex: 1; }
.fdrop-foot .link-btn { color: var(--muted); }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.price-range .input { height: 40px; padding: 0 10px; min-width: 0; }
.price-range span { color: var(--muted); }
.fbar-reset { margin-left: 4px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); font-size: 13px; font-weight: 600; }
.fchip span { font-size: 16px; line-height: 1; color: var(--muted); }
.fchip:hover span { color: var(--danger); }
@media (max-width: 640px) {
  /* На телефоне — ряд кнопок с прокруткой, панель выезжает снизу */
  .fbar { margin: 0 -16px 12px; }
  .fbar-row { flex-wrap: nowrap; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; }
  .fbar-row::-webkit-scrollbar { display: none; }
  .fdrop[open] > summary::before { background: rgba(15,18,24,.4); }
  .fdrop-panel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 80vh; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .fdrop-close { display: grid; place-items: center; }
  .fvalues { max-height: none; }
  .fvalues .check { font-size: 15px; padding: 4px 0; }
  .fdrop-foot .btn { height: 46px; }
}

/* Админка: настройка фильтров категории */
.filter-modes { display: grid; gap: 10px; }
.filter-modes .check { align-items: flex-start; font-size: 14px; }
.filter-setup .input-sm { height: 34px; padding: 0 10px; font-size: 14px; }
.filter-setup td:nth-child(3) { min-width: 180px; }
.filter-setup [hidden] { display: none; }

/* Заказ без регистрации */
.guest-hint { margin: -4px 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; }
.guest-order { max-width: 900px; }
.guest-note { display: flex; gap: 14px; align-items: flex-start; background: var(--accent-soft); border-color: #dcef9c; }
.guest-note > svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.guest-note p { margin: 6px 0 0; font-size: 14px; }
.guest-note > div { flex: 1; min-width: 0; }
.guest-link { display: flex; gap: 8px; margin-top: 12px; }
.guest-link .input { flex: 1; min-width: 0; height: 40px; font-size: 13px; background: #fff; }
@media (max-width: 640px) { .guest-link { flex-direction: column; } }

/* ---------- Блог ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 48px; }
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d5d9e0; }
.post-card time { font-size: 13px; color: var(--muted); }
.post-card h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; flex: 1; }
.post-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; font-size: 14px; }
.post-more svg { width: 16px; height: 16px; transition: transform .2s; }
.post-card:hover .post-more svg { transform: translateX(4px); }
.post-article { max-width: 820px; margin: 0 auto 40px; padding: clamp(22px, 5vw, 52px); border-radius: 20px; font-size: 17px; line-height: 1.7; }
.post-head { margin-bottom: 26px; }
.post-head h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.post-article h2 { font-size: clamp(21px, 3vw, 26px); margin: 38px 0 12px; line-height: 1.3; }
.post-article h3 { font-size: 19px; margin: 26px 0 8px; }
.post-article p { margin: 0 0 16px; }
.post-article a:not(.btn) { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-article .lead { font-size: 19px; color: var(--ink); }
.post-article .note { margin: 22px 0; padding: 18px 20px; border-radius: 14px; background: var(--accent-soft); }
.post-article .note p:last-child { margin-bottom: 0; }
.post-article .table-scroll { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--line); border-radius: 14px; }
.post-article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.post-article th, .post-article td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post-article th { background: var(--bg); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.post-article tr:last-child td { border-bottom: 0; }
.post-article .cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 34px; padding: 22px 24px; border-radius: 16px; background: var(--ink); color: #fff; }
.post-article .cta p { margin: 0; flex: 1 1 260px; }
.post-article .cta .btn { text-decoration: none; }
.post-more-list { max-width: 1100px; margin: 0 auto; }
.post-more-list h2 { margin-bottom: 16px; }
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; gap: 14px; }
  .post-card { padding: 20px; border-radius: 18px; }
  .post-article { font-size: 16px; border-radius: 18px; }
  .post-article .lead { font-size: 17px; }
  .post-article table { min-width: 600px; font-size: 14px; }
  .post-article th, .post-article td { padding: 10px 12px; }
}
