/* Manrope (SIL Open Font License 1.1) — с нашего сервера: адреса посетителей не уходят в Google */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --tile: #f1ede6;
  --ink: #1f2421;
  --muted: #6b716d;
  --line: #e7e2da;
  --accent: #2f5d50;
  --accent-2: #24493f;
  --accent-soft: #e6efeb;
  --sale: #c4532d;
  --sale-soft: #fbe9e2;
  --new: #3b5679;
  --star: #e0a526;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(31, 36, 33, .09);
  --wrap: 1280px;
  --on-accent: #fff;          /* текст на акцентной кнопке, плашках и в чате */
  --on-ink: #fff;             /* текст на --ink: активная вкладка, страница, тост, метка */
  --on-sale: #fff;
  --on-new: #fff;
  --last: #7b4b94;            /* метка «Последняя цена» */
  --on-last: #fff;
  --field-bg: #fff;           /* фон полей ввода */
  --art-bg: transparent;      /* подложка под иллюстрации в меню: в тёмных палитрах светлая */
  --art-r: 0;
  --photo-bg: var(--tile);    /* подложка под фото и иллюстрации товаров */
  --line-strong: #cfc8bd;     /* рамка кнопки при наведении, кольцо у образца цвета */
  --swatch-edge: #fff;
  --float: #fff;              /* круглые кнопки поверх фото и баннера */
  --float-ink: #1c2320;
  --fav-bg: rgba(255, 255, 255, .85); --nav-bg: rgba(255, 255, 255, .88); --zoom-bg: rgba(255, 255, 255, .92);
  --overlay: rgba(20, 24, 22, .45);      /* затемнение под меню */
  --overlay-dlg: rgba(14, 17, 16, .45);  /* затемнение под окном города */
  --shadow-lg: 0 18px 50px rgba(31, 36, 33, .22);
  --shadow-nav: 0 2px 10px rgba(31, 36, 33, .16);
  --shadow-drawer: 0 0 40px rgba(20, 24, 22, .18);
  --focus: var(--accent);
  --error-ink: #8f3a1f;
  --toast-bg: var(--ink);
  --toast-ink: var(--on-ink);
  --toast-link: #9fd8c3;
  --toast-edge: transparent;
  --footer-bg: #1c2320;
  --footer-ink: #d7dcd9;
  --footer-head: #fff;
  --footer-dim: #8f9a95;
  --skeleton-hi: rgba(255, 255, 255, .6);
}

/* ---------- палитры (атрибут data-theme на <html>; classic — это :root выше) ---------- */
:root[data-theme="nordic"] {
  --bg: #f2f5f8; --surface: #ffffff; --tile: #e6ecf1; --ink: #1c2630; --muted: #566472; --line: #d9e0e7;
  --accent: #3d6079; --accent-2: #2e4b61; --accent-soft: #e1eaf1;
  --sale: #b23f27; --sale-soft: #fae6e0; --new: #4a628f; --star: #d9a21f;
  --shadow: 0 8px 28px rgba(28, 38, 48, .09);
  --last: #6a5a8e; --line-strong: #b9c4cf; --float-ink: #1c2630; --fav-bg: rgba(255, 255, 255, .85); --nav-bg: rgba(255, 255, 255, .88); --zoom-bg: rgba(255, 255, 255, .92);
  --overlay: rgba(20, 30, 40, .45); --overlay-dlg: rgba(20, 30, 40, .45);
  --shadow-lg: 0 18px 50px rgba(28, 38, 48, .22); --shadow-nav: 0 2px 10px rgba(28, 38, 48, .16); --shadow-drawer: 0 0 40px rgba(28, 38, 48, .18);
  --toast-bg: #24313d; --toast-ink: #fff; --toast-link: #a9cfe6;
  --footer-bg: #1d2832; --footer-ink: #d3dce4; --footer-dim: #8d9ba8; --error-ink: #8c3220;
  --placeholder: #62707c; --sel: #c9dcea; --sel-ink: #1c2630;
}
:root[data-theme="terracotta"] {
  --bg: #f8f1e7; --surface: #fffaf3; --tile: #efe3d1; --ink: #2d2118; --muted: #6a5849; --line: #e5d7c4;
  --accent: #a5502c; --accent-2: #843e20; --accent-soft: #f6e1d3;
  --sale: #ab2c2c; --sale-soft: #f8e0da; --new: #566e57; --star: #d49a1c;
  --shadow: 0 8px 28px rgba(60, 36, 20, .10);
  --last: #7a4a6e; --line-strong: #d1bea6; --float-ink: #2d2118; --field-bg: #fffdf9; --swatch-edge: #fffaf3;
  --overlay: rgba(40, 26, 16, .45); --overlay-dlg: rgba(40, 26, 16, .45);
  --shadow-lg: 0 18px 50px rgba(60, 36, 20, .24); --shadow-nav: 0 2px 10px rgba(60, 36, 20, .16); --shadow-drawer: 0 0 40px rgba(60, 36, 20, .2);
  --toast-bg: #3a2a1e; --toast-ink: #fff7ec; --toast-link: #f0b996;
  --footer-bg: #2a1e16; --footer-ink: #e4d6c5; --footer-head: #fff7ec; --footer-dim: #a8957f; --error-ink: #8a2a1a;
  --placeholder: #7a6855; --sel: #f0cfb7; --sel-ink: #2d2118;
}
:root[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #15191b; --surface: #1e2326; --tile: #2a3135; --ink: #e8ece9; --muted: #9ba6a1; --line: #343c40;
  --accent: #7fb7a0; --accent-2: #99c9b6; --accent-soft: #243630;
  --sale: #f0906f; --sale-soft: #3d2a24; --new: #86a8d4; --star: #e3b341;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --on-accent: #0e1a15; --on-ink: #15191b; --on-sale: #1c0e08; --on-new: #0d1520;
  --last: #b393d0; --on-last: #170d22;
  --field-bg: #171c1e; --photo-bg: #e7e4dd; --art-bg: #e7e4dd; --art-r: 8px; --line-strong: #4b555a; --swatch-edge: #1e2326;
  --float: #1e2326; --float-ink: #e8ece9; --fav-bg: rgba(30, 35, 38, .85); --nav-bg: rgba(30, 35, 38, .88); --zoom-bg: rgba(30, 35, 38, .92);
  --overlay: rgba(0, 0, 0, .6); --overlay-dlg: rgba(0, 0, 0, .6);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6); --shadow-nav: 0 2px 10px rgba(0, 0, 0, .5); --shadow-drawer: 0 0 40px rgba(0, 0, 0, .6);
  --focus: #a9d8c3; --error-ink: #f2a48a;
  --toast-bg: #2c3438; --toast-ink: #e8ece9; --toast-link: #99c9b6; --toast-edge: #434d52;
  --footer-bg: #0f1315; --footer-ink: #b9c3be; --footer-head: #eef2ef; --footer-dim: #8a9690;
  --skeleton-hi: rgba(255, 255, 255, .06);
  --adv-bg: #223a31; --adv-ink: #e8ece9;
  --placeholder: #7e8a85; --sel: #3d6355; --sel-ink: #fff;
}
:root[data-theme="walnut"] {
  color-scheme: dark;
  --bg: #1c1612; --surface: #261f19; --tile: #352b22; --ink: #f0e6d8; --muted: #b5a592; --line: #41342a;
  --accent: #e0a85a; --accent-2: #ecbb77; --accent-soft: #3a2d1d;
  --sale: #f2906c; --sale-soft: #44271d; --new: #8fb1cc; --star: #e8b94a;
  --shadow: 0 8px 28px rgba(0, 0, 0, .5);
  --on-accent: #1f1407; --on-ink: #1c1612; --on-sale: #200e06; --on-new: #0e1822;
  --last: #bf9bc9; --on-last: #1d0f22;
  --field-bg: #1f1914; --photo-bg: #ece3d3; --art-bg: #ece3d3; --art-r: 8px; --line-strong: #5a4a3b; --swatch-edge: #261f19;
  --float: #261f19; --float-ink: #f0e6d8; --fav-bg: rgba(38, 31, 25, .85); --nav-bg: rgba(38, 31, 25, .88); --zoom-bg: rgba(38, 31, 25, .92);
  --overlay: rgba(0, 0, 0, .62); --overlay-dlg: rgba(0, 0, 0, .62);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .65); --shadow-nav: 0 2px 10px rgba(0, 0, 0, .5); --shadow-drawer: 0 0 40px rgba(0, 0, 0, .65);
  --focus: #f2c47e; --error-ink: #f4a98b;
  --toast-bg: #372c22; --toast-ink: #f0e6d8; --toast-link: #ecbb77; --toast-edge: #50412f;
  --footer-bg: #120d0a; --footer-ink: #c4b5a2; --footer-head: #f5ecdf; --footer-dim: #94846f;
  --skeleton-hi: rgba(255, 255, 255, .06);
  --adv-bg: #3b2c1a; --adv-ink: #f0e6d8;
  --placeholder: #9b8b78; --sel: #6b4f26; --sel-ink: #fff;
}
/* Поля без своего фона берут фон палитры (в тёмных он тёмный). :where даёт нулевую специфичность: правила компонентов сильнее. У classic правила нет — вид не меняется. */
:where(:root[data-theme]:not([data-theme="classic"])) :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select) { background-color: var(--field-bg); }
::placeholder { color: var(--placeholder, #757575); opacity: 1; }
::selection { background: var(--sel, Highlight); color: var(--sel-ink, HighlightText); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 15px/1.5 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.visually-hidden { 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;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--in-cart { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent;
}
.icon-btn:hover { background: var(--tile); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- шапка ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar__in { display: flex; align-items: center; gap: 24px; height: 38px; }
.topbar__city { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; border: 0; background: none; padding: 0; }
.topbar__city .ico { width: 16px; height: 16px; }
.toplinks { display: flex; gap: 18px; flex: 1; overflow: hidden; }
.toplinks a { color: var(--muted); white-space: nowrap; }
.toplinks a:hover { color: var(--ink); }
.topbar__phone { font-weight: 700; white-space: nowrap; }
.topbar__hours { color: var(--muted); white-space: nowrap; }

.header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 16px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; flex-shrink: 0; }
.logo__mark { display: block; width: 38px; height: 38px; border-radius: 11px; background: #fff; object-fit: contain; flex-shrink: 0; }
.logo small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: -4px; }
.catalog-btn .ico { stroke: var(--on-accent); }
.search { flex: 1; display: flex; position: relative; min-width: 0; }
.search input {
  width: 100%; height: 44px; padding: 0 48px 0 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--bg); outline: none;
}
.search input:focus { border-color: var(--accent); background: var(--field-bg); }
.search button { position: absolute; right: 2px; top: 2px; height: 40px; width: 44px; border: 0; background: none; color: var(--muted); }
.hicons { display: flex; gap: 4px; }
.hicon { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px; font-size: 12px; color: var(--muted); border-radius: var(--radius-sm); }
.hicon:hover { color: var(--ink); background: var(--tile); }
.hicon .ico { color: var(--ink); }
.badge {
  position: absolute; top: 0; right: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--sale); color: var(--on-sale); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.badge:empty { display: none; }
.burger { display: none; }

.catnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.catnav a:hover, .catnav a.is-active { background: var(--accent-soft); color: var(--accent); }
.catnav a.sale { color: var(--sale); }

/* Каталог в шапке выезжает и проявляется; visibility прячет закрытую панель и от клавиатуры (после конца анимации) */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .22s ease, visibility 0s linear .22s;
}
.mega.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.mega__in { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 20px 16px 24px; }
.mega a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; text-align: center; }
.mega a:hover { background: var(--tile); }
.mega .art { width: 100%; max-width: 120px; aspect-ratio: 4/3; background: var(--art-bg); border-radius: var(--art-r); }

/* Меню на телефоне выезжает слева, фон темнеет плавно; при закрытии visibility ждёт конца анимации */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; transition: visibility 0s linear .3s; }
.drawer.is-open { visibility: visible; pointer-events: auto; transition: none; }
.drawer__bg { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s ease; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: var(--surface);
  padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.drawer.is-open .drawer__panel { transform: none; box-shadow: var(--shadow-drawer); }
@media (prefers-reduced-motion: reduce) {
  .mega, .mega.is-open, .drawer__bg, .drawer__panel { transition: none; }
  .drawer { transition: none; }
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer a { padding: 10px 8px; border-radius: 8px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.drawer a:hover { background: var(--tile); }
.drawer .art { width: 44px; height: 33px; flex-shrink: 0; background: var(--art-bg); border-radius: var(--art-r); }
.drawer h4 { margin: 16px 8px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- секции ---------- */
main { min-height: 60vh; }
.section { margin-block: 48px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section__title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.section__more { color: var(--accent); font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* лента-карусель */
.rail { position: relative; }
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 5); gap: 15px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }
.rail__nav {
  position: absolute; top: 34%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center;
}
.rail__nav--prev { left: -18px; }
.rail__nav--next { right: -18px; }
.rail__nav[disabled] { opacity: 0; pointer-events: none; }

/* ---------- карточка товара ---------- */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__img { position: relative; display: block; background: var(--photo-bg); aspect-ratio: 4/3; }
.card__img .art { width: 100%; height: 100%; }
.card__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--on-ink); background: var(--ink); }
.tag--sale { background: var(--sale); color: var(--on-sale); }
.tag--new { background: var(--new); color: var(--on-new); }
.tag--hit { background: var(--accent); color: var(--on-accent); }
.tag--last { background: var(--last); color: var(--on-last); }
.card__fav { position: absolute; right: 8px; top: 8px; background: var(--fav-bg); }
.card__fav.is-on .ico, .fav-btn.is-on .ico { fill: var(--sale); stroke: var(--sale); }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.price b { font-size: 19px; font-weight: 800; }
.price s { color: var(--muted); font-size: 13px; }
.price .disc { color: var(--sale); font-weight: 700; font-size: 13px; background: var(--sale-soft); padding: 0 6px; border-radius: 5px; }
.card__title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card__title:hover { color: var(--accent); }
.card__row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 600; }
.rating .star { color: var(--star); }
.delivery { font-size: 13px; font-weight: 600; color: var(--accent); }
.delivery--order { color: var(--muted); }
.dims { font-size: 13px; color: var(--muted); }
.card__body .btn { margin-top: auto; }
.card__spacer { flex: 1; }

.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--swatch-edge); box-shadow: 0 0 0 1px var(--line-strong);
  padding: 0; cursor: pointer;
}
.swatch.is-active { box-shadow: 0 0 0 2px var(--accent); }
.swatches--lg .swatch { width: 32px; height: 32px; border-width: 3px; }

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

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-top: 20px; }
.hero--solo { grid-template-columns: 1fr; }
.slider { position: relative; border-radius: 20px; overflow: hidden; min-height: 380px; display: flex; outline: none; }
.slider:focus-visible { box-shadow: 0 0 0 3px var(--focus); }
.slider__track { display: flex; flex: 1; min-width: 0; transition: transform .45s cubic-bezier(.22, .7, .2, 1); touch-action: pan-y;
  container-type: inline-size; } /* 100cqw — ширина баннера: от неё шрифты баннеров из редактора */
.slide {
  position: relative; flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 16px;
  padding: 40px 48px 64px; overflow: hidden; background: var(--slide-bg); color: var(--slide-ink); cursor: pointer; user-select: none;
}
.slide__body { position: relative; z-index: 1; min-width: 0; }
.slide__btn { cursor: pointer; }
.slide__kicker { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.slide h2 { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 12px; overflow-wrap: anywhere; }
.slide p { margin: 0 0 24px; font-size: 16px; max-width: 420px; opacity: .85; }
.slide .art { width: 100%; max-height: 300px; }
.slide--no-art { grid-template-columns: minmax(0, 560px); }
.slider:not(:has(.slider__bar)) .slide { padding-bottom: 40px; } /* один баннер — листать нечего */
/* фото на весь баннер, сверху — подложка цвета фона, чтобы текст читался */
.slide__media, .slide__veil { position: absolute; inset: 0; }
.slide__media img { width: 100%; height: 100%; object-fit: var(--fit, cover); object-position: var(--pos, 50% 50%);
  transform: scale(var(--zoom, 1)); transform-origin: var(--pos, 50% 50%); } /* масштаб — вокруг точки фокуса */
.slide__veil { background: linear-gradient(90deg, rgb(var(--veil-c) / var(--veil-a)) 0%, rgb(var(--veil-c) / calc(var(--veil-a) * .85)) 40%, rgb(var(--veil-c) / 0) 75%); }
/* свободная картинка (например, PNG без фона): центр в (--x, --y), высота --h от высоты баннера, за краем — обрезана */
.slide--free .slide__media img { position: absolute; left: var(--x); top: var(--y); width: auto; height: var(--h); max-width: none;
  object-fit: fill; transform: translate(-50%, -50%); }
.slide--right { justify-content: end; }
.slide--right:not(.slide--no-art) { grid-template-columns: 1fr 1.1fr; }
.slide--right .art { order: -1; }
.slide--right .slide__veil { background: linear-gradient(270deg, rgb(var(--veil-c) / var(--veil-a)) 0%, rgb(var(--veil-c) / calc(var(--veil-a) * .85)) 40%, rgb(var(--veil-c) / 0) 75%); }
/* баннер из редактора: блок текста в точке (--bx, --by), привязка по выравниванию; шрифт задан для баннера шириной
   912 px и на узком экране уменьшается вместе с баннером, но не растёт на широком; --fitT и --fitP — доли размера,
   если текст не помещается (banner.js: fit) */
.slide--design { display: block; }
.slide--design .slide__body { position: absolute; left: var(--bx); top: var(--by); width: var(--bw); transform: translate(var(--bax), var(--bay));
  text-align: var(--bta); }
.slide--design .slide__kicker { font-size: calc(min(calc(var(--fk) * 1px), calc(var(--fk) * 100cqw / 912)) * var(--fitP, 1)); color: var(--kc, inherit); text-transform: var(--kcase); }
.slide--design h2 { font-size: calc(min(calc(var(--ft) * 1px), calc(var(--ft) * 100cqw / 912)) * var(--fitT, 1)); font-weight: var(--tw8); color: var(--tc, inherit);
  font-family: var(--tff, inherit); line-height: 1.12; margin: .3em 0 .35em; overflow-wrap: normal; }
/* не помещается и с уменьшенным шрифтом (banner.js: fit) — длинное слово переносится по буквам */
.slide--design.is-squeezed h2 { overflow-wrap: anywhere; }
.slide--design p { font-size: calc(min(calc(var(--fp) * 1px), calc(var(--fp) * 100cqw / 912)) * var(--fitP, 1)); color: var(--pc, inherit); max-width: none; margin: 0 0 1.5em; }
.slide--design .slide__body > :last-child { margin-bottom: 0; }
.slide--design .art { position: absolute; left: var(--x); top: var(--y); height: var(--h); width: auto; max-height: none; max-width: none;
  transform: translate(-50%, -50%); }
.slide--plate .slide__body { background: rgb(var(--plc) / var(--pla)); padding: 22px 26px; border-radius: 18px; }
.slide__hl { color: var(--hl, var(--accent)); }
.slide__btn--custom { background: var(--bbg, var(--accent)); border-color: var(--bbg, var(--accent)); color: var(--bink, #fff); }
.slide__btn--custom:hover { filter: brightness(1.08); }
.slide__btn--outline { background: transparent; border: 2px solid currentColor; color: var(--tc, var(--slide-ink)); }
.slide__btn--outline:hover { background: rgb(0 0 0 / .06); }
.slide__btn--light { background: #fff; border-color: #fff; color: #1f2421; }
.slide__btn--light:hover { background: #f1f1ef; }
.slide--center { grid-template-columns: minmax(0, 640px); justify-content: center; text-align: center; }
.slide--center p { margin-inline: auto; }
.slide--center .slide__veil { background: rgb(var(--veil-c) / var(--veil-a)); }
/* стрелки, точки и пауза: зона нажатия не меньше 32 px */
.slider__nav {
  position: absolute; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--nav-bg); color: var(--ink); box-shadow: var(--shadow-nav); display: grid; place-items: center;
  transition: background .15s, transform .1s;
}
.slider__nav:hover { background: var(--float); }
.slider__nav:active { transform: scale(.95); }
.slider__nav:focus-visible, .slider__dots button:focus-visible, .slider__pause:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.slider__nav--prev { right: 70px; }
.slider__nav--next { right: 18px; }
.slider__bar { position: absolute; left: 40px; bottom: 14px; z-index: 2; display: flex; align-items: center; color: var(--dots-ink); }
.slider.is-center .slider__bar { left: 50%; transform: translateX(-50%); }
.slider__dots { display: flex; }
.slider__dots button { width: 36px; height: 44px; border: 0; background: none; padding: 0; color: inherit; display: grid; place-items: center; }
.slider__dots button::before { content: ''; width: 26px; height: 4px; border-radius: 2px; background: currentColor; opacity: .28; transition: opacity .2s, width .2s; }
.slider__dots button:hover::before { opacity: .55; }
.slider__dots button[aria-current="true"]::before { opacity: 1; }
.slider__pause { width: 36px; height: 44px; border: 0; background: none; padding: 0; color: inherit; display: grid; place-items: center; opacity: .75; }
.slider__pause:hover { opacity: 1; }
.slider__pause .ico { width: 18px; height: 18px; }
.slider__pause .ico path { fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .slider__track { transition: none; }
}

.week { display: flex; flex-direction: column; gap: 12px; }
.week__item { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; flex: 1; }
.week__item:hover { box-shadow: var(--shadow); }
.week__img { background: var(--photo-bg); border-radius: var(--radius-sm); aspect-ratio: 4/3; overflow: hidden; }
.week__img img.art { width: 100%; height: 100%; object-fit: contain; }
.week__label { font-size: 12px; font-weight: 700; color: var(--sale); text-transform: uppercase; letter-spacing: .04em; }
.week__name { font-weight: 600; font-size: 14px; line-height: 1.3; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.week__price { font-weight: 800; font-size: 17px; }

.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; transition: box-shadow .2s; }
.cat-tile:hover { box-shadow: var(--shadow); }
.cat-tile .art { background: var(--photo-bg); border-radius: var(--radius-sm); aspect-ratio: 4/3; width: 100%; }
.cat-tile small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }

.rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.room {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 180px;
  border-radius: var(--radius); padding: 18px; overflow: hidden; font-weight: 800; font-size: 20px;
  color: #1f2421; /* фон плитки задаёт владелец, он светлый на любой палитре: текст тёмный */
}
.room .art { position: absolute; right: -8px; bottom: -6px; width: 62%; }
.room span { position: relative; }
.room small { position: relative; font-size: 13px; font-weight: 600; opacity: .7; }
.room:hover .art { transform: scale(1.04); }
.room .art { transition: transform .3s; }

.kits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.kit__scene { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--photo-bg); padding: 12px 8px 0; align-items: end; }
.kit__scene .art { width: 100%; }
.kit__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kit__title { font-size: 18px; font-weight: 800; }
.kit__list { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.kit__list li { display: flex; justify-content: space-between; gap: 8px; }
.kit__list a:hover { color: var(--accent); }
.kit__list span { white-space: nowrap; font-weight: 600; }
.kit__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: auto; }
.kit__total b { font-size: 20px; }

.advantages { background: var(--adv-bg, var(--accent)); color: var(--adv-ink, var(--on-accent)); border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 32px; }
.advantages h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.advantages p { opacity: .8; }
.advantages .btn { color: var(--ink); border-color: var(--adv-ink, var(--on-accent)); }
.adv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-content: start; }
.adv { display: flex; gap: 14px; }
.adv__ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, currentColor 14%, transparent); display: grid; place-items: center; }
.adv__ico .ico { stroke: currentColor; }
.adv b { display: block; margin-bottom: 2px; }
.adv span { opacity: .8; font-size: 14px; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); padding-top: 24px; }
.stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.stat span { opacity: .8; font-size: 14px; }

/* Текст о магазине внизу главной: спокойный, узкой колонкой, чтобы читался и не спорил с витриной. */
.about-text { max-width: 860px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.about-text h2 { color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; }
.about-text p { margin: 0; }
.about-text p + p { margin-top: 10px; }

.subscribe { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: var(--tile); border-radius: 24px; padding: 36px 40px; }
.subscribe h2 { font-size: 26px; font-weight: 800; }
.subscribe form { display: flex; gap: 8px; }
.subscribe input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); outline: none; }
.subscribe input:focus { border-color: var(--accent); }
.subscribe small { grid-column: 2; color: var(--muted); font-size: 12px; margin-top: -14px; }

/* ---------- подвал ---------- */
.footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 64px; padding: 48px 0 24px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer .logo { color: var(--footer-head); }
.footer h4 { color: var(--footer-head); margin: 0 0 12px; font-size: 15px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--footer-head); }
.footer__phone { font-size: 20px; font-weight: 800; color: var(--footer-head); display: block; margin: 16px 0 4px; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--footer-head) 8%, transparent); color: var(--footer-head); transition: background .15s; }
.footer__social a:hover, .footer__social a:focus-visible { background: color-mix(in srgb, var(--footer-head) 20%, transparent); }
.footer__social a[data-net="vk"]:hover { background: #0077ff; color: #fff; }
.footer__social a[data-net="telegram"]:hover { background: #26a5e4; color: #fff; }
.footer__social a[data-net="ok"]:hover { background: #ee8208; color: #fff; }
.footer__social a[data-net="youtube"]:hover { background: #ff0000; color: #fff; }
.footer__social a[data-net="tiktok"]:hover { background: #000; color: #fff; }
.footer__social a[data-net="pinterest"]:hover { background: #e60023; color: #fff; }
.footer__social svg { width: 20px; height: 20px; fill: currentColor; }
.footer__bottom { border-top: 1px solid color-mix(in srgb, var(--footer-head) 10%, transparent); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--footer-dim); font-size: 13px; }

/* ---------- хлебные крошки, страницы ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 20px 0 12px; }
.crumbs a:hover { color: var(--accent); }
.crumbs span::before { content: "/"; margin-right: 6px; opacity: .5; }
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.page-title sup { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 6px; }

/* ---------- каталог ---------- */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 130px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 150px); overflow-y: auto; }
.filters__head { display: none; }
.fgroup h4 { margin: 0 0 8px; font-size: 14px; }
.fgroup label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.fgroup input[type=checkbox], .fgroup input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.fgroup .count { color: var(--muted); font-size: 12px; margin-left: auto; }
.frange { display: flex; gap: 8px; }
.frange input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.frange input:focus { border-color: var(--accent); }
.fcolors { display: flex; flex-wrap: wrap; gap: 8px; }
.fcolors label { padding: 0; }
.fcolors input { position: absolute; opacity: 0; pointer-events: none; }
.fcolors .swatch { width: 26px; height: 26px; display: block; }
.fcolors input:checked + .swatch { box-shadow: 0 0 0 2px var(--accent); }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select { height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.toolbar .filters-toggle { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip .ico { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); border: 0; font-size: 13px; font-weight: 600; }
.catalog .grid { grid-template-columns: repeat(3, 1fr); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pager button { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.pager button.is-active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pager__gap { align-self: center; color: var(--muted); padding: 0 2px; }
.empty { text-align: center; padding: 60px 16px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }
.empty h1, .empty h3 { font-size: 20px; margin-bottom: 8px; }

/* ---------- карточка товара (страница) ---------- */
.product { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
/* Фото товара показываем целиком: вертикальные снимки 3:4 и 9:16 не обрезаются, по бокам остаётся фон */
.gallery__main { background: var(--photo-bg); border-radius: 20px; aspect-ratio: 1 / 1; max-height: 80vh; position: relative; overflow: hidden; }
.gallery__main .art { width: 100%; height: 100%; }
.gallery__main img.art { object-fit: contain; cursor: zoom-in; transition: transform .25s ease-out; }
/* увеличение под курсором: точку увеличения ставит product.js */
.gallery__main.is-hover-zoom img.art { transform: scale(2); }
@media (prefers-reduced-motion: reduce) { .gallery__main img.art { transition: none; } }
.gallery__zoom { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--zoom-bg); color: var(--float-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.gallery__zoom:hover { background: var(--float); }
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100000; background: #0e1110; color: #fff; }
.viewer__stage { position: absolute; inset: 0 0 48px; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; }
.viewer__stage.is-zoomed { cursor: grab; }
.viewer__stage.is-zoomed:active { cursor: grabbing; }
.viewer__img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; background: #fff; }
.viewer__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.viewer__btn:hover, .viewer__btn:focus-visible { background: rgba(255,255,255,.24); outline: none; }
.viewer__btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.viewer__close { top: 12px; right: 12px; }
.viewer__prev { left: 12px; top: calc(50% - 48px); }
.viewer__next { right: 12px; top: calc(50% - 48px); }
.viewer__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display: flex; gap: 16px; align-items: center; justify-content: center; font-size: 14px; color: rgba(255,255,255,.8); padding: 0 16px; }
.viewer__hint { color: rgba(255,255,255,.55); }
@media (max-width: 640px) { .viewer__hint { display: none; } .viewer__prev, .viewer__next { width: 40px; height: 40px; } }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumbs button { width: 72px; aspect-ratio: 3 / 4; border-radius: 10px; border: 2px solid transparent; background: var(--photo-bg); padding: 2px; overflow: hidden; }
.gallery__thumbs img.art { object-fit: contain; }
.gallery__thumbs button.is-active { border-color: var(--accent); }
.pinfo { display: flex; flex-direction: column; gap: 18px; }
.pinfo h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pinfo__meta { display: flex; gap: 16px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.pinfo .price b { font-size: 32px; }
.pinfo .price s { font-size: 16px; }
.pinfo .price .disc { font-size: 15px; }
.opt h4 { margin: 0 0 8px; font-size: 14px; }
.opt h4 span { color: var(--muted); font-weight: 500; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.sizes button { height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.sizes button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.buy { display: flex; gap: 10px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); height: 44px; }
.qty button { width: 38px; height: 100%; border: 0; background: none; font-size: 18px; }
.qty input { width: 40px; text-align: center; border: 0; outline: none; background: none; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy .btn--accent { flex: 1; height: 52px; }
.fav-btn { width: 52px; height: 52px; padding: 0; }
/* условия под кнопкой «В корзину»: строка — значок, заголовок, текст */
.perks { border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.perk { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perk > .ico { color: var(--accent); }
.perk__title { font-weight: 700; padding-top: 1px; }
.perk__body { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; min-width: 0; }
.perk__body .muted { font-size: 13px; }
.perk__body [data-delivery-calc]:empty { display: none; }
.perks__more { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--accent); }
.perks__more:hover { text-decoration: underline; }
/* характеристики и описание — две колонки под карточкой, в тех же пропорциях, что фото и цена */
.pdetails { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; margin-top: 56px; }
.pdetails--wide { grid-template-columns: 1fr; }
.pdetails__col { min-width: 0; }
.pdetails__title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 16px; }
.pdetails .specs { grid-template-columns: 1fr; max-width: none; border-top: 1px solid var(--line); }
.pdetails--wide .specs { grid-template-columns: 1fr 1fr; border-top: 0; }
.pdetails .specs div { border-bottom-style: solid; padding: 12px 0; }
.pdetails .specs dd { overflow-wrap: anywhere; }
.pdetails .prose { font-size: 15px; }
.pdetails__text { white-space: pre-line; overflow-wrap: anywhere; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; max-width: 900px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
.prose { max-width: 820px; font-size: 16px; line-height: 1.65; }
.prose h2 { font-size: 22px; margin: 28px 0 10px; }
.prose h3 { font-size: 18px; margin: 22px 0 8px; }
.prose ul { padding-left: 20px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }

/* ---------- корзина ---------- */
.cart { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.cart > * { min-width: 0; } /* иначе колонка растягивается под форму промокода и на телефоне вылезает за экран */
.cart__list { display: flex; flex-direction: column; gap: 12px; }
.citem { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.citem__img { background: var(--photo-bg); border-radius: var(--radius-sm); aspect-ratio: 4/3; }
.citem__name { font-weight: 700; }
.citem__name:hover { color: var(--accent); }
.citem__opts { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.citem__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--sale); }
.citem__price { text-align: right; }
.citem__price b { display: block; font-size: 18px; white-space: nowrap; }
.citem__price s { font-size: 13px; color: var(--muted); }
.summary { position: sticky; top: 130px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.summary h3 { font-size: 20px; margin-bottom: 4px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary__row.sale { color: var(--sale); }
.summary__hint { font-size: 13px; margin-top: -6px; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.summary__total b { font-size: 26px; }
.summary .hint { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.summary .hint .ico { width: 16px; height: 16px; display: inline; vertical-align: -3px; color: var(--accent); }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.checkout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 12px; display: grid; gap: 14px; }
.checkout h3 { font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none; font-weight: 400; background: var(--field-bg); }
.field textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field.is-error input { border-color: var(--sale); }
.field .err { color: var(--sale); font-size: 12px; font-weight: 500; min-height: 0; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.radios label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; font-size: 14px; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radios input { accent-color: var(--accent); margin-top: 3px; }
.radios small { display: block; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.success { text-align: center; padding: 48px 20px; background: var(--surface); border-radius: 20px; border: 1px solid var(--line); max-width: 640px; margin: 20px auto; }
.success__ico { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin: 0 auto 16px; }
.success__ico .ico { width: 32px; height: 32px; color: var(--accent); stroke-width: 2.5; }

/* ---------- инфо-страницы ---------- */
.info { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.info__nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 130px; }
.info__nav a { padding: 9px 12px; border-radius: 8px; font-weight: 600; }
.info__nav a:hover { background: var(--tile); }
.info__nav a.is-active { background: var(--accent-soft); color: var(--accent); }
.info__body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.info__body .page-title { margin-bottom: 8px; }

/* ---------- тосты ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--toast-bg); color: var(--toast-ink); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow), 0 0 0 1px var(--toast-edge); font-size: 14px; display: flex; gap: 12px; align-items: center; animation: toast-in .25s ease-out; }
.toast a { color: var(--toast-link); font-weight: 700; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .rail__track { grid-auto-columns: calc((100% - 45px) / 4); }
  .grid--5 { grid-template-columns: repeat(4, 1fr); }
  .rail__nav--prev { left: -8px; } .rail__nav--next { right: -8px; }
}
@media (max-width: 1024px) {
  .topbar__hours, .toplinks { display: none; }
  .topbar__in { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; }
  .week { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .week__item { min-width: 280px; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .rail__track { grid-auto-columns: calc((100% - 30px) / 3); }
  .grid, .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .kits { grid-template-columns: 1fr 1fr; }
  .advantages { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .catalog .grid { grid-template-columns: repeat(3, 1fr); }
  .filters { position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(340px, 90vw); max-height: none; border-radius: 0; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow); }
  .filters.is-open { transform: none; }
  .filters__head { display: flex; justify-content: space-between; align-items: center; }
  .toolbar .filters-toggle { display: inline-flex; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .pdetails { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .cart { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .mega__in { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .header__in { height: 60px; gap: 8px; }
  .burger { display: inline-grid; }
  .catalog-btn, .catnav { display: none; }
  .logo { font-size: 18px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo small { display: none; }
  .hicon { padding: 4px 6px; font-size: 0; gap: 0; }
  .badge { right: 0; }
  .search-row { padding-bottom: 10px; }
  .header .search { display: none; }
  .header .search.search--mobile { display: flex; }
  .slider { min-height: 440px; border-radius: 16px; }
  .slide { grid-template-columns: 1fr; padding: 24px 20px 56px; align-content: start; }
  .slide--img { align-content: start; }
  .slide h2 { font-size: 28px; }
  .slide p { margin-bottom: 16px; }
  .slide .art { max-height: 170px; }
  .slide__media img { object-fit: var(--fit-m, var(--fit, cover)); object-position: var(--pos-m, var(--pos, 50% 50%));
    transform: scale(var(--zoom-m, var(--zoom, 1))); transform-origin: var(--pos-m, var(--pos, 50% 50%)); }
  /* на телефоне своё расположение: фото на весь баннер вместо свободной картинки или наоборот */
  .slide--free:not(.slide--free-m) .slide__media img { position: static; width: 100%; height: 100%; object-fit: var(--fit-m, cover);
    transform: scale(var(--zoom-m, 1)); }
  .slide--free-m .slide__media img { position: absolute; left: var(--x-m); top: var(--y-m); width: auto; height: var(--h-m); max-width: none;
    object-fit: fill; transform: translate(-50%, -50%); }
  .slide--right:not(.slide--no-art) { grid-template-columns: 1fr; }
  /* редактор на телефоне: текст сверху вниз во всю ширину, своё выравнивание и размеры (заданы для ширины 358 px) */
  .slide--design { display: flex; flex-direction: column; justify-content: var(--bjm); }
  .slide--design .slide__body { position: relative; left: auto; top: auto; width: auto; transform: none; text-align: var(--btam); align-self: stretch; }
  .slide--design .slide__kicker { font-size: calc(min(calc(var(--fkm) * 1px), calc(var(--fkm) * 100cqw / 358)) * var(--fitP, 1)); }
  .slide--design h2 { font-size: calc(min(calc(var(--ftm) * 1px), calc(var(--ftm) * 100cqw / 358)) * var(--fitT, 1)); }
  .slide--design p { font-size: calc(min(calc(var(--fpm) * 1px), calc(var(--fpm) * 100cqw / 358)) * var(--fitP, 1)); }
  .slide--design .art { left: var(--x-m); top: var(--y-m); height: var(--h-m); }
  .slide--plate .slide__body { padding: 16px 18px; border-radius: 14px; }
  .slide--right .art { order: 0; }
  .slide--img .slide__veil, .slide--right.slide--img .slide__veil { background: linear-gradient(180deg, rgb(var(--veil-c) / var(--veil-a)) 0%, rgb(var(--veil-c) / calc(var(--veil-a) * .8)) 50%, rgb(var(--veil-c) / 0) 85%); }
  .slide--center .slide__veil { background: rgb(var(--veil-c) / var(--veil-a)); }
  .slider__nav { display: none; }
  .slider__bar { left: 10px; bottom: 6px; }
  .section { margin-block: 36px; }
  .section__title { font-size: 22px; }
  .cats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-tile { padding: 8px; font-size: 13px; }
  .cat-tile small { display: none; }
  .rooms { grid-template-columns: 1fr 1fr; }
  .room { min-height: 130px; font-size: 16px; padding: 14px; }
  .rail__track { grid-auto-columns: 72%; }
  .rail__nav { display: none; }
  .grid, .grid--5, .catalog .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__body { padding: 10px; }
  .price b { font-size: 16px; }
  .card__title { font-size: 14px; }
  .dims { display: none; }
  .kits { grid-template-columns: 1fr; }
  .advantages { padding: 24px 20px; border-radius: 18px; }
  .advantages h2 { font-size: 24px; }
  .adv-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 26px; }
  .subscribe { grid-template-columns: 1fr; padding: 24px 20px; }
  .subscribe small { grid-column: 1; margin-top: -16px; }
  .subscribe form { flex-direction: column; }
  .page-title { font-size: 24px; }
  .pinfo h1 { font-size: 22px; }
  .gallery__main { aspect-ratio: 3 / 4; }
  .pinfo .price b { font-size: 26px; }
  .specs, .pdetails--wide .specs { grid-template-columns: 1fr; }
  .pdetails__title { font-size: 20px; }
  .perk { grid-template-columns: 22px 80px minmax(0, 1fr); gap: 10px; }
  .citem { grid-template-columns: 96px 1fr; }
  .citem__price { grid-column: 2; text-align: left; }
  .fields-2 { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; }
  .info__nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .info__nav a { white-space: nowrap; }
  .info__body { padding: 20px; }
  .mega__in { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (min-width: 761px) {
  .search--mobile { display: none !important; }
}

/* ---------- фотографии товаров и сообщения формы ---------- */
img.art { width: 100%; height: 100%; object-fit: cover; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.form-error { background: var(--sale-soft); color: var(--error-ink); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.form-error[hidden], .field[hidden] { display: none; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- документы и cookie ---------- */
.info__date { margin: -8px 0 16px; font-size: 14px; }
.prose blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose img { border-radius: var(--radius-sm); height: auto; margin: 12px 0; }
.prose figure { margin: 16px 0; }
.prose figcaption { color: var(--muted); font-size: 14px; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose a.btn { color: inherit; text-decoration: none; }
.prose a.btn--accent { color: var(--on-accent); }
.check--top { align-items: flex-start; }
.check--top input { flex: none; margin-top: 3px; }
.link { color: var(--accent); text-decoration: underline; }
.subscribe form { flex-wrap: wrap; }
.subscribe__consent { flex: 1 0 100%; font-size: 12px; color: var(--muted); }
.subscribe__consent input { flex: none; height: 16px; }
.footer__bottom { flex-wrap: wrap; gap: 8px 24px; }
.footer__bottom a { text-decoration: underline; }
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 70; max-width: 460px; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; font-size: 13px; }
.cookie a { text-decoration: underline; }
.cookie .btn { flex: none; }

/* ---------- промокод ---------- */
.promo { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
.promo input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); text-transform: uppercase; outline: none; background: var(--field-bg); }
.promo input:focus { border-color: var(--accent); }
.promo input::placeholder { text-transform: none; }
.promo--on { justify-content: space-between; padding: 8px 12px; background: var(--accent-soft); border-radius: var(--radius-sm); }
.promo--on b { color: var(--accent); }
.promo--on small { display: block; color: var(--muted); font-size: 12px; }
.promo__error { color: var(--sale); font-size: 13px; margin-bottom: 4px; }
.linkbtn { border: 0; background: none; padding: 0; text-decoration: underline; color: var(--muted); font-size: 13px; }

/* ---------- лента ---------- */
.feed-head { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.feed-head p { margin: 4px 0 0; }
.feed-search { flex: 0 1 340px; }
.feed-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.feed-tabs small { color: var(--muted); font-weight: 500; }
.feed-tags { margin-bottom: 16px; flex-wrap: wrap; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feed-more { display: flex; justify-content: center; margin: 28px 0 8px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card--pinned { border-color: var(--accent); }
/* Рамка превью всегда 16:9: картинка лежит поверх и не растягивает карточку (квадратная растягивала весь ряд) */
.post-card__img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--photo-bg); overflow: hidden; }
.post-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card__img--fit img { object-fit: contain; }
.post-card__img--fit .post-card__backdrop { object-fit: cover; filter: blur(18px) brightness(.9); transform: scale(1.15); }
.post-card__time { position: absolute; left: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.post-card__blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.post-card__blank svg { width: 40px; height: 40px; }
.post-card__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.post-card__play svg { fill: currentColor; }
.post-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.post-card__body h3 { font-size: 17px; }
.post-card__body h3 a:hover { color: var(--accent); }
.post-card__body p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.tag--kind { position: static; background: var(--accent-soft); color: var(--accent); }
.post { max-width: 860px; }
.post__lead { font-size: 18px; color: var(--muted); margin: 8px 0 0; }
.post__head { margin-bottom: 20px; }
.post__head .page-title { margin: 10px 0 0; }
.post__cover { width: 100%; max-height: 80vh; object-fit: contain; background: var(--photo-bg); border-radius: var(--radius); margin-bottom: 20px; }
.post__body { margin-bottom: 20px; }
.post-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.post-media__item { margin: 0; min-width: 0; }
.post-media__item--wide { grid-column: 1 / -1; }
.post-media__item figcaption { color: var(--muted); font-size: 13px; margin-top: 4px; }
.post-media__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.post-media__open img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--photo-bg); border-radius: var(--radius-sm); }
.post-media iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); background: #000; }
/* Своё видео — в его пропорциях: горизонтальное во всю ширину, вертикальное 9:16 по высоте экрана */
.post-media video { display: block; width: auto; max-width: 100%; max-height: 80vh; margin-inline: auto; border-radius: var(--radius-sm); background: #000; }
.post__tags { flex-wrap: wrap; margin: 16px 0; }
.post__share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0; }
.post__share-label { font-weight: 700; font-size: 14px; margin-right: 4px; }
.share-net { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent); transition: background .15s, color .15s; }
.share-net svg { width: 20px; height: 20px; fill: currentColor; }
.share-net:hover, .share-net:focus-visible { color: #fff; background: var(--net); text-decoration: none; }
.share-net[data-share="vk"] { --net: #0077ff; }
.share-net[data-share="ok"] { --net: #ee8208; }
.share-net[data-share="telegram"] { --net: #26a5e4; }
.share-net[data-share="pinterest"] { --net: #e60023; }
.post__nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.post__nav a { flex: 0 1 48%; font-weight: 600; }
.post__nav a:hover { color: var(--accent); }
.post__nav small { display: block; color: var(--muted); font-weight: 400; }
.post__nav-old { text-align: right; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(0, 0, 0, .88); padding: 24px; }
.lightbox figure { margin: 0; max-width: 100%; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; margin: auto; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 8px; }
.lightbox__close, .lightbox__nav { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
@media (max-width: 900px) {
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-head { flex-direction: column; align-items: stretch; }
  .feed-search { flex: none; }
}
@media (max-width: 600px) {
  .feed-grid { grid-template-columns: 1fr; }
  .cookie { left: 8px; right: 8px; bottom: 8px; max-width: none; }
}

/* ---------- оплата и готовый HTML ---------- */
.pay__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.seo-page { padding-top: 24px; }
.seo-page img { max-width: 100%; height: auto; }

/* ---------- консультант ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px; border: 0; border-radius: 26px; background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: var(--shadow); }
.chat-fab:hover { background: var(--accent-2); }
.chat-fab[hidden] { display: none; }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 400px; height: min(640px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line); }
.chat__head > div { flex: 1; min-width: 0; }
.chat__head small { display: block; color: var(--muted); font-size: 12px; }
.chat__new { white-space: nowrap; }
.chat__log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.chat-msg { max-width: 86%; align-self: flex-start; font-size: 14px; }
.chat-msg small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.chat-msg__text { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; overflow-wrap: anywhere; }
.chat-msg__text p { margin: 0; }
.chat-msg__text p + p { margin-top: 6px; }
.chat-msg__text ul { margin: 4px 0; padding-left: 18px; }
.chat-msg__text:empty { display: none; }
.chat-msg--user { align-self: flex-end; }
.chat-msg--user .chat-msg__text { background: var(--accent); border-color: var(--accent); color: var(--on-accent); border-radius: 14px 14px 4px 14px; }
.chat-msg--operator .chat-msg__text { background: var(--accent-soft); border-color: var(--accent-soft); }
.chat-typing { display: flex; gap: 4px; align-self: flex-start; padding: 12px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chat-dot 1.2s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.chat-products { display: flex; flex-direction: column; gap: 8px; }
.chat-product { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.chat-product__img { display: block; width: 76px; height: 76px; background: var(--photo-bg); border-radius: 8px; overflow: hidden; }
.chat-product__img img { width: 100%; height: 100%; object-fit: cover; }
.chat-product__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; margin-bottom: 2px; }
.chat-product .price { margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.chat-product .price s { color: var(--muted); font-size: 12px; }
.chat-lead { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.chat-lead input:not([type=checkbox]), .chat-lead textarea { width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; outline: none; resize: vertical; background: var(--field-bg); }
.chat-lead input:focus, .chat-lead textarea:focus { border-color: var(--accent); }
.chat-lead .check { font-size: 12px; }
.chat-lead a { text-decoration: underline; }
.chat-lead__error { color: var(--sale); }
.chat__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: var(--bg); }
.chat__quick:not(:empty) { padding-bottom: 10px; }
.chat__quick button { padding: 6px 12px; border: 1px solid var(--accent); border-radius: 16px; background: var(--surface); color: var(--accent); font-size: 13px; }
.chat__form { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--line); }
.chat__form textarea { flex: 1; min-width: 0; max-height: 120px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; outline: none; resize: none; background: var(--field-bg); }
.chat__form textarea:focus { border-color: var(--accent); }
.chat__form .btn { flex: none; width: 44px; padding: 0; }
.chat__note { margin: 0; padding: 0 12px 8px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.chat__note a { text-decoration: underline; }
@media (max-width: 600px) {
  .chat { inset: 0; width: auto; height: 100dvh; border: 0; border-radius: 0; }
  .chat-fab { right: 12px; bottom: 12px; height: 48px; padding: 0 16px; }
  body.chat-open { overflow: hidden; }
  .cookie ~ .chat-fab { bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .chat-typing i { animation: none; } }

/* Текст для поисковиков виден только без JavaScript: иначе он мелькает до отрисовки витрины. */
.seo-page { display: none; }
#page:has(> .seo-page)::before { content: ""; display: block; height: 70vh; margin: 16px auto; max-width: 1280px; border-radius: 20px;
  background: linear-gradient(90deg, var(--tile) 25%, var(--skeleton-hi) 50%, var(--tile) 75%); background-size: 200% 100%; animation: page-wait 1.2s linear infinite; }
@keyframes page-wait { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #page:has(> .seo-page)::before { animation: none; } }

/* ---------- «Поделиться» в карточке товара ---------- */
.share { position: relative; margin-left: auto; }
/* Открытое меню выше плашки cookie (z-index 70), закрытая кнопка — под липкой шапкой. */
.share:has(.share__menu:not([hidden])) { z-index: 75; }
.share__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; margin: -4px -10px -4px 0;
  border: 0; border-radius: 8px; background: none; color: var(--accent); font-weight: 700; font-size: 14px;
}
.share__btn:hover, .share__btn[aria-expanded="true"] { background: var(--accent-soft); }
.share__btn .ico { width: 18px; height: 18px; }
.share__menu {
  position: absolute; right: -10px; top: calc(100% + 8px); z-index: 30; min-width: 230px; display: flex; flex-direction: column;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.share__menu[hidden] { display: none; }
.share__item {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; white-space: nowrap;
}
.share__item:hover, .share__item:focus-visible { background: var(--tile); outline: none; }
.share__item > .ico { width: 20px; height: 20px; margin: 0 4px; color: var(--muted); }
.share__item.is-done, .share__item.is-done > .ico { color: var(--accent); }
.share__mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.share__mark .ico { width: 15px; height: 15px; stroke: #fff; }
/* на телефоне только значок: строка с рейтингом и артикулом не переносится ради кнопки */
@media (max-width: 480px) {
  .share__btn { width: 36px; height: 36px; padding: 0; justify-content: center; margin: -6px -6px -6px 0; }
  .share__btn .ico { width: 20px; height: 20px; }
  .share__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- доступность и мелкая вёрстка на узких экранах ---------- */
/* Видимый фокус: у этих полей рамка лишь меняла оттенок, с клавиатуры его было не разглядеть. */
.search input:focus-visible, .frange input:focus-visible, .subscribe input:focus-visible, .promo input:focus-visible,
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .pek-calc__form input:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px;
}
.qty input:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.citem--off { opacity: .8; }
.citem__off { color: var(--sale); font-weight: 600; }
/* Таблицы в текстах страниц (cookie, доставка) не шире экрана: на телефоне они прокручиваются сами. */
.prose table { display: block; max-width: 100%; overflow-x: auto; }
/* Колонки страницы «Информация» не растягиваются по ширине ряда ссылок (он прокручивается сам). */
.info > * { min-width: 0; }
@media (max-width: 400px) {
  .buy { flex-wrap: wrap; }
  .buy .btn--accent { flex: 1 1 140px; min-width: 0; }
}

/* ---------- оформление: кнопка светлой/тёмной темы и плашка предпросмотра (theme.js) ---------- */
.theme-toggle { border: 0; background: none; cursor: pointer; } /* размер подписи — от .hicon: на телефоне только значок */
.theme-toggle:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 1px; }
.theme-preview { position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.theme-preview button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--bg); color: var(--ink); font-weight: 700; }
@media print { .theme-toggle, .theme-preview { display: none; } }
