/* ==========================================================================
   Ubiquiti.SU — основная таблица стилей
   Структура:
     1. Токены (цвета, радиусы, тени) — тёмная тема по умолчанию + светлая
     2. База и типографика
     3. Утилиты и общие компоненты (кнопки, чипы, бейджи, поля)
     4. Шапка, навигация
     5. Главная: hero, хиты, категории, новости
     6. Каталог: фильтры, тулбар, предпросмотр, 5 видов списка
     7. Карточка товара (product.html)
     8. Панели: корзина, избранное, сравнение, чат, модалки
     9. Подвал
    10. Адаптив
   ========================================================================== */

/* 1. Токены ---------------------------------------------------------------- */
:root {
  --bg: #2d3240;
  --bg-deep: #262b37;
  --surface: #353b4c;
  --surface-2: #3e4559;
  --surface-3: #48506a;
  --header: #1f232e;
  --line: #454d63;
  --line-soft: #3a4154;
  --text: #f3f6fb;
  --muted: #aab3c5;
  --dim: #7f8aa1;
  --accent: #27b0e4;
  --accent-strong: #00a3e1;
  --accent-ink: #ffffff;
  --accent-soft: rgba(39, 176, 228, .14);
  --link: #49ccff;
  --green: #24ad34;
  --green-hi: #62d666;
  --green-soft: rgba(36, 173, 52, .16);
  --orange: #ff7104;
  --red: #f0524f;
  --violet: #6a4dff;
  --tile: radial-gradient(120% 120% at 50% 0%, #1b1f2b 0%, #07080c 70%);
  --shadow: 0 10px 30px rgba(8, 10, 16, .35);
  --shadow-sm: 0 2px 8px rgba(8, 10, 16, .25);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --container: 1480px;
  --gutter: 24px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef1f6;
  --bg-deep: #e4e8f0;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --surface-3: #e6eaf2;
  --header: #1f232e;
  --line: #d5dbe6;
  --line-soft: #e3e7ef;
  --text: #1a2030;
  --muted: #566076;
  --dim: #8590a6;
  --accent: #0a96d3;
  --accent-strong: #0088c2;
  --accent-soft: rgba(10, 150, 211, .1);
  --link: #0a84bd;
  --green: #1c9a2b;
  --green-hi: #1c9a2b;
  --green-soft: rgba(28, 154, 43, .12);
  --shadow: 0 10px 30px rgba(30, 40, 70, .12);
  --shadow-sm: 0 1px 4px rgba(30, 40, 70, .1);
  color-scheme: light;
}

/* 2. База ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 500 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
section[id], footer[id] { scroll-margin-top: 84px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
.tnum { font-variant-numeric: tabular-nums; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; }
.section-head .more { font-weight: 700; font-size: 13px; white-space: nowrap; }

/* 3. Компоненты ------------------------------------------------------------ */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r);
  font-weight: 700; font-size: 14px; white-space: nowrap;
  background: var(--surface-2); color: var(--text);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: #fff; box-shadow: 0 4px 14px rgba(0, 163, 225, .3); }
.btn-primary:hover { background: linear-gradient(180deg, #3fc0f0, var(--accent)); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  color: var(--muted); background: var(--surface-2); transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }
.icon-btn.is-on { color: #fff; background: var(--accent-strong); }
.icon-btn.like.is-on { background: var(--red); }
.icon-btn.cart.is-on { background: var(--green); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  font-weight: 600; font-size: 13px; white-space: nowrap; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip .n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip.is-active .n { color: var(--accent); }
.chip-star { border-style: dashed; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.badge-hit { color: var(--orange); border: 1px solid var(--orange); }
.badge-new { color: var(--green-hi); border: 1px solid var(--green-hi); }
.badge-arch { color: var(--dim); border: 1px solid var(--dim); }

.spec-chip {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.spec-chip b { font-weight: 800; }
.spec-chip span { color: var(--muted); font-weight: 500; }
.spec-chip.c1 { background: rgba(106, 77, 255, .22); }
.spec-chip.c2 { background: rgba(39, 176, 228, .2); }
.spec-chip.c3 { background: rgba(36, 173, 52, .2); }
.spec-chip.c4 { background: rgba(255, 113, 4, .18); }

.price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-weight: 600; font-size: .72em; color: var(--muted); margin-left: 2px; }
.price-ask { color: var(--muted); font-weight: 600; font-size: 13px; }
.price-tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--green); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-tag small { color: rgba(255, 255, 255, .8); margin-left: 3px; font-size: .75em; }
.price-tag.ask { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13px; }

.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.stock.in { color: var(--green-hi); }
.stock.in::before { background: var(--green-hi); box-shadow: 0 0 0 3px var(--green-soft); }
.stock.dot-only { font-size: 0; gap: 0; }

.field { display: block; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r);
  background: var(--bg-deep); border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }

.tile { position: relative; background: var(--tile); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; }
.tile.photo img { mix-blend-mode: normal; object-fit: cover; }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.clamp-2, .clamp-3, .clamp-4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; } .clamp-4 { -webkit-line-clamp: 4; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* 4. Шапка ----------------------------------------------------------------- */
.topbar { background: var(--surface); font-size: 12.5px; color: var(--muted); }
:root[data-theme="light"] .topbar { background: #2d3240; color: #aab3c5; }
.topbar .container { display: flex; align-items: center; gap: 20px; min-height: 36px; }
.topbar-notice { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-notice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-notice::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex: none; }
.topbar-links { display: flex; gap: 18px; margin-left: auto; }
.topbar-links a { color: inherit; font-weight: 600; }
.topbar-links a:hover { color: #fff; }
.lang { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: rgba(0, 0, 0, .22); }
.lang button { padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 800; color: inherit; }
.lang button.is-active { background: var(--accent-strong); color: #fff; }

.header { position: sticky; top: 0; z-index: 50; background: var(--header); color: #f3f6fb; box-shadow: 0 2px 16px rgba(0, 0, 0, .3); }
.header-main { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; flex: none; }
.logo:hover { color: #fff; }
.logo svg { width: 38px; height: 38px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.logo-text b i { font-style: normal; color: var(--accent); }
.logo-text small { font-size: 11px; color: #8f9ab0; font-weight: 600; }
.header-contacts { display: flex; flex-direction: column; line-height: 1.25; flex: none; }
.header-contacts a:first-child { color: #fff; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.header-contacts a:last-child { font-size: 12px; color: #8f9ab0; }
.search { position: relative; flex: 1; min-width: 160px; max-width: 560px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8f9ab0; pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 84px 0 44px; border-radius: 12px;
  background: #2d3240; border: 1px solid #3d4458; color: #fff;
}
.search input::placeholder { color: #8f9ab0; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(39, 176, 228, .2); }
.search-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #8f9ab0; font-variant-numeric: tabular-nums; pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.h-action {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 62px; padding: 6px 8px; border-radius: 10px; color: #c2c9d8; font-size: 11px; font-weight: 600;
  transition: background .15s, color .15s;
}
.h-action:hover { background: #2d3240; color: #fff; }
.h-action .icon { width: 22px; height: 22px; }
.h-action .count {
  position: absolute; top: 2px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent-strong); color: #fff; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.theme-switch { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: inherit; }
.theme-switch:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.theme-switch .sun, :root[data-theme="light"] .theme-switch .moon { display: none; }
:root[data-theme="light"] .theme-switch .sun { display: block; }
.burger { display: none; }

.nav { background: var(--surface); border-bottom: 1px solid var(--line-soft); color: var(--text); }
.nav .container { display: flex; align-items: center; gap: 16px; height: 52px; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-deep); flex: none; }
.seg button { height: 32px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .15s; }
.seg button:hover { color: var(--text); }
.seg button .n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.seg button.is-active { background: var(--accent-strong); color: #fff; box-shadow: var(--shadow-sm); }
.seg button.is-active .n { color: rgba(255, 255, 255, .8); }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.cats::-webkit-scrollbar { display: none; }

/* 5. Главная --------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; padding-top: 28px; }
.hero-intro { padding: 32px; position: relative; overflow: hidden; background: linear-gradient(135deg, #14161d 20%, #1b2a6b 75%, #0e9fd0 130%); color: #fff; border-radius: var(--r-lg); }
.hero-intro::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 2px solid rgba(73, 204, 255, .25); box-shadow: 0 0 0 40px rgba(73, 204, 255, .05), 0 0 0 90px rgba(73, 204, 255, .03); pointer-events: none; }
.hero-intro h1 { font-size: clamp(24px, 2.6vw, 36px); max-width: 18em; }
.hero-intro .lead { margin-top: 14px; color: #c9d3e6; font-size: 15px; line-height: 1.6; max-width: 62em; }
.hero-intro .lead.is-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.link-btn { color: var(--link); font-weight: 700; font-size: 13px; margin-top: 6px; }
.link-btn:hover { color: #fff; }
.hero-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.hero-line { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .07); backdrop-filter: blur(6px); color: #fff; }
.hero-line:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.hero-line .icon { color: #49ccff; }
.hero-line b { display: block; font-size: 13.5px; font-weight: 800; }
.hero-line small { color: #b4c0d8; font-size: 12px; }
.hero-cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-cta .btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.hero-cta .btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.assistant { padding: 24px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--surface); }
.assistant-head { display: flex; gap: 12px; align-items: center; }
.assistant-ava { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; flex: none; }
.assistant h2 { font-size: 18px; }
.assistant p { color: var(--muted); font-size: 13px; }
.assistant .textarea { flex: 1; min-height: 96px; }
.assistant-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-hints button { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; }
.assistant-hints button:hover { color: var(--text); background: var(--surface-3); }
.assistant-answer { padding: 12px 14px; border-radius: var(--r); background: var(--bg-deep); font-size: 13px; color: var(--muted); }

.hits { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hits::-webkit-scrollbar { display: none; }
.hit {
  scroll-snap-align: start; position: relative; display: grid; grid-template-columns: 1fr 44%; align-items: center;
  min-height: 260px; padding: 24px; border-radius: var(--r-lg); color: #fff; overflow: hidden;
  background: linear-gradient(165deg, #121419 30%, var(--hit, #3a1fd1) 130%);
  transition: transform .2s, box-shadow .2s;
}
.hit:nth-child(3n+2) { --hit: #0e9fd0; }
.hit:nth-child(3n) { --hit: #1565d8; }
.hit:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: #fff; }
.hit-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #aeb7ca; font-weight: 700; }
.hit h3 { font-size: 24px; margin: 8px 0 4px; }
.hit-cat { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #aeb7ca; font-weight: 700; }
.hit ul { margin: 14px 0; display: grid; gap: 4px; font-size: 13px; color: #d5dcea; }
.hit ul b { color: #fff; font-weight: 800; }
.hit img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: screen; }
.hits-nav { display: flex; gap: 6px; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-align: center; transition: transform .15s, background .15s; }
.cat-tile:hover { transform: translateY(-3px); background: var(--surface-2); color: var(--text); }
.cat-tile .tile { width: 96px; border-radius: 50%; }
.cat-tile b { font-size: 13.5px; font-weight: 700; }
.cat-tile small { color: var(--dim); font-size: 12px; }

.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feed-col { padding: 20px; }
.feed-item { display: flex; gap: 14px; padding: 12px; margin: 0 -12px; border-radius: var(--r); color: var(--text); }
.feed-item:hover { background: var(--surface-2); color: var(--text); }
.feed-item .tile { width: 96px; aspect-ratio: 4/3; flex: none; border-radius: 8px; }
.feed-item b { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.feed-item p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.feed-item time { display: block; color: var(--dim); font-size: 12px; margin-top: 6px; }

.help-banner { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: var(--r-lg); background: linear-gradient(100deg, #14161d, #172a7a 70%, #0e7fd0); color: #fff; }
.help-banner h2 { font-size: 20px; }
.help-banner p { color: #c3cde3; margin-top: 4px; }
.help-banner ul { display: grid; gap: 4px; color: #d5dcea; font-size: 13px; margin-left: auto; }
.help-banner ul li::before { content: "•"; color: #49ccff; margin-right: 8px; }

/* 6. Каталог --------------------------------------------------------------- */
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.catalog-head h2 { font-size: 26px; }
.catalog-head p { color: var(--muted); margin-top: 4px; max-width: 70em; }

/* Фильтры */
.filters { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-right: 4px; }
.f-drop { position: relative; }
.f-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 9px;
  background: var(--bg-deep); border: 1px solid var(--line-soft); font-weight: 600; font-size: 13px; color: var(--text);
  transition: border-color .15s, background .15s;
}
.f-btn:hover { border-color: var(--dim); }
.f-btn .icon { width: 14px; height: 14px; color: var(--dim); transition: transform .15s; }
.f-drop.is-open .f-btn { border-color: var(--accent); }
.f-drop.is-open .f-btn .icon { transform: rotate(180deg); }
.f-btn.has-value { border-color: var(--accent); background: var(--accent-soft); }
.f-btn .val { color: var(--accent); font-weight: 800; }
.f-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; max-width: 320px;
  padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.f-pop-list { max-height: 280px; overflow: auto; display: grid; gap: 1px; }
.f-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.f-opt:hover { background: var(--surface-3); }
.f-opt input { appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--dim); display: grid; place-items: center; flex: none; margin: 0; cursor: pointer; transition: all .12s; }
.f-opt input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.f-opt input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.f-opt .n { margin-left: auto; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.f-opt.is-zero { opacity: .45; }
.f-pop-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.f-price { display: grid; gap: 12px; width: 260px; }
.f-price-inputs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; color: var(--dim); }
.f-price-inputs .input { height: 36px; padding: 0 10px; }
.range { position: relative; height: 22px; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--line); }
.range-fill { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: var(--accent); }
.range input { position: absolute; inset: 0; width: 100%; margin: 0; appearance: none; background: none; pointer-events: none; }
.range input::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent-strong); cursor: grab; box-shadow: var(--shadow-sm); }
.range input::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--accent-strong); cursor: grab; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.filters-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line); }
.f-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 12.5px; font-weight: 600; }
.f-tag span { color: var(--muted); font-weight: 500; }
.f-tag button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 15px; line-height: 1; }
.f-tag button:hover { background: var(--accent-strong); color: #fff; }
.f-reset { color: var(--link); font-weight: 700; font-size: 12.5px; margin-left: 6px; }
.f-mobile-btn { display: none; }

/* Тулбар видов */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; position: sticky; top: 68px; z-index: 20; padding: 8px 0; background: var(--bg); }
.toolbar-count { color: var(--muted); font-size: 13px; }
.toolbar-count b { color: var(--text); font-weight: 800; }
.toolbar-spacer { flex: 1; }
.views { display: flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface); }
.views button { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all .15s; }
.views button:hover { color: var(--text); }
.views button.is-active { background: var(--accent-strong); color: #fff; }
.views .icon { width: 17px; height: 17px; }
.t-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 11px; background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted); }
.t-btn:hover { color: var(--text); }
.t-btn.is-on { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.t-btn .icon { width: 17px; height: 17px; }
.view-opts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sort-pop { left: auto; right: 0; min-width: 240px; }
.sort-opt { display: flex; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; text-align: left; }
.sort-opt:hover { background: var(--surface-3); }
.sort-opt.is-active { color: var(--accent); }

/* Раскладка: предпросмотр + список */
.catalog-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.catalog-layout.no-preview { grid-template-columns: minmax(0, 1fr); }
.catalog-layout.no-preview .preview { display: none; }

.preview { position: sticky; top: 134px; max-height: calc(100vh - 150px); overflow: auto; padding: 16px; scrollbar-width: thin; }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 10px; }
.preview-empty .icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--dim); }
.preview-photo { position: relative; }
.preview-photo .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.preview-photo .nav-arrow:hover { background: var(--accent-strong); }
.preview-photo .prev { left: 8px; } .preview-photo .next { right: 8px; }
.preview-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.preview-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.preview-dots i.is-active { background: #fff; }
.preview h3 { font-size: 18px; margin-top: 14px; }
.preview .art { color: var(--dim); font-size: 12px; font-weight: 700; margin-top: 2px; }
.preview-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; }
.preview-buy .price { font-size: 22px; }
.preview-actions { display: flex; gap: 6px; }
.preview-block { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line-soft); }
.preview-block .eyebrow { margin-bottom: 8px; }
.preview-block .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.preview-block p { color: var(--muted); font-size: 13px; }
.kv { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kv td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.kv tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--muted); width: 44%; padding-right: 10px; }

/* Группа */
.group { margin-bottom: 20px; }
.group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.group-head h3 { font-size: 17px; }
.group-head .n { color: var(--dim); font-size: 12px; font-weight: 700; }
.group-cmp { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--link); font-size: 12.5px; font-weight: 700; }
.group-cmp:hover { color: var(--accent); }
.group-desc { color: var(--muted); font-size: 13px; margin-bottom: 10px; max-width: 80em; }

/* Вид: Кратко и По группам */
.g-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; padding: 18px; margin-bottom: 14px; }
.g-card .tile { width: 132px; }
.g-card .group-head { margin-bottom: 4px; }
.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 6px 10px; white-space: nowrap; }
.rows th small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.rows td { padding: 7px 10px; border-top: 1px solid var(--line-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows tr.row { cursor: pointer; transition: background .12s; }
.rows tr.row:hover, .rows tr.row.is-hover { background: var(--surface-2); }
.rows td:first-child, .rows th:first-child { padding-left: 8px; border-radius: 8px 0 0 8px; }
.rows td:last-child { border-radius: 0 8px 8px 0; }
.rows .name { width: 100%; white-space: normal; }
.rows .name a { color: var(--text); font-weight: 700; font-size: 14.5px; }
.rows .name a:hover { color: var(--link); }
.rows .name small { color: var(--dim); font-weight: 600; margin-left: 8px; font-size: 11.5px; }
.rows .spec { color: var(--muted); min-width: 84px; }
.rows .spec.has { color: var(--text); font-weight: 600; }
.rows .p { text-align: right; font-size: 15px; }
.rows .acts { text-align: right; width: 1%; }
.row-acts { display: inline-flex; gap: 4px; opacity: .35; transition: opacity .12s; }
.row:hover .row-acts, .row-acts:has(.is-on) { opacity: 1; }
.row-acts .icon-btn { width: 28px; height: 28px; background: transparent; }
.row-acts .icon-btn:hover { background: var(--surface-3); }
.row-acts .icon-btn.is-on { background: var(--accent-strong); }
.row-acts .icon-btn.like.is-on { background: var(--red); }
.row-acts .icon-btn.cart.is-on { background: var(--green); }
.row-acts .icon { width: 15px; height: 15px; }

/* Вид: Список */
.l-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 18px; padding: 14px; margin-bottom: 10px; transition: box-shadow .15s; }
.l-item:hover, .l-item.is-hover { box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.l-item .tile { width: 110px; }
.l-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.l-title a { color: var(--text); font-size: 17px; font-weight: 800; }
.l-title a:hover { color: var(--link); }
.l-title small { color: var(--dim); font-weight: 700; font-size: 12px; }
.l-desc { color: var(--muted); font-size: 13px; margin: 6px 0 10px; max-width: 72em; }
.l-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.l-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 150px; }
.l-side .price { font-size: 20px; }
.l-side .acts { display: flex; gap: 6px; margin-top: auto; }
.l-strip { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.l-strip .tile { width: 84px; flex: none; border-radius: 8px; cursor: zoom-in; }

/* Вид: Плитка */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.p-card { position: relative; display: flex; flex-direction: column; padding: 10px; transition: transform .15s, box-shadow .15s; }
.p-card:hover, .p-card.is-hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.p-card .tile { margin-bottom: 10px; }
.p-card-badges { position: absolute; top: 18px; left: 18px; z-index: 2; display: flex; gap: 4px; }
.p-card-acts { position: absolute; top: 18px; right: 18px; z-index: 2; display: grid; gap: 5px; opacity: 0; transform: translateX(6px); transition: all .15s; }
.p-card:hover .p-card-acts, .p-card-acts:has(.is-on) { opacity: 1; transform: none; }
.p-card-acts .icon-btn { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }
.p-card-acts .icon-btn.is-on { background: var(--accent-strong); }
.p-card-acts .icon-btn.like.is-on { background: var(--red); }
.p-card .art { color: var(--dim); font-size: 11px; font-weight: 700; padding: 0 4px; }
.p-card h4 { padding: 0 4px; font-size: 15px; font-weight: 800; line-height: 1.3; margin: 2px 0 8px; }
.p-card h4 a { color: var(--text); }
.p-card h4 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.p-card h4 a:hover { color: var(--link); }
.p-card .l-chips { padding: 0 4px; margin-bottom: 12px; }
.p-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px; position: relative; z-index: 2; }

/* Вид: Тех.хар */
.tech-wrap { overflow-x: auto; padding: 0; scrollbar-width: thin; }
.tech { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tech th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; padding: 12px 14px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; cursor: pointer; user-select: none; }
.tech th:hover { color: var(--text); }
.tech th.is-sorted { color: var(--accent); }
.tech th small { display: block; text-transform: none; letter-spacing: 0; color: var(--dim); font-weight: 600; }
.tech th .x { margin-left: 6px; color: var(--dim); font-size: 14px; }
.tech th .x:hover { color: var(--red); }
.tech td { padding: 8px 14px; border-top: 1px solid var(--line-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tech td.v { color: var(--text); font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tech td.v.empty { color: var(--dim); font-weight: 400; }
.tech tr.row { cursor: pointer; }
.tech tr.row:hover td, .tech tr.row.is-hover td { background: var(--surface-2); }
.tech .sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tech th.sticky-col { z-index: 3; background: var(--surface-2); }
.tech .prod { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.tech .prod .tile { width: 40px; border-radius: 8px; flex: none; }
.tech .prod a { color: var(--text); font-weight: 700; }
.tech .prod small { display: block; color: var(--dim); font-size: 11px; font-weight: 600; }
.tech tr.g td { background: var(--bg-deep); padding: 10px 14px; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tech tr.g .group-cmp { float: right; text-transform: none; letter-spacing: 0; }
.col-picker { width: 300px; }
.col-picker .input { height: 34px; margin-bottom: 8px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.load-more { display: flex; justify-content: center; padding: 16px 0 8px; }

/* 7. Карточка товара ------------------------------------------------------- */
.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; font-size: 13px; color: var(--dim); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }
.crumbs span::before { content: "/"; margin-right: 8px; color: var(--dim); }
.pd-nav { display: flex; gap: 8px; }
.pd-nav a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; max-width: 220px; }
.pd-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-nav a:hover { color: var(--text); background: var(--surface-2); }
.pd-nav .icon { width: 16px; height: 16px; }

.pd-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.pd-preview, .pd-similar { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 16px; scrollbar-width: thin; }
.pd-similar .n { color: var(--accent); font-weight: 800; font-size: 13px; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pd-gallery { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; }
.pd-thumbs { display: grid; gap: 8px; align-content: start; max-height: 420px; overflow: auto; scrollbar-width: none; }
.pd-thumbs button { border-radius: 10px; opacity: .55; transition: opacity .15s, box-shadow .15s; }
.pd-thumbs button:hover { opacity: 1; }
.pd-thumbs button.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.pd-main { border-radius: var(--r-lg); cursor: zoom-in; }
.pd-main img { padding: 6%; }
.pd-info h1 { font-size: clamp(26px, 2.6vw, 36px); margin: 8px 0 6px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--muted); font-size: 13px; }
.pd-meta b { color: var(--text); }
.pd-desc { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-top: 16px; }
.pd-buy { display: grid; gap: 12px; margin-top: 18px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); }
.pd-buy-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-buy .price { font-size: 32px; letter-spacing: -.02em; }
.pd-buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-buy-row .btn-primary { flex: 1; }
.pd-buy-row .icon-btn { width: 48px; height: 48px; border-radius: var(--r); }
.qty { display: inline-flex; align-items: center; border-radius: var(--r); background: var(--surface-2); height: 48px; }
.qty button { width: 36px; height: 100%; font-size: 18px; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty input { width: 34px; text-align: center; background: none; border: 0; font-weight: 800; }
.qty input:focus { outline: none; }

/* Ползунки подбора */
.pd-sliders { padding: 20px 22px 8px; margin-top: 24px; }
.pd-sliders-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.pd-sliders-head h2 { font-size: 18px; }
.pd-sliders-head p { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 56em; }
.sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 36px; }
.sl { --c: var(--violet); padding: 12px 0 14px; transition: opacity .15s; }
.sl:nth-child(4n+2) { --c: var(--orange); }
.sl:nth-child(4n+3) { --c: var(--green-hi); }
.sl:nth-child(4n) { --c: var(--accent); }
.sl.is-off { opacity: .45; }
.sl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sl-head .switch input { width: 30px; height: 18px; }
.sl-head .switch input::after { width: 14px; height: 14px; }
.sl-head .switch input:checked { background: var(--c); }
.sl-head .switch input:checked::after { transform: translateX(12px); }
.sl-name { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sl-val { margin-left: auto; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c); }
.sl-val small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.sl-track { position: relative; height: 26px; margin: 0 9px; }
.sl-track::before { content: ""; position: absolute; left: -9px; right: -9px; top: 9px; height: 8px; border-radius: 4px; background: var(--sl-bg, var(--line)); }
.sl-track input { position: absolute; left: -9px; top: 0; width: calc(100% + 18px); height: 26px; margin: 0; appearance: none; background: none; cursor: pointer; }
.sl-track input::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid var(--c); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); cursor: grab; }
.sl-track input::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 5px solid var(--c); cursor: grab; }
.sl-track input::-moz-range-track { background: none; }
.sl-pin { position: absolute; top: 1px; width: 2px; height: 24px; margin-left: -1px; background: var(--text); border-radius: 1px; pointer-events: none; opacity: .8; }
.sl-pin::after { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.sl-ticks { position: relative; height: 18px; margin: 4px 9px 0; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sl-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; cursor: pointer; }
.sl-ticks span:hover { color: var(--text); }
.sl-ticks span.own { color: var(--text); font-weight: 800; }
.sl-ticks span.cur { color: var(--c); font-weight: 800; }

/* Список «Похожие» */
.sim-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: var(--r); color: var(--text); }
.sim-item:hover, .sim-item.is-hover { background: var(--surface-2); color: var(--text); }
.sim-item.is-own { box-shadow: inset 2px 0 0 var(--accent); }
.sim-item .tile { width: 48px; border-radius: 8px; }
.sim-item b { display: block; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-item small { color: var(--dim); font-size: 11.5px; }
.sim-item .price { font-size: 13px; display: block; }
.sim-item .icon-btn { width: 28px; height: 28px; background: transparent; }
.sim-item .icon-btn.is-on { background: var(--accent-strong); }
.sim-empty { color: var(--muted); font-size: 13px; padding: 16px 4px; }

/* Модели серии: мини-сравнение по столбцам */
.series-wrap { overflow-x: auto; padding: 14px; scrollbar-width: thin; }
.series { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.series td, .series th { padding: 5px 12px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 118px; }
.series th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 0; padding-left: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.series th small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.series td.cur { background: var(--accent-soft); }
.series tr:first-child td.cur { border-radius: 12px 12px 0 0; }
.series tr:last-child td.cur { border-radius: 0 0 12px 12px; }
.series td.is-hover:not(.cur) { background: var(--surface-2); }
.series .tile { width: 92px; margin: 6px auto; }
.series a { color: var(--text); font-weight: 800; }
.series a:hover { color: var(--link); }
.series .art { color: var(--dim); font-size: 11.5px; font-weight: 600; }
.series .v { color: var(--text); font-weight: 600; }
.series .v.best { color: var(--green-hi); font-weight: 800; }
.series .v.empty { color: var(--dim); }
.series .icon-btn { width: 30px; height: 30px; margin: 4px 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 36px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--text); border-color: var(--accent); }
.tabs button .n { color: var(--dim); font-size: 12px; margin-left: 4px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; }
.specs-grid .kv { font-size: 13.5px; }
.specs-grid .kv td { padding: 9px 0; white-space: pre-line; }
.kv tr.main td:first-child { color: var(--text); font-weight: 700; }
.hint { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--dim); color: var(--dim); font-size: 10px; font-weight: 800; cursor: help; vertical-align: 1px; }
.res-list { display: grid; gap: 8px; max-width: 640px; }
.res-list a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); color: var(--text); font-weight: 600; }
.res-list a:hover { background: var(--surface-2); color: var(--link); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.photos .tile { border-radius: var(--r-lg); cursor: zoom-in; }
.photos .tile img { padding: 6%; }
.lightbox { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 24px; background: rgba(6, 8, 12, .92); cursor: zoom-out; }
.lightbox img { max-width: min(1100px, 100%); max-height: 100%; object-fit: contain; }

/* 8. Панели ---------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 18, .6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.drawer.is-open { transform: none; }
.drawer.wide { width: min(620px, 100vw); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { font-size: 19px; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line-soft); display: grid; gap: 10px; }
.mini { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.mini .tile { width: 60px; border-radius: 8px; }
.mini a { color: var(--text); font-weight: 700; }
.mini small { display: block; color: var(--dim); font-size: 12px; }
.mini .qty { height: 30px; margin-top: 6px; }
.mini .qty button { width: 28px; font-size: 15px; }
.mini .qty input { width: 28px; font-size: 13px; }
.mini-side { text-align: right; display: grid; gap: 6px; justify-items: end; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.total .price { font-size: 22px; }
.form-grid { display: grid; gap: 10px; }
.news-item { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.news-item .tile { aspect-ratio: 16/9; margin-bottom: 12px; }
.news-item h3 { font-size: 17px; margin-bottom: 6px; }
.news-item time { color: var(--dim); font-size: 12px; }
.news-item .body { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.news-item .body p + p { margin-top: 8px; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-box { width: min(1200px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.modal-box.sm { width: min(420px, 100%); }
.cmp-wrap { overflow: auto; }
.cmp { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.cmp th, .cmp td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; min-width: 170px; max-width: 240px; }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; background: var(--surface); color: var(--muted); font-weight: 600; min-width: 180px; z-index: 1; }
.cmp thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.cmp thead th:first-child { z-index: 3; }
.cmp thead .tile { width: 96px; margin-bottom: 8px; }
.cmp thead a { color: var(--text); font-weight: 800; font-size: 14px; }
.cmp thead .rm { color: var(--dim); font-size: 12px; font-weight: 600; display: block; margin-top: 4px; }
.cmp thead .rm:hover { color: var(--red); }
.cmp tr.diff td { background: var(--accent-soft); }
.cmp tr.diff td:first-child { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }

.cmp-bar { position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translate(-50%, 200px); visibility: hidden; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 14px; background: var(--header); color: #fff; box-shadow: var(--shadow); transition: transform .25s; font-weight: 700; }
.cmp-bar.is-open { transform: translate(-50%, 0); visibility: visible; }
.cmp-bar .thumbs { display: flex; }
.cmp-bar .tile { width: 34px; border-radius: 8px; margin-left: -6px; box-shadow: 0 0 0 2px var(--header); }
.cmp-bar .x { color: #8f9ab0; padding: 0 6px; font-size: 20px; }

.fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: #fff; box-shadow: 0 0 0 6px rgba(39, 176, 228, .2), var(--shadow); transition: transform .15s; }
.fab:hover { transform: scale(1.06); }
.fab .icon { width: 26px; height: 26px; }
.chat-msgs { display: grid; gap: 8px; align-content: start; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); font-size: 13.5px; }
.msg.me { justify-self: end; border-radius: 14px 14px 4px 14px; background: var(--accent-strong); color: #fff; }
.chat-form { display: flex; gap: 8px; }

.toasts { position: fixed; left: 24px; bottom: 24px; z-index: 120; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--header); color: #fff; font-weight: 600; box-shadow: var(--shadow); border-left: 3px solid var(--accent); animation: toast .25s; }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }

/* 9. Подвал ---------------------------------------------------------------- */
.footer { margin-top: 56px; padding: 36px 0 28px; background: var(--bg-deep); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h5 { color: var(--text); font-size: 13px; font-weight: 800; margin: 0 0 12px; }
.footer li { margin-bottom: 7px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--link); }
.footer .logo { color: var(--text); margin-bottom: 12px; }
.footer .logo-text small { color: var(--dim); }
.footer-stats { display: flex; gap: 28px; margin-top: 16px; }
.footer-stats b { display: block; font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--dim); }

/* 10. Адаптив -------------------------------------------------------------- */
@media (max-width: 1280px) {
  .header-contacts { display: none; }
  .hits { grid-auto-columns: calc((100% - 20px) / 2); }
}
@media (max-width: 1360px) {
  .pd-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .pd-preview { display: none; }
}
@media (max-width: 1100px) {
  .pd-layout { grid-template-columns: minmax(0, 1fr); }
  .pd-similar { position: static; max-height: 420px; margin-top: 16px; }
  .sliders { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .preview, #previewToggle { display: none !important; }
  .hero { grid-template-columns: 1fr; }
  .h-action span:not(.count) { display: none; }
  .h-action { min-width: 44px; }
  .h-action .count { right: 2px; }
  .help-banner ul { display: none; }
}
@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .topbar-links, .topbar .lang { display: none; }
  .header-main { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px 12px; }
  .logo-text small { display: none; }
  .h-action { min-width: 40px; padding: 6px 4px; }
  .h-action[data-act="open-news"] { display: none; }
  .header-actions { gap: 0; }
  .rows .row-acts { opacity: 1; }
  .rows .row-acts .like, .rows .row-acts .compare { display: none; }
  .rows td { padding: 7px 6px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 40px; }
  .nav .container { height: auto; padding-top: 8px; padding-bottom: 8px; flex-direction: column; align-items: stretch; gap: 8px; }
  .seg { overflow-x: auto; scrollbar-width: none; }
  .toolbar { top: 0; position: static; }
  .views button span { display: none; }
  .hits { grid-auto-columns: 86%; }
  .hit { min-height: 220px; padding: 18px; }
  .hit h3 { font-size: 20px; }
  .feed { grid-template-columns: 1fr; }
  .hero-intro { padding: 22px; }
  .help-banner { flex-direction: column; align-items: flex-start; }
  .g-card { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .g-card .tile { width: 72px; }
  .rows .spec, .rows th.spec { display: none; }
  .rows .name small { display: none; }
  .l-item { grid-template-columns: 72px minmax(0, 1fr); }
  .l-item .tile { width: 72px; }
  .l-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .l-side .acts { margin: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-card-acts { opacity: 1; transform: none; }
  .specs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pd { grid-template-columns: 1fr; }
  .pd-gallery { grid-template-columns: 1fr; }
  .pd-sliders-head { flex-direction: column; }
  .pd-thumbs { grid-auto-flow: column; grid-auto-columns: 64px; order: 2; overflow-x: auto; }
  .f-mobile-btn { display: inline-flex; }
  .filters:not(.is-open) .filters-row.main { display: none; }
  .f-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; z-index: 110; }
  .f-price { width: 100%; }
  .fab { right: 16px; bottom: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
