/* Sea Store — витрина живых рыб.
   Макет: липкая шапка, каталог «фильтры слева + сетка», на телефоне фильтры уезжают в выдвижную панель.
   Сайт всегда светлый. Палитра от неона: голубая полоса — главный акцент, красное брюшко — скидки и предупреждения. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --water: #edf5f8;
  --ink: #0d2433;
  --muted: #587080;
  --line: #dde7eb;
  --accent: #1264e0;
  --accent-ink: #ffffff;
  --accent-soft: #e2edfd;
  --neon-red: #d93a32;
  --ok: #1d7f50;
  --ok-soft: #e1f3ea;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --shadow: 0 1px 2px rgba(13, 36, 51, .06), 0 6px 20px rgba(13, 36, 51, .06);
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-data: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px;
  --r-sm: 9px;
  --max: 1200px;
  --chrome: #0d2433;
  --chrome-fg: #ffffff;
  --key-bg: #1d4a66;
  --bonus: #1d4a66;
  --danger: #a5463e;
  --logo-plate: transparent;
  --hero-ink: #0d2433;
  color-scheme: light;
}
/* Тёмная тема включается переключателем в шапке (атрибут на <html>), по умолчанию сайт светлый */
:root[data-mf-theme="dark"] {
  --bg: #0b1a22; --surface: #10232e; --water: #163545; --ink: #e4eff3; --muted: #93abb8; --line: #234556;
  --accent: #5aa2ff; --accent-ink: #061626; --accent-soft: #15324f; --neon-red: #ff6f62;
  --ok: #5fd39a; --ok-soft: #11372a; --warn: #f2b45a; --warn-soft: #3a2c12;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --chrome: #06121a; --chrome-fg: #e4eff3; --key-bg: #1d4a66; --bonus: #8cc4e8; --danger: #b8574e; --logo-plate: #ffffff; --hero-ink: #5aa2ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
/* без приближения двойным тапом при частых нажатиях на кнопки (щипком масштаб работает) */
button, a, input, select, label, .bk-tank { touch-action: manipulation; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-body); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font: 600 clamp(26px, 4vw, 40px)/1.12 var(--f-display); letter-spacing: -.01em; }
h2 { font: 600 clamp(20px, 2.6vw, 26px)/1.2 var(--f-display); }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }
.muted { color: var(--muted); }
.num, .data { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px;
  background: var(--key-bg); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.35); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--key-bg); filter: none; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 8px; border-radius: 999px; color: var(--muted); display: inline-flex; }
.icon-btn:hover { color: var(--neon-red); }
.icon-btn.on { color: var(--neon-red); }

/* Шапка */
.topline { background: var(--chrome); color: var(--chrome-fg); font-size: 13px; }
.topline .wrap { display: flex; gap: 16px; justify-content: space-between; padding-block: 6px; flex-wrap: wrap; }
.topline b { font-weight: 600; }
/* шапка выше полосы меню (у неё z-index 20), чтобы при прокрутке меню уходило под шапку, а не наезжало на неё */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 20px; padding-block: 8px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex-shrink: 0; }
.logo-img { display: block; height: 76px; width: auto; max-width: none; background: var(--logo-plate); border-radius: 10px; }
:root[data-mf-theme="dark"] .logo-img { padding: 4px 8px; }
.theme-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; width: 40px; height: 40px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-btn:hover { border-color: var(--accent); }
@media (max-width: 760px) { .logo-img { height: 54px; } }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); display: grid; place-items: center; }
.logo-text { font: 700 19px/1 var(--f-display); letter-spacing: -.02em; }
.logo-text small { display: block; font: 500 11px/1.3 var(--f-data); color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.search { flex: 1; min-width: 0; position: relative; }
.search input { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 16px 10px 40px; }
.search input:focus { border-color: var(--accent); outline: none; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-link { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8.5px; min-width: 40px; height: 40px; box-sizing: border-box; border-radius: 999px; color: var(--ink); font-weight: 500;
  border: 1.5px solid var(--line); background: var(--surface); } /* обведены, как кнопка темы (Максим, 14.10) */
.head-link .badge:not([hidden]) { margin-right: 2px; }
.head-link .lbl { margin-right: 2px; position: relative; top: 3.5px; }
/* Низ значка корзины (колёса) на одной линии с низом цифр суммы и «₽», значок по центру кнопки (Максим, 14.10, по его скриншоту) */
.head-link:hover { border-color: var(--accent); text-decoration: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--neon-red); color: #fff; font: 600 12px/20px var(--f-data); text-align: center; }
nav.main { border-bottom: 1px solid var(--line); background: var(--surface); }
nav.main .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 4px; }
nav.main a { padding: 8px 12px; color: var(--ink); white-space: nowrap; border-radius: 8px; font-size: 15px; }
nav.main .nav-cats { display: contents; }
nav.main .nav-right { margin-left: auto; }
nav.main a.nav-key { background: var(--key-bg); color: #ffffff; }
nav.main a.nav-key:hover, nav.main a.nav-key.active { background: var(--key-bg); color: #ffffff; filter: brightness(1.35); }
nav.main a:hover, nav.main a.active { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
@media (max-width: 760px) {
  header.site .wrap { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .head-actions { margin-left: auto; }
  .head-link .lbl { display: none; }
  .logo-text small { display: none; }
}

main { padding-block: 24px 64px; min-height: 60vh; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Главная */

.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.promise { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; }
.promise b { font-size: 15px; }
.promise span { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .promises { gap: 8px; } .promise { padding: 12px; } .promise b { font-size: 14px; } }

section.block { margin-top: 48px; display: grid; gap: 18px; }
.block-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; color: var(--ink); }
.cat:hover { border-color: var(--accent); text-decoration: none; }
.cat .pic { background: var(--water); border-radius: 10px; padding: 4px; }
.cat b { display: block; font-weight: 600; line-height: 1.25; }
.cat small { color: var(--muted); font-family: var(--f-data); font-size: 12px; }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: st; }
.step { counter-increment: st; padding: 16px; border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.step::before { content: counter(st); font: 600 13px var(--f-data); color: var(--accent); display: block; margin-bottom: 6px; }
.step b { display: block; margin-bottom: 4px; }
.step span { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; align-content: start; }

/* Каталог */
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; max-height: calc(100vh - 110px); overflow: auto; }
.filters h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-list a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--ink); font-size: 15px; }
.cat-list a:hover { background: var(--bg); text-decoration: none; }
.cat-list a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cat-list .cnt { font: 12px var(--f-data); color: var(--muted); padding-top: 3px; }
.cat-list .subs { padding-left: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; padding: 3px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field input, .field select, .field textarea, .range input, .sel { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 9px 11px; }
.field input:focus, .field select:focus, .field textarea:focus, .range input:focus, .sel:focus { border-color: var(--accent); outline: none; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .sel { width: auto; }
.filter-toggle { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(340px, 88vw); max-height: none; border-radius: 0 var(--r) var(--r) 0; z-index: 40; transform: translateX(-105%); transition: transform .25s; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .filters.open { transform: none; box-shadow: var(--shadow); }
  .filter-toggle { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(5, 15, 20, .45); z-index: 35; }
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: grid; grid-template-rows: auto 1fr; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); }
.card .pic { position: relative; background: var(--water); padding: 14px 10px 6px; display: block; }
.card .pic svg { display: block; margin: 0 auto; }
.card .tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; }
/* Наличие на карточке в каталоге: плашка в левом нижнем углу фото */
.badge-stock { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 7px; border-radius: 999px; font: 600 12px/1.3 var(--f-body); background: rgba(255,255,255,.92); color: var(--ok); box-shadow: 0 1px 4px rgba(13,36,51,.18); white-space: nowrap; }
.badge-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-stock.out { color: var(--warn); }
.badge-stock.ask { color: var(--muted); }
:root[data-mf-theme="dark"] .badge-stock { background: rgba(11,26,34,.88); }
.tag { font: 600 11px/1 var(--f-body); padding: 5px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); text-transform: uppercase; letter-spacing: .04em; }
.tag.sale { background: var(--neon-red); color: #fff; }
.tag.new { background: var(--accent); color: var(--accent-ink); }
.card .fav { position: absolute; right: 6px; top: 6px; }
.card .body { padding: 12px 14px 14px; display: grid; gap: 8px; grid-template-rows: auto auto auto 1fr auto; }
.card .name { color: var(--ink); font-weight: 600; line-height: 1.3; }
.card .latin { font-style: italic; font-size: 13px; color: var(--muted); margin-top: -6px; }
/* Карточка не шире своей колонки: длинное название переносится, латынь и слишком длинное название обрезаются многоточием, кнопка уходит под цену (Максим, 14.10) */
.card .body { grid-template-columns: minmax(0, 1fr); }
.card .name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.card .latin { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .buy { flex-wrap: wrap; row-gap: 8px; min-width: 0; }
.params { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 12.5px/1.4 var(--f-data); color: var(--muted); }
.params span { white-space: nowrap; }
.stock { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); font-size: 13px; line-height: 1.35; }
.stock::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.stock b { font-size: 15px; color: var(--ok); }
.stock span { grid-column: 2; color: var(--muted); }
.stock.out { background: var(--warn-soft); }
.stock.out::before { background: var(--warn); }
.stock.out b { color: var(--warn); }
.stock.ask { background: var(--surface-2, rgba(88,112,128,.1)); }
.stock.ask::before { background: var(--muted); }
.stock.ask b { color: var(--ink); }
.buy { display: flex; justify-content: space-between; align-items: center; gap: 8px; align-self: end; }
.price { font: 600 19px/1 var(--f-data); font-variant-numeric: tabular-nums; }
.price s { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.empty { padding: 40px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); display: grid; gap: 10px; justify-items: center; }

/* Карточка товара */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.product .gallery { background: var(--water); border-radius: 20px; padding: 32px; position: relative; }
.product .gallery .note { position: absolute; left: 14px; bottom: 10px; font-size: 12px; color: var(--muted); }
.product .gallery .credit { position: absolute; right: 8px; bottom: 8px; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.5); color: #fff; }
.product .gallery .credit a { color: #fff; }
.product .info { display: grid; gap: 16px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.spec { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.spec:nth-child(odd) { border-right: 1px solid var(--line); }
.spec dt { font-size: 12px; color: var(--muted); }
.spec dd { margin: 0; font: 500 15px var(--f-data); }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: transparent; width: 36px; height: 36px; cursor: pointer; font-size: 18px; }
.qty button:hover { background: var(--bg); }
.qty input { width: 44px; text-align: center; border: 0; background: transparent; font-family: var(--f-data); padding: 0; }
.flock { font-size: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); }
.level { display: inline-flex; gap: 3px; vertical-align: middle; }
.level i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.level i.on { background: var(--accent); }
.prose { max-width: 65ch; display: grid; gap: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 820px) { .product { grid-template-columns: 1fr; } .specs { grid-template-columns: 1fr; } .spec:nth-child(odd) { border-right: 0; } }

/* Корзина и оформление */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.lines { display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 10px 10px; }
.line .pic { background: var(--water); border-radius: 10px; padding: 4px; }
.line .ctrl { display: grid; gap: 6px; justify-items: end; min-width: 112px; }
/* Корзина: фото, название и количество по верхнему краю строки, цены одной колонкой (Максим, 14.10) */
.line .name { display: block; line-height: 1.3; margin-bottom: 2px; }
.line .ctrl .icon-btn { padding: 2px 0; }
.summary { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; gap: 12px; }
.row.total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.notice { border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; display: block; }
/* блоки внутри сообщения — с небольшим отступом; ссылки и жирный текст остаются в строке */
.notice > p, .notice > div, .notice > ul { margin: 0; }
.notice > p + p, .notice > * + div, .notice > * + ul { margin-top: 4px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.info { background: var(--accent-soft); color: var(--ink); }
.notice b { font-weight: 600; }
@media (max-width: 900px) { .cart { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 520px) { .line { grid-template-columns: 70px minmax(0, 1fr); } .line .ctrl { grid-column: 1 / -1; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; justify-items: stretch; align-items: center; gap: 14px; } .line .ctrl .num { justify-self: end; } }

.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.field .err, .err { color: var(--neon-red); font-size: 13px; margin: 4px 0 0; }
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 4px; accent-color: var(--accent); }
.opt small { display: block; color: var(--muted); font-size: 13px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
legend { font: 600 17px var(--f-body); margin-bottom: 8px; }

/* Текстовые страницы */
.page { display: grid; gap: 24px; max-width: 880px; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 600; }
.tbl td.num { white-space: nowrap; }
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.done { display: grid; gap: 14px; justify-items: start; max-width: 640px; }

footer.site { background: var(--chrome); color: color-mix(in srgb, var(--chrome-fg) 80%, var(--chrome)); padding-block: 40px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 24px; }
footer.site a { color: inherit; }
footer.site .footer-logo { display: block; height: 64px; width: auto; background: #ffffff; border-radius: 10px; padding: 6px 10px; }
footer.site h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--chrome-fg); opacity: .7; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer.site .fine { margin-top: 28px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--chrome-fg) 20%, transparent); opacity: .7; }
/* Юридические документы: самой нижней строкой подвала, под реквизитами */
footer.site .foot-docs { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; opacity: .7; }
footer.site .foot-docs a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--chrome-fg) 35%, transparent); }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 60; font-size: 15px; max-width: calc(100vw - 32px); }

/* Телефон: две колонки товаров, компактная шапка и способы доставки */
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .body { padding: 10px; }
  .card .buy { flex-wrap: wrap; }
  .card .params { font-size: 11.5px; }
  .topline .tl-desk { display: none; }
  .opt { grid-template-columns: auto minmax(0, 1fr); }
  .opt > span:last-child { grid-column: 2; font-size: 14px; color: var(--muted); }
}

/* Каталог по систематике */
.tax-tree .tax-cls { font: 600 11px/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 8px 4px; }
.cat-list .lat, .cat-latin, .h-latin { font-style: italic; }
.cat-list .lat { color: var(--muted); font-size: 13px; }
.cat-latin { display: block; color: var(--muted); font-size: 13px; }
.h-latin { font: italic 400 .55em var(--f-body); color: var(--muted); white-space: nowrap; }
.chip.lat { font-style: italic; }
.chip .cnt { font: normal 11px var(--f-data); color: var(--muted); }
.taxline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.code-badge { font: 600 11.5px/1 var(--f-data); padding: 4px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-style: normal; }

/* Значки разделов каталога */
.ico { display: inline-grid; place-items: center; flex: none; width: 34px; height: 24px; background: var(--water); border-radius: 6px; }
.ico svg { width: 100%; height: 100%; display: block; }
.ico.big { width: 64px; height: 44px; border-radius: 10px; margin-right: 12px; vertical-align: middle; }
.ico.nav { width: 30px; height: 20px; margin-right: 6px; background: color-mix(in srgb, var(--water) 70%, transparent); }
nav.main a[data-ico] { display: inline-flex; align-items: center; }
.cat-list .tx { display: flex; gap: 8px; align-items: center; min-width: 0; }
.h-ico { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0; row-gap: 4px; }
.h-ico .h-latin { margin-left: 10px; }
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 22px; }
.sub-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.sub-card:hover { border-color: var(--accent); text-decoration: none; }
.sub-card .ico { width: 54px; height: 36px; }
.sub-card b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.sub-card small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 760px) { .ico.nav { display: none; } .sub-cards { grid-template-columns: 1fr 1fr; } }
.filters { grid-template-columns: minmax(0, 1fr); }
.cat-list a > span:first-child { min-width: 0; }
.sub-cards > * { min-width: 0; }
@media (max-width: 760px) { .sub-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat-list { grid-template-columns: minmax(0, 1fr); }
.sub-card > span { min-width: 0; }
.cat > span:last-child, .cat-list .tx > span:last-child { min-width: 0; }

/* Названия разделов: перенос только по словам */
/* переносим только между словами, слово целиком не рвём */
.cat b, .cat .cat-latin, .cat small, .sub-card b, .sub-card small, .cat-list .tx > span:last-child, .card .name, .product h1 { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.cats { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cat { grid-template-columns: 64px minmax(0, 1fr); }
.sub-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
@media (min-width: 901px) { .catalog { grid-template-columns: 300px minmax(0, 1fr); } }
.tax-tree a { font-size: 14px; }
@media (max-width: 760px) {
  .cats { grid-template-columns: minmax(0, 1fr); }
  .sub-cards { grid-template-columns: minmax(0, 1fr); }
}
.nw { white-space: nowrap; }
/* Соцсети  */
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.socials a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); color: inherit; text-decoration: none; font-size: 13px; }
.socials a:hover { border-color: currentColor; }
/* Новости */
.news-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.news-tabs .chip { text-decoration: none; color: inherit; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.news-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; min-width: 0; }
a.news-card:hover { border-color: var(--accent); }
.news-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.news-ico.video { background: color-mix(in srgb, #e0322b 14%, var(--surface)); color: #d0261f; }
.news-tx { display: grid; gap: 4px; min-width: 0; }
.news-tx b { font-size: 15px; line-height: 1.3; }
.news-tx > span { font-size: 14px; color: var(--muted); }
.news-tx .news-meta { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.news-tx .news-go { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.empty-note { color: var(--muted); padding: 24px 0; }
/* Новости на главной: крупные карточки с картинкой */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.news-big { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; text-decoration: none; min-width: 0; }
a.news-big:hover { border-color: var(--accent); }
.news-big .news-tx { padding: 14px 16px 16px; }
.news-cover { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--water)), var(--water)); overflow: hidden; }
.news-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-art { position: absolute; inset: 12% 18%; display: grid; place-items: center; }
.news-art svg { width: 100%; height: 100%; }
.news-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #d0261f; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.block.news-home { margin-top: 28px; }
/* Шортсы вертикальные, обычные ролики широкие */
.news-cover.short { aspect-ratio: 9 / 16; }
.news-cover.short .news-art { inset: 30% 10%; }
.news-big.short .news-tx b { font-size: 14px; }
.news-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.4fr); gap: 14px; align-items: start; }
.news-grid.short { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.news-h { margin: 22px 0 12px; font-size: 22px; }
.news-h:first-of-type { margin-top: 4px; }
@media (max-width: 700px) {
  .news-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-row > .long, .news-row > .supply { grid-column: 1 / -1; }
}
@media (min-width: 701px) {
  .news-row { align-items: stretch; }
  .news-row > .long, .news-row > .supply { grid-template-rows: 1fr auto; }
  .news-row > .long .news-cover, .news-row > .supply .news-cover { aspect-ratio: auto; height: 100%; min-height: 220px; }
}
/* Новости на главной компактно: три шортса и ролик в одну невысокую строку */
/* три шортса занимают 60% ширины, длинный ролик 40% */
.news-home .news-row { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: 12px; }
.news-home .news-cover.short { aspect-ratio: 3 / 4; }
.news-home .news-big .news-tx { padding: 10px 12px 12px; gap: 2px; }
.news-home .news-big .news-tx b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-home .news-big.long .news-tx b { font-size: 14px; }
.news-home .news-tx .news-meta { font-size: 11px; }
.news-home .news-play { width: 40px; height: 40px; }
.news-home .news-row > .long .news-cover { min-height: 0; }
@media (max-width: 700px) {
  .news-home .news-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .news-home .news-row > .long { grid-column: 1 / -1; grid-template-columns: 42% minmax(0, 1fr); grid-template-rows: auto; }
  .news-home .news-row > .long .news-cover { aspect-ratio: 16 / 9; height: auto; }
  .news-home .news-big .news-tx b { font-size: 12px; }
  .news-home .news-big.short .news-meta { display: none; }
}
/* Шапка: тёмные кнопки в ряд. Первой «Каталог» с выпадающим списком разделов, за ней страницы магазина */
nav.main { position: relative; z-index: 20; }
nav.main .wrap { overflow: visible; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 6px; }
nav.main a.nav-key, .nav-dd-btn { background: var(--key-bg); color: #fff; font: 500 15px/1.2 var(--f-body); padding: 9px 14px; border-radius: 8px; }
nav.main a.nav-key:hover, nav.main a.nav-key.active, .nav-dd-btn:hover, .nav-dd.open .nav-dd-btn, .nav-dd.active .nav-dd-btn { background: var(--key-bg); color: #fff; filter: brightness(1.35); }
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font-weight: 600; }
.nav-dd-btn .caret { transition: transform .15s; }
.nav-dd.open .caret { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 30; display: grid; padding: 12px 6px 6px; }
.nav-dd-menu::before { content: ""; position: absolute; inset: 6px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(13, 36, 51, .18); z-index: -1; }
.nav-dd-menu[hidden] { display: none; }
nav.main .nav-dd-menu a { padding: 9px 12px; border-radius: 8px; color: var(--ink); }
nav.main .nav-dd-menu a:hover, nav.main .nav-dd-menu a.active { background: var(--accent-soft); color: var(--accent); }
nav.main .nav-dd-menu a.all { color: var(--accent); font-weight: 600; }
.nav-dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 8px; }
/* Страницы магазина: светлая капсула рядом с тёмным «Каталогом» */
nav.main .nav-cap { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: var(--water); }
nav.main .nav-cap a { padding: 6px 12px; color: var(--ink); }
nav.main .nav-cap a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(13, 36, 51, .14); }
nav.main .nav-cap a:hover:not(.active) { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink); }
/* «Назад» слева от «Каталога», на всех страницах кроме главной */
.nav-back { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: var(--key-bg); color: #fff; cursor: pointer; -webkit-appearance: none; appearance: none; }
.nav-back:hover, .nav-back:active { background: var(--key-bg); color: #fff; filter: brightness(1.35); }
.nav-back[hidden] { display: none; }
@media (max-width: 600px) {
  nav.main .wrap { gap: 6px; }
  nav.main .nav-dd { flex: 1 1 100%; }
  nav.main .nav-back:not([hidden]) + .nav-dd { flex-basis: calc(100% - 44px); }
  .nav-dd-btn { width: 100%; justify-content: center; }
  .nav-dd-menu { right: 0; }
  nav.main .nav-cap { flex: 1 1 100%; justify-content: space-between; }
  /* Пять пунктов со «Статьями» (13.10) помещаются в ширину телефона; на самых узких экранах строку можно прокрутить */
  nav.main .nav-cap { overflow-x: auto; scrollbar-width: none; }
  nav.main .nav-cap::-webkit-scrollbar { display: none; }
  nav.main .nav-cap a { padding: 6px 4px; font-size: 13px; white-space: nowrap; }
  nav.main .nav-long { display: none; }
  /* На телефоне «Главная» не помещается рядом с «Оптовикам»: домой ведёт логотип */
  nav.main .nav-cap .nav-home { display: none; }
}
@media (max-width: 380px) { nav.main .nav-cap a { padding: 6px 3px; font-size: 12.5px; } }


/* Выпадающий «Каталог»: все разделы в две колонки, на телефоне в одну */
.nav-dd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4px; }
.nav-dd-menu { min-width: 560px; }
/* Длинное название не вылезает за край меню: на компьютере меню шире, а если не влезло, обрезается многоточием (Максим, 14.10) */
nav.main .nav-dd-menu .nav-dd-grid a { min-width: 0; }
.nav-dd-grid a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  /* На телефоне две колонки: в три длинные названия («Лабиринтовые», «Наноаквариум») не помещаются и рвутся посреди слова */
  .nav-dd-menu { min-width: 0; }
  .nav-dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4px; }
  nav.main .nav-dd-menu .nav-dd-grid a { padding: 7px 6px; font-size: 14px; line-height: 1.25; display: flex; align-items: center; white-space: normal; min-width: 0; }
  .nav-dd-grid a > span { white-space: normal; text-overflow: clip; }
}
/* Узкие телефоны: «Живородящие», «Наноаквариум» одним словом не влезали в колонку и вылезали за край меню */
@media (max-width: 380px) {
  nav.main .nav-dd-menu .nav-dd-grid a { padding: 7px 4px; font-size: 13px; gap: 4px; }
  .nav-dd-grid .ico.dd { width: 18px; height: 13px; }
}
@media (max-width: 340px) {
  .nav-dd-grid .ico.dd { display: none; }
  nav.main .nav-dd-menu a.all { padding: 8px 6px; font-size: 14px; }
}
.news-grid + .news-grid { margin-top: 14px; }

/* Плитки разделов каталога: крупные значки; на телефоне два столбца, значок над названием */
.sub-card .ico { width: 84px; height: 56px; flex: none; }
.sub-card { padding: 10px 12px; gap: 12px; }
@media (max-width: 600px) {
  .sub-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .sub-card .ico { width: 72px; height: 48px; }
  .sub-card b { font-size: 14px; hyphens: auto; }
  .sub-card small { font-size: 12px; }
}
/* Верхняя полоска: на компьютере доставка и контакты, на телефоне только отправка в регионы */
.topline .tl-phone { display: none; }
@media (max-width: 560px) { .topline .tl-phone { display: inline; } .topline .wrap { justify-content: center; } }
/* Рыба на значке плитки раздела крупнее, почти во всю плашку */
.sub-card .ico { overflow: hidden; }
.sub-card .ico svg { transform: none; }

/* Плитки разделов: крупный значок, название, ниже описание раздела вместо латыни */
.sub-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.sub-card { align-items: flex-start; padding: 12px; gap: 14px; }
.sub-card .ico { width: 96px; height: 64px; border-radius: 10px; }
.sub-card b { font-size: 16px; }
.sub-card b .cnt { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); font-family: var(--f-data); margin-left: 4px; }
.sub-card small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.cat .cat-desc { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); margin: 2px 0 4px; }
@media (max-width: 600px) {
  .sub-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-card { flex-direction: column; gap: 8px; padding: 10px; }
  .sub-card .ico { width: 100%; height: auto; aspect-ratio: 2 / 1; }
  .sub-card b { font-size: 14.5px; }
  .sub-card small { font-size: 12px; }
}

/* Логотип в тёмной теме: без белой подложки, тёмно-синие буквы осветлены под тёмный фон */
.logo-img.logo-dark { display: none; }
:root[data-mf-theme="dark"] .logo-img.logo-light { display: none; }
:root[data-mf-theme="dark"] .logo-img.logo-dark { display: block; background: transparent; padding: 0; }



/* Телефон: компактные «Новости», «Доставка и оплата», «Контакты» */
@media (max-width: 600px) {
  .page.news-page, .page.compact { gap: 12px; }
  .page.news-page h1, .page.compact h1 { font-size: 20px; }
  .news-page .news-tabs { margin: 0; gap: 6px; }
  .news-page .news-tabs .chip { padding: 5px 12px; font-size: 13px; }
  .news-page .news-h { font-size: 16px; margin: 6px 0 8px; }
  .news-page .news-grid { gap: 8px; }
  .news-page .news-grid.short { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-page .news-grid.short .news-cover { aspect-ratio: 3 / 4; }
  .news-page .news-grid.long { grid-template-columns: minmax(0, 1fr); }
  .news-page .news-big .news-tx { padding: 8px 10px 10px; gap: 2px; }
  .news-page .news-big .news-tx b { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .news-page .news-tx .news-meta { font-size: 10.5px; }
  .news-page .news-play { width: 36px; height: 36px; }
  .news-page .news-grid.long .news-big { grid-template-columns: 42% minmax(0, 1fr); grid-template-rows: auto; }
  .news-page .news-grid.long .news-cover { aspect-ratio: 16 / 10; height: 100%; }
  .page.compact { zoom: .8; }
  /* Таблица способов доставки на телефоне: каждый способ отдельной карточкой */
  .page.compact .tbl thead { display: none; }
  .page.compact .tbl, .page.compact .tbl tbody, .page.compact .tbl tr, .page.compact .tbl td { display: block; width: auto; }
  .page.compact .tbl tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .page.compact .tbl td { padding: 2px 0; border: 0; }
  .page.compact .tbl td:first-child { font-weight: 600; }
  .page.compact .scroll-x { overflow: visible; }
}

/* Тёмная тема: плитки разделов каталога чуть светлее фона страницы */
:root[data-mf-theme="dark"] .sub-card, :root[data-mf-theme="dark"] .cat { background: #1b3a4c; border-color: #2a5068; }
:root[data-mf-theme="dark"] .sub-card .ico, :root[data-mf-theme="dark"] .cat .pic { background: #24495e; }
/* Телефон: шортсы в новостях ниже, почти квадратные */
@media (max-width: 600px) {
  .news-page .news-grid.short .news-cover, .news-home .news-cover.short { aspect-ratio: 1 / 1; }
}
/* Телефон, главная: плашка длинного ролика крупнее и занимает место до блока «Каталог» */
@media (max-width: 700px) {
  .news-home .news-row > .long { grid-template-columns: 55% minmax(0, 1fr); }
  .news-home .news-row > .long .news-cover { aspect-ratio: 16 / 10; }
  .news-home .news-big.long .news-tx { padding: 12px; align-content: center; }
  .news-home .news-big.long .news-tx b { font-size: 14px; -webkit-line-clamp: 4; }
}

/* Компьютер, страница «Новости»: компактный заголовок с вкладками в одну строку, шортсы ниже и шире, длинный ролик крупнее */
@media (min-width: 601px) {
  .page.news-page { grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; row-gap: 12px; align-items: center; max-width: none; }
  .page.news-page > h1 { font-size: 28px; margin: 0; }
  .page.news-page > .news-tabs { margin: 0; }
  .page.news-page > *:not(h1):not(.news-tabs) { grid-column: 1 / -1; }
  .news-page .news-h { font-size: 18px; margin: 4px 0 0; }
  .news-page .news-grid.short { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .news-page .news-grid.short .news-cover { aspect-ratio: 1 / 1; }
  .news-page .news-big .news-tx { padding: 10px 14px 12px; gap: 2px; }
  .news-page .news-big .news-tx b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .news-page .news-grid.long { grid-template-columns: minmax(0, 1fr); }
  .news-page .news-grid.long .news-big { grid-template-columns: 45% minmax(0, 1fr); grid-template-rows: auto; }
  .news-page .news-grid.long .news-cover { aspect-ratio: 16 / 9; height: 100%; }
  .news-page .news-grid.long .news-tx { align-content: center; padding: 20px 24px; }
  .news-page .news-grid.long .news-tx b { font-size: 18px; -webkit-line-clamp: 4; }
}

/* «Показать ещё» в новостях: работает только на телефоне, на компьютере видны все ролики */
.news-more { display: none; }
@media (max-width: 600px) {
  .news-grid.limited:not(.open) > .news-extra { display: none; }
  .news-more { display: flex; width: 100%; margin-top: 8px; }
}
@media (max-width: 600px) {
  .news-page .news-big .news-tx b { max-height: 2.6em; }
  .news-page .news-grid.long .news-tx { align-content: center; }
  .news-page .news-grid.long .news-tx b { -webkit-line-clamp: 3; max-height: 3.9em; }
}

/* Шаги карантина: полоса и номер в цвет кнопки «Каталог», текст ровно по левому краю */
.page .steps .step, .block .steps .step { border-top-color: var(--key-bg); padding: 14px 0 0; background: transparent; border-radius: 0; }
.page .steps .step::before, .block .steps .step::before { color: #ffffff; background: var(--key-bg); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; margin-bottom: 10px; }
/* Обложки длинных роликов целиком, 16:9 без обрезки; шортсы остаются вертикальными */
.news-cover:not(.short):has(img) { aspect-ratio: 16 / 9 !important; height: auto !important; min-height: 0 !important; align-self: center; }
/* Настоящие фото рыб с  */
.card .pic.has-ph { padding: 0; aspect-ratio: 16 / 10; overflow: hidden; }
img.ph { height: auto; }
.pic.has-ph img.ph, .gallery.has-ph img.ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.product .gallery.has-ph { padding: 0; overflow: hidden; aspect-ratio: 16 / 9; align-self: start; }
.line .pic.has-ph { padding: 0; overflow: hidden; aspect-ratio: 4 / 3; }
/* Промокод в корзине */
.summary .promo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.summary .promo input { min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; text-transform: uppercase; }
/* Поиск в фильтрах */
.filters .f-find input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
/* Характер рыбы на карточке */
.params .temper { font-family: var(--f-body); font-weight: 600; }
.params .temper.peace { color: #1f8a4c; }
.params .temper.semi { color: #b76e00; }
.params .temper.predator { color: #c0392b; }
:root[data-mf-theme="dark"] .params .temper.peace { color: #5fd08f; }
:root[data-mf-theme="dark"] .params .temper.semi { color: #f2b450; }
:root[data-mf-theme="dark"] .params .temper.predator { color: #ff7a6b; }

/* Выбор размера рыбы в карточке: размер и цена на одной крупной кнопке */
.sizes { display: grid; gap: 10px; }
.sizes-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.size-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.size-opt { position: relative; display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.size-opt span { font: 600 16px var(--f-data); }
.size-opt b { font: 700 22px var(--f-data); }
.size-opt:hover { border-color: var(--key-bg); }
.size-opt.on { border-color: var(--key-bg); background: var(--key-bg); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.size-opt.on::after { content: "✓"; position: absolute; top: 10px; right: 12px; font-weight: 700; }
.size-opt small { font: 500 12px var(--f-data); opacity: .75; }
.size-opt.out:not(.on) { border-style: dashed; color: var(--muted, #667); }


/* Телефон: разделы каталога на главной в два столбца — иконка сверху, название и число позиций */
@media (max-width: 760px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cats .cat { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; align-items: start; align-content: start; }
  .cats .cat .pic { width: 64px; }
  .cats .cat b { font-size: 14.5px; }
  .cats .cat .cat-desc { display: none; }
}

/* Карточка товара: сверху фото и покупка с описанием, ниже на всю ширину две колонки — «Информация о рыбе» и «Содержание» */
.product .info .about { margin: 0; }
.product .info .about h3, .product .info .about h2 { margin: 0 0 6px; }
/* Подзаголовки карточки рыбы — h2 для поисковиков, на вид как прежние h3 */
.product .info .about h2, .pdetail h2 { font: 600 18px/1.15 var(--f-body); }
.sp-more { margin: 8px 0 0; }
.product .info .about p { margin: 0 0 6px; line-height: 1.55; }
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 32px; align-items: start; }
.pdetail h3, .pdetail h2 { margin: 0 0 10px; }
@media (max-width: 820px) { .pdetail { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; } }
/* фото по высоте правой колонки, чтобы верх карточки был ровным прямоугольником */
@media (min-width: 821px) {
  .product { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
  .product .gallery.has-ph { aspect-ratio: auto; align-self: stretch; min-height: 380px; }
  .product .gallery.has-ph img.ph { position: absolute; inset: 0; }
}

/* Телефон: поле поиска в шапке ниже примерно на 20% (шрифт 16px оставляем, чтобы iPhone не увеличивал страницу) */
@media (max-width: 600px) { .search input { padding-top: 5px; padding-bottom: 5px; } }

/* Главная на компьютере и телефоне: аквариум, «Каталог» (4 раздела + «Показать ещё»), «Новости», остальное */
.wrap:has(> .aq-hero) { display: flex; flex-direction: column; }
.wrap:has(> .aq-hero) > * { min-width: 0; }
.wrap:has(> .aq-hero) > .aq-hero { order: -4; margin-bottom: 24px; }
.wrap:has(> .aq-hero) > .home-cats { order: -3; margin-top: 0; margin-bottom: 24px; }
/* наборы для начинающих сразу под каталогом, видео после них (Максим) */
.wrap:has(> .aq-hero) > .home-beginner { order: -2; margin-top: 0; margin-bottom: 24px; }
.wrap:has(> .aq-hero) > .news-home { order: -1; margin-top: 0; margin-bottom: 24px; }
.home-cats .cats:not(.open) > .cat:nth-child(n+5) { display: none; }
.home-cats .cats-more { display: flex; justify-content: center; }
@media (min-width: 761px) { .home-cats .cats-more { justify-self: center; width: auto; min-width: 220px; margin: 0 auto; } }

/* Фото товара в пропорции 16:9 — и в карточках каталога, и на странице товара (по просьбе Maksim) */
.card .pic.has-ph { aspect-ratio: 16 / 9; }
.product .gallery.has-ph { aspect-ratio: 16 / 9; }
@media (min-width: 821px) {
  .product { align-items: start; }
  .product .gallery.has-ph { align-self: start; min-height: 0; }
}

/* Таблички «Информация о рыбе» и «Содержание»: все ячейки одной высоты, текст не длиннее трёх строк (полностью — во всплывающей подсказке) */
.pdetail .specs { grid-auto-rows: 96px; }
.pdetail .spec { height: 96px; box-sizing: border-box; align-content: start; overflow: hidden; }
.pdetail .spec dd { line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 14px; }

/* Кнопки размеров: компактные, ровной сеткой по 3 в ряд, чтобы карточка не меняла форму от числа размеров */
.size-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.size-opt { padding: 8px 10px; border-radius: 10px; gap: 2px; }
.size-opt span { font-size: 13px; }
.size-opt b { font-size: 16px; }
.size-opt.on::after { top: 6px; right: 8px; font-size: 12px; }
.buybox .sizes-label { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Карточка товара: название и латынь под фото, справа сразу покупка */
.pleft { display: grid; gap: 16px; align-content: start; min-width: 0; }
.ptitle h1 { margin: 0; }

/* Телефон: в карточках каталога только фото, название, наличие, цена, избранное и «В корзину» — подробности в открытой карточке */
@media (max-width: 600px) {
  .card .latin, .card .taxline, .card .params { display: none; }
}

/* Телефон: плитки разделов каталога — иконка на всю ширину плитки, название под ней, без пустот */
@media (max-width: 760px) {
  .cats .cat { padding: 8px; gap: 6px; }
  .cats .cat .pic { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 6px 10px; box-sizing: border-box; }
  .cats .cat .pic svg { width: 100%; height: 100%; }
  .cats .cat b { font-size: 15px; }
}

/* Компьютер: плитки разделов — 4 в ряд (16 разделов = 4 ряда без «хвоста»), иконка сверху на всю ширину, ниже название, описание и число позиций */
@media (min-width: 761px) {
  .home-cats .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .home-cats .cat { grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; gap: 8px; padding: 10px 10px 14px; }
  .home-cats .cat .pic { width: 100%; aspect-ratio: 16 / 7; display: grid; place-items: center; padding: 6px 16px; box-sizing: border-box; }
  .home-cats .cat .pic svg { width: 100%; height: 100%; }
  .home-cats .cat > span:last-child { padding: 0 4px; }
  .home-cats .cat b { font-size: 16px; }
  .home-cats .cat .cat-desc { min-height: 5.6em; }
}
/* «Как мы готовим рыбу к отправке» на главной: как шаги карантина, всё по левому краю */
.block .steps, .block .steps .step { text-align: left; justify-items: start; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .steps.four { grid-template-columns: 1fr; } }

/* Маленькие значки разделов в выпадающем меню «Каталог» */
nav.main .nav-dd-menu .nav-dd-grid a { display: flex; align-items: center; gap: 8px; }
.ico.dd { width: 30px; height: 20px; border-radius: 5px; }
@media (max-width: 600px) {
  nav.main .nav-dd-menu .nav-dd-grid a { gap: 5px; }
  .ico.dd { width: 22px; height: 15px; border-radius: 4px; }
}

/* Скалярии: фото квадратнее, чтобы помещались высокие плавники */
.card .pic.has-ph.tall { aspect-ratio: 4 / 3; }
.product .gallery.has-ph.tall { aspect-ratio: 4 / 3; }

/* Советы новичкам: как заполнить аквариум */
.sub-card .ico.tank-ico { background: var(--water); }
.beginner .tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px; }
.beginner .tips .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 6px; align-content: start; text-align: left; }
.beginner .tips .step span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.beginner .bk-h { margin: 26px 0 12px; }
.tank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tank-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tank-tab:hover { border-color: var(--accent); color: var(--accent); }
.tank-tab.on { background: var(--key-bg); border-color: var(--key-bg); color: #fff; }
.bk-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.bk-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.bk-pic { display: block; width: 96px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--water); }
.bk-pic img, .bk-pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-name { display: grid; gap: 2px; min-width: 0; }
.bk-name a { color: var(--ink); font-weight: 600; }
.bk-name a:hover { color: var(--accent); }
.bk-name small { color: var(--muted); font-style: italic; }
.bk-q { color: var(--muted); white-space: nowrap; }
.bk-sum { font-weight: 600; white-space: nowrap; min-width: 80px; text-align: right; }
.bk-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; font-size: 16px; }
@media (max-width: 900px) { .beginner .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .beginner .tips { grid-template-columns: 1fr; }
  .bk-list li { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .bk-pic { width: 64px; }
  .bk-q { grid-column: 2; grid-row: 2; font-size: 13px; }
  .bk-sum { grid-column: 3; grid-row: 1 / span 2; min-width: 0; }
}

/* Блок «Советы новичкам» на главной */
.home-beginner .tips { margin-top: 12px; }
button.tank-tab { cursor: pointer; font: inherit; font-weight: 600; }

.bk-list li { grid-template-columns: 96px minmax(0, 1fr) auto auto auto; }
.bk-swap-btn { border: 1px solid var(--line); background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.bk-swap-btn:hover, .bk-swap-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.bk-alts { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.bk-alt { scroll-snap-align: start; display: grid; gap: 4px; align-content: start; text-align: left; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.bk-alt:hover { border-color: var(--accent); }
.bk-alt.on { border: 2px solid var(--accent); padding: 5px 5px 7px; }
.bk-alt-pic { display: block; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; background: var(--water); }
.bk-alt-pic img, .bk-alt-pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-alt b { font-weight: 600; line-height: 1.25; }
.bk-alt .num { color: var(--muted); }
.bk-alt em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
@media (max-width: 600px) {
  .bk-list li { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .bk-swap-btn { grid-column: 2 / -1; justify-self: start; }
  .bk-alts { grid-auto-columns: 128px; }
}

/* Варианты набора внутри одного объёма */
.kit-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.kit-tab { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--water); color: var(--ink); }
.kit-tab:hover { border-color: var(--accent); color: var(--accent); }
.kit-tab.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .kit-tab { flex: 1 1 100%; text-align: left; } }
.bk-alts-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

.kit-row { display: grid; gap: 6px; margin-bottom: 8px; }
.kit-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.bk-decor { margin: 0; font-size: 14px; }
.bk-src a { color: var(--accent); }
@media (max-width: 600px) { .kit-tab { flex: 1 1 calc(50% - 4px); font-size: 13px; padding: 7px 10px; } }

/* Замена: карточки рядами без горизонтальной прокрутки */
.bk-alts { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); overflow: visible; }
.bk-alts .bk-alt.extra { display: none; }
.bk-alts.all .bk-alt.extra { display: grid; }
.bk-alts-more { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 600px) { .bk-alts { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-columns: auto; } }

.cart-clear { color: var(--muted); }
.cart-clear:hover, .cart-clear.sure { color: #c62828; border-color: #c62828; }
/* Рекомендации новичкам: в светлой теме номера советов синим цветом шапки; выбранный вариант набора тёмно-синий, как выбранный литраж */
:root:not([data-mf-theme="dark"]) .beginner .tips .step::before { color: var(--key-bg); font-weight: 700; }
.kit-tab.on, .kit-tab.on:hover { background: var(--key-bg); border-color: var(--key-bg); color: #fff; }
/* Кнопка набора: на телефоне компактная, в одну строку с итогом */
.bk-foot .sm { display: none; }
@media (max-width: 600px) {
  .bk-foot { flex-wrap: nowrap; font-size: 14px; }
  .bk-foot .btn { width: auto; padding: 8px 14px; font-size: 14px; min-height: 0; flex: none; }
  .bk-foot .lg { display: none; }
  .bk-foot .sm { display: inline; }
}
/* Уведомление о добавлении в корзину на телефоне: маленькое, в 1–2 строки, с галочкой */
@media (max-width: 600px) {
  .toast { font-size: 13px; line-height: 1.3; padding: 7px 12px 7px 10px; border-radius: 12px; max-width: min(78vw, 320px); width: max-content; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 6px; align-items: flex-start; box-shadow: 0 6px 18px rgba(13, 36, 51, .22); }
  .toast::before { content: "✓"; font-weight: 700; color: #5fd08a; flex: none; }
  .toast[hidden] { display: none; }
}

/* Карточка товара в каталоге на телефоне: компактная, наличие плашкой на фото; цена, сердечко и корзина в одну строку */
.card .add-ico { display: none; }
.badge-stock { font-size: 12px; }
@media (max-width: 600px) {
  .grid .card .stock { display: none; }
  .badge-stock { left: 6px; bottom: 6px; font-size: 11px; padding: 2px 7px 2px 6px; }
  .grid .card .body { padding: 8px 10px 10px; gap: 6px; grid-template-rows: auto 1fr auto; }
  .grid .card .name { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .grid .card .body > div:has(> .stock) { display: none; }
  .grid .card .buy { flex-wrap: nowrap; gap: 4px; }
  .grid .card .price { font-size: 15px; white-space: nowrap; }
  .grid .card .buy .icon-btn { padding: 4px; }
  .grid .card .buy .icon-btn svg { width: 18px; height: 18px; }
  .grid .card .add-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; min-height: 0; }
  .grid .card .add-tx { display: none; }
  .grid .card .add-ico { display: block; }
}
/* Телефон: сердечко и корзина одинаковыми тёмно-синими кнопками (цвет кнопки «Каталог»), цена сразу под названием */
@media (max-width: 600px) {
  .grid .card .body { grid-template-rows: auto auto; align-content: start; gap: 4px; }
  .grid .card .name { font-size: 15.5px; }
  .grid .card .price { font-size: 16px; font-weight: 700; color: var(--ink); }
  .grid .card .buy { align-self: start; }
  .grid .card .buy .icon-btn, .grid .card .add-btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; background: var(--key-bg); color: #fff; border: 0; }
  .grid .card .buy .icon-btn svg, .grid .card .add-ico { width: 17px; height: 17px; }
  .grid .card .buy .icon-btn.on { color: #ff6b6b; }
  .grid .card .buy > span { gap: 6px !important; }
}
/* Телефон: название всегда занимает ровно две строки, поэтому цена и кнопки стоят на одном месте во всех карточках */
@media (max-width: 600px) {
  .grid .card .name { line-height: 1.25; height: 2.5em; }
}

/* Страница «Доставка и оплата»: единый ритм отступов */
.page.dlv { gap: 28px; }
.page.dlv h1 { margin: 0; }
.dlv-lead { margin: -12px 0 0; max-width: 65ch; }
.dlv-tbl { table-layout: fixed; }
.dlv-tbl th:nth-child(1) { width: 26%; } .dlv-tbl th:nth-child(2) { width: 34%; }
.dlv-tbl th, .dlv-tbl td { padding: 14px 18px; line-height: 1.45; }
.dlv-tbl td:first-child { font-weight: 600; }
.dlv-tbl td b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.dlv-tbl td small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.dlv-tbl tr:last-child td { border-bottom: 0; }
.dlv-cards { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dlv-card { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; padding: 22px 24px; align-items: start; }
.dlv-card + .dlv-card { border-top: 1px solid var(--line); }
.dlv h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.dlv .nw { white-space: nowrap; }
.dlv-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.dlv-card li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; }
.dlv-card li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--key-bg); }
.dlv-release { display: grid; gap: 16px; }
.dlv-release ol { margin: 0; padding: 0; list-style: none; counter-reset: rl; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dlv-release li { counter-increment: rl; border-top: 3px solid var(--key-bg); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.dlv-release li::before { content: counter(rl); width: 26px; height: 26px; border-radius: 50%; background: var(--key-bg); color: #ffffff; display: grid; place-items: center; font: 600 13px var(--f-data); margin-bottom: 4px; }
.dlv-release li span { font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) { .dlv-release ol { grid-template-columns: 1fr; } .dlv-card { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 640px) {
  .page.dlv { gap: 20px; }
  .dlv-lead { margin-top: -8px; }
  .dlv h2 { font-size: 18px; }
  .dlv-release ol { gap: 12px; }
  .dlv-card { padding: 16px; gap: 10px; }
  .page.compact .dlv-tbl tr { padding: 12px 14px; display: grid; gap: 4px; }
  .page.compact .dlv-tbl td { padding: 0; }
  .page.compact .dlv-tbl tr:last-child { border-bottom: 0; }
}
.dlv-card h2 { text-wrap: wrap; }

/* Яндекс Карта на странице «Контакты» */
.map-box { display: grid; gap: 10px; }
.map-frame { position: relative; height: 420px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--water); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.map-link { justify-self: start; font-weight: 600; }
@media (max-width: 640px) { .map-frame { height: 300px; } }
.map-off .map-ph { align-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; color: var(--ink); }
.map-off .map-ph svg { color: var(--key-bg); }
.map-off .map-ph span { max-width: 40ch; }
.map-off .map-ph small { color: var(--muted); font-size: 12px; }
.map-frame.map-off { height: 280px; }

/* SEO-текст внизу раздела каталога */
.seo-text { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 75ch; display: grid; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.seo-text p { margin: 0; }
.catalog .seo-text { max-width: none; }

/* Телефон ссылкой: по нажатию на телефоне сразу звонок */
.topline a.tl-tel, footer.site a[href^="tel:"], a.tel { color: inherit; text-decoration: none; }
a.tel:hover, footer.site a[href^="tel:"]:hover { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Юридические страницы, галочки согласия и уведомление о cookie */
.page.legal { gap: 14px; max-width: 75ch; }
.page.legal h2 { margin: 14px 0 0; font-size: 19px; }
.page.legal p, .page.legal ul { margin: 0; line-height: 1.6; }
.page.legal ul { padding-left: 20px; display: grid; gap: 6px; }
mark.todo { background: #ffe08a; color: #3b2a00; padding: 0 4px; border-radius: 4px; }
.consent .check { align-items: flex-start; font-size: 14px; line-height: 1.45; }
.consent .check input { margin-top: 3px; }
[hidden] { display: none !important; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 560px; margin: 0 auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0, 0, 0, .15); font-size: 14px; line-height: 1.4; }
.cookie span { flex: 1; min-width: 0; }

/* Фото набора в аквариуме */
.bk-photo { margin: 4px 0 12px; }
.bk-photo img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--water); }
.bk-photo figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
.bk-photo figcaption a { color: inherit; text-decoration: underline; }

/* Личный кабинет и бонусы */
.acc-link { position: relative; }
.acc-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok, #1f8a4c); border: 2px solid var(--bg); }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.acc-grid.guest { grid-template-columns: minmax(0, 480px) minmax(0, 360px); }
.acc-tabs { margin-bottom: 4px; }
.acc-tabs .chip { font: inherit; color: inherit; }
.acc-rules ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.acc-rules h3, .acc-grid h3 { margin: 0; font-size: 18px; }
.acc-main, .acc-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Колонки кабинета заканчиваются на одной линии: последняя рамка в каждой колонке растягивается до низа */
.acc-grid:not(.guest) { align-items: stretch; }
.acc-main > :last-child, .acc-side > :last-child { flex-grow: 1; }
.acc-actions { align-content: start; gap: 12px; }
.acc-actions .form { padding: 4px 0 8px; }
.acc-bonus { gap: 4px; }
.acc-bonus > b { font: 800 56px/1.05 var(--f-body); color: var(--bonus); letter-spacing: -.01em; }
.acc-order { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.acc-order-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 4px; }
.acc-order .row, .acc-main .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.acc-order .row.total { font-weight: 600; font-size: 15px; }
.acc-pay { margin-top: 6px; }
.acc-topay { gap: 4px; }
.acc-topay-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.acc-topay-row:first-of-type { border-top: 0; }
.acc-topay-row > span { display: grid; gap: 2px; }
.pay-now { display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: 12px; background: var(--water); max-width: 100%; }
.pay-now .btn { font-size: 17px; padding: 12px 22px; }
.pay-now small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.acc-earn { color: var(--ok, #1f8a4c); font-size: 14px; font-weight: 600; }
.acc-hide { justify-self: start; background: none; border: 0; padding: 4px 0 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.acc-hide:hover { color: var(--ink); }
.st { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--water); color: var(--key-bg); }
:root[data-mf-theme="dark"] .st:not(.st-done):not(.st-canceled) { color: var(--accent); }
.st-done { background: var(--ok-soft); color: var(--ok, #1f8a4c); }
.st-canceled { background: var(--warn-soft); color: var(--warn); }
.num.plus { color: var(--ok, #1f8a4c); }
.btn.key { background: var(--key-bg); color: #fff; }
.btn.key:hover { filter: brightness(1.35); }
.btn.danger { background: var(--danger); color: #fff; }
.acc-tabs .chip.on { border-color: var(--key-bg); background: var(--key-bg); color: #fff; }
.acc-hint a { font-weight: 600; }
@media (max-width: 900px) { .acc-grid, .acc-grid.guest { grid-template-columns: minmax(0, 1fr); } }

/* Условия продажи внизу главной: те же строки, что на странице «Доставка и оплата» */
.home-terms { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 150px; display: grid; gap: 16px; }
.home-terms > * { max-width: 900px; }
.home-terms > h2 { margin: 0; }
.terms-lead p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 75ch; }
.home-terms .dlv-card h3 { margin: 0; font-size: 17px; line-height: 1.35; text-wrap: balance; }
.terms-tx p { margin: 0; font-size: 15px; line-height: 1.5; }
.home-terms a { color: inherit; text-decoration: underline; }
@media (max-width: 900px) { .home-terms .dlv-card { grid-template-columns: 1fr; gap: 10px; } }
@media (max-width: 640px) { .home-terms .dlv-card { padding: 16px; } }

/* Популярные виды над каталогом: ссылки на страницы «Гуппи», «Неоны», «Скалярии» */
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; }
.sp-chips > .muted { font-size: 14px; margin-right: 4px; }
.sp-chips .chip { text-decoration: none; color: inherit; }
.sp-chips .chip:hover { border-color: var(--key-bg); }
.sp-chips .chip.on { border-color: var(--key-bg); background: var(--key-bg); color: #fff; }
.sp-chips .chip.on .cnt { color: rgba(255, 255, 255, .75); }

/* Подзаголовки и частые вопросы в тексте раздела */
.seo-text h2 { margin: 10px 0 0; font-size: 19px; line-height: 1.3; color: var(--ink); }
.seo-text .faq { display: grid; gap: 8px; margin-top: 8px; }
.seo-text .faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 16px; }
.seo-text .faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); list-style-position: outside; }
.seo-text .faq details[open] summary { border-bottom: 1px solid var(--line); }
.seo-text .faq details p { padding: 10px 0 14px; }
@media (max-width: 640px) {
  /* На телефоне популярные виды листаются одной строкой, чтобы не отодвигать каталог вниз */
  .sp-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .sp-chips::-webkit-scrollbar { display: none; }
  .sp-chips > * { flex: none; }
}

/* Главная: живой аквариум (assets/aquarium.js). Рыбки появляются там, где проходит мышь или палец, улитки ползут по стеклу всегда.
   На компьютере заголовок, текст и кнопка стоят поверх воды */
.aq-hero { position: relative; height: clamp(320px, 42vw, 480px); }
.aq-tank { position: absolute; inset: 0; overflow: hidden; border-radius: 22px; background: #0b3147; touch-action: pan-y; cursor: crosshair; box-shadow: 0 18px 40px rgba(13, 36, 51, .18); }
.aq-tank canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aq-text { position: absolute; left: clamp(16px, 4vw, 48px); top: clamp(18px, 4.5vw, 52px); max-width: min(520px, 80%); pointer-events: none; color: #fff; text-shadow: 0 2px 18px rgba(4, 20, 30, .55); }
.aq-text h1 { font-size: clamp(19px, 2.6vw, 30px); line-height: 1.18; margin: 0 0 clamp(18px, 2.6vw, 30px); color: #fff; }
.aq-text h1 span { display: block; color: #bfe6f5; }
.aq-text p { margin: 0 0 clamp(22px, 3vw, 36px); font-size: clamp(13.5px, 1.4vw, 16px); max-width: 36ch; }
.aq-text .btn { pointer-events: auto; background: #fff; color: #1d4a66; padding: 10px 20px; font-size: 15px; font-weight: 600; text-shadow: none; }
.aq-text .btn:hover { filter: none; background: #e6f1f7; }
.aq-btns { display: flex; flex-wrap: wrap; gap: 10px; }
/* «Как проходит карантин»: прозрачная кнопка с белой рамкой, чтобы главной оставалась «Открыть каталог» */
.aq-text .btn.aq-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); }
.aq-text .btn.aq-ghost:hover { background: rgba(255, 255, 255, .12); }
.aq-hint { position: absolute; right: 16px; bottom: 14px; font-size: 13px; color: rgba(255, 255, 255, .85); background: rgba(5, 25, 38, .45); padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .6s; }
.aq-hint.gone { opacity: 0; }
/* Телефон: в аквариуме только рыбы. Заголовок над ним, строка про карантин и «Открыть каталог» в тёмно-синей плашке под ним */
@media (max-width: 600px) {
  main:has(.aq-hero) { padding-top: 10px; }
  .aq-hero { height: auto; display: flex; flex-direction: column; gap: 12px; }
  .aq-text { display: contents; color: var(--ink); text-shadow: none; }
  .aq-text h1 { order: 0; margin: 0; color: var(--ink); font-size: clamp(19px, 5.4vw, 23px); line-height: 1.2; }
  .aq-text h1 span { display: inline; color: var(--key-bg); }
  :root[data-mf-theme="dark"] .aq-text h1 span { color: var(--hero-ink); }
  .aq-tank { order: 1; position: relative; inset: auto; aspect-ratio: 2 / 1; min-height: 176px; max-width: 100%; border-radius: 16px; box-shadow: 0 10px 24px rgba(13, 36, 51, .16); }
  .aq-cta { order: 2; display: grid; gap: 12px; padding: 14px 14px 16px; border-radius: 16px; background: var(--key-bg); color: #fff; }
  .aq-cta p { margin: 0; max-width: none; font-size: 14.5px; line-height: 1.4; }
  .aq-cta .btn { padding: 7px 11px; font-size: clamp(12px, 3.4vw, 14px); white-space: nowrap; }
  .aq-btns { gap: 6px; flex-wrap: nowrap; }
  @media (max-width: 350px) { .aq-cta { padding-inline: 10px; } .aq-cta .btn { padding: 7px 8px; font-size: 11.5px; } }
  .aq-hint { right: 12px; bottom: 15px; font-size: 12px; padding: 5px 10px; }
}

/* Набор с нарисованным аквариумом: аквариум, количество, вторая стая, подсказка о месте */
.bk-tank-slot { margin: 4px 0 0; }
.bk-tank { border-radius: 12px; overflow: hidden; background: #dfe7ea; box-shadow: 0 0 0 1px var(--line); }
.bk-tank canvas { display: block; width: 100%; }
.bk-cap { margin: 6px 0 12px; font-size: 12px; color: var(--muted); }
.bk-capline { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.bk-capline .bk-cap { margin: 0; }
.bk-reroll { border: 1px solid var(--key-bg); background: transparent; color: var(--key-bg); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.bk-reroll:hover { background: var(--accent-soft); }
.bk-qty { display: flex; align-items: center; gap: 4px; }
.bk-qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--key-bg); color: #fff; font: 600 17px/1 var(--f-body); cursor: pointer; display: grid; place-items: center; padding: 0; }
.bk-qty button:disabled { opacity: .35; cursor: default; }
.bk-qty output { min-width: 2.2ch; text-align: center; font-weight: 600; }
.bk-none { font-size: 12.5px; color: var(--muted); }
.bk-out { display: block; font-size: 12.5px; color: var(--muted); }
.bk-alt em.out { color: var(--muted); font-weight: 500; }
.bk-rm { justify-self: start; border: 0; background: none; padding: 2px 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bk-adds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bk-add { border: 1px dashed var(--key-bg); background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.bk-add:hover { background: var(--accent-soft); }
.bk-verdict { margin-top: 10px; border-radius: 10px; padding: 10px 14px; font-size: 14px; background: var(--ok-soft); color: var(--ok); }
.bk-verdict.warn { background: var(--warn-soft); color: var(--warn); }
.bk-verdict p { margin: 0; }
.bk-verdict p + p { margin-top: 6px; }
@media (max-width: 600px) {
  .bk-list li[data-trow] { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .bk-list li[data-trow] .bk-qty { grid-column: 3; grid-row: 1; }
  .bk-list li[data-trow] .bk-sum { grid-column: 2; grid-row: 2; text-align: left; font-size: 13px; color: var(--muted); min-width: 0; }
  .bk-list li[data-trow] .bk-swap-btn { grid-column: 2 / -1; grid-row: 3; }
}

/* «Оптовикам»: три варианта сотрудничества, как шаги на странице доставки */
.opt-tiers li b { font-size: 17px; }
.opt-call { display: grid; gap: 4px; }
.opt-call p { margin: 0; }
.opt-price { display: grid; gap: 14px; font-size: 15px; }
.opt-price p { margin: 0; }
.opt-form { display: grid; gap: 6px; }
.opt-row { display: flex; gap: 8px; }
.opt-row input[type=email] { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; }
.opt-row input[type=email]:focus { border-color: var(--key-bg); outline: none; }
.opt-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.opt-msg { font-size: 13px; min-height: 0; }
.opt-msg.ok { color: var(--ok); font-weight: 600; } .opt-msg.bad { color: var(--danger); }
.opt-price .check { font-size: 13px; color: var(--muted); }
@media (max-width: 420px) { .opt-row { flex-direction: column; } .opt-row .btn { width: 100%; } }

/* Набор: компактные строки (название, латынь, цена), удобный счётчик −/+, короткие подписи на телефоне */
.bk-list li[data-trow] { grid-template-columns: 96px minmax(0, 1fr) auto 200px; }
.bk-meta { display: flex; align-items: center; gap: 12px; justify-content: flex-start; }
.bk-meta .bk-sum { min-width: 84px; }
.bk-qty { border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.bk-qty output { min-width: 2.6ch; font-size: 16px; }
.bk-list li[data-trow] .bk-qty button { width: 34px; height: 34px; font-size: 20px; }
.cap-s, .bk-more { display: none; }
@media (max-width: 600px) {
  /* на телефоне все стили видны сразу, без прокрутки вбок: ровная сетка в два столбца (Максим, 12.10) */
  .kit-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .kit-tab { font-size: 13px; line-height: 1.25; padding: 8px 10px; border-radius: 18px; text-align: center; white-space: normal; min-width: 0; }
  .kit-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* объёмы одной строкой равной ширины */
  .tank-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .tank-tab { padding: 8px 4px; text-align: center; white-space: nowrap; font-size: 15px; }
  .bk-capline { flex-wrap: nowrap; margin: 6px 0 10px; }
  .cap-l { display: none; }
  .cap-s { display: inline; }
  .bk-reroll { white-space: nowrap; }
  .bk-about { max-height: 4.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
  .bk-about.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .bk-about p, .bk-about .muted { font-size: 14px; line-height: 1.45; margin: 0 0 4px; }
  .bk-more { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 2px 0 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--key-bg); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .bk-list { gap: 6px; }
  .bk-list li[data-trow] { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 8px; align-items: center; }
  .bk-list li[data-trow] .bk-pic { width: 52px; grid-row: 1 / span 2; }
  .bk-list li[data-trow] .bk-name { grid-column: 2; grid-row: 1; gap: 0; }
  .bk-list li[data-trow] .bk-name a { font-size: 14px; line-height: 1.25; }
  .bk-list li[data-trow] .bk-none { display: none; }
  .bk-list li[data-trow] .bk-qty { padding: 2px; gap: 0; }
  .bk-list li[data-trow] .bk-qty button { width: 32px; height: 32px; font-size: 19px; }
  .bk-list li[data-trow] .bk-qty output { min-width: 2.9ch; font-size: 15px; }
  .bk-list li[data-trow] .bk-name small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bk-sz { display: none; }
  .bk-adds { gap: 6px; }
  .bk-add { font-size: 13px; padding: 7px 12px; }
  .bk-list li[data-trow] .bk-qty { grid-column: 3; grid-row: 1 / span 2; }
  .bk-list li[data-trow] .bk-meta { grid-column: 2; grid-row: 2; justify-content: flex-start; gap: 12px; }
  .bk-list li[data-trow] .bk-sum { grid-column: auto; grid-row: auto; min-width: 0; font-size: 13.5px; color: var(--ink); text-align: left; }
  .bk-list li[data-trow] .bk-swap-btn { grid-column: auto; grid-row: auto; border: 0; background: none; padding: 0; margin-left: 2px; font-size: 13px; color: var(--key-bg); text-decoration: underline; text-underline-offset: 3px; }
  .bk-list li[data-trow] .bk-swap-btn.on { background: none; }
}

/* Набор: «Другая расстановка», «Подробнее», «Заменить» — одинаковые заметные кнопки, светлее тёмно-синего «Каталога» */
:root { --key-act: #2a6b94; }
.bk-reroll, .bk-more, .bk-swap-btn, .bk-list li[data-trow] .bk-swap-btn {
  border: 0; background: var(--key-act); color: #fff; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: 0 1px 2px rgba(10, 30, 45, .25); }
.bk-reroll:hover, .bk-more:hover, .bk-swap-btn:hover, .bk-list li[data-trow] .bk-swap-btn:hover { background: var(--key-act); filter: brightness(1.15); }
.bk-reroll:active, .bk-more:active, .bk-swap-btn:active { filter: brightness(.9); }
.bk-swap-btn.on, .bk-list li[data-trow] .bk-swap-btn.on { background: var(--key-bg); filter: none; }
@media (max-width: 600px) {
  .bk-more { display: inline-block; width: auto; justify-self: start; align-self: flex-start; margin: 2px 0 10px; padding: 6px 14px; font-size: 13px; }
  .bk-list li[data-trow] .bk-meta { flex-wrap: wrap; gap: 4px 10px; }
  .bk-list li[data-trow] .bk-meta .bk-sum { flex: none; }
  .bk-list li[data-trow] .bk-swap-btn { padding: 4px 11px; font-size: 12.5px; margin-left: 0; }
}

/* Аквариум набора целиком помещается в экран под шапкой: высота не больше экрана минус шапка и строка с подписью.
   Соотношение сторон аквариума задаёт settank.js (--tank-ar) */
.bk-tank, .bk-capline { max-width: calc((100svh - var(--sticky-h, 96px) - 80px) * var(--tank-ar, 1.43)); margin-inline: auto; }

/* Телефон боком и другие низкие экраны (высота до 500 px): шапка не закреплена, чтобы не съедать треть экрана,
   оформления одной прокручиваемой строкой, аквариум на главной и набор целиком видны */
@media (orientation: landscape) and (max-height: 500px) {
  header.site { position: static; }
  .bk-tank, .bk-capline { --sticky-h: 0px; }
  .bk-capline { flex-wrap: nowrap; }
  .cap-l { display: none; }
  .cap-s { display: inline; }
  .kit-tabs { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .kit-tabs::-webkit-scrollbar { display: none; }
  .kit-tab { flex: 0 0 auto; white-space: nowrap; }
  .aq-hero { height: clamp(250px, calc(100svh - 24px), 480px); }
  .aq-text { top: 18px; }
  .aq-text h1 { margin-bottom: 12px; }
  .aq-text p { margin-bottom: 14px; }
  .cookie { padding: 8px 12px; font-size: 13px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* Аквариум в корзине: объём и рыбы из корзины в масштабе (settank.js, MF.setTank.cart) */
.cart-tank { margin-top: 6px; }
.empty + .cart-tank { margin-top: 16px; }
/* Объём аквариума в корзине: крупная цифра, ползунок и популярные объёмы, всё в тёмно-синей гамме кнопки «Каталог» */
.ct-vol { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--water); margin-bottom: 12px; }
.ct-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ct-q { font-weight: 600; font-size: 16px; display: grid; gap: 2px; }
.ct-q small { font-weight: 400; font-size: 13px; color: var(--muted); }
.ct-val { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 0 6px; cursor: text; max-width: 260px; }
.ct-val input { width: 3.4ch; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 0; text-align: right; font: 600 34px/1.1 var(--f-display); color: var(--ink); border-radius: 0; }
.ct-val input:focus { outline: none; border-bottom-color: var(--key-bg); }
.ct-val input::placeholder { color: var(--muted); opacity: .6; }
.ct-val > span { font: 600 18px var(--f-display); color: var(--ink); }
.ct-val small { flex-basis: 100%; text-align: right; font: 12px var(--f-data); color: var(--muted); }
.ct-val.unset small { opacity: .7; }
.ct-slide { display: flex; align-items: center; gap: 10px; }
.ct-step { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--key-bg); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.ct-step:hover { filter: brightness(1.15); }
.ct-slide input[type=range] { --p: 50%; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: manipulation; }
.ct-slide input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--key-bg) var(--p), var(--line) var(--p)); }
.ct-slide input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.ct-slide input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--key-bg); }
.ct-slide input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--key-bg); box-shadow: 0 1px 4px rgba(13, 36, 51, .25); }
.ct-slide input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--key-bg); box-shadow: 0 1px 4px rgba(13, 36, 51, .25); }
.ct-slide input[type=range]:focus-visible { outline: 2px solid var(--key-bg); outline-offset: 4px; border-radius: 6px; }
.ct-presets { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ct-presets button { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: 8px 0; font: 600 14px var(--f-body); cursor: pointer; touch-action: manipulation; }
.ct-presets button span { font-weight: 400; color: var(--muted); }
.ct-presets button:hover { border-color: var(--key-bg); }
.ct-presets button.on { background: var(--key-bg); border-color: var(--key-bg); color: #fff; }
.ct-presets button.on span { color: rgba(255, 255, 255, .75); }
@media (max-width: 560px) {
  .ct-vol { padding: 12px; }
  .ct-presets { grid-template-columns: repeat(4, 1fr); }
  .ct-val input { font-size: 28px; }
  .ct-val { justify-content: flex-start; }
  .ct-val small { text-align: left; }
}
.ct-cap p { margin: 0; font-size: 14px; }
.ct-cap { display: grid; gap: 6px; }
.ct-slot { margin: 4px 0 0; }

/* Переключатель «Мирные / Хищные» над стилями набора */
.kit-mode { display: inline-grid; width: max-content; max-width: 100%; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: var(--water); border: 1px solid var(--line); }
.kit-mode button { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); touch-action: manipulation; }
.kit-mode button:hover { color: var(--accent); }
.kit-mode button.on, .kit-mode button.on:hover { background: var(--key-bg); color: #fff; }
@media (max-width: 600px) { .kit-mode { display: grid; width: auto; } }
.bk-tank { position: relative; }
.bk-grow { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 20px); padding: 5px 6px 5px 12px; border-radius: 999px; background: rgba(12, 32, 48, .72); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; pointer-events: none; }
.bk-grow[hidden] { display: none; }
.bk-grow span { padding: 2px 6px 2px 0; }
.bk-grow button { pointer-events: auto; cursor: pointer; font: inherit; font-size: 12px; padding: 4px 10px; border: 0; border-radius: 999px; background: #fff; color: var(--key-bg); }
.bk-grow button[hidden] { display: none; }
@media (max-width: 600px) {
  .bk-grow { position: static; max-width: none; justify-content: space-between; flex-wrap: nowrap; border-radius: 0; padding: 6px 8px 6px 12px; background: #16324a; font-size: 12px; min-height: 36px; box-sizing: border-box; }
  .bk-grow button { flex: none; font-size: 12px; padding: 4px 10px; }
}

/* Тёмная тема: счётчики в шапке темнее, чтобы белые цифры читались */
:root[data-mf-theme="dark"] .badge { background: #d93a32; }
/* Узкие телефоны: цена от 10 000 ₽ и две круглые кнопки не помещаются в строку карточки */
@media (max-width: 380px) {
  .grid .card .buy { gap: 2px; }
  .grid .card .buy .icon-btn, .grid .card .add-btn { width: 30px; height: 30px; }
  .grid .card .price { font-size: 14px; }
}

/* ---------- Статьи (/stati/): колонка для чтения, оглавление справа на широком экране ---------- */
.art { display: grid; gap: 40px; grid-template-columns: minmax(0, 720px) 250px; align-items: start; }
.art-main { min-width: 0; display: grid; gap: 22px; }
.art-tag { display: inline-block; font: 600 12px/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--key-bg); background: var(--water); border-radius: 999px; padding: 6px 10px; justify-self: start; }
:root[data-mf-theme="dark"] .art-tag { color: var(--bonus); }
.art-head { display: grid; gap: 12px; }
.art-head h1 { font-size: clamp(26px, 3.4vw, 36px); }
.art-lead { font-size: 19px; line-height: 1.55; color: var(--muted); }
.art-meta { font-size: 14px; color: var(--muted); }
.art-cover { margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--water); }
.art-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-sum { background: var(--water); border-radius: var(--r); padding: 18px 22px; }
.art-sum b { display: block; font: 600 13px var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--key-bg); margin-bottom: 8px; }
:root[data-mf-theme="dark"] .art-sum b { color: var(--bonus); }
.art-sum ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 17px; line-height: 1.5; }
.art-sum li { padding-left: 26px; position: relative; }
.art-sum li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 10px; height: 6px; border-left: 2.5px solid var(--key-bg); border-bottom: 2.5px solid var(--key-bg); transform: rotate(-45deg); }
.art-body { font-size: 18px; line-height: 1.7; display: grid; gap: 16px; }
.art-body h2 { font-size: clamp(21px, 2.4vw, 25px); margin-top: 22px; scroll-margin-top: 90px; }
.art-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.art-body ul li { padding-left: 22px; position: relative; }
.art-body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--key-bg); }
.art-tip { border-left: 4px solid var(--key-bg); background: var(--water); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 18px; font-size: 17px; }
.art-tip b { display: block; font-size: 14px; color: var(--key-bg); margin-bottom: 2px; }
:root[data-mf-theme="dark"] .art-tip b, :root[data-mf-theme="dark"] .art-card .tg { color: var(--accent); }
.art-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.art-cmp > div { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 16px; line-height: 1.5; }
.art-cmp h3 { font-size: 17px; margin-bottom: 8px; }
.art-cmp.gb .good h3 { color: var(--ok); }
.art-cmp.gb .bad h3 { color: var(--danger); }
.art-cmp.gb .good li::before { background: none; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); border-radius: 0; width: 9px; height: 5px; transform: rotate(-45deg); top: .55em; }
.art-cmp.gb .bad li::before { content: "×"; background: none; color: var(--danger); width: auto; height: auto; top: -.05em; left: 3px; font-weight: 700; font-size: 18px; border-radius: 0; }
.art-prods { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; font-size: 16px; line-height: 1.5; }
.art-prods .block-head h3 { font-size: 18px; }
.art-prods .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.art-faq { display: grid; gap: 8px; }
.art-faq h2 { margin-bottom: 6px; }
.art-faq details { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px; }
.art-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.art-faq details p { margin-top: 8px; font-size: 17px; line-height: 1.6; }
.art-cta { background: var(--chrome); color: var(--chrome-fg); border-radius: var(--r); padding: 22px; display: grid; gap: 10px; }
.art-cta h3 { font: 600 20px/1.25 var(--f-display); }
.art-cta p { opacity: .85; }
.art-cta .btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.art-cta .btn { background: var(--key-bg); }
.art-cta .btn.ghost { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; }
.art-toc { position: sticky; top: 80px; display: grid; gap: 4px; font-size: 15px; border-left: 2px solid var(--line); padding-left: 16px; }
.art-toc b { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.art-toc a { color: var(--ink); padding: 3px 0; }
.art-toc a.on { color: var(--key-bg); font-weight: 600; }
.art-toc-m { display: none; }
.art-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.art-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.art-card:hover { text-decoration: none; border-color: var(--key-bg); }
.art-card .ph { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; background: var(--water); }
.art-card .tx { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.art-card .tg { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--key-bg); }
.art-card b { font-size: 18px; line-height: 1.3; }
.art-card .ld { color: var(--muted); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-card .mt { font-size: 13px; color: var(--muted); }
.art-list { display: grid; gap: 18px; max-width: none; }
.art-list .intro { color: var(--muted); font-size: 17px; max-width: 70ch; }
@media (max-width: 1023px) {
  .art { grid-template-columns: minmax(0, 1fr); }
  .art-side { display: none; }
  .art-toc-m { display: block; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; font-size: 16px; }
  .art-toc-m summary { font-weight: 600; cursor: pointer; }
  .art-toc-m nav { display: grid; gap: 6px; margin-top: 8px; }
  .art-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-prods .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .art-body { font-size: 17px; }
  .art-lead { font-size: 17px; }
  .art-cmp { grid-template-columns: 1fr; }
  /* Телефон: компактные карточки по две в ряд, без прокрутки вбок (Максим, 13.10) */
  .art-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .art-card .tx { padding: 8px 10px 10px; gap: 4px; }
  .art-card .tg { font-size: 10px; }
  .art-card b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .art-card .ld { display: none; }
  .art-card .mt { font-size: 12px; }
}
@media (max-width: 640px) {
  .art-prods .grid3 { grid-auto-flow: column; grid-auto-columns: 64%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; }
  .art-prods .card { scroll-snap-align: start; }
}

/* На главной 3 карточки на компьютере, на телефоне только 2 в один ряд, остальное по кнопке «Все статьи» */
@media (max-width: 640px) { .home-art .art-card:nth-child(n+3) { display: none; } }
.art-card[hidden] { display: none; }
.art-card span.ph { display: block; }
.art-list .chips { display: flex; flex-wrap: wrap; gap: 8px; }
