/* =========================================================
   АП Электрик — design system
   B2B industrial editorial · lime green accent · datasheet rhythm
   ========================================================= */

:root {
  --bg: #F2EEE7;
  --surface: #E8E3D8;
  --surface-2: #ECE7DC;
  --fg: #1A1A1A;
  --muted: #5A5853;
  --border: #D1CCBE;
  --border-strong: #B8B2A1;
  --accent: #B0D627;
  --accent-on: #0F1500;
  --accent-dark: #1A2D00;
  --accent-soft: #E8F2C8;
  --accent-line: #4A5A0E;
  --hazard: #FF5A1F;
  --font-display: 'Unbounded', 'PT Root UI', sans-serif;
  --font-body: 'PT Root UI', 'Helvetica', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --radius: 0px;
  --space-section: 96px;
  --container: 1280px;
  --shadow-card: 0 1px 0 rgba(26,26,26,0.05);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(176,214,39,0.05) 0%, transparent 35%),
    repeating-linear-gradient(0deg, transparent 0, transparent 24px, rgba(26,26,26,0.022) 24px, rgba(26,26,26,0.022) 25px);
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.eyebrow-accent { color: var(--accent-line); }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--space-section) 0; }
.section-tight { padding: calc(var(--space-section) * 0.6) 0; }
.section-dark {
  background: var(--accent-dark);
  color: var(--accent-soft);
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
}
.section-dark .eyebrow { color: var(--accent); }
.section-dark .muted { color: rgba(232, 242, 200, 0.65); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
}
h1 { font-size: clamp(24px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: clamp(20px, 2.6vw, 32px); line-height: 1.15; }
h3 { font-size: clamp(18px, 2.0vw, 24px); line-height: 1.2; }
h4 { font-size: clamp(15px, 1.4vw, 18px); letter-spacing: 0; }

p { color: var(--fg); }
.muted { color: var(--muted); }

/* ============== TOP BAR ============== */
.topbar {
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid #000;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar a:hover { color: var(--accent); }
.topbar-left, .topbar-right { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.topbar-dot { width: 6px; height: 6px; background: var(--accent); display: inline-block; }
.topbar-time { color: var(--accent); }

/* ============== HEADER ============== */
header.site {
  position: sticky;
  top: 0;
  background: rgba(242, 238, 231, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.header-main { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 20px 32px; flex-wrap: wrap; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo img { height: 68px; width: auto; }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1; }
.logo-text small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; color: var(--muted); margin-top: 2px; }

.nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { font-size: 14px; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: color 200ms, border-color 200ms; white-space: nowrap; }
.nav a.is-stock { font-size: 13px; letter-spacing: -0.01em; }
.nav a:hover, .nav a.active { color: var(--accent-line); border-bottom-color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-phone { font-family: var(--font-mono); font-size: 16px; font-weight: 500; white-space: nowrap; }
.header-phone:hover { color: var(--accent-line); }

.mobile-toggle { display: none; background: none; border: 1px solid var(--border); padding: 8px 12px; font-family: var(--font-mono); font-size: 12px; cursor: pointer; }

/* Subnav strip */
.subnav { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg); overflow-x: auto; }
.subnav-inner { display: flex; gap: 0; align-items: stretch; }
.subnav a {
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  color: var(--muted);
  transition: all 150ms;
}
.subnav a:hover { background: var(--accent-soft); color: var(--accent-line); }
.subnav a.active { background: var(--accent); color: var(--accent-on); }

/* ============== HERO ============== */
.hero {
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero h1 { margin-top: 18px; }
.hero h1 .accent { color: var(--accent-line); display: block; }
.hero p.lede { font-size: 16px; color: var(--muted); margin-top: 24px; max-width: 56ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.hero-meta b { color: var(--fg); display: block; font-size: 18px; font-weight: 700; margin-top: 4px; font-family: var(--font-display); letter-spacing: 0; }

/* Spec card (memorable) */
.spec-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 28px;
  position: relative;
}
.spec-card .label {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--accent);
  color: var(--accent-on);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.spec-card h3 { margin-bottom: 18px; font-size: 18px; }
.spec-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.spec-card dt { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.spec-card dd { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--fg); margin-top: 2px; }
.spec-card .row-full { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  transition: transform 200ms var(--ease), background 200ms, color 200ms, border-color 200ms;
  min-height: 52px;
  text-align: center;
}
.btn:hover { background: var(--accent); color: var(--accent-on); border-color: var(--accent); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--fg); }
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--fg); border-color: var(--fg); }
.btn-accent { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--accent-soft); }
.btn-sm { padding: 10px 16px; font-size: 11px; min-height: 38px; }
.btn-arrow::after { content: "→"; font-family: var(--font-mono); }

/* ============== SECTIONS ============== */
.section-head { margin-bottom: 48px; max-width: 720px; }
.section-head h2 { margin-top: 12px; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--muted); }

/* ============== CATEGORY GRID ============== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.cat-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
  background: var(--bg);
  transition: background 200ms;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.cat-cell:hover { background: var(--surface); }
.cat-cell .cat-id { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cat-cell h3 { font-size: 18px; margin: 12px 0 8px; line-height: 1.1; }
.cat-cell p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.cat-cell .cat-count { font-family: var(--font-mono); font-size: 11px; color: var(--accent-line); margin-top: 16px; }
.cat-cell::after {
  content: "→";
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  color: var(--accent-line);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 200ms var(--ease);
}
.cat-cell:hover::after { opacity: 1; transform: translateX(0); }

/* ============== PRODUCT GRID ============== */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.prod-card {
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: background 200ms;
}
.prod-card:hover { background: var(--surface); }
.prod-visual {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.prod-visual .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  position: relative;
  background: var(--bg);
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 8px, rgba(26,26,26,0.04) 8px, rgba(26,26,26,0.04) 9px);
}
.prod-visual .placeholder .sku { font-size: 22px; color: var(--fg); font-weight: 700; margin-bottom: 4px; }
.prod-visual .placeholder .tds { font-size: 9px; color: var(--accent-line); margin-top: 6px; }
/* Product card with photo background */
.prod-visual.has-image {
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}
.prod-visual.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.prod-visual.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.prod-visual.has-image .placeholder {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  z-index: 2;
}
.prod-visual.has-image .placeholder .sku {
  color: #fff;
  font-size: 14px;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.prod-visual.has-image .placeholder > div:not(.sku):not(.tds) {
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  margin-bottom: 2px;
}
.prod-visual.has-image .placeholder .tds {
  color: var(--accent);
  margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Предметные фото на белом фоне: вписываем целиком, без подписи-градиента */
.prod-visual.has-image.contain::after { display: none; }
.prod-visual.has-image.contain .placeholder { display: none; }
.prod-visual.has-image.contain img { object-fit: contain; padding: 18px; }
.prod-visual.tall { aspect-ratio: 4 / 5; }
.prod-visual.tall img { padding: 14px 22px; }
.prod-visual.has-image /* === Liquidation / Неликвиды === */
:root {
  --sale: #E0A100;          /* янтарный для распродажи */
  --sale-bg: #FFF6E0;
  --sale-dark: #8A5A00;
}

.nav a.is-sale {
  background: var(--sale-bg);
  color: var(--sale-dark);
  padding: 6px 10px;
  border-radius: 3px;
  font-weight: 700;
}
.nav a.is-sale.active {
  background: var(--sale);
  color: var(--fg);
}

.sale-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--sale);
  color: var(--fg);
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 3px;
}
.sale-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.page-hero-sale {
  background: var(--sale-bg);
  border-top: 4px solid var(--sale);
}

.sale-strip {
  background: var(--fg);
  color: var(--bg);
  padding: 32px 0;
}
.sale-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.sale-strip-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sale-strip-grid .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.sale-strip-grid .v {
  font-size: 22px;
  font-weight: 700;
}
@media (max-width: 768px) {
  .sale-strip-grid { grid-template-columns: repeat(2, 1fr); }
}

.liquidation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .liquidation-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .liquidation-grid { grid-template-columns: 1fr; } }

.liq-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.liq-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.liq-strip {
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--sale) 0,
    var(--sale) 8px,
    var(--fg) 8px,
    var(--fg) 16px
  );
}
.liq-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--fg);
  color: var(--accent);
  padding: 4px 8px;
  z-index: 2;
}
.liq-photo {
  aspect-ratio: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.liq-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.liq-photo-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  border: 1px dashed var(--border-strong);
  padding: 12px 20px;
}
.liq-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}
.liq-conditions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cond-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.cond-new { background: #E5F2D0; color: #2D4A00; }
.cond-bu { background: #FFE0B0; color: #6B3500; }
.cond-pack { background: #FFD0D0; color: #6B0000; }
.cond-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.liq-body h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}
.liq-specs {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 12px;
  font-size: 13px;
}
.liq-specs .k { color: var(--muted); }
.liq-specs .v { color: var(--fg); font-weight: 500; }
.liq-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.price-old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.price-new {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-mono);
}
.price-discount {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--sale);
  color: var(--fg);
  padding: 2px 6px;
  border-radius: 2px;
}
.liq-body .btn { align-self: flex-start; }

.footer-grid a.sale-link { color: var(--sale); }
.footer-grid a.sale-link b { font-weight: 700; }

.prod-tag {
  z-index: 2;
}

/* === Liquidation / Неликвиды === */
:root {
  --sale: #E0A100;          /* янтарный для распродажи */
  --sale-bg: #FFF6E0;
  --sale-dark: #8A5A00;
}

.nav a.is-sale {
  background: var(--sale-bg);
  color: var(--sale-dark);
  padding: 6px 10px;
  border-radius: 3px;
  font-weight: 700;
}
.nav a.is-sale.active {
  background: var(--sale);
  color: var(--fg);
}

.sale-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--sale);
  color: var(--fg);
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 3px;
}
.sale-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.page-hero-sale {
  background: var(--sale-bg);
  border-top: 4px solid var(--sale);
}

.sale-strip {
  background: var(--fg);
  color: var(--bg);
  padding: 32px 0;
}
.sale-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.sale-strip-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sale-strip-grid .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.sale-strip-grid .v {
  font-size: 22px;
  font-weight: 700;
}
@media (max-width: 768px) {
  .sale-strip-grid { grid-template-columns: repeat(2, 1fr); }
}

.liquidation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .liquidation-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .liquidation-grid { grid-template-columns: 1fr; } }

.liq-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.liq-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.liq-strip {
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--sale) 0,
    var(--sale) 8px,
    var(--fg) 8px,
    var(--fg) 16px
  );
}
.liq-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--fg);
  color: var(--accent);
  padding: 4px 8px;
  z-index: 2;
}
.liq-photo {
  aspect-ratio: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.liq-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.liq-photo-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  border: 1px dashed var(--border-strong);
  padding: 12px 20px;
}
.liq-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}
.liq-conditions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cond-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.cond-new { background: #E5F2D0; color: #2D4A00; }
.cond-bu { background: #FFE0B0; color: #6B3500; }
.cond-pack { background: #FFD0D0; color: #6B0000; }
.cond-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.liq-body h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}
.liq-specs {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 12px;
  font-size: 13px;
}
.liq-specs .k { color: var(--muted); }
.liq-specs .v { color: var(--fg); font-weight: 500; }
.liq-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.price-old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.price-new {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-mono);
}
.price-discount {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--sale);
  color: var(--fg);
  padding: 2px 6px;
  border-radius: 2px;
}
.liq-body .btn { align-self: flex-start; }

.footer-grid a.sale-link { color: var(--sale); }
.footer-grid a.sale-link b { font-weight: 700; }

.prod-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: var(--accent);
  color: var(--accent-on);
  z-index: 2;
}
.prod-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.prod-body h3 { font-size: 18px; line-height: 1.1; }
.prod-body .sku-mono { font-family: var(--font-mono); font-size: 12px; color: var(--accent-line); }
.prod-body p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.prod-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}
.prod-specs .k { color: var(--muted); }
.prod-specs .v { color: var(--fg); font-weight: 500; }
.prod-cta { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.prod-cta .btn { flex: 1; padding: 10px 12px; font-size: 11px; min-height: 40px; }
.prod-price { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
.prod-price b { color: var(--fg); font-size: 14px; font-weight: 700; }

/* ============== SERVICES LIST ============== */
.svc-list { border-top: 1px solid var(--border); }
.svc-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 200px 120px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.svc-row:hover { background: var(--surface); }
.svc-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.svc-row h3 { font-size: 22px; line-height: 1.1; }
.svc-row p { font-size: 14px; color: var(--muted); }
.svc-specs { font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--muted); }
.svc-specs b { color: var(--fg); font-weight: 500; }
.svc-price { font-family: var(--font-mono); font-size: 14px; color: var(--fg); text-align: right; }
.svc-price b { display: block; font-size: 18px; font-weight: 700; color: var(--accent-line); }

/* ============== STATS ============== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
}
.stat {
  padding: 36px 24px;
  border-right: 1px solid rgba(232, 242, 200, 0.18);
}
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -0.02em; }
.stat .label { font-family: var(--font-mono); font-size: 12px; color: rgba(232, 242, 200, 0.7); margin-top: 10px; }

/* ============== PROCESS GRID ============== */
.proc-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.proc-step { padding: 32px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 220px; }
.proc-step .step-num { font-family: var(--font-mono); font-size: 11px; color: var(--accent-line); letter-spacing: 0.08em; }
.proc-step h4 { font-size: 18px; margin: 12px 0 8px; }
.proc-step p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ============== TABLE ============== */
.tbl { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13px; }
.tbl th, .tbl td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th { background: var(--surface); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; color: var(--muted); border-bottom: 2px solid var(--accent-line); }
.tbl tbody tr:hover { background: var(--surface-2); }

/* ============== FORMS ============== */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-full { grid-column: 1 / -1; }
.form label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 14px 14px;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  transition: border-color 200ms;
  min-height: 50px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form .checkbox { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-body); font-size: 13px; color: var(--muted); line-height: 1.5; }
.form .checkbox input { width: auto; min-height: auto; margin-top: 4px; }

/* ============== PAGE HERO (sub-pages) ============== */
.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--accent-line); }
.crumbs span { color: var(--border-strong); margin: 0 8px; }
.page-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.page-hero p.lede { font-size: 18px; color: var(--muted); margin-top: 20px; max-width: 64ch; }

/* ============== FOOTER ============== */
footer.site {
  background: var(--fg);
  color: var(--bg);
  padding: 80px 0 32px;
  border-top: 4px solid var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-grid h4 { color: var(--accent); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 14px; color: var(--bg); }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p, .footer-grid address { font-style: normal; font-size: 14px; color: rgba(242, 238, 231, 0.75); line-height: 1.6; }
.footer-grid .brand { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-transform: uppercase; color: var(--bg); margin-bottom: 14px; }
.footer-grid .brand small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--accent); letter-spacing: 0.08em; margin-top: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(232, 242, 200, 0.18);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(242, 238, 231, 0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a:hover { color: var(--accent); }

/* ============== CTA SECTION ============== */
.cta-block {
  background: var(--accent);
  color: var(--accent-on);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0, transparent 18px, rgba(15, 21, 0, 0.05) 18px, rgba(15, 21, 0, 0.05) 19px);
  pointer-events: none;
}
.cta-block .container { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.cta-block h2 { color: var(--accent-on); }
.cta-block p { color: var(--accent-on); opacity: 0.8; margin-top: 16px; font-size: 17px; }
.cta-block .btn { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cta-block .btn:hover { background: var(--accent-on); color: var(--fg); }

/* ============== BREADCRUMB NAV ============== */
.subnav-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.subnav-cats a { padding: 8px 14px; font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--border-strong); background: var(--bg); }
.subnav-cats a:hover, .subnav-cats a.active { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }

/* ============== UTILITIES ============== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.divider { height: 1px; background: var(--border); margin: 32px 0; }
.divider-accent { height: 2px; background: var(--accent-line); margin: 32px 0; }

/* ============== RESPONSIVE ============== */
@media (max-width: 1180px) {
  .nav { gap: 16px 20px; }
  .nav a { font-size: 13px; }
  .header-phone { font-size: 14px; letter-spacing: -0.02em; }
  .header-cta { gap: 12px; }
  .header-main { gap: 12px 20px; }
  .logo img { height: 60px; }
}
@media (max-width: 1100px) {
  .nav { gap: 13px; }
  .nav a { font-size: 12.5px; }
  .nav a.is-stock { font-size: 12px; }
  .header-main { gap: 10px 16px; }
  .header-phone { font-size: 13px; }
  .logo img { height: 54px; }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .proc-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-block .container { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 60px 1fr; }
  .svc-row > *:nth-child(3), .svc-row > *:nth-child(4), .svc-row > *:nth-child(5) { grid-column: 2; }
}
@media (max-width: 768px) {
  :root { --space-section: 64px; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; }
  .nav.open a { padding: 14px 24px; border-bottom: 1px solid var(--border); }
  .nav.open a:last-child { border-bottom: none; }
  .mobile-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .header-phone { font-size: 14px; }
  .topbar .container { font-size: 11px; height: auto; padding: 8px 24px; }
  .topbar-left, .topbar-right { gap: 12px; font-size: 11px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-cell { min-height: auto; padding: 24px 20px; }
  .prod-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(232, 242, 200, 0.18); }
  .stat:last-child { border-bottom: none; }
  .proc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
  .svc-row { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .svc-row > *:nth-child(3), .svc-row > *:nth-child(4), .svc-row > *:nth-child(5) { grid-column: 1; }
  .hero { padding: 48px 0 64px; }
  .spec-card dl { grid-template-columns: 1fr; }
}

/* ============== A11Y ============== */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============== MAP SECTION ============== */
.map-header { max-width: 760px; margin-bottom: 32px; }
.map-header h2 { font-size: 36px; margin-top: 12px; }
.map-header .lede { color: var(--muted); margin-top: 12px; font-size: 16px; line-height: 1.6; }
.map-wrap {
  border: 2px solid var(--fg);
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}
.map-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
@media (max-width: 768px) {
  .map-header h2 { font-size: 28px; }
  .map-wrap iframe { height: 360px; }
  .map-actions .btn { flex: 1; min-width: 200px; }
}

/* ============== LEAFLET MAP ============== */
#leaflet-map {
  width: 100%;
  height: 450px;
  background: #e8e8e0; /* fallback while tiles load */
}
/* Tame the default Leaflet UI for our B2B style */
.leaflet-container { font-family: var(--font-mono); }
.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #0a0a0a !important;
  border: 1px solid #0a0a0a !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}
.leaflet-control-zoom a:hover { background: var(--accent) !important; }
.leaflet-control-attribution {
  background: rgba(255,255,255,0.85) !important;
  font-size: 10px !important;
  font-family: var(--font-mono) !important;
  padding: 2px 8px !important;
}
.leaflet-control-attribution a { color: #555 !important; }

/* Custom lime marker */
.ap-marker { position: relative; }
.ap-marker-pin {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: 3px solid #0a0a0a;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.ap-marker-pin::after {
  content: '';
  width: 12px;
  height: 12px;
  background: #0a0a0a;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.ap-marker-dot {
  width: 8px;
  height: 8px;
  background: rgba(10,10,10,0.4);
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
  left: 16px;
}

/* Popup */
.leaflet-popup-content-wrapper {
  background: #0a0a0a !important;
  color: #f2eee7 !important;
  border-radius: 0 !important;
  padding: 16px 18px !important;
  border: 2px solid var(--accent) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3) !important;
}
.leaflet-popup-content { margin: 0 !important; font-family: var(--font-mono) !important; }
.leaflet-popup-tip { background: #0a0a0a !important; border: 1px solid var(--accent) !important; }
.leaflet-popup-close-button { color: var(--accent) !important; }
.ap-popup-eyebrow {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 6px;
}
.ap-popup-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; font-family: var(--font-display) !important; }
.ap-popup-addr { font-size: 12px; line-height: 1.5; color: #d4d0c5; margin-bottom: 4px; }
.ap-popup-time { font-size: 11px; color: var(--accent); margin-top: 6px; }

@media (max-width: 768px) {
  #leaflet-map { height: 360px; }
  .leaflet-control-zoom a { width: 32px !important; height: 32px !important; line-height: 32px !important; }
}


/* ============== REQUISITES GRID ============== */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.req-block {
  background: var(--surface);
  border: 2px solid var(--fg);
  padding: 28px 32px;
}
.req-block h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-line);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.req-block dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 18px; }
.req-block dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 3px;
}
.req-block dd {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  word-break: break-word;
}
.req-block dd a { color: var(--accent-line); }

@media (max-width: 900px) {
  .req-grid { grid-template-columns: 1fr; }
  .req-block dl { grid-template-columns: 130px 1fr; gap: 6px 12px; }
  .req-block dt { font-size: 11px; }
  .req-block dd { font-size: 13px; }
}

/* Product image section */
.product-visual-section {
  padding-top: 0;
  padding-bottom: 24px;
}
.product-image {
  display: block;
  margin: 0 auto;
  max-width: 480px;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px;
}
@media (max-width: 768px) {
  .product-image { max-width: 100%; padding: 16px; }
}

/* Page hero with image */
.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 8px;
}
.page-hero-text { max-width: 600px; }
.page-hero-image {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-hero-image .product-image {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 32px;
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.image-caption {
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-hero-text { max-width: 100%; }
  .page-hero-image .product-image { padding: 20px; }
}

/* Polished image frame */
.image-frame {
  position: relative;
  background: #f4f1ea;
  border: 1px solid var(--border);
  padding: 36px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 24px 48px -24px rgba(0,0,0,0.12);
}
.image-frame .product-image {
  background: transparent;
  border: 0;
  padding: 0;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.image-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.image-corner-tl { top: 6px; left: 6px; border-top-width: 2px; border-left-width: 2px; }
.image-corner-tr { top: 6px; right: 6px; border-top-width: 2px; border-right-width: 2px; }
.image-corner-bl { bottom: 6px; left: 6px; border-bottom-width: 2px; border-left-width: 2px; }
.image-corner-br { bottom: 6px; right: 6px; border-bottom-width: 2px; border-right-width: 2px; }
.hero-specs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 20px;
  border: 1px solid var(--border);
  background: #fff;
}
.hero-spec {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border);
}
.hero-spec:last-child { border-right: 0; }
.hero-spec-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero-spec-v {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}
@media (max-width: 900px) {
  .image-frame { padding: 20px; }
}
@media (max-width: 600px) {
  .hero-specs { grid-template-columns: 1fr; }
  .hero-spec { border-right: 0; border-bottom: 1px solid var(--border); }
  .hero-spec:last-child { border-bottom: 0; }
}

/* =========================================================
   Оборудование в наличии (stock.html)
   ========================================================= */
.footer-grid a.stock-link { color: var(--accent); }
.footer-grid a.stock-link b { font-weight: 700; }

.nav a.is-stock {
  color: var(--accent-line);
  font-weight: 700;
  border-bottom-color: var(--accent-soft);
}
.nav a.is-stock.active { border-bottom-color: var(--accent-line); }

.page-hero-stock {
  border-top: 4px solid var(--accent);
}
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--accent-on);
  padding: 6px 12px;
  margin-bottom: 16px;
}
.stock-pill-dot {
  width: 8px; height: 8px;
  background: var(--accent-on);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* --- сводная полоса --- */
.stock-strip {
  background: var(--fg);
  color: var(--bg);
  padding: 32px 0;
}
.stock-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stock-strip-grid > div { display: flex; flex-direction: column; gap: 4px; }
.stock-strip-grid .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.stock-strip-grid .v { font-size: 22px; font-weight: 700; }

/* --- фильтр --- */
.stock-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.stock-filter button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  cursor: pointer;
  transition: background 160ms, border-color 160ms, color 160ms;
}
.stock-filter button:hover { border-color: var(--fg); background: var(--surface); }
.stock-filter button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  font-weight: 700;
}

/* --- таблица наличия --- */
/* =========================================================
   В наличии — сетка карточек
   ========================================================= */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--fg);
  border-left: 1px solid var(--border);
}
.stock-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 200ms;
}
.stock-card:hover { background: var(--surface); }

/* --- визуал --- */
.stock-card-visual {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.stock-card-visual.has-image { padding: 0; background: #fff; }
.stock-card-visual.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 400ms var(--ease);
}
.stock-card-visual.has-image.contain img { object-fit: contain; padding: 14px; }
.stock-card-visual.tall { aspect-ratio: 3 / 4; }
.stock-card-visual.tall.has-image.contain img { padding: 10px 18px; }
.stock-card:hover .stock-card-visual.has-image img { transform: scale(1.03); }
.stock-card:hover .stock-card-visual.has-image.contain img { transform: none; }

/* плейсхолдер для позиций без фото */
.stock-card-visual:not(.has-image) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 8px, rgba(26,26,26,0.035) 8px, rgba(26,26,26,0.035) 9px);
}
.stock-card-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}
.stock-card-code i {
  font-style: normal;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.05;
  word-break: break-word;
}
.stock-card-visual.has-image .stock-card-code {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  align-items: flex-start;
  text-align: left;
  padding: 5px 9px;
  background: rgba(26,26,26,0.78);
  color: rgba(255,255,255,0.8);
}
.stock-card-visual.has-image .stock-card-code i { font-size: 13px; color: #fff; }

/* --- остаток --- */
.stock-card-qty {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  background: var(--accent);
  color: var(--accent-on);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.stock-card-visual:not(.has-image) .stock-card-qty {
  position: static;
  align-self: center;
  margin-top: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.stock-card-qty.is-low { background: var(--hazard); color: #fff; }
.stock-card-visual:not(.has-image) .stock-card-qty.is-low {
  background: var(--hazard);
  color: #fff;
}

/* --- тело --- */
.stock-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.stock-card-body h3 {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.stock-card-body h3 a:hover { color: var(--accent-line); }
.stock-card-par {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.stock-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.stock-card-lead {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.stock-card-lead b { display: block; color: var(--fg); font-weight: 700; font-size: 12px; }
.stock-card-foot .btn { flex: 0 0 auto; padding: 9px 14px; font-size: 11px; min-height: 38px; }

.stock-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}
.stock-note b { color: var(--fg); font-weight: 500; }

@media (max-width: 900px) {
  .stock-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero-stock h1 { font-size: clamp(28px, 8.4vw, 44px); letter-spacing: -0.01em; }
  .stock-pill { font-size: 9px; }
  .stock-filter button { font-size: 10px; padding: 8px 12px; }
  .stock-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- баннер «В наличии» на главной и в каталоге --- */
.stock-banner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--accent-soft);
  border: 2px solid var(--accent-line);
  padding: 32px 28px;
  margin-bottom: 48px;
}
.stock-banner .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-line);
  display: block;
  margin-bottom: 10px;
}
.stock-banner h2 { font-size: clamp(20px, 2.2vw, 28px); }
.stock-banner p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}
.stock-banner .btn { justify-self: end; }
@media (max-width: 768px) {
  .stock-banner { grid-template-columns: 1fr; padding: 24px 18px; }
  .stock-banner .btn { justify-self: stretch; }
}
.page-hero-stock h1 .accent { color: var(--accent-line); }
.stock-note .eyebrow { flex: 0 0 auto; }

@media (max-width: 768px) {
  .stock-grid { grid-template-columns: 1fr; }
  .stock-card-visual { aspect-ratio: 16 / 9; }
}
