/* =====================================================================
   Gobsek — дизайн-система v3 (темы: light, dark, eco)
   Темы задаются атрибутом data-theme на <html>. Все цвета — переменные.
   ===================================================================== */
:root, [data-theme="light"] {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f0f2ee;
  --surface-3: #e6eae4;
  --text: #0e1511;
  --muted: #5f6b63;
  --faint: #8c968f;
  --line: #e2e6e0;
  --accent: #0c7a50;
  --accent-hover: #09643f;
  --accent-contrast: #ffffff;
  --accent-soft: #e2f2e9;
  --hl: #c9f26a;
  --hl-text: #11210c;
  --ink: #0f1f17;
  --ink-text: #ffffff;
  --ink-muted: #a7bdb0;
  --media: #f2f3f0;
  --danger: #d6392a;
  --warn: #b7791f;
  --shadow-sm: 0 1px 2px rgba(15, 31, 23, .05);
  --shadow: 0 1px 2px rgba(15, 31, 23, .04), 0 8px 24px rgba(15, 31, 23, .06);
  --shadow-lg: 0 24px 64px rgba(15, 31, 23, .14);
  --glass: rgba(255, 255, 255, .78);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000;
  --surface: #0c0d0d;
  --surface-2: #161817;
  --surface-3: #212423;
  --text: #f3f5f3;
  --muted: #9ea7a1;
  --faint: #6f7873;
  --line: #1f2221;
  --accent: #f3f5f3;
  --accent-hover: #ffffff;
  --accent-contrast: #08090a;
  --accent-soft: #1f2422;
  --hl: #c9f26a;
  --hl-text: #11210c;
  --ink: #161a19;
  --ink-text: #ffffff;
  --ink-muted: #a2aaa5;
  --media: #f2f3f0;
  --danger: #ff6a5b;
  --warn: #e8ad4a;
  --shadow-sm: none;
  --shadow: 0 0 0 1px #202423;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --glass: rgba(0, 0, 0, .72);
  color-scheme: dark;
}
[data-theme="eco"] {
  --bg: #0b1711;
  --surface: #112119;
  --surface-2: #162a20;
  --surface-3: #1d3428;
  --text: #ecf4e8;
  --muted: #a3bba9;
  --faint: #78917e;
  --line: #21392d;
  --accent: #9fe07a;
  --accent-hover: #b6ec95;
  --accent-contrast: #0b1711;
  --accent-soft: #1e3a2b;
  --hl: #9fe07a;
  --hl-text: #0b1711;
  --ink: #071009;
  --ink-text: #ecf4e8;
  --ink-muted: #a3bba9;
  --media: #eef2ec;
  --danger: #ff7b6b;
  --warn: #e8b34f;
  --shadow-sm: none;
  --shadow: 0 0 0 1px #1d3428;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
  --glass: rgba(17, 33, 25, .82);
  color-scheme: dark;
}
/* ============ База ============ */
:root {
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --tabbar-h: 0px;
  --hdr-h: 124px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body { margin: 0; font-family: var(--font); font-size: 15px; background: var(--bg); color: var(--text); line-height: 1.5;
  padding-bottom: var(--tabbar-h); -webkit-font-smoothing: antialiased; transition: background-color .2s, color .2s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
p { margin: 0 0 .8em; }
.i { flex: none; display: block; }
.wrap { width: min(1280px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
.center { text-align: center; }
.link { color: var(--accent); font-weight: 600; }
[data-theme="dark"] .link { color: var(--hl); }
.link:hover { text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ============ Кнопки ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-contrast); font-weight: 600; font-size: .95rem;
  cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, border-color .15s; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn.lg { height: 52px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn.sm { height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.soft { background: var(--surface-2); color: var(--text); }
.btn.soft:hover { background: var(--surface-3); }
.btn.outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn.outline:hover { background: var(--surface-2); }
.btn.hl { background: var(--hl); color: var(--hl-text); }
.btn.hl:hover { filter: brightness(.96); }
.btn.white { background: #fff; color: #0e1511; }
.btn.white:hover { background: #f0f2ee; }
.btn.ghost-white { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }
.btn.ghost-white:hover { background: rgba(255,255,255,.18); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.on { color: #e5354f; border-color: color-mix(in srgb, #e5354f 35%, transparent); }
.icon-btn.on svg path { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
[data-theme="dark"] .link-btn { color: var(--hl); }
.link-btn:disabled { color: var(--faint); cursor: default; }
.count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e5354f;
  color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ============ Шапка ============ */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; align-items: center; gap: 12px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; white-space: nowrap; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; }
[data-theme="dark"] .logo-mark { background: var(--hl); color: var(--hl-text); }
.catalog-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; white-space: nowrap; }
.catalog-btn:hover { opacity: .9; }
.search { flex: 1; position: relative; display: flex; min-width: 0; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { flex: 1; min-width: 0; height: 46px; padding: 0 110px 0 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .15s, background .15s; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search button { position: absolute; right: 5px; top: 5px; height: 36px; padding: 0 16px; border: 0; border-radius: 9px;
  background: var(--accent); color: var(--accent-contrast); font-weight: 600; cursor: pointer; }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.hdr-actions .btn { height: 46px; }
.pop { position: relative; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: grid; gap: 2px; }
.pop-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 4px; font-weight: 600; }
.pop-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none;
  cursor: pointer; text-align: left; font-size: .92rem; }
.pop-menu button:hover { background: var(--surface-2); }
.pop-menu button.active { background: var(--accent-soft); font-weight: 600; }
.pop-menu .tick { margin-left: auto; color: var(--accent); }
[data-theme="dark"] .pop-menu .tick { color: var(--hl); }
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.lang-btn { width: auto; padding: 0 12px; gap: 6px; display: inline-flex; font-weight: 600; font-size: .85rem; }

.catnav { display: flex; align-items: center; gap: 6px; height: 52px; overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: .9rem;
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.catnav a:hover { background: var(--surface-2); color: var(--text); }
.catnav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.catnav a.accent { color: var(--accent); font-weight: 600; }
[data-theme="dark"] .catnav a.accent { color: var(--hl); }
.catnav .sep { width: 1px; height: 20px; background: var(--line); flex: none; margin: 0 6px; }

/* Мега-меню */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 140px); overflow: auto; animation: drop .18s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.mega-inner { display: grid; grid-template-columns: 300px 1fr; gap: 32px; padding: 20px 0 28px; }
.mega-parents { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-parents a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-weight: 500; }
.mega-parents a .n { margin-left: auto; color: var(--faint); font-size: .8rem; }
.mega-parents a:hover, .mega-parents a.active { background: var(--surface-2); }
.mega-parents .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
[data-theme="dark"] .mega-parents .ic { color: var(--hl); }
.mega-children h3 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin-bottom: 16px; }
.mega-children ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 4px 24px; }
.mega-children li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mega-children li a:hover { color: var(--accent); }
.mega-children li .n { color: var(--faint); font-size: .82rem; }

/* ============ Hero / бенто ============ */
.bento { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; margin: 24px 0 16px; }
.bento-main { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink); color: var(--ink-text);
  padding: clamp(28px, 4.5vw, 56px); display: grid; align-content: space-between; gap: 28px; min-height: 420px; }
.bento-main::before { content: ''; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 38%, transparent), transparent 65%); pointer-events: none; }
.bento-main::after { content: ''; position: absolute; width: 380px; height: 380px; left: 30%; bottom: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 122, 80, .55), transparent 65%); pointer-events: none; }
.bento-main > * { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12); font-size: .82rem; font-weight: 500; color: var(--ink-muted); justify-self: start; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hl) 25%, transparent); }
.bento-main h1 { color: var(--ink-text); font-size: clamp(2rem, 4.4vw, 3.6rem); max-width: 14ch; margin: 14px 0 12px; }
.bento-main h1 em { font-style: normal; color: var(--hl); }
.bento-main p { color: var(--ink-muted); font-size: 1.06rem; max-width: 52ch; margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats-row { display: flex; gap: 32px; flex-wrap: wrap; }
.stats-row div b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stats-row div span { color: var(--ink-muted); font-size: .85rem; }
.bento-side { display: grid; gap: 16px; grid-template-rows: 1fr 1fr; }
.tile { border-radius: var(--r-lg); padding: 26px; display: grid; align-content: space-between; gap: 14px; position: relative; overflow: hidden; }
.tile h3 { font-size: 1.35rem; margin: 0 0 6px; color: inherit; }
.tile p { margin: 0; opacity: .8; font-size: .93rem; }
.tile .tile-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.tile-hl { background: var(--hl); color: var(--hl-text); }
.tile-hl .tile-ic { background: rgba(0,0,0,.08); }
.tile-surface { background: var(--surface); box-shadow: var(--shadow); }
.tile-surface .tile-ic { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .tile-surface .tile-ic { color: var(--hl); }
.tile-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.tile .price-tag { font-size: .85rem; opacity: .75; }
.tile .price-tag b { display: block; font-size: 1.6rem; opacity: 1; letter-spacing: -0.02em; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.trust > div { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); min-width: 0; }
.trust .ti { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
[data-theme="dark"] .trust .ti { color: var(--hl); }
.trust b { display: block; font-size: .95rem; }
.trust span span { color: var(--muted); font-size: .84rem; }

/* ============ Секции ============ */
.sec { margin: 48px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.more:hover { color: var(--text); }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tint { background: var(--surface-2); box-shadow: none; }

/* Категории */
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.cat-card { position: relative; display: grid; gap: 14px; align-content: space-between; min-height: 150px; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.cat-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .cat-card .ic { color: var(--hl); }
.cat-card b { display: block; font-size: 1rem; line-height: 1.25; letter-spacing: -0.01em; }
.cat-card span { color: var(--faint); font-size: .84rem; }
.cat-card .go { position: absolute; right: 16px; top: 18px; color: var(--faint); transition: transform .18s; }
.cat-card:hover .go { transform: translateX(3px); color: var(--text); }

/* Карточка товара */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 240px); gap: 16px; overflow-x: auto; padding: 2px 2px 14px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: transparent; }
.pcard > a { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pcard-media { position: relative; aspect-ratio: 1; background: var(--media); overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); background: var(--surface-2); }
.chip-eco { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: 999px;
  background: var(--hl); color: var(--hl-text); font-size: .74rem; font-weight: 700; }
.chip-status { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; background: var(--warn); color: #fff; font-size: .74rem; font-weight: 600; }
.fav { position: absolute; right: 10px; top: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #1a201c; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: transform .15s; }
.fav:hover { transform: scale(1.08); }
.fav.on { color: #e5354f; }
.fav.on svg path { fill: currentColor; }
.pcard-body { padding: 14px 16px 16px; display: grid; gap: 6px; flex: 1; align-content: start; }
.pcard-title { font-weight: 500; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.price { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.price small { font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price.ask { font-size: .95rem; font-weight: 600; color: var(--muted); }
.pcard-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--faint); margin-top: 2px; min-width: 0; }
.pcard-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex: none; }
.avail { color: var(--accent); font-weight: 500; }
[data-theme="dark"] .avail, [data-theme="eco"] .avail { color: var(--hl); }

/* Промо-баннеры */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.promo { border-radius: var(--r-lg); padding: 28px; display: grid; gap: 12px; align-content: start; position: relative; overflow: hidden; min-height: 200px; }
.promo h3 { font-size: 1.45rem; margin: 0; color: inherit; max-width: 18ch; }
.promo p { margin: 0; opacity: .8; max-width: 44ch; }
.promo .btn { justify-self: start; margin-top: 6px; }
.promo .big-ic { position: absolute; right: 22px; top: 22px; opacity: .9; }
.promo-ink { background: var(--ink); color: var(--ink-text); }
.promo-ink .big-ic { color: var(--hl); }
.promo-soft { background: var(--surface); border: 1px solid var(--line); }
.promo-soft .big-ic { color: var(--accent); }

/* Шаги — номер над текстом, без наложения */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 6px; align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: .82rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); justify-self: start; padding: 4px 10px; border-radius: 999px; margin-bottom: 6px; }
[data-theme="dark"] .step::before { color: var(--hl); }
.step h3 { margin: 0; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
.steps.col { grid-template-columns: 1fr; }

/* Сравнение */
.cmp-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; }
.cmp th:nth-child(2) { color: var(--accent); }
[data-theme="dark"] .cmp th:nth-child(2) { color: var(--hl); }
.cmp td:nth-child(2) { font-weight: 600; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.cmp td:nth-child(2) .i { display: inline-block; vertical-align: -4px; margin-right: 6px; color: var(--accent); }
[data-theme="dark"] .cmp td:nth-child(2) .i { color: var(--hl); }
.cmp td:nth-child(3) { color: var(--muted); }
.cmp tr:last-child td { border-bottom: 0; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable td, .ptable th { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.ptable th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; }
.ptable td:last-child, .ptable th:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable a:hover { color: var(--accent); }

.cta { text-align: center; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-lg); background: var(--ink); color: var(--ink-text); position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 30%, transparent), transparent 65%); }
.cta > * { position: relative; }
.cta h2 { color: var(--ink-text); }
.cta p { color: var(--ink-muted); max-width: 48ch; margin: 0 auto 20px; }

/* ============ Каталог ============ */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 20px 0 10px; font-size: .86rem; color: var(--faint); }
.crumbs a:hover { color: var(--text); }
.page-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.page-title .muted { font-size: .95rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: .9rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { color: var(--faint); font-size: .8rem; }
.chip.active .n { color: inherit; opacity: .7; }
.cat-layout { display: grid; grid-template-columns: 272px 1fr; gap: 28px; align-items: start; margin-bottom: 48px; }
.cat-layout > * { min-width: 0; }
.side { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 14px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.side-box h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 0 0 10px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .92rem; }
.cat-list a:hover { background: var(--surface-2); }
.cat-list a.active { background: var(--accent-soft); font-weight: 600; }
.cat-list .n { margin-left: auto; color: var(--faint); font-size: .8rem; }
.cat-list .back { color: var(--muted); }
.cat-list .sub { padding-left: 22px; }
.filters { display: grid; gap: 16px; }
.range-row { display: flex; gap: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .actions { margin-left: auto; }
.toolbar select { width: auto; height: 40px; padding: 0 36px 0 12px; }
.filters-toggle { display: none; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.pager a.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.all-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-bottom: 48px; }
.all-cats .side-box h3 { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; text-transform: none; letter-spacing: -0.01em; color: var(--text); margin-bottom: 12px; }
.all-cats .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
[data-theme="dark"] .all-cats .ic { color: var(--hl); }

/* ============ Страница товара ============ */
.pp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.pp > * { min-width: 0; }
.col { display: grid; gap: 16px; align-content: start; }
.col > * { min-width: 0; }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--media); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .ph { font-size: 0; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: #1a201c; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.g-nav.prev { left: 14px; } .g-nav.next { right: 14px; }
.g-count { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: .78rem; font-weight: 600; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--media); }
.thumbs button.active { border-color: var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buybox { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 16px; }
.buy-card { display: grid; gap: 14px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 600; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .pill.ok, [data-theme="eco"] .pill.ok { color: var(--hl); }
.pill.hl { background: var(--hl); color: var(--hl-text); }
.pill.warn { color: var(--warn); }
.pill.new { background: #e5354f; color: #fff; }
.pp-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; letter-spacing: -0.025em; }
.price-xl { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.price-xl small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-xl.ask { font-size: 1.4rem; color: var(--muted); }
.buy-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.contact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.meta-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--faint); }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }
.seller-card { display: grid; gap: 14px; }
.seller-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.seller-head > div { min-width: 0; }
.seller-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; flex: none; }
[data-theme="dark"] .avatar { color: var(--hl); }
.avatar.lg { width: 72px; height: 72px; font-size: 1.7rem; border-radius: 20px; }
.contact-list { display: grid; gap: 4px; }
.contact-list a, .contact-list span { display: flex; align-items: center; gap: 10px; padding: 6px 0; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent); }
.contact-list .i { color: var(--faint); }
.info-rows { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.info-rows li { display: flex; gap: 12px; align-items: flex-start; }
.info-rows .i { color: var(--accent); margin-top: 1px; }
[data-theme="dark"] .info-rows .i { color: var(--hl); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { position: relative; flex: none; border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs button.active, .tabs a.active { color: var(--text); border-color: var(--text); }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .count { position: static; border: 0; }
.description { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; }
.kv dt { color: var(--muted); padding-right: 16px; }
.kv dd { font-weight: 500; }
.kv dd a { color: var(--accent); }
[data-theme="dark"] .kv dd a { color: var(--hl); }
.eco-meter { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 8px 0 16px; }
.eco-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--hl)); border-radius: 99px; }
.eco-big { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.lang-note { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: .8rem; margin-bottom: 10px; }
.mobile-buy { display: none; }

/* ============ Формы ============ */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.form-grid > * { min-width: 0; }
label { display: grid; gap: 7px; font-weight: 600; font-size: .9rem; }
.hint { font-weight: 400; color: var(--faint); font-size: .82rem; }
.req { color: var(--danger); }
input, select, textarea { font: inherit; font-size: max(16px, .95rem); height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238c968f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
input[type=range] { height: auto; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); background: none; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: .9rem; }
.check a { color: var(--accent); text-decoration: underline; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.error { color: var(--danger); font-weight: 500; margin: 0; font-size: .9rem; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none;
  color: var(--faint); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.code-input { font-size: 1.9rem !important; height: 64px; letter-spacing: .5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: .5em; }
.demo { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent);
  border-radius: 12px; padding: 12px 14px; font-size: .88rem; }
.demo .i { color: var(--warn); margin-top: 1px; }
.demo-code { display: inline-block; font-size: 1.3rem; font-weight: 800; letter-spacing: .18em; white-space: nowrap; margin-top: 2px; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.steps-bar span.on { background: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0; background: var(--surface); }
legend { padding: 0 8px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
details summary { cursor: pointer; }

.auth { max-width: 460px; margin: 40px auto 56px; }
.auth h1 { font-size: 1.85rem; margin-bottom: 4px; }
.auth .lead { color: var(--muted); margin-bottom: 22px; }
.btn-google { width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.btn-google:hover { background: var(--surface-2); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.more-fields summary { color: var(--accent); font-weight: 600; font-size: .9rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.more-fields summary::-webkit-details-marker { display: none; }
[data-theme="dark"] .more-fields summary { color: var(--hl); }

/* ============ Кабинет ============ */
.cab-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.cab-head h1 { margin: 0; }
.list { display: grid; gap: 10px; margin-bottom: 48px; }
.row-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.row-item > * { min-width: 0; }
.row-item .thumb { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--media); }
.row-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.row-item .actions { justify-content: flex-end; }
.order { display: grid; gap: 10px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.order .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.order select { width: auto; height: 38px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: var(--r); margin-bottom: 14px;
  background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.notice a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-item { position: relative; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--media); border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.photo-item .cover { position: absolute; left: 6px; bottom: 6px; background: var(--hl); color: var(--hl-text); font-size: .68rem; padding: 2px 7px; border-radius: 6px; font-weight: 700; }
.photo-add { width: 112px; height: 112px; border: 1.5px dashed var(--faint); border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 6px;
  color: var(--muted); cursor: pointer; font-weight: 600; font-size: .8rem; text-align: center; background: var(--surface-2); padding: 8px; }
.photo-add:hover { border-color: var(--accent); color: var(--accent); }
.photo-add input { display: none; }
.form-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.form-card h3 .num { width: 26px; height: 26px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: .82rem; display: grid; place-items: center; }

/* ============ Инфо-страницы ============ */
.page-hero { margin: 24px 0 8px; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-lg); background: var(--ink); color: var(--ink-text); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; width: 480px; height: 480px; right: -140px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 35%, transparent), transparent 65%); }
.page-hero > * { position: relative; }
.page-hero h1 { color: var(--ink-text); max-width: 20ch; }
.page-hero p { color: var(--ink-muted); max-width: 62ch; font-size: 1.06rem; }
.feature { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
[data-theme="dark"] .feature .ic { color: var(--hl); }
.feature h3 { margin: 4px 0 0; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0; margin-bottom: 10px; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .2s; color: var(--faint); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }
.tariff { display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: var(--r-lg); background: var(--ink); color: var(--ink-text); }
.tariff h2 { color: var(--ink-text); margin: 6px 0 0; }
.tariff .big-num { font-size: 3.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--hl); }
.tariff .muted { color: var(--ink-muted); }
.tariff ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.tariff li { display: flex; gap: 10px; align-items: flex-start; }
.tariff li .i { color: var(--hl); }
.about-text { white-space: pre-line; font-size: 1.05rem; line-height: 1.7; }
.mission { font-size: 1.25rem; line-height: 1.55; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.numbers div { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.numbers b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.numbers span { color: var(--muted); font-size: .9rem; }

/* ============ Модальное окно ============ */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(8, 12, 10, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface); border-radius: var(--r-lg); padding: 26px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; position: relative;
  box-shadow: var(--shadow-lg); animation: rise .2s ease; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.sheet h2 { padding-right: 40px; }
.sheet-close { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.sheet-product { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); margin-bottom: 18px; min-width: 0; }
.sheet-product > div { min-width: 0; }
.sheet-product b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-product img, .sheet-product .ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--media); }
.success { text-align: center; padding: 8px 0; display: grid; gap: 8px; justify-items: center; }
.success .big { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

/* ============ Подвал ============ */
.ftr { background: var(--ink); color: var(--ink-muted); padding: 48px 0 24px; margin-top: 56px; }
.ftr .logo { color: var(--ink-text); }
.ftr .logo-mark { background: var(--hl); color: var(--hl-text); }
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.ftr h4 { color: var(--ink-text); font-size: .95rem; margin-bottom: 12px; letter-spacing: 0; }
.ftr-grid a { display: block; padding: 4px 0; font-size: .92rem; }
.ftr-grid a:hover { color: var(--ink-text); }
.ftr-brand p { margin-top: 12px; font-size: .92rem; max-width: 36ch; }
.ftr-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; font-size: .84rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ============ Уведомления, скелетоны ============ */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); transform: translate(-50%, 16px); background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .22s; z-index: 80;
  max-width: calc(100% - 32px); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%;
  animation: sk 1.3s ease infinite; border-radius: var(--r-lg); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-page { display: grid; gap: 16px; margin: 24px 0; }
.empty { text-align: center; padding: 56px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; justify-items: center; }
.empty .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); color: var(--faint); display: grid; place-items: center; }
.empty p { color: var(--muted); margin: 0; max-width: 40ch; }

.tabbar { display: none; }
.mob-only { display: none; }

/* ============ Скидка ============ */
.old-price { color: var(--faint); text-decoration: line-through; font-size: .82rem; font-weight: 500; margin-left: 6px; }
.price-xl .old-price { font-size: 1.05rem; margin-left: 10px; }
.chip-sale { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; background: #e5354f; color: #fff; font-size: .74rem; font-weight: 700; }

/* ============ Редактор карточки товара ============ */
.ed { display: grid; grid-template-columns: 210px minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin: 8px 0 56px; }
.ed > * { min-width: 0; }
.ed-nav { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 2px; }
.ed-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: .92rem; }
.ed-nav a:hover { background: var(--surface); color: var(--text); }
.ed-nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.ed-nav .st { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); color: transparent; }
.ed-nav .st.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.ed-main { display: grid; gap: 16px; }
.ed-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 16px; scroll-margin-top: calc(var(--hdr-h) + 16px); }
.ed-sec > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0; }
.ed-sec > h2 .i { color: var(--accent); }
[data-theme="dark"] .ed-sec > h2 .i { color: var(--hl); }
.ed-sec > .hint { margin-top: -10px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.counter { font-size: .78rem; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--warn); }

.drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 26px 16px; border: 1.5px dashed var(--faint); border-radius: var(--r);
  background: var(--surface-2); color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop b { color: var(--text); }
.drop input { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile-ph { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--media); border: 2px solid transparent; cursor: grab; }
.tile-ph:first-child { border-color: var(--accent); }
.tile-ph.dragging { opacity: .4; }
.tile-ph.target { border-color: var(--hl); }
.tile-ph img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile-ph .cover { position: absolute; left: 6px; top: 6px; background: var(--accent); color: var(--accent-contrast); font-size: .66rem; padding: 2px 7px; border-radius: 6px; font-weight: 700; }
.tile-ph .tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 2px; padding: 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .15s; }
.tile-ph:hover .tools, .tile-ph:focus-within .tools { opacity: 1; }
.tile-ph .tools button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255,255,255,.92); color: #1a201c; cursor: pointer; display: grid; place-items: center; }
.tile-ph .tools button.del { background: #e5354f; color: #fff; }

.combo { position: relative; }
.combo-picked { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.combo-picked .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.combo-picked .path { flex: 1; min-width: 0; font-weight: 500; }
.combo-picked .path small { display: block; color: var(--faint); font-weight: 400; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: 320px; overflow: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.combo-list .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 10px 10px 4px; font-weight: 600; }
.combo-list button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-size: .92rem; }
.combo-list button:hover, .combo-list button.hot { background: var(--surface-2); }
.combo-list .none { padding: 14px; color: var(--muted); text-align: center; }

.attr-rows { display: grid; gap: 8px; }
.attr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 44px; gap: 8px; }
.attr-row .icon-btn { width: 44px; height: 48px; color: var(--faint); }
.attr-row .icon-btn:hover { color: var(--danger); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sugg .lbl { font-size: .82rem; color: var(--faint); margin-right: 2px; }
.sugg button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--faint); background: none; cursor: pointer; font-size: .84rem; display: inline-flex; align-items: center; gap: 4px; }
.sugg button:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }
.tipbox { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: .86rem; }
.tipbox .i { color: var(--accent); flex: none; margin-top: 1px; }

.ed-side { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 14px; }
.score { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 10px; }
.score-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; }
.score-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--hl)); transition: width .3s; }
.score ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.score li { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.score li .i { color: var(--warn); }
.preview-box { display: grid; gap: 8px; }
.preview-box .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; }
.preview-box .pcard { pointer-events: none; }
.publish-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 12px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; font-size: .9rem; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; border: 0; padding: 0; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.save-state { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--faint); }
.save-state.dirty { color: var(--warn); }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ed-bar { display: none; }

/* Быстрая правка в «Мои товары» */
.quick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.quick label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--faint); font-weight: 500; }
.quick input { width: 96px; height: 34px; padding: 0 10px; font-size: .9rem; border-radius: 9px; }
.quick input.qty { width: 70px; }
.quick .btn { height: 34px; }

/* ============ Адаптив ============ */
@media (max-width: 1180px) {
  .hdr-actions .lbl { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr; }
  .bento-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .cat-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .side.collapsed { display: none; }
  .filters-toggle { display: inline-flex; }
  .pp { grid-template-columns: 1fr; gap: 20px; }
  .buybox { position: static; }
  .mega-inner { grid-template-columns: 250px 1fr; }
}

/* ============ Телефон ============ */
@media (max-width: 760px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); --hdr-h: 112px; }
  body { font-size: 15px; }
  .wrap { width: calc(100% - 28px); }
  .hdr-row { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .logo { flex: 1; font-size: 1.1rem; }
  .logo-mark { width: 34px; height: 34px; border-radius: 10px; }
  .catalog-btn, .desk { display: none !important; }
  .mob-only { display: initial; }
  .search { order: 3; flex-basis: 100%; }
  .search input { height: 44px; padding-right: 12px; }
  .search button { display: none; }
  .icon-btn { width: 40px; height: 40px; border-radius: 11px; }
  .icon-btn.lang-btn { width: auto; padding: 0 10px; }
  .catnav { height: 46px; }
  .catnav a { height: 32px; font-size: .85rem; padding: 0 10px; }
  .mega { display: none !important; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; font-size: .68rem; font-weight: 500; color: var(--faint); padding: 4px 0; }
  .tabbar a.active { color: var(--text); }
  .tabbar .ti { position: relative; display: grid; place-items: center; height: 26px; }
  .tabbar a.add .ti { width: 46px; height: 30px; border-radius: 10px; background: var(--accent); color: var(--accent-contrast); }
  .tabbar .count { top: -6px; right: -10px; }

  h1 { font-size: 1.6rem; }
  .card { padding: 18px; border-radius: 20px; }
  .sec { margin: 32px 0; }
  .sec-head { margin-bottom: 14px; }
  .bento { margin: 14px 0 12px; gap: 12px; }
  .bento-main { min-height: 0; padding: 24px 20px; gap: 22px; border-radius: 20px; }
  .bento-main h1 { font-size: 1.75rem; margin: 12px 0 10px; }
  .eyebrow { font-size: .75rem; }
  .bento-main p { font-size: .95rem; }
  .actions .btn.lg { flex: 1; height: 48px; padding: 0 12px; font-size: .92rem; }
  .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stats-row div b { font-size: 1.4rem; }
  .stats-row div span { font-size: .75rem; display: block; line-height: 1.25; }
  .bento-side { grid-template-columns: 1fr; gap: 12px; }
  .tile { padding: 20px; border-radius: 20px; }
  .tile h3 { font-size: 1.15rem; }
  .trust { grid-template-columns: 1fr 1fr; gap: 8px; }
  .trust > div { padding: 12px; gap: 10px; align-items: flex-start; }
  .trust .ti { width: 34px; height: 34px; border-radius: 10px; }
  .trust b { font-size: .86rem; line-height: 1.25; }
  .trust span span { font-size: .76rem; display: block; line-height: 1.3; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { min-height: 128px; padding: 14px; border-radius: 18px; gap: 10px; }
  .cat-card .ic { width: 42px; height: 42px; border-radius: 12px; }
  .cat-card b { font-size: .92rem; }
  .cat-card .go { display: none; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: calc(50% - 5px); gap: 10px; }
  .pcard { border-radius: 18px; }
  .pcard-body { padding: 10px 12px 12px; gap: 4px; }
  .pcard-title { font-size: .86rem; }
  .price { font-size: 1.05rem; }
  .pcard-meta { font-size: .74rem; }
  .fav { width: 34px; height: 34px; right: 8px; top: 8px; }
  .chip-eco { left: 8px; bottom: 8px; font-size: .68rem; padding: 3px 7px 3px 5px; }
  .promo { padding: 22px 20px; min-height: 0; border-radius: 20px; }
  .promo h3 { font-size: 1.2rem; padding-right: 48px; }
  .promo .big-ic { right: 18px; top: 18px; }
  .page-title h1 { font-size: 1.5rem; }
  .toolbar select { max-width: 52vw; }

  .crumbs { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; margin: 14px 0 8px; }
  .crumbs > *:last-child { overflow: hidden; text-overflow: ellipsis; }
  .gallery-main { border-radius: 20px; margin-inline: -2px; }
  .price-xl { font-size: 1.9rem; }
  .buy-card .buy-row, .buy-card .contact-row { display: none; }
  .mobile-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 44;
    padding: 10px 14px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .mobile-buy .btn { height: 48px; }
  .has-mobile-buy { padding-bottom: 72px; }
  .kv { grid-template-columns: minmax(100px, 40%) 1fr; }

  .row-item { grid-template-columns: 64px 1fr; gap: 12px; }
  .row-item .thumb { width: 64px; height: 64px; }
  .row-item .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cab-head { margin: 18px 0 10px; }
  .ftr { margin-top: 32px; padding-top: 32px; }
  .ftr-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .ftr-brand { grid-column: 1 / -1; }
  .modal { place-items: end stretch; padding: 0; }
  .sheet { width: 100%; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; }
  .seg { grid-template-columns: 1fr; }
  .auth { margin: 20px auto 40px; }
  .numbers b { font-size: 1.8rem; }
  .numbers div { padding: 16px; }
}
@media (max-width: 360px) {
  .pgrid, .cats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats-row div b { font-size: 1.2rem; }
  .trust { grid-template-columns: 1fr; }
}

/* ============ Редактор: адаптив ============ */
@media (max-width: 1180px) {
  .ed { grid-template-columns: minmax(0, 1fr) 320px; }
  .ed-nav { display: none; }
}
@media (max-width: 900px) {
  .ed { grid-template-columns: 1fr; }
  .ed-side { position: static; order: 2; }
  .ed-side .preview-box { display: none; }
  .ed-bar { display: flex; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 44; gap: 10px; align-items: center;
    padding: 10px 14px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .ed-bar .btn { flex: 1; height: 48px; }
  .ed { margin-bottom: 96px; }
}
@media (max-width: 760px) {
  .ed-sec { padding: 18px; border-radius: 20px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile-ph .tools { opacity: 1; padding: 8px; }
  .tile-ph .tools button { width: 32px; height: 32px; }
  .attr-row { grid-template-columns: 1fr 44px; }
  .attr-row input:nth-child(2) { grid-column: 1; }
  .attr-row .icon-btn { grid-row: 1 / span 2; grid-column: 2; height: auto; }
  .quick input { width: 84px; }
}
@media (max-width: 380px) {
  /* на самых узких экранах оставляем только «обложка» и «удалить» */
  .tile-ph .tools [data-ph="left"], .tile-ph .tools [data-ph="right"] { display: none; }
}

/* ============ Рейтинг и отзывы ============ */
.stars { display: inline-flex; gap: 2px; color: #f4b400; vertical-align: middle; }
.stars .i { width: var(--s, 16px); height: var(--s, 16px); }
.stars .on path { fill: currentColor; }
.stars .off { color: var(--surface-3); }
.stars .off path { fill: currentColor; }
.rating-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; }
.rating-badge b { font-size: 1rem; }
.rating-badge .muted { font-weight: 500; }
.rating-new { display: grid; gap: 6px; }
.rating-new .row { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; }
.rating-new .bar, .dist .bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rating-new .bar span, .dist .bar span { display: block; height: 100%; border-radius: 99px; background: #f4b400; }
.rv-summary { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.rv-big { display: grid; gap: 6px; justify-items: start; }
.rv-big .num { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.dist { display: grid; gap: 8px; }
.dist .row { display: grid; grid-template-columns: 28px 1fr 36px; gap: 10px; align-items: center; font-size: .84rem; color: var(--muted); }
.dist .row > span:first-child { display: inline-flex; align-items: center; gap: 2px; }
.rv-list { display: grid; gap: 12px; }
.rv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 10px; }
.rv.is-hidden { opacity: .55; }
.rv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-head .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
.rv-head .who { display: grid; }
.rv-head .who b { font-size: .95rem; }
.rv-head .actions { margin-left: auto; }
.rv-text { white-space: pre-line; overflow-wrap: anywhere; }
.rv-reply { border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: .92rem; display: grid; gap: 4px; }
.rv-reply b { font-size: .82rem; }
.star-pick { display: flex; gap: 6px; }
.star-pick button { width: 48px; height: 48px; border: 0; background: var(--surface-2); border-radius: 12px; cursor: pointer; color: var(--surface-3);
  display: grid; place-items: center; transition: transform .1s, color .1s; }
.star-pick button:hover { transform: scale(1.06); }
.star-pick button.on { color: #f4b400; }
.star-pick button.on path { fill: currentColor; }
.star-pick button .i { width: 26px; height: 26px; }
.star-label { min-height: 1.4em; font-weight: 600; color: var(--muted); }
@media (max-width: 760px) {
  .rv-summary { grid-template-columns: 1fr; gap: 16px; }
  .rv-big .num { font-size: 2.8rem; }
  .rv { padding: 16px; }
  .star-pick button { width: 44px; height: 44px; }
}

/* ============ Аналитика продавца ============ */
.an-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 16px; }
.seg-tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.seg-tabs a, .seg-tabs button { height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: none; font-weight: 600; font-size: .86rem; color: var(--muted);
  display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap; }
.seg-tabs .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.kpi .lbl { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .lbl .i { color: var(--faint); }
.kpi .val { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .delta { font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; color: var(--faint); }
.kpi .delta.up { color: var(--accent); }
[data-theme="dark"] .kpi .delta.up, [data-theme="eco"] .kpi .delta.up { color: var(--hl); }
.kpi .delta.down { color: var(--danger); }
.kpi.money { background: var(--surface-2); }
.an-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.an-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.an-card h2 { font-size: 1.1rem; margin: 0; }
.an-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart { position: relative; width: 100%; height: 240px; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .area { fill: var(--accent); opacity: .1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px;
  padding: 8px 10px; font-size: .8rem; white-space: nowrap; transform: translateX(-50%); display: grid; gap: 2px; z-index: 2; }
.chart-tip b { font-size: 1rem; }
.chart-tip span { color: var(--muted); }
.funnel { display: grid; gap: 10px; }
.funnel .row { display: grid; gap: 4px; }
.funnel .top { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; }
.funnel .top b { font-variant-numeric: tabular-nums; }
.hbar { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-2); overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.an-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.an-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 980px; }
.an-table th, .an-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; cursor: pointer; user-select: none; background: var(--surface); position: sticky; top: 0; }
.an-table th.sorted { color: var(--text); }
.an-table th:first-child, .an-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.an-table tbody tr { cursor: pointer; }
.an-table tbody tr:hover td { background: var(--surface-2); }
.an-table tfoot td { font-weight: 700; border-bottom: 0; }
.an-prod { display: flex; align-items: center; gap: 10px; max-width: 320px; }
.an-prod img, .an-prod .ph { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: var(--media); }
.an-prod span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-0 { color: var(--faint); }
@media (max-width: 980px) { .an-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 1.3rem; }
  .chart { height: 200px; }
  .an-card { padding: 16px; }
}
/* переключатели периода/показателя не растягивают карточку на узких экранах — прокручиваются внутри */
.seg-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-tabs::-webkit-scrollbar { display: none; }
.an-head > * { min-width: 0; max-width: 100%; }
.an-card > * { min-width: 0; }
.chart { min-width: 0; overflow: hidden; }
.chart svg { max-width: 100%; }

/* ============ Gobsek Seller — рабочее пространство продавца ============ */
.ws { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; margin: 20px 0 48px; }
.ws-side { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 14px; }
.ws-brand { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--ink); color: var(--ink-text); }
.ws-brand .logo-mark { width: 34px; height: 34px; background: var(--hl); color: var(--hl-text); }
.ws-brand b { display: block; font-size: 1rem; }
.ws-brand span { font-size: .78rem; color: var(--ink-muted); }
.ws-nav { display: grid; gap: 2px; }
.ws-nav a, .ws-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: .93rem;
  border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
.ws-nav a:hover, .ws-nav button:hover { background: var(--surface); color: var(--text); }
.ws-nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.ws-nav .count { position: static; margin-left: auto; border: 0; }
.ws-nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }
.ws-nav .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; padding: 6px 12px 2px; }
.ws-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ws-user .avatar { width: 38px; height: 38px; font-size: 1rem; border-radius: 11px; }
.ws-user b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-user span { font-size: .78rem; color: var(--faint); }
.ws-main { min-width: 0; display: grid; gap: 0; align-content: start; }
.ws-main > .cab-head, .ws-main > nav.tabs.cab-tabs { display: none; }
.ws-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ws-title h1 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

/* статусы заказов */
.st-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.st-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { background: color-mix(in srgb, #e5354f 12%, var(--surface)); color: #d4243f; }
.st-accepted { background: color-mix(in srgb, #2f6fdb 12%, var(--surface)); color: #2f6fdb; }
.st-shipped { background: color-mix(in srgb, #b7791f 14%, var(--surface)); color: #a26a12; }
.st-completed { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .st-completed, [data-theme="eco"] .st-completed { color: var(--hl); }
.st-refused { background: color-mix(in srgb, #7a4fd6 12%, var(--surface)); color: #7a4fd6; }
.st-cancelled { background: var(--surface-2); color: var(--faint); }
[data-theme="dark"] .st-new, [data-theme="eco"] .st-new { color: #ff7088; }
[data-theme="dark"] .st-accepted, [data-theme="eco"] .st-accepted { color: #7aa8ff; }
[data-theme="dark"] .st-shipped, [data-theme="eco"] .st-shipped { color: #f0b555; }
[data-theme="dark"] .st-refused, [data-theme="eco"] .st-refused { color: #b39dff; }
.pay-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.pay-pill.held, .pay-pill.released { color: var(--accent); }
[data-theme="dark"] .pay-pill.held, [data-theme="dark"] .pay-pill.released { color: var(--hl); }
.pay-pill.awaiting { color: var(--warn); }

.st-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .88rem; }
.st-tabs a .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: .76rem; }
.st-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.st-tabs a.active .n { background: rgba(255,255,255,.18); color: inherit; }
.st-tabs a.hot .n { background: #e5354f; color: #fff; }
.ord-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; margin-bottom: 14px; }
.ord-tools .search-in { position: relative; }
.ord-tools .search-in .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.ord-tools .search-in input { padding-left: 40px; }
.ord-tools select { width: auto; }
.ord-list { display: grid; gap: 10px; }
.ord { display: grid; grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ord:hover { border-color: transparent; box-shadow: var(--shadow); }
.ord.is-new { border-left: 3px solid #e5354f; }
.ord > * { min-width: 0; }
.ord .thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--media); }
.ord .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ord .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord .sub { font-size: .8rem; color: var(--faint); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ord .col { display: grid; gap: 3px; font-size: .86rem; }
.ord .col b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord .sum { text-align: right; display: grid; gap: 6px; justify-items: end; }
.ord .sum b { font-size: 1.05rem; }
.mini-buyer { font-size: .76rem; color: var(--faint); }
.mini-buyer.bad { color: var(--danger); font-weight: 600; }

/* карточка заказа */
.od { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.od > * { min-width: 0; display: grid; gap: 16px; align-content: start; }
.od-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.od-card h2 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.od-card h2 .i { color: var(--faint); }
.od-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.od-head h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.od-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.od-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
.od-item .thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--media); }
.od-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.money-rows { display: grid; gap: 0; }
.money-rows .r { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.money-rows .r:last-child { border-bottom: 0; }
.money-rows .r.total { font-weight: 700; font-size: 1.05rem; }
.money-rows .r span:first-child { color: var(--muted); }
.money-rows .r.total span:first-child { color: var(--text); }
.kv2 { display: grid; gap: 10px; margin: 0; }
.kv2 > div { display: grid; gap: 2px; }
.kv2 dt { font-size: .78rem; color: var(--faint); }
.kv2 dd { margin: 0; font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.copy-btn { border: 0; background: var(--surface-2); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.copy-btn:hover { color: var(--text); }
.bstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bstats div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.bstats b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.bstats span { font-size: .74rem; color: var(--muted); }
.bstats .bad b { color: var(--danger); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; font-size: .88rem; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--faint); font-size: .78rem; }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress-steps div { display: grid; gap: 6px; font-size: .76rem; color: var(--faint); text-align: center; }
.progress-steps div::before { content: ''; height: 4px; border-radius: 2px; background: var(--surface-3); }
.progress-steps div.on { color: var(--text); font-weight: 600; }
.progress-steps div.on::before { background: var(--accent); }
.progress-steps.stopped div.on::before { background: var(--faint); }

/* оформление заказа */
.opt-cards { display: grid; gap: 8px; }
.opt-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; }
.opt-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt-card input { margin: 0; }
.opt-card small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.opt-card .tag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--hl); color: var(--hl-text); }
.co-sec { display: grid; gap: 10px; }
.co-sec > b { font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.co-total b { font-size: 1.3rem; }
.gpay-box { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--ink); color: var(--ink-text); }
.gpay-box .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; }
.gpay-box .brand .i { color: var(--hl); }
.gpay-box p { color: var(--ink-muted); margin: 0; font-size: .86rem; }

@media (max-width: 1180px) {
  .ord { grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; }
  .ord .col.delivery { display: none; }
}
@media (max-width: 980px) {
  .ws { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .ws-side { position: static; gap: 10px; }
  .ws-brand, .ws-user, .ws-nav .sep, .ws-nav .grp, .ws-side .ws-extra { display: none; }
  .ws-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .ws-nav::-webkit-scrollbar { display: none; }
  .ws-nav a, .ws-nav button { flex: none; width: auto; border-radius: 0; padding: 12px 12px; border-bottom: 2px solid transparent; background: none !important; box-shadow: none !important; }
  .ws-nav a.active { border-color: var(--text); }
  .od { grid-template-columns: minmax(0, 1fr); }
  .ord-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ord-tools .search-in { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .ord { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .ord .thumb { width: 52px; height: 52px; }
  .ord .col.buyer { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
  .ord .sum { grid-column: 3; grid-row: 1 / 3; }
  .ord .thumb { grid-row: 1 / 3; }
  .ord-tools select { width: 100%; }
  .od-card { padding: 16px; }
  .progress-steps div { font-size: .68rem; }
}
.ov-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1400px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
.ord.buy { grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) auto; }
@media (max-width: 760px) {
  .ord.buy { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .ord.buy .col.delivery { display: none; }
  .ord.buy .sum .btn { display: none; }
}
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =====================================================================
   v3 — аналитика с прибылью, настройки, обновлённый вид
   ===================================================================== */
html:not([data-theme]), [data-theme="light"] {
  --chart: var(--accent);
  --s-cost: #2a78d6; --s-commission: #eb6834; --s-profit: #1baf7a;   /* категории: проверены на дальтонизм */
  --heat-0: var(--surface-2); --heat-1: #cde2fb; --heat-2: #9ec5f4; --heat-3: #5598e7; --heat-4: #256abf; --heat-5: #104281;
  --pos: #0a7d4f;
  --bg: #f5f6f3;
  --line: #e6e9e4;
  --shadow: 0 1px 2px rgba(15, 31, 23, .04), 0 10px 30px -8px rgba(15, 31, 23, .10);
}
[data-theme="dark"] {
  --chart: #c9f26a;
  --s-cost: #3987e5; --s-commission: #d95926; --s-profit: #199e70;
  --heat-1: #104281; --heat-2: #184f95; --heat-3: #256abf; --heat-4: #3987e5; --heat-5: #86b6ef;
  --pos: #c9f26a;
}
[data-theme="eco"] {
  --chart: #9fe07a;
  --s-cost: #3987e5; --s-commission: #d95926; --s-profit: #199e70;
  --heat-1: #104281; --heat-2: #184f95; --heat-3: #256abf; --heat-4: #3987e5; --heat-5: #86b6ef;
  --pos: #9fe07a;
}
.neg { color: var(--danger) !important; }
.pos { color: var(--pos); font-weight: 600; }

/* ---- общий вид: мягче поверхности, крупнее заголовки, плавные состояния ---- */
h1 { letter-spacing: -0.04em; }
.card, .an-card, .od-card, .kpi { transition: border-color .2s, box-shadow .2s, transform .2s; }
.an-card { border-radius: 22px; padding: 22px; box-shadow: var(--shadow-sm); }
.an-card h2 { font-size: 1.05rem; letter-spacing: -0.015em; }
.cat-card b { color: var(--text); }
.cat-card .ic { width: 52px; height: 52px; border-radius: 16px; }
.pcard { border-radius: 22px; }
.pcard .price { font-size: 1.25rem; }
.btn { border-radius: 13px; letter-spacing: -0.005em; }
.icon-btn { border-radius: 13px; }
.seg-tabs { border-radius: 13px; }
.seg-tabs a, .seg-tabs button { white-space: nowrap; }
::selection { background: var(--hl); color: var(--hl-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-theme="dark"] :focus-visible, [data-theme="eco"] :focus-visible { outline-color: var(--hl); }

/* шапка: кнопка заказов со счётчиком */
.orders-btn .count { background: #e5354f; color: #fff; }

/* рабочее пространство: тёмный бренд-блок с мягким свечением */
.ws-brand { position: relative; overflow: hidden; border-radius: 18px; padding: 16px; }
.ws-brand::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 45%, transparent), transparent 70%); pointer-events: none; }
.ws-nav a.active { background: var(--surface); box-shadow: var(--shadow-sm), inset 3px 0 0 var(--accent); }
[data-theme="dark"] .ws-nav a.active, [data-theme="eco"] .ws-nav a.active { box-shadow: inset 3px 0 0 var(--hl); background: var(--surface-2); }

/* ---- аналитика ---- */
.an-filters { justify-content: space-between; gap: 12px; }
.an-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.view-tabs { display: flex; gap: 6px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.view-tabs::-webkit-scrollbar { display: none; }
.view-tabs a { flex: none; height: 38px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.view-tabs a:hover { color: var(--text); }
.view-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.demo-flag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; margin-bottom: 14px; font-size: .84rem; font-weight: 600;
  background: color-mix(in srgb, var(--hl) 35%, var(--surface)); color: var(--text); }
.an-kpis { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.kpi { border-radius: 18px; padding: 16px 18px; gap: 6px; }
.kpi .val { font-size: 1.7rem; }
.kpi.money { background: var(--surface); }
.kpi.hero { background: var(--ink); color: var(--ink-text); border-color: transparent; position: relative; overflow: hidden; }
.kpi.hero::after { content: ''; position: absolute; inset: auto -30px -50px auto; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 40%, transparent), transparent 70%); pointer-events: none; }
.kpi.hero .lbl, .kpi.hero .lbl .i { color: var(--ink-muted); }
.kpi.hero .delta.up { color: var(--hl); }
.kpi.hero .delta.down { color: #ff8a7a; }
.chart { height: 260px; }
.chart .line { stroke: var(--chart); stroke-width: 2.25; }
.chart .area { fill: url(#areaGrad); opacity: 1; }
.chart .dot { fill: var(--chart); }
.chart-tip { padding: 8px 12px; display: grid; gap: 2px; font-size: .8rem; transform: translateX(-50%); white-space: nowrap; }

/* из чего состоит выручка */
.split-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.split-hero > div { display: grid; gap: 2px; min-width: 0; }
.split-hero b { font-size: 1.35rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.split-bar { display: flex; gap: 2px; height: 16px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.split-bar span { min-width: 3px; }
.s-cost { background: var(--s-cost); } .s-commission { background: var(--s-commission); } .s-profit { background: var(--s-profit); }
.split-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.split-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 56px; gap: 10px; align-items: center; font-size: .88rem; }
.split-legend i { width: 12px; height: 12px; border-radius: 4px; }
.split-legend b, .split-legend .faint { text-align: right; font-variant-numeric: tabular-nums; }

/* топ товаров */
.top-list { display: grid; gap: 4px; }
.top-item { display: grid; grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; }
.top-item:hover { background: var(--surface-2); }
.top-item .rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--surface-2); color: var(--muted); }
.top-item:first-child .rank { background: var(--hl); color: var(--hl-text); }
.top-item .an-prod { max-width: none; min-width: 0; }
.top-nums { display: grid; justify-items: end; gap: 2px; text-align: right; }
.top-nums b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.lbl-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel .top { align-items: center; }

/* теплокарта */
.heat-wrap { overflow-x: auto; scrollbar-width: thin; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 3px; min-width: 520px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--heat-0); cursor: pointer; }
.heat i.on { outline: 2px solid var(--text); outline-offset: 1px; }
.heat .hd, .heat .hh { font-size: .7rem; color: var(--faint); display: flex; align-items: center; }
.heat .hh { justify-content: flex-start; }
.l1 { background: var(--heat-1) !important; } .l2 { background: var(--heat-2) !important; } .l3 { background: var(--heat-3) !important; }
.l4 { background: var(--heat-4) !important; } .l5 { background: var(--heat-5) !important; } .l0 { background: var(--heat-0); }
.heat-legend { display: flex; align-items: center; gap: 4px; }
.heat-legend i { width: 14px; height: 14px; border-radius: 4px; }
.heat-tip { min-height: 1.3em; color: var(--muted); }

/* таблица товаров */
.an-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.an-tools .search-in { position: relative; flex: 1 1 260px; max-width: 420px; }
.an-tools .search-in .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.an-tools .search-in input { padding-left: 40px; }
.an-table { min-width: 0; }
.an-table td.neg { font-weight: 600; }
.an-prod.big img, .an-prod.big .ph { width: 64px; height: 64px; border-radius: 14px; }
.an-prod.big b { font-size: 1.15rem; white-space: normal; }

/* экономика единицы */
.unit-econ { display: grid; gap: 0; }
.unit-econ .r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.unit-econ .r > span:first-child { display: grid; gap: 2px; }
.unit-econ .r small { font-size: .74rem; }
.unit-econ .r.total { font-size: 1rem; }
.unit-econ .r b { font-variant-numeric: tabular-nums; }
.cost-in { display: flex; gap: 6px; align-items: center; }
.cost-in input { width: 120px; height: 38px; text-align: right; }
.cost-box { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.cost-box label { gap: 6px; }

/* выбор показателей */
.pick-grp { border: 0; padding: 0; margin: 0 0 6px; }
.pick-grp legend { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; margin-bottom: 8px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; display: inline-flex !important; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--muted); background: var(--surface); }
.pick input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* настройки */
.settings { display: grid; gap: 18px; }
.settings h2 { display: flex; align-items: center; gap: 8px; }
.set-row { display: grid; gap: 8px; }
.theme-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-card { display: grid; gap: 8px; padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .88rem; text-align: center; }
.theme-card.active { border-color: var(--accent); }
[data-theme="dark"] .theme-card.active, [data-theme="eco"] .theme-card.active { border-color: var(--hl); }
.tc-prev { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 64px; padding: 6px; border-radius: 10px; }
.tc-prev i { border-radius: 5px; }
.tc-prev i:first-child { grid-row: span 2; }
.tc-light { background: #f5f6f3; } .tc-light i { background: #fff; box-shadow: 0 0 0 1px #e6e9e4; } .tc-light i:nth-child(3) { background: #0c7a50; box-shadow: none; }
.tc-dark { background: #000; } .tc-dark i { background: #161817; } .tc-dark i:nth-child(3) { background: #c9f26a; }
.tc-eco { background: #0b1711; } .tc-eco i { background: #162a20; } .tc-eco i:nth-child(3) { background: #9fe07a; }

@media (max-width: 1100px) { .an-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .an-grid4 { grid-template-columns: minmax(0, 1fr); }
  .an-filters { flex-direction: column; align-items: stretch; }
  .top-item { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 8px 4px; }
  .top-item .top-bar { display: none; }
  .split-hero b { font-size: 1.1rem; }
  .kpi .val { font-size: 1.35rem; }
  .an-card { padding: 16px; border-radius: 18px; }
  .chart { height: 220px; }
  .theme-cards { gap: 8px; }
  .cost-in input { width: 96px; }
}
.split-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-hero > div:first-child { grid-column: 1 / -1; }
.split-hero > div:first-child b { font-size: 1.9rem; }
.top-bar { display: block; min-width: 0; }
.funnel .top b { white-space: nowrap; }
.an-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1700px) { .an-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .an-grid4 { grid-template-columns: minmax(0, 1fr); } .split-hero > div:first-child b { font-size: 1.5rem; } }

.unit-econ label.r { display: flex; flex-wrap: wrap; }
.unit-econ .r > span:first-child { flex: 1 1 150px; min-width: 0; }
.unit-econ .cost-in { flex: none; }
@media (max-width: 760px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .an-kpis .kpi { padding: 12px 14px; }
  .an-kpis .kpi .val { font-size: 1.15rem; }
  .an-kpis .kpi .lbl { font-size: .74rem; }
}
@media (max-width: 760px) { .top-nums .small { display: none; } .top-item .an-prod img, .top-item .an-prod .ph { width: 34px; height: 34px; } }

/* =====================================================================
   v0.10 — дерево категорий в 3 уровня
   ===================================================================== */
.mega-parents { max-height: calc(100vh - 200px); overflow: auto; padding-right: 4px; }
.mega-parents a { padding: 7px 10px; font-size: .92rem; }
.mega-parents a .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mega-parents .ic { width: 30px; height: 30px; flex: none; }
.mega-parents a.all { font-weight: 700; }
.mega-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mega-head h3 { margin: 0; font-size: 1.35rem; }
.mega-head h3 a:hover { color: var(--accent); }
.mega-groups { columns: 3 220px; column-gap: 28px; }
.mega-group { break-inside: avoid; display: grid; gap: 2px; margin-bottom: 18px; }
.mega-group a { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; color: var(--muted); padding: 2px 0; }
.mega-group a:hover { color: var(--accent); }
.mega-group a.has { color: var(--text); }
.mega-group a.g { font-weight: 700; color: var(--text); font-size: .95rem; margin-bottom: 4px; }
.mega-group a.more { color: var(--accent); font-weight: 600; }
.mega-group .n, .cat-group .n, .cat-hits .n, .cat-sec h2 .n { color: var(--faint); font-size: .78rem; font-weight: 500; }
[data-theme="dark"] .mega-group a:hover, [data-theme="dark"] .mega-group a.more { color: var(--hl); }

.chip.dim { color: var(--muted); }
.cat-list a.dim { color: var(--muted); }
.cat-list a b { font-weight: 600; }

/* страница «Усі категорії» */
.cat-search { position: relative; display: block; margin: 4px 0 14px; }
.cat-search .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.cat-search input { height: 56px; padding-left: 50px; font-size: 1.05rem; border-radius: 16px; }
.sec-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; margin-bottom: 8px; }
.sec-chips::-webkit-scrollbar { display: none; }
.sec-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 600; }
.sec-chips a:hover { border-color: var(--text); }
.sec-chips .i { color: var(--accent); }
.cat-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; margin-bottom: 16px; scroll-margin-top: calc(var(--hdr-h) + 16px); }
.cat-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin: 0 0 16px; }
.cat-sec h2 .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
[data-theme="dark"] .cat-sec h2 .ic, [data-theme="dark"] .sec-chips .i { color: var(--hl); }
.cat-sec h2 a:hover { color: var(--accent); }
.cat-groups { columns: 4 220px; column-gap: 28px; }
.cat-group { break-inside: avoid; margin-bottom: 18px; }
.cat-group a.g { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.cat-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.cat-group li a { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; color: var(--muted); padding: 3px 0; }
.cat-group li a.has { color: var(--text); }
.cat-group a:hover { color: var(--accent); }
.cat-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 8px; margin-bottom: 24px; }
.cat-hits a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.cat-hits a:hover { border-color: var(--text); }
.cat-hits .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.cat-hits b { display: block; }
.cat-hits small { display: block; color: var(--faint); font-size: .78rem; }
.cat-hits .n { margin-left: auto; }
.cat-suggest { display: flex; align-items: center; gap: 14px; margin: 8px 0 48px; flex-wrap: wrap; }
.cat-suggest > div { flex: 1 1 260px; }
.cat-suggest > .i { color: var(--accent); }

/* выбор категории в редакторе */
.combo-list { max-height: 380px; }
.combo-list button { display: flex; align-items: center; gap: 8px; }
.combo-list button span { flex: 1; min-width: 0; }
.combo-list button small { color: var(--faint); font-size: .76rem; flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-list button.has-kids .i { color: var(--faint); }
.combo-list button .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none !important; }
.combo-list .combo-nav button { color: var(--muted); font-weight: 600; font-size: .85rem; }
.combo-list .pick-here { color: var(--accent); font-weight: 700; background: var(--accent-soft); margin-bottom: 4px; }
.combo-list .suggest { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
[data-theme="dark"] .combo-list .pick-here, [data-theme="dark"] .combo-list .suggest { color: var(--hl); }

@media (max-width: 760px) {
  .cat-sec { padding: 16px; border-radius: 18px; }
  .cat-groups { columns: 1; }
  .cat-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
}
.mega-parents a .t { white-space: normal; line-height: 1.25; }

/* =====================================================================
   Два режима: Gobsek (покупатель) и Gobsek Seller (продавец)
   ===================================================================== */
/* кнопка входа в Gobsek Seller в шапке покупателя — в «цветах» кабинета продавца */
.seller-pill { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 6px; border-radius: 14px;
  background: #0d1311; color: #fff; transition: transform .15s, box-shadow .15s; }
.seller-pill:hover { box-shadow: 0 6px 20px rgba(13, 19, 17, .25); transform: translateY(-1px); }
.seller-pill .sp-ic, .seller-cta .sp-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #c9f26a; color: #11210c; flex: none; }
.seller-pill .sp-t { display: grid; line-height: 1.1; }
.seller-pill b { font-size: .92rem; }
.seller-pill small { font-size: .72rem; color: rgba(255, 255, 255, .6); }
.seller-pill .count { top: -6px; right: -6px; }
[data-theme="dark"] .seller-pill, [data-theme="eco"] .seller-pill { background: #c9f26a; color: #11210c; }
[data-theme="dark"] .seller-pill .sp-ic, [data-theme="eco"] .seller-pill .sp-ic { background: #11210c; color: #c9f26a; }
[data-theme="dark"] .seller-pill small, [data-theme="eco"] .seller-pill small { color: rgba(17, 33, 12, .65); }

/* шапка Gobsek Seller — всегда тёмная, без каталога и поиска */
body[data-mode="seller"] { --hdr-h: 68px; }
body[data-mode="seller"] .ftr { display: none; }
.hdr.seller { background: #0d1311; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sh-row { display: flex; align-items: center; gap: 14px; height: 68px; }
.sh-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sh-brand .logo-mark { background: #c9f26a; color: #11210c; width: 38px; height: 38px; }
.sh-brand b { display: block; font-size: 1.05rem; letter-spacing: -0.02em; }
.sh-brand small { display: block; font-size: .74rem; color: rgba(255, 255, 255, .55); }
.sh-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.desk-flex { display: contents; }
.hdr.seller .icon-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #fff; }
.hdr.seller .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.hdr.seller .pop-menu { color: var(--text); }
.sh-user .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; background: rgba(255, 255, 255, .1); color: #c9f26a; }

/* переключатель режимов */
.mode-switch { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .08); margin-left: 12px; }
.mode-switch a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: rgba(255, 255, 255, .7); }
.mode-switch a:hover { color: #fff; }
.mode-switch a.active { background: #c9f26a; color: #11210c; }

/* рабочая область продавца: свой фон, чтобы не путать с витриной */
body[data-mode="seller"] { background: color-mix(in srgb, var(--bg) 92%, #0d1311); }
body[data-mode="seller"] .ws { margin-top: 24px; }
body[data-mode="seller"] .ws-brand { display: none; }

/* кабинет покупателя */
.bc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 12px; }
.bc-user { display: flex; align-items: center; gap: 14px; }
.bc-user .avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 1.3rem; }
.bc-user h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.seller-cta { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px; background: #0d1311; color: #fff; max-width: 100%; }
.seller-cta b { display: block; }
.seller-cta small { display: block; font-size: .78rem; color: rgba(255, 255, 255, .65); }
.seller-cta:hover { box-shadow: 0 8px 24px rgba(13, 19, 17, .25); }
[data-theme="dark"] .seller-cta, [data-theme="eco"] .seller-cta { background: var(--surface-2); }
.tabs button { position: relative; flex: none; border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; }

/* нижнее меню на телефоне */
@media (max-width: 760px) {
  body[data-mode="seller"] { --hdr-h: 60px; }
  .sh-row { height: 60px; gap: 8px; }
  .sh-brand small { display: none; }
  .sh-brand b { font-size: .95rem; }
  .mode-switch { margin-left: auto; }
  .mode-switch a { padding: 0 10px; height: 32px; }
  .mode-switch a span { display: none; }
  .sh-actions { margin-left: 0; gap: 6px; }
  .desk-flex { display: none; }
  .sh-user .avatar { width: 36px; height: 36px; }
  .tabbar a.seller .ti { background: #0d1311; color: #c9f26a; }
  [data-theme="dark"] .tabbar a.seller .ti, [data-theme="eco"] .tabbar a.seller .ti { background: #c9f26a; color: #11210c; }
  body[data-mode="seller"] .tabbar { background: #0d1311; border-top-color: rgba(255, 255, 255, .08); }
  body[data-mode="seller"] .tabbar a { color: rgba(255, 255, 255, .55); }
  body[data-mode="seller"] .tabbar a.active { color: #fff; }
  body[data-mode="seller"] .tabbar a.add .ti { background: #c9f26a; color: #11210c; }
  .seller-cta { width: 100%; }
  .seller-cta svg:last-child { margin-left: auto; }
}

/* Текст страницы для поисковиков (виден долю секунды, пока загружается приложение) */
.seo-page { max-width: 820px; margin: 32px auto; color: var(--muted); line-height: 1.6; }
.seo-page h1 { color: var(--text); }
.seo-page img { border-radius: 16px; max-width: 100%; height: auto; }
.seo-list { columns: 2 260px; padding-left: 18px; }

/* админка */
.adm-table { min-width: 980px; }
.adm-table td { text-align: left; white-space: normal; vertical-align: top; }
.adm-table th { text-align: left; }
.adm-table tbody tr { cursor: default; }
.adm-table tr.blocked td { opacity: .55; }
.adm-table .wrap-cell { max-width: 260px; }
.adm-latest { display: grid; gap: 10px; }
.adm-latest > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-latest .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; flex: none; }
.adm-latest b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-latest small { color: var(--faint); font-size: .76rem; }
.adm-latest span { min-width: 0; }
.ws-title h1 .i { display: inline-block; vertical-align: -3px; color: var(--accent); }
.adm-table td { white-space: nowrap; }
.adm-table td:first-child, .adm-table td.wrap-cell { white-space: normal; min-width: 180px; }
.an-tools select { width: auto; flex: none; }
.an-tools .check { display: inline-flex; gap: 6px; align-items: center; }
