/* ==========================================================================
   NORMA Group — стили сайта.
   Цвета сняты пипеткой с утверждённого логотипа: ультрамарин #1C4D9C и
   сигнальный красный #D12D2C — две половины знака, графит #1B2023 — шрифт
   логотипа. Ультрамарин ведёт бренд, красный работает указателем и вторым
   акцентом, белое поле остаётся основой. Гарнитуры IBM Plex.
   ========================================================================== */

:root {
  /* Цвета логотипа */
  --ink: #1b2123;
  --blue: #1a4e9c;
  --blue-dark: #143f7f;
  --blue-soft: #eaf0f9;
  --red: #d12d2c;
  --red-dark: #b02322;
  --red-soft: #fdeceb;

  --paper: #ffffff;
  --field: #eef0f2;
  --field-2: #f6f7f9;
  --rule: #c9cfd6;
  --rule-soft: #e3e7eb;
  --concrete: #5a6570;
  --industry: #c2410c;
  --wa: #25d366;

  /* Двухцветная полоса-подпись: половина знака синяя, половина красная */
  --split: linear-gradient(90deg, var(--blue) 0 58%, var(--red) 58% 100%);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --wrap: 1280px;
  --gut: 24px;
  --head-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 900px) {
  :root { --gut: 40px; --head-h: 76px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Единая колонка страницы. Все блоки сайта живут внутри неё, поэтому
   в элементах с классом .wrap задаём только padding-block — сокращённый
   padding обнулил бы боковые поля, и блок вышел бы шире соседних. */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
/* Утилиты только прячут: собственное display элемента при этом не теряется. */
@media (max-width: 899px) { .only-desktop { display: none !important; } }
@media (min-width: 900px) { .only-mobile { display: none !important; } }

/* ---------- Типографика ---------- */

h1, h2, h3 { font-family: var(--cond); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(32px, 5.4vw, 60px); }
h2 { font-size: clamp(24px, 3.4vw, 38px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
p { margin: 0 0 14px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--concrete); max-width: 62ch; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
}
.mono { font-family: var(--mono); }
.muted { color: var(--concrete); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  text-align: center;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.ghost:hover { background: var(--blue); color: #fff; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.quiet:hover { background: var(--field); color: var(--ink); border-color: var(--concrete); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--rule-soft);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* Полоса из двух половин знака: ультрамарин и сигнальный красный */
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--split);
}
.header.scrolled { box-shadow: 0 1px 0 var(--rule), 0 8px 24px -18px rgba(26, 29, 33, 0.5); }
.header-in {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.glyph {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 2.5px solid var(--blue);
  display: grid; grid-template-rows: 1fr auto;
}
.glyph b {
  font-family: var(--cond); font-weight: 700; font-size: 22px; line-height: 1;
  color: var(--blue); display: flex; align-items: center; justify-content: center;
}
.glyph i {
  display: block; height: 6px;
  border-top: 2.5px solid var(--blue);
  background: repeating-linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 5px);
}
.brand-text { line-height: 1.05; }
.wordmark { font-family: var(--cond); font-weight: 700; font-size: 21px; letter-spacing: 0.02em; color: var(--ink); }
.wordmark span { color: var(--blue); }
.brand-desc { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--concrete); }
.brand img.logo-img { height: 38px; width: auto; display: block; }
@media (min-width: 900px) { .brand img.logo-img { height: 46px; } }
.footer .brand img.logo-img { height: 52px; }

.nav { display: none; gap: 22px; margin-left: 10px; }
@media (min-width: 1060px) { .nav { display: flex; } }
.nav a { color: var(--ink); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { text-decoration: none; border-bottom-color: var(--blue); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.icon-btn:hover { border-color: var(--blue); background: var(--field-2); }
.icon-btn svg { width: 19px; height: 19px; }
.count-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.count-badge[hidden] { display: none; }

/* Мобильное меню */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule-soft);
  background: var(--paper);
  padding: 8px var(--gut) 16px;
}
.mobile-nav.open { display: block; }
@media (min-width: 1060px) { .mobile-nav.open { display: none; } }
.mobile-nav a { display: block; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink); }

/* ==========================================================================
   ПЕРВЫЙ ЭКРАН
   ========================================================================== */

.hero { position: relative; background: var(--ink); }

/* Кадры и панель управления — две строки сетки: панель занимает
   собственную полосу и ничем не перекрывает текст слайда. */
.carousel { position: relative; display: grid; grid-template-rows: 1fr auto; background: var(--ink); }

.slides {
  position: relative; display: grid; grid-template-areas: "slide";
  overflow: hidden; min-height: 420px;
}
@media (min-width: 900px) { .slides { min-height: clamp(430px, 56vh, 520px); } }

.slide {
  grid-area: slide; position: relative; display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

.slide-bg { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.slide-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05); transition: transform 9s linear; will-change: transform;
}
.slide.is-active .slide-bg img { transform: scale(1); }
/* Затемнение слева направо: текст ложится на плотную часть, фото остаётся видно */
.slide-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20, 26, 30, 0.94) 0%, rgba(20, 26, 30, 0.86) 30%, rgba(20, 26, 30, 0.5) 58%, rgba(20, 26, 30, 0.28) 100%);
}
@media (max-width: 899px) {
  .slide-bg::after {
    background: linear-gradient(180deg, rgba(20, 26, 30, 0.72) 0%, rgba(20, 26, 30, 0.86) 45%, rgba(20, 26, 30, 0.95) 100%);
  }
}

.slide-in { position: relative; z-index: 4; width: 100%; padding-block: 44px; }
@media (min-width: 900px) { .slide-in { padding-block: 60px; } }
.slide-body { max-width: 620px; color: #fff; }

.slide-kicker {
  display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66); margin-bottom: 16px;
}
.slide-title {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.04; letter-spacing: 0.005em;
  color: #fff; margin: 0;
}
.slide-text {
  margin: 18px 0 0; max-width: 50ch;
  font-size: clamp(14.5px, 1.4vw, 16.5px); line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}
.slide-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
/* Кнопки одинаковой ширины: разнобой на телефоне выглядит неаккуратно */
@media (max-width: 559px) { .slide-cta { display: grid; grid-template-columns: 1fr; } .slide-cta .btn { width: 100%; justify-content: center; } }

.slide-body > * { opacity: 0; transform: translateY(16px); }
.slide.is-active .slide-body > * { animation: slideUp 0.6s var(--ease) forwards; }
.slide.is-active .slide-body > *:nth-child(1) { animation-delay: 0.05s; }
.slide.is-active .slide-body > *:nth-child(2) { animation-delay: 0.12s; }
.slide.is-active .slide-body > *:nth-child(3) { animation-delay: 0.19s; }
.slide.is-active .slide-body > *:nth-child(4) { animation-delay: 0.26s; }
@keyframes slideUp { to { opacity: 1; transform: none; } }

/* Вертикальный слоган у правой кромки */
.hero-slogan {
  position: absolute; right: 32px; top: 44px; z-index: 5;
  display: none; flex-direction: column; gap: 3px;
  padding-left: 16px; border-left: 2px solid var(--red);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.82);
}
@media (min-width: 1180px) { .hero-slogan { display: flex; } }

/* Полоса доверия и стрелки */
.hero-controls { background: rgba(15, 20, 24, 0.82); border-top: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(3px); }
.hero-controls-in { display: flex; align-items: center; gap: 24px; padding-block: 16px; }
/* На узком экране строка из полосы доверия и стрелок сжимает текст
   в лапшу — раскладываем в две строки. */
@media (max-width: 759px) {
  .hero-controls-in { flex-direction: column; align-items: stretch; gap: 16px; padding-block: 18px; }
  .hero-controls-in .car-nav { justify-content: flex-end; }
}

.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px 30px; flex: 1; min-width: 0; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust li { display: flex; gap: 11px; align-items: flex-start; color: #fff; }
@media (max-width: 759px) { .trust { gap: 12px; } .trust b, .trust span { display: inline; } .trust span::before { content: " "; } }
.trust .ic { flex: 0 0 auto; color: var(--red); margin-top: 1px; }
.trust b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.trust span { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.62); line-height: 1.35; }

.car-nav { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.car-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.55); }
.car-count b { color: var(--red); font-weight: 600; }

.car-btn {
  width: 40px; height: 40px; flex: 0 0 auto; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
  background: transparent; color: #fff;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.car-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.car-btn.dark { border-color: var(--rule); color: var(--ink); }
.car-btn.dark:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.car-btn:disabled { opacity: 0.35; cursor: default; }
.car-btn:disabled:hover { background: transparent; border-color: var(--rule); color: var(--ink); }

/* ==========================================================================
   БЫСТРЫЙ ПОИСК
   ========================================================================== */

.quick { background: var(--paper); border-bottom: 1px solid var(--rule-soft); }
.quick-in { display: grid; gap: 28px; padding-block: 30px 34px; }
@media (min-width: 1000px) {
  .quick-in { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr); gap: 56px; align-items: center; padding-block: 34px 38px; }
}

.quick-search { display: grid; gap: 14px; }
@media (min-width: 780px) { .quick-search { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; } }
.quick-title {
  font-family: var(--cond); font-weight: 700; font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.15; margin: 0; padding-top: 4px;
}
.quick-form { min-width: 0; }

.search-field { display: flex; border: 1px solid var(--rule); background: var(--paper); transition: border-color 0.18s var(--ease); }
.search-field:focus-within { border-color: var(--blue); }
.search-field input { flex: 1; min-width: 0; border: 0; padding: 13px 16px; font-size: 15px; background: transparent; }
.search-field input::placeholder { color: #9aa4ae; }
.search-field input:focus { outline: none; }
.search-field button {
  border: 0; background: var(--blue); color: #fff; width: 52px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s var(--ease);
}
.search-field button:hover { background: var(--blue-dark); }

.quick-hint { margin: 9px 0 0; font-size: 13px; color: var(--concrete); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-link {
  font-size: 13px; padding: 6px 13px; background: var(--field);
  border: 1px solid transparent; color: var(--ink);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.chip-link:hover { text-decoration: none; background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

/* Показатели с водяным знаком */
.quick-stats {
  position: relative; overflow: hidden;
  display: grid; gap: 16px; padding: 22px 24px;
  background: var(--field-2); border: 1px solid var(--rule-soft);
}
.quick-stats::after {
  content: ""; position: absolute; right: -34px; top: 50%; transform: translateY(-50%);
  width: 190px; height: 172px; opacity: 0.07; pointer-events: none;
  background: url("/assets/img/symbol.svg") center / contain no-repeat;
}
.quick-stats .stat { position: relative; z-index: 1; }
.quick-stats .num {
  display: block; font-family: var(--cond); font-weight: 700; font-size: 30px;
  line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums;
}
.quick-stats .stat:first-child .num { color: var(--red); }
.quick-stats .cap { display: block; font-size: 13px; color: var(--concrete); margin-top: 5px; }

/* ==========================================================================
   ЗАГОЛОВКИ РАЗДЕЛОВ
   ========================================================================== */

.section { padding: 52px 0; }
@media (min-width: 900px) { .section { padding: 68px 0; } }
.section.alt { background: var(--field-2); }

.row-head { display: grid; gap: 16px; margin-bottom: 28px; }
@media (min-width: 900px) {
  .row-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 48px; align-items: end; margin-bottom: 34px; }
}
.row-head h2 {
  font-family: var(--cond); font-weight: 700; font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.1; margin: 8px 0 0;
}
.row-head .row-aside p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--concrete); }
.row-head .row-aside { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
@media (min-width: 900px) { .row-head .row-aside { align-items: flex-end; text-align: right; } }
.row-nav { display: flex; gap: 10px; }
@media (min-width: 900px) { .row-nav { justify-self: end; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--concrete);
}
.eyebrow b { color: var(--red); font-weight: 600; }
.eyebrow i { width: 22px; height: 1px; background: var(--rule); display: block; }
.eyebrow.red { color: var(--red); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--blue);
}
.link-arrow::after {
  content: ""; width: 15px; height: 15px; background: currentColor;
  transition: transform 0.18s var(--ease);
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.4 12h15M13.2 5.8 19.4 12l-6.2 6.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.4 12h15M13.2 5.8 19.4 12l-6.2 6.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   АКТУАЛЬНЫЕ РЕШЕНИЯ
   ========================================================================== */

/* Горизонтальная лента: на узких экранах листается пальцем,
   на широких укладывается в четыре колонки. */
.sol-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 4px;
  scrollbar-width: none;
}
.sol-rail::-webkit-scrollbar { display: none; }
@media (min-width: 1080px) {
  .sol-rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
}

.sol {
  scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--rule-soft); color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.sol:hover { text-decoration: none; border-color: var(--rule); box-shadow: 0 20px 36px -28px rgba(27, 33, 35, 0.9); transform: translateY(-3px); }
.sol-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--field); }
.sol-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.sol:hover .sol-img img { transform: scale(1.04); }
.sol-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sol-accent, var(--blue)); }
.sol-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.sol h3 { font-size: 16px; line-height: 1.3; margin: 0 0 8px; hyphens: auto; overflow-wrap: break-word; }
.sol p { font-size: 13.5px; line-height: 1.5; color: var(--concrete); margin: 0 0 14px; }
.sol .link-arrow { margin-top: auto; font-size: 13.5px; }

/* ==========================================================================
   НАПРАВЛЕНИЯ КАТАЛОГА
   ========================================================================== */

.dirs { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .dirs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .dirs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.dir {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--rule-soft); color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.dir:hover { text-decoration: none; border-color: var(--rule); box-shadow: 0 20px 36px -28px rgba(27, 33, 35, 0.9); transform: translateY(-3px); }

.dir-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--field); }
.dir-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.dir:hover .dir-img img { transform: scale(1.05); }
.dir-no {
  position: absolute; left: 0; top: 0; z-index: 2;
  min-width: 38px; padding: 6px 10px;
  background: var(--dir-accent, var(--blue)); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
}
.dir-count {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 4px 9px; background: rgba(20, 26, 30, 0.78); color: #fff;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
}
.dir-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.dir h3 { font-size: 15.5px; line-height: 1.3; margin: 0 0 7px; hyphens: auto; overflow-wrap: break-word; }
.dir p { font-size: 13px; line-height: 1.45; color: var(--concrete); margin: 0 0 12px; }
.dir-go {
  margin-top: auto; align-self: flex-end;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); color: var(--blue);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.dir:hover .dir-go { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Карточка-призыв в конце сетки направлений */
.dir-cta {
  display: flex; flex-direction: column; justify-content: center;
  padding: 22px 20px; background: var(--field); border: 1px solid var(--rule-soft);
}
.dir-cta h3 {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: 20px; line-height: 1.12; margin: 0 0 10px;
}
.dir-cta p { font-size: 13.5px; line-height: 1.5; color: var(--concrete); margin: 0 0 16px; }

/* ==========================================================================
   ПРЕИМУЩЕСТВА
   ========================================================================== */

.advantages { display: grid; gap: 26px; }
@media (min-width: 620px) { .advantages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 34px; } }
@media (min-width: 1000px) { .advantages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adv { padding-top: 20px; border-top: 2px solid var(--ink); }
.adv .ic { color: var(--blue); margin-bottom: 14px; display: block; }
.adv:nth-child(2n) .ic { color: var(--red); }
.adv h3 { font-size: 16.5px; margin: 0 0 8px; }
.adv p { font-size: 13.5px; line-height: 1.55; color: var(--concrete); margin: 0; }

/* ==========================================================================
   ПОРЯДОК ПОСТАВКИ
   ========================================================================== */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; counter-reset: step; }
@media (min-width: 620px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.step { position: relative; }
.step-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-ic {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: var(--paper); color: var(--blue);
}
.step-no { font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--rule); }
.step h3 { font-size: 16px; margin: 0 0 7px; }
.step p { font-size: 13.5px; line-height: 1.55; color: var(--concrete); margin: 0; }
/* Пунктир между шагами: последовательность, а не четыре отдельные карточки */
@media (min-width: 1000px) {
  .step:not(:last-child) .step-top::after {
    content: ""; flex: 1; height: 1px;
    background: repeating-linear-gradient(90deg, var(--rule) 0 5px, transparent 5px 10px);
  }
}

/* ==========================================================================
   КЛИЕНТЫ
   ========================================================================== */

.clients-rail { display: flex; align-items: center; gap: 12px; }
.clients {
  flex: 1; min-width: 0; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.clients::-webkit-scrollbar { display: none; }
@media (min-width: 1080px) { .clients { grid-auto-columns: calc((100% - 5 * 12px) / 6); } }
.rail-prev, .rail-next { display: none; }
@media (min-width: 760px) { .rail-prev, .rail-next { display: flex; } }

.client {
  scroll-snap-align: start;
  background: var(--paper); border: 1px solid var(--rule-soft);
  min-height: 96px; padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.client:hover { border-color: var(--rule); box-shadow: 0 14px 26px -22px rgba(27, 33, 35, 0.8); }

/* Логотип вписываем по ширине плитки, высоту держим общей для всего ряда:
   иначе длинные названия визуально «перевешивают» короткие. */
.client-logo {
  max-width: 100%; height: auto; max-height: 38px;
  object-fit: contain; opacity: 0.78;
  transition: opacity 0.18s var(--ease);
}
.client:hover .client-logo { opacity: 1; }

/* Запасной вид, пока логотип не загружен */
.client .mono-mark {
  font-family: var(--cond); font-weight: 700; font-size: 19px; color: var(--blue);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-soft); background: var(--field-2);
}
.client-name { font-weight: 600; font-size: 13px; line-height: 1.3; text-align: center; }

/* ==========================================================================
   О КОМПАНИИ, КОНТАКТЫ И ЗАЯВКА
   ========================================================================== */

.cta { background: var(--ink); color: #fff; }
.cta-grid { display: grid; }
@media (min-width: 1080px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) minmax(0, 1.05fr); align-items: stretch; }
}

.cta-left { display: flex; align-items: center; padding: 44px var(--gut); }
@media (min-width: 1080px) { .cta-left { padding: 64px 40px 64px max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))); } }
.cta-left-in { max-width: 420px; }
.cta h2 {
  font-family: var(--cond); font-weight: 700; font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.12; margin: 0 0 14px; color: #fff;
}
.cta-lead { font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.68); margin: 0 0 26px; }

.cta-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.cta-contacts li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.cta-contacts .ic { flex: 0 0 auto; color: var(--red); margin-top: 2px; }
.cta-contacts a { color: #fff; }
.cta-contacts a:hover { color: #fff; text-decoration: underline; }
.cta-contacts span { color: rgba(255, 255, 255, 0.75); }

/* Фото офиса с вывеской */
.cta-photo { position: relative; min-height: 240px; overflow: hidden; display: none; }
@media (min-width: 1080px) { .cta-photo { display: block; } }
/* Только прямой потомок: логотип на вывеске лежит глубже и не должен
   попадать под правила фоновой фотографии. */
.cta-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20, 26, 30, 0.86) 0%, rgba(20, 26, 30, 0.34) 40%, rgba(20, 26, 30, 0.5) 100%);
}
/* Логотип кладём поверх фотографии живым SVG — на снимке вывеска пустая */
.cta-sign {
  position: absolute; left: 30px; bottom: 34px; z-index: 2; max-width: 250px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.cta-sign-logo { display: block; width: 178px; height: 51px; }
.cta-sign-text {
  display: block; padding-top: 14px; border-top: 3px solid var(--red);
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: 15px; line-height: 1.25; color: #fff;
}

.cta-form { background: var(--paper); color: var(--ink); padding: 34px var(--gut) 40px; }
@media (min-width: 1080px) { .cta-form { padding: 52px 40px 52px 44px; } }
.cta-form h3 { font-family: var(--cond); font-weight: 700; font-size: 25px; margin: 0 0 6px; }
.cta-form-lead { font-size: 13.5px; color: var(--concrete); margin: 0 0 20px; }
.cta-form .form-row { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 520px) { .cta-form .form-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cta-form input, .cta-form textarea {
  width: 100%; border: 1px solid var(--rule); background: var(--paper);
  padding: 12px 14px; font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color 0.16s var(--ease);
}
.cta-form input:focus, .cta-form textarea:focus { outline: none; border-color: var(--blue); }
.cta-form textarea { resize: vertical; min-height: 104px; margin-bottom: 14px; }
.cta-form .check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--concrete); margin-bottom: 16px; }
.cta-form .check input { width: auto; margin-top: 2px; flex: 0 0 auto; }
.btn.wide { width: 100%; justify-content: center; }
.form-note { margin: 12px 0 0; font-size: 13.5px; color: var(--blue); }
.form-note.error { color: var(--red); }


/* ==========================================================================
   Каталог
   ========================================================================== */

.crumbs { font-size: 13.5px; color: var(--concrete); padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--concrete); }
.crumbs span { color: var(--rule); }

.catalog-head { padding: 14px 0 22px; border-bottom: 1px solid var(--rule); }
.catalog-head h1 { font-size: clamp(26px, 3.6vw, 40px); }
.catalog-head .lead { margin-top: 8px; font-size: 15.5px; }

.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; scrollbar-width: thin; }
.cat-tab {
  flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--rule);
  font-size: 14px; color: var(--ink); background: var(--paper); white-space: nowrap;
  transition: all 0.15s var(--ease);
}
.cat-tab:hover { text-decoration: none; border-color: var(--blue); color: var(--blue); }
.cat-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-tab .n { font-family: var(--mono); font-size: 12px; opacity: 0.65; margin-left: 6px; }

.catalog-layout { display: block; padding-block: 22px 96px; }
@media (min-width: 1000px) {
  .catalog-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 60px; }
}

/* Фильтры */
.filters-aside { display: none; }
@media (min-width: 1000px) { .filters-aside { display: block; } }
.filters { font-size: 14.5px; }
@media (min-width: 1000px) { .filters { position: sticky; top: calc(var(--head-h) + 12px); max-height: calc(100vh - var(--head-h) - 30px); overflow-y: auto; padding-right: 6px; } }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 6px; }
.filters-head .clear { font-size: 13px; color: var(--red); background: none; border: 0; cursor: pointer; padding: 2px 0; }
.filters-head .clear:hover { text-decoration: underline; }

.fgroup { border-bottom: 1px solid var(--rule-soft); }
.fgroup > summary {
  list-style: none; cursor: pointer; padding: 13px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after {
  content: ""; width: 8px; height: 8px; flex: 0 0 8px;
  border-right: 1.5px solid var(--concrete); border-bottom: 1.5px solid var(--concrete);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.2s var(--ease);
}
.fgroup[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.fgroup .unit { color: var(--concrete); font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.fbody { padding-bottom: 14px; max-height: 250px; overflow-y: auto; }
.fbody.wrapchips { display: flex; flex-wrap: wrap; gap: 6px; }

.fopt { display: flex; align-items: center; gap: 9px; padding: 5px 0; cursor: pointer; line-height: 1.3; }
.fopt input { width: 16px; height: 16px; accent-color: var(--blue); flex: 0 0 16px; margin: 0; }
.fopt .txt { flex: 1; }
.fopt .n { font-family: var(--mono); font-size: 12px; color: var(--concrete); }
.fopt:hover .txt { color: var(--blue); }

.fchip { position: relative; }
.fchip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fchip span {
  display: block; padding: 6px 10px; border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; transition: all 0.12s var(--ease);
}
.fchip input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; }
.fchip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.fchip:hover span { border-color: var(--blue); }

/* Панель управления списком */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.toolbar .found { font-size: 14.5px; color: var(--concrete); margin-right: auto; }
.toolbar .found b { color: var(--ink); font-family: var(--mono); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding: 9px 34px 9px 12px; border: 1px solid var(--rule); background: var(--paper); font-size: 14px; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--concrete); border-bottom: 1.5px solid var(--concrete); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.view-toggle { display: flex; border: 1px solid var(--rule); }
.view-toggle button { width: 38px; height: 38px; border: 0; background: var(--paper); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.view-toggle button + button { border-left: 1px solid var(--rule); }
.view-toggle button.active { background: var(--ink); color: #fff; }
.view-toggle svg { width: 16px; height: 16px; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0; }
.active-filters:empty { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 8px 5px 10px; border: 1px solid var(--blue); color: var(--blue);
  font-size: 13px; background: rgba(27, 79, 160, 0.06);
}
.tag button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 2px; }
.tag button:hover { color: var(--red); }

/* Сетка товаров */
.grid { display: grid; gap: 14px; padding: 20px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--rule-soft);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  animation: cardin 0.32s var(--ease) both;
}
@keyframes cardin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card:hover { border-color: var(--concrete); box-shadow: 0 16px 30px -26px rgba(26, 29, 33, 0.9); }
.card-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--field-2); border-bottom: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.card:hover .card-img img { transform: scale(1.035); }
.ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(27, 79, 160, 0.07) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(27, 79, 160, 0.07) 0 1px, transparent 1px 22px);
}
.ph .ph-mark { width: 26px; height: 26px; border: 2px solid var(--rule); display: flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: 700; color: var(--rule); }
.ph .ph-sku { font-family: var(--mono); font-size: 11.5px; color: var(--concrete); word-break: break-all; }
.badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; background: var(--paper); border: 1px solid var(--rule); color: var(--concrete);
}
.badge.in { color: #14663a; border-color: #a8d5bd; background: #eef8f2; }
.badge.draft { left: auto; right: 10px; color: #8a5a00; border-color: #e5cf9a; background: #fdf6e6; }

.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; flex: 1; }
.card-sku { font-family: var(--mono); font-size: 11.5px; color: var(--concrete); letter-spacing: 0.03em; }
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.32; margin: 5px 0 10px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--blue); text-decoration: none; }
.card-attrs { list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; color: var(--concrete); }
.card-attrs li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--rule-soft); }
.card-attrs b { font-family: var(--mono); font-weight: 500; color: var(--ink); text-align: right; }
.card-foot { margin-top: auto; display: flex; gap: 8px; }
.card-foot .btn { flex: 1; }

/* Табличный вид */
.table-wrap { padding: 20px 0; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--rule-soft); padding: 10px 12px; text-align: left; vertical-align: middle; }
table.tbl thead th {
  position: sticky; top: 0; background: var(--field); z-index: 1;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--concrete);
  border-bottom: 1px solid var(--rule);
}
table.tbl tbody tr:hover { background: var(--field-2); }
table.tbl td.sku { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
table.tbl td.act { text-align: right; white-space: nowrap; }
table.tbl .dot { display: inline-block; width: 8px; height: 8px; background: var(--rule); margin-right: 6px; }
table.tbl .dot.in { background: #1a9f5f; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 26px 0 10px; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer;
  font-family: var(--mono); font-size: 14px; transition: all 0.14s var(--ease);
}
.pager button:hover:not([disabled]) { border-color: var(--blue); color: var(--blue); }
.pager button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button[disabled] { opacity: 0.4; cursor: default; }
.pager .gap { color: var(--concrete); padding: 0 4px; }

/* Пусто / загрузка */
.empty { padding: 60px 20px; text-align: center; border: 1px dashed var(--rule); margin: 24px 0; }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--concrete); max-width: 44ch; margin: 0 auto 16px; }
.skeleton { background: linear-gradient(90deg, var(--field) 25%, #e6e9ed 37%, var(--field) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-card { height: 300px; }

/* Мобильная панель фильтров */
.mobile-filter-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  display: flex; gap: 10px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--rule);
  backdrop-filter: blur(6px);
}
@media (min-width: 1000px) { .mobile-filter-bar { display: none; } }
.mobile-filter-bar .btn { flex: 1; }
.filter-count { font-family: var(--mono); background: var(--red); color: #fff; padding: 0 6px; margin-left: 6px; }

.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer-back { position: absolute; inset: 0; background: rgba(26, 29, 33, 0.45); animation: fade 0.2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh;
  background: var(--paper); display: flex; flex-direction: column;
  animation: slideup 0.28s var(--ease);
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gut); border-bottom: 1px solid var(--rule); }
.drawer-head h3 { font-size: 20px; }
.drawer-body { overflow-y: auto; padding: 0 var(--gut) 12px; -webkit-overflow-scrolling: touch; }
.drawer-foot { padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); display: flex; gap: 10px; }
.drawer-foot .btn { flex: 1; }
.close-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px; color: var(--concrete); }

/* ==========================================================================
   Карточка позиции
   ========================================================================== */

.product { display: grid; gap: 30px; padding: 24px 0 60px; }
@media (min-width: 940px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 34px 0 80px; } }
.gallery-main { border: 1px solid var(--rule); aspect-ratio: 4 / 3; background: var(--field-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button { width: 72px; height: 56px; border: 1px solid var(--rule); background: var(--field-2); padding: 0; cursor: pointer; overflow: hidden; }
.gallery-thumbs button.active { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product h1 { font-size: clamp(24px, 3.2vw, 36px); margin-bottom: 8px; }
.product .p-sku { font-family: var(--mono); font-size: 14px; color: var(--concrete); }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.spec-table th, .spec-table td { border: 1px solid var(--rule-soft); padding: 9px 12px; text-align: left; }
.spec-table th { width: 45%; font-weight: 500; color: var(--concrete); background: var(--field-2); }
.spec-table td { font-family: var(--mono); font-size: 13.5px; }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.p-note { border-left: 3px solid var(--red); padding-left: 14px; font-size: 14px; color: var(--concrete); }

/* ==========================================================================
   Заявка (список для запроса цены)
   ========================================================================== */

.modal { position: fixed; inset: 0; z-index: 90; display: none; }
.modal.open { display: block; }
.modal-back { position: absolute; inset: 0; background: rgba(26, 29, 33, 0.5); animation: fade 0.2s var(--ease); }
.modal-panel {
  position: relative; margin: 0 auto; background: var(--paper);
  max-width: 640px; width: calc(100% - 24px);
  max-height: 88vh; overflow-y: auto;
  top: 50%; transform: translateY(-50%);
  border: 1px solid var(--ink);
  animation: pop 0.24s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-48%) scale(0.98); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rule); background: var(--ink); color: #fff; }
.modal-head h3 { font-size: 20px; }
.modal-head .close-x { color: rgba(255, 255, 255, 0.7); }
.modal-body { padding: 20px; }
.req-list { list-style: none; margin: 0 0 18px; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--rule-soft); }
.req-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .nm { flex: 1; }
.req-list .sk { font-family: var(--mono); font-size: 12px; color: var(--concrete); }
.req-list .qty { width: 74px; padding: 5px 7px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; }
.req-list .rm { border: 0; background: none; color: var(--concrete); cursor: pointer; font-size: 17px; line-height: 1; }
.req-list .rm:hover { color: var(--red); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 100; background: var(--ink); color: #fff;
  padding: 12px 18px; font-size: 14.5px; max-width: calc(100% - 32px);
  animation: toastin 0.24s var(--ease);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.err { background: var(--red); }

/* Появление секций при прокрутке (задел под скролл-анимации) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Кнопка WhatsApp
   ========================================================================== */

.wa-fab {
  position: fixed; right: 20px; bottom: 22px; z-index: 80;
  display: flex; align-items: center; gap: 0;
  height: 52px; padding: 0; border-radius: 999px;
  background: var(--wa); color: #fff;
  box-shadow: 0 12px 30px -12px rgba(15, 60, 30, 0.7);
  transition: gap 0.24s var(--ease), padding 0.24s var(--ease), transform 0.18s var(--ease);
  overflow: hidden;
}
.wa-fab:hover { text-decoration: none; color: #fff; transform: translateY(-2px); }
.wa-fab .ic { flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.wa-fab .ic svg { width: 27px; height: 27px; fill: currentColor; }
.wa-fab .tx { order: -1; max-width: 0; opacity: 0; white-space: nowrap; font-size: 14.5px; font-weight: 600; transition: max-width 0.28s var(--ease), opacity 0.2s var(--ease); }
@media (min-width: 900px) {
  .wa-fab:hover .tx, .wa-fab:focus-visible .tx { max-width: 210px; opacity: 1; padding-left: 20px; }
}
/* На каталоге внизу закреплена панель фильтров — поднимаем кнопку над ней */
@media (max-width: 999px) {
  body.page-catalog .wa-fab { bottom: 78px; }
  .wa-fab { right: 16px; bottom: 18px; height: 48px; }
  .wa-fab .ic { flex-basis: 48px; width: 48px; height: 48px; }
}
@media print { .wa-fab { display: none; } }

/* ---------- Подвал ---------- */

.footer {
  background: var(--ink); color: #fff; padding: 0 0 0;
  border-top: 3px solid transparent; border-image: var(--split) 1;
}
.footer a { color: rgba(255, 255, 255, 0.86); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; font-size: 14.5px; }
.footer .wordmark { color: #fff; }
.footer .wordmark span { color: #7fa7e0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 16px 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
}

/* Поля формы: используются в модальном окне заявки и в админ-подобных формах */
.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--concrete); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--rule); background: var(--paper);
  padding: 11px 13px; font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.field textarea { min-height: 104px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa4ae; }

.form-status { margin-top: 12px; font-size: 14.5px; padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--field-2); }
.form-status.error { border-left-color: var(--red); }

/* Строки формы используются и в модальном окне заявки */
.form-row { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 620px) { .form-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.ph.ph-photo { background-size: cover; background-position: center; position: relative; }
/* Плотная вуаль: артикул должен читаться поверх снимка, он здесь главный */
.ph.ph-photo::before { content: ""; position: absolute; inset: 0; background: rgba(247, 248, 250, 0.9); }
.ph.ph-photo .ph-mark { display: none; }
.ph.ph-photo .ph-sku { position: relative; z-index: 1; color: var(--ink); font-weight: 500; }

/* ---------- Шапка и подвал: доводка под макет ---------- */

.header-cta { padding: 10px 18px; font-size: 14px; position: relative; }
.header-cta .count-badge { position: static; margin-left: 8px; background: rgba(255, 255, 255, 0.25); }
.header-phone {
  display: none; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0; white-space: nowrap; color: var(--ink);
}
@media (min-width: 780px) { .header-phone { display: inline-flex; } }
.header-phone .ic { color: var(--red); flex: 0 0 auto; }
.header-phone:hover { color: var(--blue); text-decoration: none; }
.header-phone:hover .ic { color: var(--blue); }

.footer-in { padding-top: 44px; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 34px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .footer-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 44px; } }
.footer-brand p { color: rgba(255, 255, 255, 0.62); font-size: 14px; max-width: 34ch; margin: 16px 0 0; line-height: 1.55; }
.footer-socials { display: flex; gap: 8px; margin-top: 18px; }
.footer-socials a {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24); color: rgba(255, 255, 255, 0.8); font-size: 13px;
}
.footer-socials a:hover { background: var(--red); border-color: var(--red); color: #fff; text-decoration: none; }
.footer h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin: 0 0 16px;
}
.footer-contacts li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contacts .ic { flex: 0 0 auto; color: var(--red); margin-top: 2px; }
.footer-contacts span { color: rgba(255, 255, 255, 0.7); }

.footer-slogan { display: none; flex-direction: column; gap: 3px; padding-left: 16px; border-left: 2px solid var(--red);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
@media (min-width: 1080px) { .footer-slogan { display: flex; } }
.footer-bottom { text-transform: none; letter-spacing: 0.02em; font-family: var(--sans); font-size: 12.5px; }

/* ==========================================================================
   Мелкая моторика: приёмы из брендбука, ничего лишнего
   ========================================================================== */

/* Штамп в подвале — тот самый штамп с листа проектной документации */
.title-block {
  display: grid; grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
@media (min-width: 700px) { .title-block { grid-template-columns: repeat(4, 1fr); } }
.title-block .tb {
  padding: 12px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
@media (min-width: 700px) { .title-block .tb { border-bottom: 0; } }
.title-block .tb:last-child { border-right: 0; }
.title-block .k {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 4px;
}
.title-block .v { font-size: 14px; font-weight: 500; color: #fff; }
.title-block .v.accent { color: #ff8b8a; }

/* Ссылка-подчёркивание, которое дорисовывается */
.ulink {
  position: relative; font-weight: 600; color: var(--blue);
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.25s var(--ease);
  padding-bottom: 2px;
}
.ulink:hover { text-decoration: none; background-size: 100% 2px; }

/* Стрелка на основной кнопке слегка сдвигается */
/* Красная кнопка — основной призыв к действию по макету */
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.on-photo { background: #fff; border-color: #fff; color: var(--ink); }
.btn.on-photo:hover { background: var(--field); border-color: var(--field); color: var(--ink); }
.btn.ghost-photo { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn.ghost-photo:hover { border-color: #fff; background: rgba(255, 255, 255, 0.14); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn svg.arw { width: 14px; height: 14px; margin-left: 8px; transition: transform 0.18s var(--ease); }
.btn:hover svg.arw { transform: translateX(3px); }
