/* Layout: sticky bar → compact hero with signal trace → filter rail + card grid → contacts split (channels | form)
   Single dark look by brand choice: black instrument-panel ground, signal red as the one accent. */
:root {
  --bg: #0a0909;
  --panel: #131111;
  --panel-2: #1b1818;
  --line: #2b2626;
  --fg: #f3efee;
  --muted: #a39998;
  --red: #e3242b;
  --red-deep: #7d1116;
  --ok: #5fc48a;
  --font-display: "Tektur", "Arial Narrow", system-ui, sans-serif;
  --tracking-display: 0.06em;   /* расстояние между буквами акцентного шрифта */
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 4px;
  --wrap: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap {
  max-width: calc((100vw + var(--wrap)) / 2 + 16px);   /* боковые поля на широких экранах — вдвое меньше, чем при 1200px */
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Header ---------- */
.bar {
  transition: background-color .25s, border-color .25s;
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; padding-block: 6px; }
.logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.logo img { display: block; height: 54px; width: auto; }
@media (max-width: 560px) { .logo img { height: 46px; } }
.logo-foot { display: block; height: 72px; width: auto; margin-bottom: 6px; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--fg); }
.lang { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang a, .lang button {
  text-decoration: none; display: inline-block;
  background: none; border: 0; padding: 6px 10px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.lang a[aria-current="true"], .lang button[aria-pressed="true"] { background: var(--red); color: #fff; }
.lang a:not([aria-current="true"]):hover, .lang button:not([aria-pressed="true"]):hover { color: var(--fg); }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { padding-block: 16px 56px; display: grid; gap: 28px; position: relative; z-index: 1; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
}
.trace { position: absolute; right: 0; top: 50%; width: 62%; height: 180px; transform: translateY(-50%); z-index: 0; opacity: 0.9; }
.trace { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
.trace path { fill: none; vector-effect: non-scaling-stroke; }
.trace .axis { stroke: var(--red); stroke-opacity: .22; stroke-width: 1; stroke-dasharray: 4 6; }
/* осциллограмма напряжения: синусоида плавно бежит по экрану, как на живом осциллографе */
.trace .wave path { stroke: var(--red); stroke-width: 2; filter: drop-shadow(0 0 6px var(--red)); }
.trace .wave { animation: scope 2.4s linear infinite, scope-in 1.2s ease-out both; }
@keyframes scope { from { transform: translateX(0); } to { transform: translateX(-200px); } }
@keyframes scope-in { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1600; } }
.eyebrow { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); margin: 0; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 6vw, 64px); line-height: 1.02; letter-spacing: var(--tracking-display);
  margin: 0; max-width: 14ch; text-wrap: balance;
}
/* на широком экране — ровно две строки, как на макете */
@media (min-width: 901px) { .hero h1 { max-width: none; white-space: nowrap; font-size: clamp(44px, 5.1vw, 75px); } .trace { width: 41%; } }
@media (max-width: 900px) { .br-d { display: none; } }
.hero p.lead { margin: 0; max-width: 56ch; color: var(--muted); font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--red);
  background: var(--red); color: #fff; text-decoration: none; cursor: pointer;
  font-weight: 500; font-size: 15px; transition: background .15s, border-color .15s;
}
.btn:hover { background: #ff3138; border-color: #ff3138; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; }
.btn.sm { padding: 8px 14px; font-size: 14px; }

/* ---------- Catalog ---------- */
.section { padding-block: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3.4vw, 36px); margin: 0; letter-spacing: var(--tracking-display); }
.demo-note { font-size: 13px; color: var(--muted); margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  text-decoration: none;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
  display: inline-flex; gap: 8px; align-items: center;
}
.chip em { font-style: normal; font-family: var(--font-mono); font-size: 12px; opacity: .7; }
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.search { flex: 1 1 240px; min-width: 0; position: relative; }
.search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); outline: none;
}
.search input:focus { border-color: var(--red); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0 0 16px; letter-spacing: .04em; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card { color: inherit; text-decoration: none; }
.card:hover { border-color: var(--red-deep); transform: translateY(-2px); }
.card:hover h3 { color: var(--red); }
.card-go { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.card-go i { font-style: normal; color: var(--red); transition: transform .15s; }
.card:hover .card-go { color: var(--fg); }
.card:hover .card-go i { transform: translateX(3px); }
.thumb {
  position: relative; aspect-ratio: 16 / 10; max-width: 100%;
  background:
    radial-gradient(circle at 70% 40%, color-mix(in srgb, var(--red) 18%, transparent), transparent 60%),
    linear-gradient(var(--panel-2), var(--panel-2));
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center; color: var(--fg);
}
.thumb svg { width: 46%; height: auto; max-height: 70%; }
.thumb .sku { position: absolute; left: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; min-width: 0; }
.card .thumb { aspect-ratio: 5 / 2; }
.card .thumb svg { width: 26%; }
.card h3 { font-size: 15px; }
.card .mini-specs { font-size: 12px; }
.cat-label { font-size: 12px; color: var(--red); text-transform: uppercase; letter-spacing: .12em; margin: 0; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.mini-specs { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.mini-specs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.mini-specs li b { font-family: var(--font-mono); font-weight: 400; color: var(--fg); font-size: 12px; text-align: right; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }


/* ---------- Shared table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 400; padding-right: 24px; width: 45%; }
.spec-table td { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Product page ---------- */
.pview .wrap { padding-block: 24px 56px; display: grid; gap: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a, .crumbs button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.crumbs a:hover, .crumbs button:hover { color: var(--fg); }
.crumbs .cur { font-family: var(--font-mono); font-size: 12px; color: var(--fg); }
.p-top { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
.p-top > * { min-width: 0; }
.p-visual .thumb { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); }
.p-visual .thumb svg { width: 58%; }
.p-visual .thumb .sku { font-size: 13px; left: 16px; bottom: 14px; }
.p-info { display: grid; gap: 18px; }
.p-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.08; margin: 0; letter-spacing: var(--tracking-display); text-wrap: balance; }
.p-lead { margin: 0; color: var(--muted); font-size: 17px; max-width: 56ch; }
.keyspecs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.keyspecs li { padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.keyspecs li + li { border-left: 1px solid var(--line); }
.keyspecs b { font-family: var(--font-mono); font-weight: 500; font-size: 15px; color: var(--fg); overflow-wrap: anywhere; }
.keyspecs span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.buybox { display: grid; gap: 18px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--red); border-radius: var(--radius); }
.buy-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: var(--tracking-display); }
.buy-price .note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.facts dd.mono { font-family: var(--font-mono); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.stock { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.p-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; border-top: 1px solid var(--line); padding-top: 40px; }
.p-main { display: grid; gap: 40px; min-width: 0; }
.p-sec h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: var(--tracking-display); margin: 0 0 14px; }
.p-sec p { margin: 0; max-width: 68ch; color: #d9d2d1; }
.p-sec .apps { margin-top: 14px; color: var(--muted); font-size: 15px; }
.p-sec .apps span { color: var(--fg); }
.feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feat li { position: relative; padding: 14px 16px 14px 36px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.feat li::before { content: ""; position: absolute; left: 16px; top: 22px; width: 10px; height: 2px; background: var(--red); }
.tbl { overflow-x: auto; }
.p-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.kitbox { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.kit { margin: 0; padding: 0; list-style: none; counter-reset: k; display: grid; gap: 10px; }
.kit li { counter-increment: k; display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 15px; }
.kit li::before { content: counter(k, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--red); padding-top: 3px; }
.related { border-top: 1px solid var(--line); padding-top: 40px; }
.pn { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Contacts ---------- */
.contacts { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%); }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.split > * { min-width: 0; }
.contacts .intro { color: var(--muted); max-width: 48ch; margin: 12px 0 24px; }
.channels { display: grid; gap: 12px; }
.channel {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.channel .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); grid-column: 1 / -1; }
.channel .val { font-family: var(--font-mono); font-size: 17px; user-select: all; overflow-wrap: anywhere; }
.channel .links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.copy { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--muted); }
.copy:hover { color: var(--fg); border-color: var(--fg); }
.meta-line { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

.form { display: grid; gap: 14px; padding: 24px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.form h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: var(--tracking-display); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.form-msg { margin: 0; font-size: 14px; }
.consent { margin: -4px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.btn:disabled { opacity: .6; cursor: progress; }
.form-msg.err { color: #ff6b70; }
.form-msg.ok { color: var(--ok); }
.result { display: grid; gap: 10px; }
.result textarea { width: 100%; min-height: 140px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
footer .wrap.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; padding-block: 32px; align-items: start; }
.foot p { margin: 6px 0 0; max-width: 40ch; }
.foot h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--fg); font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .p-top, .p-body { grid-template-columns: 1fr; gap: 28px; }
  .p-side { position: static; }
  .trace { width: 100%; opacity: .35; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .row { grid-template-columns: 1fr; }
  .feat, .facts { grid-template-columns: 1fr; }
  .keyspecs { grid-template-columns: 1fr; }
  .keyspecs li + li { border-left: 0; border-top: 1px solid var(--line); }
  .spec-table th { width: auto; }
  .hero .wrap { padding-block: 12px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trace .wave { animation: none; }
  .card, .card:hover { transition: none; transform: none; }
}

/* ---------- Product photos ---------- */
.thumb.has-img { background: var(--panel-2); overflow: hidden; }
.thumb.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.thumb.has-img .sku { background: color-mix(in srgb, var(--bg) 75%, transparent); padding: 2px 6px; border-radius: 2px; }
.p-visual { display: grid; gap: 10px; }
.p-visual .thumb.has-img img { object-fit: contain; padding: 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.tn { width: 72px; height: 54px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); cursor: pointer; overflow: hidden; }
.tn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn.on, .tn:hover { border-color: var(--red); }

/* ---------- Category, articles, 404 ---------- */
#catalog .crumbs { margin-bottom: 18px; }
.cat-head { display: grid; gap: 10px; margin-bottom: 24px; }
.cat-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; margin: 0; letter-spacing: var(--tracking-display); text-wrap: balance; }
.cat-desc { margin: 0; color: var(--muted); max-width: 70ch; font-size: 17px; }
#empty { margin-top: 16px; }
.alist { display: grid; gap: 16px; }
.acard { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; transition: border-color .15s; }
.acard:hover { border-color: var(--red-deep); }
.acard:hover h2 { color: var(--red); }
.acard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 2px; background: var(--panel-2); }
.acard > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.acard time, .article time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.acard h2 { margin: 0; font-size: 20px; line-height: 1.25; text-wrap: balance; }
.acard p { margin: 0; color: var(--muted); }
.acard:not(:has(img)) { grid-template-columns: 1fr; }
.article { max-width: 760px; display: grid; gap: 18px; margin-top: 18px; }
.article .cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.prose { font-size: 17px; line-height: 1.7; color: #d9d2d1; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: var(--tracking-display); color: var(--fg); margin: 32px 0 10px; }
.prose h3 { font-size: 19px; color: var(--fg); margin: 24px 0 8px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--red); }
.prose strong { color: var(--fg); }
.nf { display: grid; gap: 14px; justify-items: start; padding-block: 40px; }
@media (max-width: 860px) {
  footer .wrap.foot { grid-template-columns: 1fr auto; }
  .acard { grid-template-columns: 1fr; }
}

/* ---------- Back button ---------- */
.crumbs-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.back-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--fg); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.back-btn:hover { border-color: var(--red); background: var(--panel-2); }
.back-btn:hover svg { transform: translateX(-2px); }
.back-btn svg { transition: transform .15s; }
@media (prefers-reduced-motion: reduce) { .back-btn, .back-btn svg { transition: none; } }

/* ---------- Большой логотип на главной, который при прокрутке уезжает в шапку (js/site.js) ---------- */
.hero-logo-slot { width: clamp(240px, 40vw, 500px); max-width: 100%; aspect-ratio: 640 / 308; }
.hero-logo-slot img { display: block; width: 100%; height: auto; }
.logo-anim .hero-logo-slot img { visibility: hidden; }          /* вместо него летит логотип из шапки */
.logo-anim .bar .logo img { transform-origin: 0 0; will-change: transform; }
.logo-anim .bar.at-top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.logo-anim .hero { margin-top: calc(-1 * var(--bar-h, 72px)); }
.logo-anim .hero .wrap { padding-top: calc(var(--bar-h, 72px) + 8px); }   /* большой логотип — под кнопкой «Категории» */
/* на телефоне шапка узкая: логотип стоит сразу под ней, чтобы не наезжать на переключатель языков */
@media (max-width: 560px) { .logo-anim .hero { margin-top: 0; } .logo-anim .hero .wrap { padding-top: 8px; } }
@media (max-width: 560px) { .hero-logo-slot { width: min(78vw, 340px); } }

/* SEO-текст категории под списком товаров */
.cat-body { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 80ch; }
.cat-body > h2:first-child { margin-top: 0; }

/* ---------- Боковая панель категорий (js/site.js добавляет html.drawer-open) ---------- */
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  height: 40px; padding: 0 14px 0 12px; margin-right: -8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--fg); cursor: pointer; font-size: 14px; transition: border-color .15s, background .15s;
}
.menu-btn:hover { border-color: var(--red); }
.burger { position: relative; width: 18px; height: 12px; flex: none; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: currentColor;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s, top .35s cubic-bezier(.2,.8,.2,1); }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; background: var(--red); }
.burger i:nth-child(3) { top: 10px; right: 6px; }
.drawer-open .burger i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.drawer-open .burger i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.drawer-open .burger i:nth-child(3) { top: 5px; right: 0; transform: rotate(-45deg); }
@media (max-width: 860px) { .menu-lbl { display: none; } .menu-btn { padding: 0; width: 40px; justify-content: center; } }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(5, 4, 4, .62);
  backdrop-filter: blur(3px); opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.drawer {
  position: fixed; z-index: 41; top: 0; bottom: 0; left: 0;
  width: min(360px, 88vw); display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line);
  box-shadow: 24px 0 60px rgba(0, 0, 0, .45);
  padding-top: env(safe-area-inset-top, 0px); padding-left: env(safe-area-inset-left, 0px);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .42s cubic-bezier(.2,.8,.2,1), visibility 0s linear .42s;
}
.drawer::before { content: ""; position: absolute; top: 0; right: -1px; width: 2px; height: 100%;
  background: linear-gradient(var(--red), transparent 60%); opacity: .8; }
.drawer-open .drawer-scrim { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.drawer-open .drawer { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.2,.8,.2,1); }
.drawer-open body { overflow: hidden; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-x { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--fg); cursor: pointer; transition: border-color .15s, transform .3s; }
.drawer-x:hover { border-color: var(--red); transform: rotate(90deg); }
.drawer-nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px; }
.drawer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.drawer-nav li { opacity: 0; transform: translateX(-14px); transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1); }
.drawer-open .drawer-nav li { opacity: 1; transform: none; transition-delay: calc(80ms + var(--i) * 22ms); }
.drawer-nav a {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--muted); font-size: 15px; line-height: 1.3;
  transition: background .15s, color .15s;
}
.drawer-nav a:hover { background: var(--panel-2); color: var(--fg); }
.drawer-nav a[aria-current] { background: var(--panel-2); color: var(--fg); }
.drawer-nav a[aria-current]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--red); }
.d-ico { display: grid; place-items: center; width: 34px; height: 24px; color: var(--fg); opacity: .75; }
.d-ico svg { width: 100%; height: 100%; }
.drawer-nav a:hover .d-ico, .drawer-nav a[aria-current] .d-ico { opacity: 1; }
.drawer-nav em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.drawer-foot { display: flex; gap: 18px; padding: 14px 22px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 14px; }
.drawer-foot a { color: var(--muted); text-decoration: none; }
.drawer-foot a:hover { color: var(--fg); }

/* кнопка «Категории» над сеткой товаров */
.cats-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: var(--radius);
  font-weight: 500; font-size: 14px; transition: background .15s, color .15s, border-color .15s;
}
.cats-btn svg { width: 16px; height: 16px; }
.cats-btn em { font-style: normal; font-family: var(--font-mono); font-size: 12px; opacity: .6; }
.cats-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-scrim, .drawer-nav li, .burger i, .drawer-x { transition: none !important; }
}

/* ---------- Белые плитки товаров: название красное, остальное чёрное ---------- */
.card { background: #fff; border-color: #fff; color: #111; }
.card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.card { transition: border-color .15s, transform .2s, box-shadow .2s; }
.card h3 { color: var(--red); }
.card:hover h3 { color: #b8141a; }
.card .cat-label { color: #111; opacity: .7; }
.card .mini-specs { color: #111; }
.card .mini-specs li { border-bottom-color: #e2dddc; }
.card .mini-specs li b { color: #111; }
.card .card-go, .card:hover .card-go { color: #111; }
.card .thumb { background: #fff; border-bottom-color: #ebe7e6; color: #111; }
.card .thumb.has-img { background: #fff; }
.card .thumb .sku, .card .thumb.has-img .sku { color: #111; background: rgba(255, 255, 255, .88); }
.card :focus-visible, .card:focus-visible { outline-color: var(--red); }

/* плитки: квадратное фото и более крупный, плотный вспомогательный текст */
.card .thumb { aspect-ratio: 1 / 1; }
.card .thumb svg { width: 46%; }
.card .thumb .sku, .card .thumb.has-img .sku { font-size: 13px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; left: 10px; bottom: 10px; color: #000; background: rgba(255, 255, 255, .94); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.card .cat-label { font-size: 12.5px; font-weight: 600; opacity: .8; }
.card h3 { font-size: 18px; font-weight: 700; }
.card .mini-specs { font-size: 14px; font-weight: 500; gap: 6px; color: #000; }
.card .mini-specs li { padding-bottom: 6px; }
.card .mini-specs li span { color: #333; }
.card .mini-specs li b { font-size: 13.5px; font-weight: 600; color: #000; }
.card .card-go { font-size: 15px; font-weight: 700; color: #000; }
.card .card-go i { font-size: 17px; }

/* ---------- Страница товара: белый блок ключевых характеристик ---------- */
.keyspecs { background: #fff; border-color: #fff; color: #000; }
.keyspecs li + li { border-left-color: #e4dfde; }
.keyspecs b { color: #000; font-size: 16px; font-weight: 700; line-height: 1.35; }
.keyspecs span { color: #333; font-size: 13.5px; font-weight: 500; line-height: 1.4; }
@media (max-width: 560px) { .keyspecs li + li { border-top-color: #e4dfde; } }

/* блок «Вартість — після консультації»: крупнее и плотнее */
.buy-title { font-size: 25px; font-weight: 700; }
.buy-price .note { font-size: 16px; line-height: 1.5; color: #e0d9d8; font-weight: 500; margin-top: 8px; }
.facts dt { font-size: 13px; font-weight: 600; color: #c9c0bf; }
.facts dd { font-size: 17px; font-weight: 600; }
.facts dd.mono { font-size: 15px; font-weight: 600; }
.buybox .btn { font-size: 16px; font-weight: 600; padding: 13px 24px; }

/* контакты: «Позвонить» + «Копировать» */
.channel .acts { display: flex; gap: 8px; align-items: center; }
.channel .acts .btn.sm, .channel .acts .copy { height: 36px; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; }
@media (max-width: 420px) { .channel { grid-template-columns: 1fr; } }

/* ---------- Просмотр фото на весь экран (js/site.js) ---------- */
.p-visual .thumb.has-img { cursor: zoom-in; }
.zoom-hint {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(10, 9, 9, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  pointer-events: none; transition: transform .2s, background .2s;
}
.p-visual .thumb.has-img:hover .zoom-hint { transform: scale(1.08); background: var(--red); }
.lb {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(6, 5, 5, .96); color: #fff; opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.lb.open { opacity: 1; visibility: visible; transition: opacity .28s ease; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.lb-count { font-family: var(--font-mono); font-size: 14px; color: #d9d2d1; }
.lb-cap { flex: 1; min-width: 0; font-size: 14px; color: #a39998; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; transition: background .15s, border-color .15s;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.lb-img {
  max-width: calc(100vw - 150px); max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none;
  cursor: zoom-in; transform-origin: center; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s;
  background: #fff;
}
.lb-img.zoomed { cursor: zoom-out; }
.lb-img.fade { opacity: 0; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-strip { display: flex; gap: 8px; justify-content: center; padding: 12px 16px 18px; overflow-x: auto; }
.lb-strip button { flex: none; width: 64px; height: 48px; padding: 0; border-radius: var(--radius); border: 2px solid transparent; background: #1b1818; cursor: pointer; overflow: hidden; opacity: .55; transition: opacity .15s, border-color .15s; }
.lb-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-strip button:hover { opacity: .9; }
.lb-strip button[aria-current] { border-color: var(--red); opacity: 1; }
.lb-open body { overflow: hidden; }
@media (max-width: 700px) {
  .lb-img { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; width: 46px; height: 46px; }
  .lb-stage { padding-bottom: 62px; }
  .lb-cap { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lb, .lb-img { transition: none !important; } }

/* факты в блоке «Консультация»: столбиком, «название — значение» в одну строку */
.buybox .facts { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.buybox .facts div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.buybox .facts dt { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; color: #c9c0bf; }
.buybox .facts dd { font-size: 16px; font-weight: 700; justify-content: flex-end; text-align: right; }
.buybox .facts dd.mono { font-size: 15px; }

/* ---------- Зелёные кнопки действия: «Консультация», «Позвонить» ---------- */
.btn.green { background: #1f9d4e; border-color: #1f9d4e; color: #fff; }
.btn.green:hover { background: #23b85a; border-color: #23b85a; }

/* кнопки мессенджеров у телефона */
.msgr { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msgr a {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px;
  border-radius: var(--radius); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  transition: filter .15s, transform .15s;
}
.msgr a svg { width: 18px; height: 18px; flex: none; }
.msgr a:hover { filter: brightness(1.12); transform: translateY(-1px); }
.m-wa { background: #25a244; } .m-tg { background: #2a9bd6; } .m-vb { background: #7360f2; }

/* осциллограмма — напротив большого логотипа (центр по высоте логотипа) */
@media (min-width: 901px) {
  .logo-anim .trace { top: calc(var(--bar-h, 72px) + 8px + clamp(240px, 40vw, 500px) * 0.2406); }
}

/* формулы на фоне, за осциллограммой: напряжение, вакуум, электронная оптика, ультразвук, тонкие плёнки, ААС */
.formulas { position: absolute; right: 0; width: 41%; z-index: 0; pointer-events: none; user-select: none;
  top: calc(var(--bar-h, 72px) + 8px); height: calc(clamp(240px, 40vw, 500px) * 0.48125 + 60px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.formulas span { position: absolute; white-space: nowrap; transform: translateY(-50%); color: #f3efee;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", Georgia, serif; font-style: italic; letter-spacing: .02em; }
.trace { z-index: 1; }
@media (max-width: 900px) { .formulas { display: none; } }
