/* mart.rmcds.ru — витрина МЦДС. Токены :root скопированы из боевого styles.css rmcds.ru
   (светлая и тёмная темы), чтобы магазин стоял рядом с сайтом как одно целое. */

:root {
  color-scheme: only light;
  --ink: #0B1220;
  --ink-2: #1F2A3B;
  --muted: #5A6478;
  --muted-2: #656C7A;
  --line: #E4E7ED;
  --line-2: #F0F2F5;
  --line-strong: #868E9E;
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-tint: #EEF2F8;
  --deep: #0B1220;
  --deep-line: rgba(255, 255, 255, 0.12);
  --deep-fill: rgba(255, 255, 255, 0.08);
  --on-deep: #FFFFFF;
  --on-deep-2: rgba(255, 255, 255, 0.85);
  --on-deep-3: rgba(255, 255, 255, 0.70);
  --on-deep-4: rgba(255, 255, 255, 0.50);
  --on-deep-border: rgba(255, 255, 255, 0.24);
  --brand: #0B3D91;
  --brand-2: #1E5BC6;
  --brand-fill: #0B3D91;
  --brand-fill-2: #1E5BC6;
  --on-brand: #FFFFFF;
  --on-brand-2: rgba(255, 255, 255, 0.85);
  --brand-wash: rgba(11, 61, 145, 0.09);
  --focus-ring: rgba(11, 61, 145, 0.10);
  --signal: #C8102E;
  --signal-ink: #C8102E;
  --signal-bg: #FEF6F6;
  --gold: #B8975A;
  --ok: #16A34A;
  --ok-text: #0E7A3C;
  --ok-bg: #ECFDF5;
  --ok-ink: #065F46;
  --mark-bg: #FFF1B8;
  --mark-ink: #0B1220;
  --scrim: rgba(11, 18, 32, 0.42);
  --shadow-1: 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-2: 0 4px 16px rgba(11, 18, 32, 0.06);
  --shadow-3: 0 8px 28px rgba(11, 18, 32, 0.12);
  --shadow-4: 0 24px 60px rgba(11, 18, 32, 0.16);
  --font-sans: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --container: 1280px;
  --radius: 4px;
  --card-line: var(--line);
  --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%235A6478' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Тёмная тема витрины выключена: лицо сайта белое. */

/* ---------- base — как styles.css rmcds.ru ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #fff; color-scheme: light; min-height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 4px 6px; border-radius: 2px; transition: color .15s, background-color .15s; }
input, select { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
:root { --gutter: 24px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, .cta:focus-visible, .lang__btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px;
}
.topbar a:focus-visible, .topbar button:focus-visible, .footer a:focus-visible { outline-color: var(--on-deep); }
::selection { background: var(--brand-wash); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-fill); color: var(--on-brand);
  padding: 12px 20px; font-weight: 600; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- topbar ---------- */
.strip, .topbar {
  background: #0B1220; color: rgba(255,255,255,.7);
  font-size: 12px; letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.24);
  height: 36px;
}
.topbar__inner, .strip__inner { display: flex; align-items: center; justify-content: space-between; height: 36px; gap: 16px; }
.topbar__left { display: flex; gap: 24px; min-width: 0; }
.topbar__left span { display: inline-flex; align-items: center; gap: 6px; }
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok-glow); animation: pulse 2.4s ease-out infinite; flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--ok-glow); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.topbar__tel { font-variant-numeric: tabular-nums; letter-spacing: .02em; transition: color .15s; color: inherit; }
.topbar__tel:hover { color: #fff; }
.topbar__right { display: flex; align-items: center; gap: 18px; flex: none; }
.topbar__right button {
  background-color: transparent; border: 0; color: rgba(255,255,255,.7); font: inherit; cursor: pointer;
  padding: 4px 6px; border-radius: 2px; transition: color .15s, background-color .15s;
}
.topbar__right button:hover { color: #fff; }
.topbar__right button.is-active { color: #fff; background-color: rgba(255,255,255,.08); }
.strip__back { color: var(--on-deep-4); white-space: nowrap; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: var(--shadow-1); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo__mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--brand-fill); color: var(--on-brand);
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  letter-spacing: -0.02em; border-radius: 2px;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__abbr { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.logo__sub { font-size: 11px; color: var(--muted); letter-spacing: .01em; }

.search {
  display: flex; align-items: stretch; flex: 1; max-width: 560px;
  border: 0; background: transparent; gap: 8px;
}
.search input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  font-size: 15px; line-height: 1.2; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 2px;
  transition: border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:hover:not(:focus) { border-color: var(--muted-2); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.search__btn { border-radius: 2px; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; background-color: var(--brand-fill); color: var(--on-brand);
  font-weight: 600; font-size: 14px; border-radius: 2px; border: 0;
  transition: background-color .2s; white-space: nowrap;
}
.cta:hover { background-color: var(--brand-fill-2); }
.cta--ghost { background-color: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.cta--ghost:hover { background-color: var(--bg-soft); border-color: var(--ink); }

.hact { display: flex; align-items: center; flex: none; }
.themetgl {
  flex: none; width: 40px; height: 40px; margin-left: 12px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 2px;
  background-color: var(--bg); color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.themetgl:hover { color: var(--ink); border-color: var(--line-strong); background-color: var(--bg-soft); }
.themetgl svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.themetgl .themetgl__moon { display: block; }
.themetgl .themetgl__sun { display: none; }
:root[data-theme="dark"] .themetgl .themetgl__moon { display: none; }
:root[data-theme="dark"] .themetgl .themetgl__sun { display: block; }
.hact__b {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 13px; border: 0; border-radius: 2px; background-color: var(--bg);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.hact__b:hover { color: var(--ink); background-color: var(--bg-soft); }
.hact__n {
  font-family: var(--font-mono); font-size: 11px; color: var(--brand); letter-spacing: .04em;
}
.hact__n:empty { display: none; }

.note-bar { background: #EEF2F8; border-bottom: 1px solid var(--line); }
.note-bar__inner { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 13px; color: #0B1220; }
.note-bar strong { font-weight: 600; color: #0B3D91; }

.catbar { background: var(--bg); border-bottom: 1px solid var(--line); }
.catbar__inner { display: flex; align-items: center; gap: 4px; min-height: 52px; overflow-x: auto; scrollbar-width: none; }
.catbar__inner::-webkit-scrollbar { display: none; }
.gnav__b, .catbar__b {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 13px; border: 0; border-radius: 2px; background-color: var(--bg);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--muted);
  white-space: nowrap; transition: color .15s, background-color .15s;
}
.gnav__b:hover, .catbar__b:hover { color: var(--ink); background-color: var(--bg-soft); }
.catbar__b.is-active { color: var(--ink); background-color: var(--bg-tint); }
.catbar__b svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------- layout ---------- */
main { min-height: 60vh; padding: 20px 0 48px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--brand); }
.crumbs__sep { color: var(--line-strong); }
.crumbs__cur { color: var(--ink); font-weight: 500; }

.ptitle { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.ptitle h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; margin: 0;
}
.ptitle__n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.lead { color: var(--muted); max-width: 70ch; margin: -8px 0 20px; }

.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.subcats a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--ink); background-color: var(--bg);
  transition: border-color .2s, color .2s, background-color .2s;
}
.subcats a:hover { border-color: var(--brand); color: var(--brand); background-color: var(--bg); }
.subcats .n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.shop { display: grid; grid-template-columns: 264px 1fr; gap: 28px; align-items: start; }

/* ---------- facets ---------- */
.facets { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding-right: 4px; }
.facets__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.facets__head h2 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin: 0; }
.facets__reset { font-size: 12px; color: var(--brand); }
.facets__reset:hover { text-decoration: underline; }
.facet { border-top: 1px solid var(--card-line); padding: 12px 0; }
.facet:last-child { border-bottom: 1px solid var(--card-line); }
.facet__t { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; font-weight: 600; font-size: 13.5px; padding: 2px 0; }
.facet__t .u { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.facet__t svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.8; transition: transform .15s; }
.facet.is-closed .facet__t svg { transform: rotate(-90deg); }
.facet.is-closed .facet__body { display: none; }
.facet__body { margin-top: 10px; display: grid; gap: 6px; }
.facet__opt { display: flex; align-items: center; gap: 10px; padding: 3px 0; cursor: pointer; }
.facet__opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-fill); flex: none; }
.facet__opt .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet__opt .c { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.facet__opt.is-zero { color: var(--muted-2); }
.facet__opt.is-zero .l { opacity: .6; }
.facet__sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); flex: none; }
.facet__more { font-size: 12px; color: var(--brand); padding: 2px 0; text-align: left; }
.facet__more:hover { text-decoration: underline; }
.range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.range input {
  width: 100%; height: 46px; border: 1px solid var(--line-strong); border-radius: 2px;
  padding: 0 14px; background-color: var(--bg); font-size: 15px; font-family: var(--font-mono);
  transition: border-color .18s, box-shadow .18s;
}
.range input:hover:not(:focus) { border-color: var(--muted-2); }
.range input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.range .d { color: var(--line-strong); }
.range__hint { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.facet__ok, .add {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px; border-radius: 2px; border: 0;
  background-color: var(--brand-fill); color: var(--on-brand);
  font-weight: 600; font-size: 14px; transition: background-color .2s;
}
.facet__ok:hover, .add:hover { background-color: var(--brand-fill-2); }
.add.is-in, .add--ghost, .facet__ok {
  background-color: var(--bg); color: var(--ink); border: 1px solid var(--line);
}
.add.is-in:hover, .add--ghost:hover, .facet__ok:hover { background-color: var(--bg-soft); border-color: var(--ink); }

/* ---------- toolbar / chips ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar__l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort select {
  appearance: none; -webkit-appearance: none; height: 46px; padding: 0 40px 0 14px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  background-color: var(--bg); background-image: var(--sel-arrow); background-repeat: no-repeat; background-position: right 14px center;
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.fbtn { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 2px; font-weight: 500; font-size: 14px; background-color: var(--bg); color: var(--muted); }
.fbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.fbtn .n { font-family: var(--font-mono); font-size: 11px; color: var(--brand); letter-spacing: .04em; background: none; padding: 0; }
.fbtn .n:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 0;
  background-color: rgba(11,61,145,.09); color: #0B3D91; font-size: 13px;
}
.chip b { font-weight: 500; }
.chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.chip:hover { border-color: var(--brand); color: var(--brand); background-color: var(--bg); }
.chip--reset { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chip--reset:hover { background: var(--bg-soft); color: var(--ink); }

/* ---------- product grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.card {
  display: flex; flex-direction: column; border-radius: 0; background: var(--bg);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: none; overflow: hidden; position: relative;
}
.card:hover { background: var(--bg-soft); box-shadow: none; }
.card__img { aspect-ratio: 4 / 3; background: var(--bg-soft); display: grid; place-items: center; position: relative; }
.card__img svg { width: 56%; height: 56%; stroke: var(--line-strong); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.card__tag {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: transparent; border: 0; padding: 0;
}
.card__tag--new { background: transparent; color: var(--brand); }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.card__brand { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card__name:hover { color: var(--brand); }
.card__specs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted-2); }
.card__specs span b { color: var(--ink-2); font-weight: 500; }
.card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 8px; }
.price { font-family: var(--font-mono); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.price small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .04em; margin-top: 4px; }
.price--req { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--brand); }
.stock { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.stock--in { color: var(--ok-text); } .stock--in::before { background: var(--ok); }
.stock--order { color: var(--muted); } .stock--order::before { background: var(--gold); }
.stock--out { color: var(--muted-2); } .stock--out::before { background: var(--line-strong); }
.add[disabled] { background-color: var(--bg-soft); color: var(--muted-2); border: 1px solid var(--line); cursor: default; }
.hero__label, .section__label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.hero__label::before, .section__label::before { content: ""; width: 24px; height: 1px; background: var(--brand); }
.hero h1, .sec__head h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 12px; color: var(--ink);
}
.sec__head h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 0; }
.hero p, .lead, .section__lead { font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ---------- home ---------- */
.hero { padding: 36px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.hero__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.hero__label::before { content: ""; width: 22px; height: 1px; background: var(--brand); }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.015em; margin: 0 0 10px; max-width: 24ch; line-height: 1.12; }
.hero p { color: var(--muted); max-width: 60ch; margin: 0; font-size: 15px; }
.sec { margin-bottom: 36px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec__head h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.sec__head a { font-size: 13px; color: var(--brand); }
.sec__head a:hover { text-decoration: underline; }
.root {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 28px 24px 24px; background: var(--bg);
  display: flex; flex-direction: column; gap: 12px;
}
.root:hover { background: var(--bg-soft); box-shadow: none; }
.roots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.root__top { display: flex; align-items: center; gap: 12px; }
.root__ic { width: 40px; height: 40px; border-radius: 2px; background: var(--bg-tint); display: grid; place-items: center; flex: none; }
.root__ic svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.root__name { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.root__n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.root__lead { color: var(--muted); font-size: 13px; margin: 0; }
.root__kids { display: flex; flex-wrap: wrap; gap: 6px; }
.root__kids a, .root__kids span {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background-color: var(--bg); color: var(--ink);
}

/* ---------- product page ---------- */
.prod { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 36px; align-items: start; }
.prod__gal { border: 1px solid var(--line); border-radius: 2px; background: var(--bg-soft); aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; }
.prod__gal svg { width: 44%; height: 44%; stroke: var(--line-strong); fill: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.prod__gal .note { position: absolute; bottom: 12px; left: 12px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.prod__brand { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; gap: 14px; }
.prod h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 16px; }
.prod__key { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.prod__key div { padding: 10px 12px; background: var(--bg-soft); border-radius: var(--radius); }
.prod__key .k { font-size: 11.5px; color: var(--muted); }
.prod__key .v { font-family: var(--font-mono); font-size: 15px; font-weight: 500; margin-top: 2px; }
.buy { border: 1px solid var(--line); border-radius: 2px; padding: 20px; display: grid; gap: 14px; margin-bottom: 28px; }
.buy__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.buy .price { font-size: 24px; }
.buy__meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); height: 38px; }
.qty button { width: 36px; height: 100%; font-size: 18px; color: var(--ink-2); }
.qty button:hover { background: var(--bg-soft); }
.qty input { width: 56px; height: 100%; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-family: var(--font-mono); background: transparent; }
.buy .add { height: 38px; padding: 0 18px; flex: 1; }
.buy .add--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.buy .add--ghost:hover { border-color: var(--ink); background: var(--bg-soft); }
.specs h2 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.specs table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.specs td { padding: 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 46%; }
.specs td:last-child { font-weight: 500; }
.specs td .mono { font-size: 13px; }
.specs .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); vertical-align: -1px; margin-right: 6px; }
.prod__desc { color: var(--ink-2); margin: 18px 0 0; }

/* ---------- cart ---------- */
.cart { max-width: 820px; }
.cart__demo { padding: 10px 14px; background: var(--bg-tint); border-radius: var(--radius); font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.cline { display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cline__img { width: 64px; height: 48px; background: var(--bg-soft); border-radius: 2px; display: grid; place-items: center; }
.cline__img svg { width: 60%; height: 60%; stroke: var(--line-strong); fill: none; stroke-width: 1.2; }
.cline__name { font-weight: 500; }
.cline__sku { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cline__sum { font-family: var(--font-mono); font-weight: 600; text-align: right; min-width: 90px; }
.cline__rm { color: var(--muted); padding: 6px; border-radius: var(--radius); }
.cline__rm:hover { color: var(--signal-ink); background: var(--signal-bg); }
.cline__rm svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ctotal { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; font-size: 15px; }
.ctotal .price { font-size: 22px; }
.ctotal__note { font-size: 12.5px; color: var(--muted); }

/* ---------- states ---------- */
.state { display: grid; place-items: center; text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); gap: 8px; }
.state svg { width: 40px; height: 40px; stroke: var(--line-strong); fill: none; stroke-width: 1.4; stroke-linecap: round; }
.state h3 { font-family: var(--font-display); font-size: 17px; margin: 4px 0 0; color: var(--ink); }
.state p { margin: 0; max-width: 46ch; }
.state .add { margin-top: 10px; }
.state--err { border-color: var(--signal-ink); background: var(--signal-bg); }
.state--err svg { stroke: var(--signal-ink); }
.skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.skel div { height: 300px; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-soft) 25%, var(--bg-tint) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--deep); color: var(--on-deep); padding: 10px 16px; border-radius: var(--radius); box-shadow: var(--shadow-3); font-size: 13px; z-index: 80; }

/* ---------- footer ---------- */
.footer {
  background: #0B1220; color: rgba(255,255,255,.7);
  padding: 28px 0; margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12); font-size: 13px;
}
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: #fff; }
.footer a:hover { color: #fff; }
.footer .mono { font-size: 11px; letter-spacing: .06em; color: rgba(255,255,255,.5); }

/* ---------- drawer (mobile filters) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(92vw, 400px); background: var(--bg); z-index: 70; display: flex; flex-direction: column; box-shadow: var(--shadow-4); transition: transform .2s; touch-action: pan-y; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-family: var(--font-display); font-size: 16px; margin: 0; }
.drawer__x { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius); }
.drawer__x:hover { background: var(--bg-soft); }
.drawer__x svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.drawer__body { flex: 1; overflow: auto; padding: 4px 16px 16px; }
.drawer__body .facets { position: static; max-height: none; }
.drawer__foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer__foot .add { flex: 1; height: 42px; font-size: 14px; }
.drawer__foot .add--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); flex: 0 0 auto; padding: 0 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .shop { grid-template-columns: 1fr; }
  .shop > .facets { display: none; }
  .fbtn { display: inline-flex; }
  .prod { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .header__inner { height: auto; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
  .search { flex: 1 1 100%; max-width: none; order: 3; }
  .header .logo__sub { display: none; }
  .search input { height: 40px; font-size: 14px; }
  .cta, .search__btn { padding: 9px 14px; font-size: 13px; }
  .grid, .roots { grid-template-columns: 1fr; }
  .topbar__status { display: none; }
  .cline { grid-template-columns: 48px 1fr auto; row-gap: 10px; }
  .cline__img { width: 48px; height: 40px; }
  .cline .qty { grid-column: 1 / 3; width: max-content; }
  .cline__sum { grid-column: 3; grid-row: 2; text-align: right; min-width: 0; align-self: center; }
  .cline__rm { grid-column: 3; grid-row: 1; justify-self: end; }
}
@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card__foot { flex-direction: column; align-items: stretch; }
  .add { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Телефон в тёмной системе не имеет права красить витрину. Знак и кнопки — синие, не зелёные. */
html, body, main, .header, .catbar, .note-bar, .card, .root, .facets, .shop {
  background-color: #fff;
  color: #0B1220;
}
.note-bar { background-color: #EEF2F8; }
.topbar, .footer { background-color: #0B1220; color: rgba(255,255,255,.7); }
.logo__mark, .cta, .search__btn, .add:not(.add--ghost):not([disabled]) {
  background-color: #0B3D91;
  color: #fff;
}
