:root {
  --bg: #f4f5f7;
  --card: #fff;
  --ink: #14161a;
  --ink-2: #3c424d;
  --muted: #747b88;
  --line: #e4e7ec;
  --accent: #ff5a1f;
  --accent-ink: #d9430d;
  --ok: #12925a;
  --sale: #e11d48;
  --sale-bg: #ffe4ea;
  --surface: #fff;          /* поля, кнопки-плашки, выпадающие списки */
  --photo: #fff;            /* подложка под фото товара: белая в обеих темах — у фото белый фон */
  --line-strong: #c6ccd6;
  --accent-bg: #fff1ec;
  --err-ink: #a8320a;
  --inv-bg: #14161a;        /* «тёмные» кнопки и выбранные плашки; в тёмной теме становятся светлыми */
  --inv-ink: #fff;
  --inv-hover: #2a2e36;
  --hdr-bg: rgba(255, 255, 255, .92);
  --ftr-bg: #14161a;
  --ok-bg: #e3f6ec; --ok-ink: #0b6a40;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.card-name, .cart-info a, .tile-name, .prose, .pdp-lead, .thanks-row span, .crumbs a { overflow-wrap: anywhere; }
h1 { font-size: clamp(26px, 3.4vw, 36px); }
h2 { font-size: clamp(20px, 2.4vw, 26px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(255, 90, 31, .45); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.main { flex: 1; padding: 20px 0 56px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0;
  border-radius: 12px; font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }
.btn-dark { background: var(--inv-bg); color: var(--inv-ink); }
.btn-dark:hover { background: var(--inv-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-icon { width: 44px; padding: 0; flex: none; }
.btn.done { background: var(--ok); }

/* ---------- шапка ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--hdr-bg); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; align-items: center; gap: 16px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; flex: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 6px; border: 3px solid var(--accent); border-radius: 50%; }
.logo-light { color: #fff; }
.logo-light .logo-mark { background: #2a2e36; }

.search { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; height: 46px; padding: 0 50px 0 18px; border: 2px solid transparent; border-radius: 14px; background: var(--bg); outline: 0; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--ink); background: var(--surface); }
.search input::-webkit-search-cancel-button { display: none; }
.search > button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ink-2); }
.search > button:hover { background: var(--line); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border-radius: var(--r); box-shadow: 0 16px 48px rgba(20, 22, 26, .18); padding: 6px; z-index: 60; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.suggest a:hover, .suggest a.on { background: var(--bg); }
.suggest img, .suggest .noimg { width: 44px; height: 44px; object-fit: contain; flex: none; border-radius: 8px; background: var(--photo); }
.suggest span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.suggest b { font-size: 14px; white-space: nowrap; }
.suggest .all { justify-content: center; color: var(--accent-ink); font-weight: 600; font-size: 14px; }

.hdr-phone { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.hdr-phone small { color: var(--muted); font-size: 12px; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 14px; font-weight: 600; }
.cart-link:hover { background: var(--bg); }
.cart-badge { position: absolute; left: 26px; top: 4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 12px/20px var(--font); text-align: center; }
.cart-badge.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* меню каталога: слева разделы, справа — группы выбранного раздела */
.catmenu { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(20, 22, 26, .12); max-height: calc(100vh - 72px); overflow: auto; }
.cm { padding: 16px 0 20px; }
.cm-roots { list-style: none; margin: 0; padding: 0; position: relative; width: 300px; min-height: 320px; }
.cm-root-row { display: flex; align-items: center; }
.cm-root-link { flex: 1; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-weight: 600; color: var(--ink); min-width: 0; }
.cm-root.on > .cm-root-row .cm-root-link, .cm-root-link:hover { background: var(--bg); }
.cm-ico { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.cm-ico img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cm-more { display: none; }
.cm-panel { display: none; position: absolute; left: 324px; top: 0; width: calc(min(1280px, 100vw - 32px) - 324px); padding: 4px 0 0 28px; border-left: 1px solid var(--line); min-height: 100%; }
.cm-root.on > .cm-panel { display: block; }
.cm-title { display: inline-block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
.cm-title:hover, .cm-head:hover { color: var(--accent-ink); }
.cm-cols { columns: 3 220px; column-gap: 28px; }
.cm-group { break-inside: avoid; display: grid; gap: 2px; margin-bottom: 18px; }
.cm-head { font-weight: 650; padding: 4px 0; }
.cm-group a:not(.cm-head) { color: var(--ink-2); font-size: 15px; padding: 4px 0; }
.cm-group a:not(.cm-head):hover { color: var(--ink); text-decoration: underline; }
.catmenu small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 2px; }
.cm-all a { display: block; padding: 12px; color: var(--accent-ink); font-weight: 600; }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; padding: clamp(24px, 5vw, 56px); border-radius: 28px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #3a2418 0%, #1b1d22 45%, #14161a 100%); }
.hero h1 { font-size: clamp(28px, 4.2vw, 48px); letter-spacing: -.035em; }
.hero p { color: #b9bfca; font-size: clamp(16px, 1.5vw, 19px); max-width: 52ch; margin: 16px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero-points li { padding: 16px 18px; border-radius: var(--r); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 2px; }
.hero-points span { color: #a3aab6; font-size: 14px; }

.block { margin-top: 48px; }
.block.narrow { max-width: 860px; }
.block > h2 { margin-bottom: 16px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.block-head a { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { position: relative; min-height: 132px; padding: 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20, 22, 26, .05), 0 16px 36px rgba(20, 22, 26, .1); }
.tile-name { font-weight: 650; max-width: 62%; line-height: 1.25; }
.tile-count { color: var(--muted); font-size: 13px; }
.tile img { position: absolute; right: 8px; bottom: 8px; width: 92px; height: 92px; object-fit: contain; mix-blend-mode: multiply; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 550; transition: box-shadow .15s, background .15s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip.on { background: var(--inv-bg); color: var(--inv-ink); box-shadow: none; }
.quick { margin-bottom: 14px; }
.tiles-sub { margin-bottom: 24px; }
.chip small { color: var(--muted); font-weight: 400; }

/* ---------- карточка товара в списке ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20, 22, 26, .05), 0 16px 36px rgba(20, 22, 26, .1); }
.card-img { position: relative; display: block; aspect-ratio: 1; padding: 16px; background: var(--photo); }
.card-img img, .card-img .noimg { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.card-off .card-img img { opacity: .55; filter: grayscale(.4); }
.noimg { display: block; width: 100%; height: 100%; border-radius: 12px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c3c9d3' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='m4 18 5-5 3.5 3.5L15 14l5 5'/%3E%3C/svg%3E") center / 36% no-repeat; }
.noimg-lg { aspect-ratio: 1; }
.badge { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 3px 9px; border-radius: 8px; background: var(--sale); color: #fff; font-weight: 700; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 4px 16px 16px; flex: 1; }
.card-brand { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.card-name { font-weight: 550; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-name:hover { color: var(--accent-ink); }
.card-stock { font-size: 13px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.card-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card-stock.yes { color: var(--ok); }
.card-stock.no { color: var(--muted); }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 52px; }
/* цена: акционная — крупно и цветом, обычная — перечёркнута, рядом процент скидки */
.price { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; min-width: 0; }
.price b { font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.price-sale b { color: var(--sale); }
.price-old { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.price-old s { color: var(--muted); font-size: 13px; text-decoration-thickness: 1px; }
.price-old i { font-style: normal; font-weight: 700; font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 6px; background: var(--sale-bg); color: var(--sale); }
.price-ask { color: var(--muted); font-size: 14px; }
/* две цены: наличными (крупно) и картой */
.price-cash, .price-card { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; white-space: nowrap; }
.price-cash small, .price-card small { font-size: 12px; color: var(--muted); font-weight: 500; }
.price-card > span:first-child { font-size: 14px; font-weight: 600; }
.price-card .price-old { margin-left: 2px; }
.price-two.price-sale .price-cash b { color: inherit; }
.price-lg.price-two { flex-direction: column; align-items: flex-start; gap: 4px; }
.price-lg .price-cash small, .price-lg .price-card small { font-size: 14px; }
.price-lg .price-card > span:first-child { font-size: 20px; }
.price-hint { color: var(--muted); font-size: 14px; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-title { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
.pay label { position: relative; display: block; cursor: pointer; }
.pay input { position: absolute; opacity: 0; }
.pay label > span { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.pay small { color: var(--muted); font-size: 13px; }
.pay input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); }
.pay input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.price-lg { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.price-lg b { font-size: clamp(30px, 3.6vw, 40px); }
.price-lg .price-old { gap: 8px; }
.price-lg .price-old s { font-size: 18px; }
.price-lg .price-old i { font-size: 14px; line-height: 24px; padding: 0 8px; border-radius: 8px; }
.price-save { margin-top: -6px; color: var(--sale); font-weight: 600; font-size: 14px; }

/* ---------- каталог ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.crumbs a:hover { color: var(--ink); }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }
.filters { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 18px; }
.filters-head { display: none; }
.f-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.f-group legend { padding: 0; margin-bottom: 8px; font-weight: 650; }
.f-list { display: grid; gap: 2px; max-height: 232px; overflow: auto; margin-right: -6px; padding-right: 6px; }
.f-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-range input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; margin: 0; }
.check span { flex: 1; }
.check small { color: var(--muted); }
.check-strong { font-weight: 600; }
.filters-actions { display: grid; gap: 8px; }
.js .filters-actions .btn-dark { display: none; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.view-toggle { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.view-toggle a { width: 36px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.view-toggle a.on { background: var(--inv-bg); color: var(--inv-ink); }

/* список товаров строками: фото, характеристики, цена */
.rows { display: grid; gap: 10px; }
.row-card { display: grid; grid-template-columns: 180px minmax(0, 1fr) 210px; gap: 20px; align-items: start; padding: 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); transition: box-shadow .15s; }
.row-card:hover { box-shadow: 0 2px 4px rgba(20, 22, 26, .05), 0 16px 36px rgba(20, 22, 26, .1); }
.row-img { padding: 0; width: 180px; }
.row-img img, .row-img .noimg { inset: 0; width: 100%; height: 100%; }
.row-main { display: grid; gap: 6px; align-content: start; min-width: 0; }
.row-name { font-weight: 600; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.row-name:hover { color: var(--accent-ink); }
.row-specs { margin: 4px 0 0; display: grid; gap: 3px; font-size: 14px; }
.row-specs div { overflow-wrap: anywhere; }
.row-specs dt { display: inline; color: var(--muted); }
.row-specs dd { display: inline; margin: 0; }
.row-buy { display: grid; gap: 8px; align-content: start; }
.row-buy .price b { font-size: 22px; }
.row-delivery { font-size: 13px; color: var(--muted); }
.filters-open { display: none; }
.filters-open i { font-style: normal; background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; line-height: 20px; }
.sort { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; }
.sort select, .order-form select { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.results.loading .grid { opacity: .5; transition: opacity .15s; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center; border-radius: 12px; font-weight: 600; }
.pager a { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pager a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pager a.on { background: var(--inv-bg); color: var(--inv-ink); box-shadow: none; }
.cat-desc { margin-top: 32px; color: var(--ink-2); max-width: 80ch; white-space: pre-line; }

.empty { text-align: center; padding: 56px 20px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; }
.empty p { margin: 0 0 10px; color: var(--muted); max-width: 46ch; }

/* ---------- страница товара ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery { position: sticky; top: 88px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.gallery-main { --pad: clamp(16px, 3vw, 40px); position: relative; background: var(--photo); border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 1; }
.gallery-main img, .gallery-main .noimg { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); }
.gallery-main img { object-fit: scale-down; }
.gallery-main.zoomable { cursor: zoom-in; }
.gallery-main.zoomable::after { content: ""; position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 20px no-repeat; box-shadow: inset 0 0 0 1px var(--line); }

/* просмотр фото во весь экран */
.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #fff; animation: lb-in .15s ease-out; --ink: #14161a; --line: #e4e7ec; color: #14161a; }
@keyframes lb-in { from { opacity: 0; } }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 56px clamp(12px, 6vw, 88px) 12px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s ease-out; -webkit-user-drag: none; }
.lb-stage.can-zoom img { cursor: zoom-in; }
.lb-stage.zoomed, .lb-stage.zoomed img { cursor: zoom-out; }
.lb-close, .lb-nav { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { background: #f1f1f3; }
.lb-close { top: 10px; right: 12px; }
.lb-nav { top: calc(50% - 60px); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; z-index: 2; top: 20px; left: 16px; font-size: 14px; color: #6b7280; }
.lb-thumbs { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 8px 12px max(12px, env(safe-area-inset-bottom)); }
.lb-thumbs button { flex: none; width: 64px; height: 64px; padding: 5px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.lb-thumbs button.on { box-shadow: inset 0 0 0 2px var(--ink); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) {
  .lb-stage { padding: 56px 8px 8px; }
  .lb-nav { width: 38px; height: 38px; font-size: 26px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-thumbs button { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .lb, .lb-stage img { animation: none; transition: none; } }

.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.gallery-thumbs button { flex: none; width: 76px; height: 76px; padding: 6px; border: 0; border-radius: 14px; background: var(--photo); box-shadow: inset 0 0 0 1px var(--line); }
.gallery-thumbs button.on { box-shadow: inset 0 0 0 2px var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
.pdp-lead { margin: 0; color: var(--ink-2); font-size: 17px; }
.buybox { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; margin: 6px 0; }
.buy-row { display: flex; gap: 10px; }
.buy { flex: 1; }
.in-cart { color: var(--ok); font-weight: 600; }
.qty { display: inline-flex; align-items: center; height: 52px; border-radius: 14px; background: var(--bg); flex: none; }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 20px; border-radius: 14px; }
.qty button:hover { background: var(--line); }
.qty input { width: 44px; height: 100%; border: 0; background: none; text-align: center; font-weight: 650; -moz-appearance: textfield; appearance: textfield; outline: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.specs { margin: 0; display: grid; }
.specs div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.specs-short div { padding: 7px 0; font-size: 15px; }
.prose { white-space: pre-line; color: var(--ink-2); font-size: 17px; line-height: 1.65; }

.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); transition: transform .15s; }
.doc:hover { transform: translateY(-2px); }
.doc-ico { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-bg); color: var(--accent-ink); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.doc-text { display: grid; min-width: 0; }
.doc-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-text small { color: var(--muted); }

/* ---------- корзина и заказ ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.cart-list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 20px; }
.cart-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 120px 36px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-img { width: 84px; height: 84px; }
.cart-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-info { display: grid; gap: 4px; }
.cart-info a { font-weight: 550; line-height: 1.3; }
.cart-info a:hover { color: var(--accent-ink); }
.cart-info .muted { font-size: 13px; }
.cart-item .qty { height: 44px; }
.cart-sum { text-align: right; font-size: 18px; white-space: nowrap; }
.cart-del { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; font-size: 22px; color: var(--muted); }
.cart-del:hover { background: var(--bg); color: var(--ink); }

.order-form { position: sticky; top: 88px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 14px; }
.order-form > label:not(.check) { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.order-form input:not([type=checkbox]):not([type=radio]), .order-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 400; font-size: 16px; outline: 0; resize: vertical; }
.order-form input:focus, .order-form textarea:focus { border-color: var(--ink); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid rgba(255, 90, 31, .45); }
/* доставка в оформлении заказа */
.dlv { display: grid; gap: 14px; padding: 14px; border-radius: 16px; background: var(--bg); }
.dlv label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.dlv small { font-weight: 400; }
.dlv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.order-form .dlv select { width: 100%; height: 46px; border-radius: 12px; font-size: 16px; font-weight: 400; }
.dlv-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dlv-check { display: flex !important; align-items: center; height: 46px; font-weight: 500 !important; }
.addr { position: relative; }
.addr-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 4px 0 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 12px; box-shadow: 0 16px 40px rgba(20, 22, 26, .18); max-height: 280px; overflow: auto; font-weight: 400; }
.addr-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; display: flex; justify-content: space-between; gap: 10px; }
.addr-list li:hover, .addr-list li.on { background: var(--bg); }
.addr-list small { color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) { .dlv-row4 { grid-template-columns: 1fr 1fr; } }
.dlv-hint { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); }
.dlv-result { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 14px; transition: opacity .15s; }
.dlv-result.loading { opacity: .5; }
.dlv-result p { margin: 0; }
.dlv-head { display: grid; gap: 2px; }
.dlv-head b { font-size: 16px; }
.dlv-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dlv-lines li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dlv-lines span { min-width: 0; overflow-wrap: anywhere; }
.dlv-lines small { display: block; color: var(--muted); }
.dlv-lines b { white-space: nowrap; }
.dlv-err { color: var(--err-ink); font-weight: 550; }
.order-sum { display: grid; gap: 6px; font-size: 15px; }
.order-sum div { display: flex; justify-content: space-between; gap: 12px; }
.order-sum b { font-weight: 600; white-space: nowrap; }
.pdp-delivery { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }
.pdp-delivery svg { flex: none; margin-top: 2px; }
.pdp-delivery b { color: var(--ink); }
.tariffs { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.tariffs th, .tariffs td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.tariffs th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tariffs th:first-child, .tariffs td:first-child { text-align: left; }
.tariffs td:not(:first-child) { white-space: nowrap; font-weight: 600; }
.tariffs-wrap { overflow-x: auto; }
.tariffs th, .tariffs td { overflow-wrap: normal; word-break: normal; }
.tariffs td:first-child { min-width: 220px; }
/* на телефоне таблица не помещается — каждая строка становится карточкой с подписями */
@media (max-width: 760px) {
  .tariffs thead { display: none; }
  .tariffs, .tariffs tbody, .tariffs tr, .tariffs td { display: block; }
  .tariffs tr { padding: 12px 14px; margin-bottom: 10px; border-radius: var(--r); background: var(--bg); }
  .tariffs td { border: 0; padding: 0; text-align: left; white-space: normal; }
  .tariffs td:first-child { min-width: 0; font-weight: 650; color: var(--ink); margin-bottom: 8px; }
  .tariffs td[data-label] { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-weight: 600; }
  .tariffs td[data-label]::before { content: attr(data-label); font-weight: 400; color: var(--ink-2); }
}

.order-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); font-size: 17px; }
.order-total b { font-size: 26px; letter-spacing: -.02em; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--accent-bg); color: var(--err-ink); font-weight: 550; }

.thanks { max-width: 560px; margin: 32px auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.thanks p { margin: 0; color: var(--ink-2); }
.thanks-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 36px; display: grid; place-items: center; }
.thanks-icon-off { background: var(--muted); }
.order-status { font-size: 18px; }
.thanks-box { width: 100%; text-align: left; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 10px; margin: 8px 0; }
.thanks-row { display: flex; justify-content: space-between; gap: 16px; }
.thanks-row b { white-space: nowrap; }
.thanks-total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; }

/* ---------- сравнение ---------- */
.card { position: relative; }
.cmp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.cmp-btn:hover { color: var(--ink); background: var(--bg); }
.cmp-btn.on { color: var(--accent-ink); }
.cmp-corner { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 3px rgba(20, 22, 26, .12); }
.cmp-corner.on { background: #fff1ec; }
.cmp-text { height: 36px; padding: 0 10px; font-size: 14px; font-weight: 550; justify-self: start; }
.cmp-diff { margin-bottom: 12px; display: inline-flex; }
.cmp-wrap { overflow-x: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.cmp { border-collapse: collapse; width: 100%; }
.cmp th, .cmp td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 190px; overflow-wrap: anywhere; }
.cmp th { position: sticky; left: 0; z-index: 1; background: var(--card); color: var(--muted); font-weight: 500; min-width: 170px; width: 220px; }
.cmp tbody tr.diff td { font-weight: 600; }
.cmp tbody tr.diff th { color: var(--ink); }
.cmp.diff-only tr.same { display: none; }
.cmp-prod { position: relative; display: grid; gap: 8px; justify-items: start; }
.cmp-img { width: 140px; height: 140px; display: block; position: relative; }
.cmp-img img, .cmp-img .noimg { width: 100%; height: 100%; object-fit: contain; }
.cmp-name { font-weight: 600; line-height: 1.3; }
.cmp-name:hover { color: var(--accent-ink); }
.cmp-price { font-size: 19px; }
.cmp-x { position: absolute; right: 0; top: 0; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 18px; cursor: pointer; z-index: 1; }
.cmp-x:hover { background: var(--line); color: var(--ink); }

/* ---------- личный кабинет ---------- */
.auth { max-width: 440px; margin: 24px auto; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 32px); display: grid; gap: 14px; }
.auth > label:not(.check) { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.auth input:not([type=checkbox]) { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; font-weight: 400; outline: 0; }
.auth input:focus { border-color: var(--ink); }
.auth p { margin: 0; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.note-ok { padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 550; margin-bottom: 12px; }
.acc { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.acc h2 { margin-bottom: 12px; }
.acc-side { display: grid; gap: 16px; }
.acc-side .order-form { position: static; }
.acc-side input[readonly] { background: var(--bg); color: var(--muted); }
.acc-list { display: grid; gap: 10px; }
.acc-order { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .15s; }
.acc-order:hover { transform: translateY(-2px); }
.acc-order > div { display: grid; gap: 4px; min-width: 0; }
.acc-order .muted { font-size: 14px; }
.acc-order-side { text-align: right; justify-items: end; }
.acc-order-side b { font-size: 18px; white-space: nowrap; }
.st { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.st-new { background: #fff0e0; color: #a14a00; }
.st-processing { background: #e4edff; color: #1d3fae; }
.st-done { background: var(--ok-bg); color: var(--ok-ink); }
.st-canceled { background: #fdeae6; color: #9c2613; }
.page-head form { margin-left: auto; }

/* ---------- подвал, уведомления ---------- */
.ftr { background: var(--ftr-bg); color: #c9ced7; padding: 40px 0 20px; font-size: 15px; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }

/* ---------- информационные страницы ---------- */
.info { max-width: 820px; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 44px); }
.info h1 { margin-bottom: 20px; }
.info-text { color: var(--ink-2); font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.info-text h2 { margin: 28px 0 10px; font-size: 22px; color: var(--ink); }
.info-text h3 { margin: 20px 0 8px; font-size: 18px; color: var(--ink); }
.info-text p { margin: 0 0 12px; }
.info-text ul, .info-text ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 4px; }
.info-text a { color: var(--accent-ink); text-decoration: underline; }
.info-text > :first-child { margin-top: 0; }
.contact-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.contact-card div { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--bg); }
.contact-card span { color: var(--muted); font-size: 13px; }
.contact-card a, .contact-card b { font-weight: 650; font-size: 17px; overflow-wrap: anywhere; }
.ftr h4 { color: #fff; margin-bottom: 10px; font-size: 15px; }
.ftr-grid > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ftr a:hover { color: #fff; }
.ftr-note { margin: 12px 0 0; max-width: 38ch; color: #8b93a1; font-size: 14px; }
.ftr-copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid #2a2e36; color: #8b93a1; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--inv-bg); color: var(--inv-ink); box-shadow: 0 16px 40px rgba(20, 22, 26, .3); animation: rise .2s; }
.toast a { color: #fff; background: var(--accent); padding: 6px 12px; border-radius: 9px; font-weight: 600; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .hdr-compare span, .hdr-account span { display: none; }
  .row-card { grid-template-columns: 140px minmax(0, 1fr); }
  .row-img { width: 140px; }
  .row-buy { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; }
  .cm-cols { columns: 2 200px; }
  .hero { grid-template-columns: 1fr; }
  .hero-points { grid-template-columns: repeat(3, 1fr); }
  .hdr-phone { display: none; }
  .checkout { grid-template-columns: 1fr; }
  .order-form { position: static; }

  .layout { grid-template-columns: minmax(0, 1fr); }
  .results { min-width: 0; }
  .filters-open { display: inline-flex; }
  .filters { position: fixed; inset: 0 0 0 auto; width: min(360px, 100%); max-height: none; z-index: 80; border-radius: 0; transform: translateX(105%); transition: transform .22s; align-content: start; }
  .filters.open { transform: none; box-shadow: 0 0 0 100vmax rgba(20, 22, 26, .45); }
  .filters-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
  .js .filters-actions .btn-dark { display: inline-flex; }
}

@media (max-width: 760px) {
  .hdr-row { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .logo { order: 1; margin-right: auto; font-size: 18px; }
  .cart-link { order: 2; padding: 0 10px; }
  .cart-link span { display: none; }
  .cart-badge { left: 24px; }
  .cat-btn { order: 3; width: 46px; height: 46px; padding: 0; }
  .cat-btn span { display: none; }
  .search { order: 4; flex-basis: calc(100% - 56px); }
  .catmenu { max-height: calc(100vh - 124px); }
  .cm-roots { width: auto; min-height: 0; }
  .cm-more { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; }
  .cm-more::before { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s; }
  .cm-root.open .cm-more::before { transform: rotate(-135deg); }
  .cm-panel, .cm-root.on > .cm-panel { display: none; position: static; width: auto; border: 0; padding: 4px 0 8px 56px; min-height: 0; }
  .cm-root.open > .cm-panel { display: block; }
  .cm-root.on > .cm-root-row .cm-root-link { background: none; }
  .cm-title { display: none; }
  .cm-cols { columns: auto; }
  .cm-group { margin-bottom: 10px; }
  .row-card { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .row-img { width: 96px; }
  .row-name { font-size: 15px; }
  .row-specs { font-size: 13px; }
  .row-specs div:nth-child(n + 4) { display: none; }
  .row-buy { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
  .row-buy .price { grid-row: 1 / 3; }
  .row-buy .btn { grid-column: 2; grid-row: 1 / 3; }
  .row-buy .card-stock, .row-delivery { display: none; }

  .hero { border-radius: 20px; }
  .hero-points { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-img { padding: 10px; }
  .card-img img, .card-img .noimg { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
  .card-body { padding: 2px 12px 12px; }
  .card-name { font-size: 14px; }
  .price b { font-size: 17px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { min-height: 116px; padding: 14px; }
  .tile-name { max-width: 100%; font-size: 15px; }
  .tile img { width: 64px; height: 64px; opacity: .9; }
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .chips-scroll .chip { white-space: nowrap; }
  .sort .muted { display: none; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .sort { flex: 1; min-width: 0; margin-left: 0; }
  .sort select { width: 100%; min-width: 0; }
  .quick { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .quick .chip { white-space: nowrap; flex: none; }

  .pdp { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gallery { position: static; }
  .cart-list { padding: 0 14px; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 10px 12px; }
  .cart-img { width: 64px; height: 64px; }
  .cart-item .qty { grid-column: 2; grid-row: 2; justify-self: start; }
  .cart-sum { grid-column: 2 / 4; grid-row: 2; align-self: center; }
  .cart-del { grid-column: 3; grid-row: 1; }
  .ftr-grid { grid-template-columns: 1fr; gap: 24px; }
  .hdr-compare span, .hdr-account span { display: none; }
  .hdr-compare, .hdr-account { order: 2; padding: 0 8px; }
  .hdr-compare .cart-badge { left: 22px; }
  .acc { grid-template-columns: minmax(0, 1fr); }
  .acc-order { flex-direction: column; gap: 8px; }
  .acc-order-side { text-align: left; justify-items: start; }
  .cmp th { min-width: 110px; width: 110px; font-size: 13px; padding: 10px 8px; }
  .cmp td { min-width: 150px; padding: 10px 8px; }
  .cmp-img { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- переключатель темы ---------- */
.theme-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: none; color: var(--ink-2); }
.theme-btn:hover { background: var(--bg); color: var(--ink); }
.theme-btn .moon, :root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
.ftr .theme-btn { width: auto; height: auto; padding: 0; display: inline-flex; gap: 8px; align-items: center; color: inherit; font-size: 14px; }
.ftr .theme-btn:hover { background: none; color: #fff; }
html:not(.js) .theme-btn { display: none; }
@media (max-width: 720px) { .hdr .theme-btn { display: none; } }

/* ---------- тёмная тема ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1114;
  --card: #191c21;
  --surface: #21252c;
  --ink: #f1f3f5;
  --ink-2: #c5cad3;
  --muted: #9199a8;
  --line: #2d323b;
  --line-strong: #454c59;
  --accent: #ff6a33;
  --accent-ink: #ff9166;
  --accent-bg: #3a2016;
  --err-ink: #ffa184;
  --ok: #3ccb8c;
  --ok-bg: #12301f; --ok-ink: #7fe0b0;
  --sale: #ff6384;
  --sale-bg: #45151f;
  --inv-bg: #f1f3f5;
  --inv-ink: #14161a;
  --inv-hover: #dde1e7;
  --hdr-bg: rgba(15, 17, 20, .9);
  --ftr-bg: #0a0b0d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
}
/* фото товаров сняты на белом фоне: в тёмной теме у них остаётся белая подложка со скруглением */
:root[data-theme="dark"] .tile img, :root[data-theme="dark"] .cm-ico img { mix-blend-mode: normal; background: #fff; border-radius: 10px; padding: 3px; }
:root[data-theme="dark"] .cart-img img, :root[data-theme="dark"] .cmp-img img { background: #fff; border-radius: 10px; padding: 4px; }
:root[data-theme="dark"] .cmp-corner { color: #5b6472; }
:root[data-theme="dark"] .cmp-corner.on { color: #d9430d; }
:root[data-theme="dark"] .toast { box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .st-new { background: #3d2a12; color: #ffc078; }
:root[data-theme="dark"] .st-processing { background: #18264d; color: #9db8ff; }
:root[data-theme="dark"] .st-canceled { background: #3e1a15; color: #ff9d8c; }
:root[data-theme="dark"] .card:hover, :root[data-theme="dark"] .tile:hover, :root[data-theme="dark"] .row-card:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 36px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .suggest, :root[data-theme="dark"] .addr-list, :root[data-theme="dark"] .catmenu { box-shadow: 0 16px 48px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .filters.open { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .65); }
:root[data-theme="dark"] .ftr { border-top: 1px solid var(--line); }
.ftr .theme-btn { margin-top: 14px; }
