/* =========================================================
   МАКОН — корпоративный сайт
   Палитра: navy + белый + светло-серый
   ========================================================= */

:root {
  /* Палитра */
  --navy-900: #0B2545;
  --navy-700: #13315C;
  --blue-500: #1E5AC8;
  --blue-600: #1A4DAD;
  --gray-50:  #F4F6FA;
  --gray-100: #E8ECF2;
  --gray-300: #C7CFDC;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --white:    #FFFFFF;
  --border:   #DDE3EC;

  /* Типографика */
  --font-sans: "Inter", "Roboto", "Segoe UI", system-ui, sans-serif;

  /* Размеры */
  --container: 1280px;
  --header-h:  92px;
  --util-h:    40px;
  --radius:    6px;
  --radius-lg: 10px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(11,37,69,.06);
  --shadow-md: 0 4px 14px rgba(11,37,69,.08);
  --shadow-lg: 0 12px 32px rgba(11,37,69,.14);
}

/* --- Reset / база --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue-500); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-600); }
h1, h2, h3, h4 { color: var(--navy-900); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.005em; }
h3 { font-size: clamp(18px, 2vw, 22px); }
p  { margin: 0 0 1em; }

/* --- Контейнер --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   ШАПКА: утилити-бар + sticky главное меню
   ========================================================= */

.util-bar {
  background: #021852;   /* глубокий navy */
  color: var(--white);
  font-size: 13.5px;
  height: var(--util-h);
  display: flex;
  align-items: center;
}
.util-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.util-bar a {
  color: var(--white);
  opacity: .85;
}
.util-bar a:hover { opacity: 1; color: var(--white); }
.util-bar .util-left,
.util-bar .util-right {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.util-bar .util-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.util-bar .util-item svg {
  width: 14px; height: 14px;
  fill: currentColor; opacity: .8;
}
.util-bar .sep { opacity: .35; }

/* --- Sticky стек: утилити-бар + шапка прилипают вместе --- */
.header-stack {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
}
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header .container {
  height: calc(var(--header-h) - var(--util-h));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-900);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.logo-img {
  height: 76px;
  width: auto;
  display: block;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-900);
}
.logo .logo-mark {
  width: 44px; height: 44px;
  background: var(--navy-900);
  color: var(--white);
  display: grid; place-items: center;
  border-radius: var(--radius);
  font-size: 18px;
  letter-spacing: -.02em;
}
.logo .logo-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: .04em;
  margin-top: 4px;
}
/* Светлый логотип — в тёмном футере */
.logo-light,
.logo-light .logo-text { color: var(--white, #fff); }

/* --- Главное меню --- */
.nav { display: flex; align-items: center; gap: 2px; }
.nav > li { list-style: none; position: relative; white-space: nowrap; }
.nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.nav > li > a:hover,
.nav > li.is-open > a {
  background: var(--gray-50);
  color: var(--blue-500);
}
.nav .caret {
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .15s;
}
.nav > li.is-open .caret { transform: rotate(-135deg); margin-top: 3px; }

/* --- Mega dropdown (Продукция) --- */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 640px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
  z-index: 110;
}
.nav > li.is-open .mega { display: block; }
.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
}
.mega a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--gray-700);
  font-weight: 500;
}
.mega a:hover { background: var(--gray-50); color: var(--blue-500); }
.mega a strong {
  display: block;
  color: var(--navy-900);
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 2px;
}
.mega a span {
  font-size: 12.5px;
  color: var(--gray-500);
}

/* --- Кнопка-CTA в шапке --- */
.header .btn {
  margin-left: 8px;
  white-space: nowrap;
}

/* --- Кнопки (общие) --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue-500);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-600); color: var(--white); }
.btn-ghost {
  background: var(--blue-500);  /* сплошной синий, не прозрачный */
  color: var(--white);
  border-color: var(--blue-500);
}
.btn-ghost:hover { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-500); }

/* =========================================================
   HERO / СЛАЙДЕР
   ========================================================= */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
}
.hero-slider {
  position: relative;
  height: clamp(420px, 60vh, 600px);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s;
  display: flex;
  align-items: center;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,20,20,.85) 0%, rgba(20,20,20,.55) 50%, rgba(20,20,20,.25) 100%);
  z-index: 1;
}
.hero-slide-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* ken-burns: на активном слайде картинка плавно приближается;
     сброс scale(1) на неактивных, чтобы каждый показ стартовал одинаково */
  transform: scale(1);
  transition: transform .8s ease-out;
}
.hero-slide.is-active .hero-slide-bg {
  transform: scale(1.08);
  transition: transform 6s ease-out;
}
.hero-slide .container {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  margin-bottom: 18px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: clamp(32px, 4.5vw, 52px);
}
.hero p.lead {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* точки слайдера */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.hero-dots button {
  width: 36px; height: 4px;
  background: rgba(255,255,255,.3);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s;
}
.hero-dots button.is-active { background: var(--white); }

/* стрелки */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: var(--white);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: background .15s;
}
.hero-arrow:hover { background: rgba(255,255,255,.2); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }
.hero-arrow svg { width: 18px; height: 18px; fill: currentColor; }

/* =========================================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================================= */
.breadcrumb-bar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-size: 13.5px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
}
.breadcrumb a {
  color: var(--blue-500);
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gray-300); }

/* =========================================================
   СЕКЦИИ (общие)
   ========================================================= */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tight { padding: clamp(40px, 5vw, 64px) 0; }
/* Главная: стык «Новости → Контакты» без двойного отступа (белое на белом читалось дырой) */
.section--news-end { padding-bottom: 0; }
.section-alt { background: var(--gray-50); }
.section-dark { background: var(--navy-900); color: rgba(255,255,255,.85); }
.section-dark h2 { color: var(--white); }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .sub {
  color: var(--gray-500);
  font-size: 15px;
  max-width: 480px;
  margin: 8px 0 0;
}
.section-head .link {
  font-weight: 600;
  font-size: 14.5px;
}

/* =========================================================
   КАТАЛОГ ПРОДУКЦИИ (карточки)
   ========================================================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
/* Модификатор: строго 3 колонки (для плиток направлений /products/).
   На узких — по 1. */
.product-grid--three {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 960px) {
  .product-grid--three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .product-grid--three { grid-template-columns: 1fr; }
}
/* Модификатор: строго 4 колонки (для плиток /tech/).
   На узких — по 2 / 1. */
.product-grid--four {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) {
  .product-grid--four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .product-grid--four { grid-template-columns: 1fr; }
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-500);
}
.product-card .img {
  aspect-ratio: 4/3;
  background: var(--gray-50);
  display: grid; place-items: center;
  color: var(--gray-300);
  overflow: hidden;
}
.product-card .img img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-card .body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.product-card .brand {
  font-size: 34.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.product-card h3 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}
.product-card .desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 8px;
  flex: 1;
}
.product-card .more {
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   ПРЕИМУЩЕСТВА (4 колонки)
   ========================================================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.feature .icon {
  width: 44px; height: 44px;
  background: var(--blue-500);
  border-radius: var(--radius);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.feature .icon svg { width: 22px; height: 22px; fill: var(--white); }
.feature h3 { color: var(--white); font-size: 17px; margin-bottom: 6px; }
.feature p  { font-size: 14px; color: rgba(255,255,255,.75); margin: 0; }

/* =========================================================
   НОВОСТИ
   ========================================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card .img { aspect-ratio: 16/9; background: var(--gray-100); }
.news-card .body { padding: 20px 22px 22px; }
.news-card .date {
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.news-card h3 { font-size: 17px; line-height: 1.35; }
.news-card p  { font-size: 14px; color: var(--gray-500); margin: 8px 0 0; }

/* =========================================================
   КАТАЛОГИ PDF (лента обложек)
   ========================================================= */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.catalog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.catalog-card:visited { color: inherit; }
.catalog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.catalog-card .cover {
  aspect-ratio: 3/4;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.catalog-card .cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.catalog-card .cover::after {
  content: "PDF";
  position: absolute;
  top: 10px; right: 10px;
  background: var(--navy-900);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .05em;
}
.catalog-card .cover.no-pdf::after {
  content: "↗";
  font-size: 13px;
  padding: 3px 8px;
}
.catalog-card .catalog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.catalog-card h4 {
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--navy-900);
}
.catalog-card .meta { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; }
.catalog-card .btn { width: 100%; justify-content: center; }

/* =========================================================
   ПАРТНЁРЫ (лента логотипов)
   ========================================================= */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
  align-items: center;
}
.partners .partner {
  height: 80px;
  display: grid; place-items: center;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gray-500);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .15s, border-color .15s;
}
.partners .partner img {
  max-height: 56px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .85;
  transition: filter .15s, opacity .15s;
}
.partners .partner:hover img { filter: grayscale(0); opacity: 1; }
.partners .partner:hover { color: var(--navy-900); border-color: var(--blue-500); }

/* =========================================================
   КОНТАКТЫ + ПОДВАЛ
   ========================================================= */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: start;
}

/* Контакты на главной (отдельный стиль — независим от /contacts/) */
.contacts-row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.contacts-row li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.contacts-row .icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: grid; place-items: center;
}
.contacts-row .icon svg { width: 18px; height: 18px; fill: var(--navy-900); }
.contacts-row .label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.contacts-row .value { color: var(--navy-900); font-weight: 600; font-size: 16px; line-height: 1.4; }
.contacts-row .value a { color: inherit; }
.contact-list .icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: grid; place-items: center;
}
.contact-list .icon svg { width: 18px; height: 18px; fill: var(--navy-900); }
.contact-list .label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.contact-list .value { color: var(--navy-900); font-weight: 600; font-size: 16px; line-height: 1.4; }
.contact-list .value a { color: inherit; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-form h3 { margin-bottom: 6px; }
.contact-form .hint { color: var(--gray-500); font-size: 14px; margin-bottom: 18px; }
.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-700);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30,90,200,.12);
}
.field textarea { min-height: 96px; resize: vertical; }

/* --- Подвал --- */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.7);
  padding: 56px 0 28px;
}
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer h5 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer .brand-block { max-width: 320px; }
.footer .brand-block p { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.7); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* =========================================================
   АДАПТИВ
   ========================================================= */

@media (max-width: 1024px) {
  .contact-list { grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
  .contacts-row { grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .contacts-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 820px) {
  :root { --header-h: 72px; --util-h: 36px; }
  .util-bar { font-size: 12px; }
  /* На мобиле в утилити-баре остаются: телефон, иконка майл, иконка адреса (→ /contacts/),
     иконка заявки со счётчиком. Часы работы и текстовые подписи прячем. */
  .util-bar .sep { display: none; }
  .util-bar .util-hours { display: none; }
  .util-bar .util-item .util-text { display: none; }
  .util-bar .container { gap: 14px; }
  .util-bar .util-left,
  .util-bar .util-right { gap: 14px; }
  .util-bar .util-item svg { width: 16px; height: 16px; }
  .nav { display: none; } /* на мобиле показываем .mobile-nav */
  .header-cta { display: none; }                                     /* CTA переехала в дровер */
  .header-auth { display: none; }                                     /* авторизация переехала в дровер */

  /* Перебиваем высоту .header .container: 92px на десктопе минус util = 52px мало для бургера 44×44 */
  .header .container {
    height: 56px;
    gap: 12px;
    position: relative;
  }

  /* Бургер прибиваем к правому верхнему углу хедера — вытащим из flow,
     чтобы header-cart не выдавливал его за край. */
  .menu-toggle {
    display: inline-flex !important;
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    z-index: 5;
    flex-shrink: 0;
  }
  /* На мобиле корзина из шапки переезжает в дровер — освобождаем правый край
     под бургер. Ссылка .util-cart в утилити-баре ОСТАЁТСЯ (иконка + счётчик). */
  .header-cart { display: none !important; }

  .mobile-nav {
    /* На мобиле — fixed-панель справа, по умолчанию СКРЫТА (translateX 100%) */
    display: block !important;
    position: fixed;
    top: calc(var(--util-h, 36px) + var(--header-h, 72px));
    right: 0;
    width: min(320px, 86vw);
    max-height: calc(100vh - var(--util-h, 36px) - var(--header-h, 72px));
    background: var(--white);
    z-index: 110;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -12px 0 32px rgba(11,37,69,.14);
    transform: translateX(100%);
    transition: transform .25s ease;
    visibility: hidden;
  }
  body.nav-open .mobile-nav {
    transform: translateX(0);
    visibility: visible;
  }
  /* НЕ лочим overflow body — иначе сайт не прокручивается */

  .mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
  }
  .mobile-nav ul li + li { border-top: 1px solid var(--gray-100); }
  .mobile-nav ul a {
    display: block;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--navy-900);
    text-decoration: none;
  }
  .mobile-nav ul a:hover,
  .mobile-nav ul a:active { background: var(--gray-50); }
  .mobile-nav-contacts {
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--gray-50);
  }
  .mobile-nav-contacts .mnc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-900);
    font-size: 15px;
    text-decoration: none;
  }
  .mobile-nav-contacts .mnc-item svg {
    width: 18px !important;
    height: 18px !important;
    fill: var(--blue-500);
    flex-shrink: 0;
  }
  .mobile-nav-contacts .mnc-item.mnc-static { color: var(--gray-700); }
  .mobile-nav-contacts .mobile-nav-cta {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }

  .hero-arrow { display: none; }
  .hero-slide .container { padding-top: 24px; padding-bottom: 24px; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo-img { height: 44px; }
  .logo-text { font-size: 12px; }
  .logo .logo-sub { font-size: 10px; }
}

/* =========================================================
   Утилиты
   ========================================================= */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 12px;
}

/* =========================================================
   КАРТОЧКА ТОВАРА
   ========================================================= */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.product-detail-media .main {
  aspect-ratio: 1/1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.product-detail-media > img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.product-detail-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.product-detail-thumbs button {
  width: 80px; height: 80px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: grid; place-items: center;
}
.product-detail-thumbs button.is-active {
  border-color: var(--blue-500);
}
.product-detail-thumbs button img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
}

/* допуски ГОСТ (надстрочные/подстрочные индексы в ячейках таблицы) */
.data-table td .tol {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.6em;
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
}
.data-table td .tol sup,
.data-table td .tol sub {
  font-size: 1em;
  line-height: 0;
  font-weight: 600;
  color: var(--gray-700, #555);
}
.data-table td .tol sup {
  vertical-align: super;
}
.data-table td .tol sub {
  vertical-align: sub;
}

.product-detail-info .brand {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 12px;
}
.product-detail-info h1 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 32px);
}
.product-detail-info .lead {
  font-size: 16px;
  color: var(--gray-700);
  margin-bottom: 24px;
}
.product-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
  font-size: 14.5px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.product-specs li strong {
  color: var(--navy-900);
  font-weight: 600;
  display: inline-block;
  min-width: 160px;
}
.product-detail-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.product-detail-delivery {
  font-size: 13.5px;
  color: var(--gray-500);
  padding: 14px 18px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--blue-500);
}

/* =========================================================
   ТАБЛИЦЫ ДАННЫХ
   ========================================================= */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.2;
}
.data-table th,
.data-table td {
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th {
  background: var(--blue-600, #1A4DAD);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--blue-600, #1A4DAD);
}
.data-table tbody tr:hover {
  background: #d5e3fc;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table .t-action {
  width: 1px;
  text-align: right;
}
.btn-mini {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white);
  background: var(--blue-500);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .15s;
}
.btn-mini:hover {
  background: var(--blue-600);
  color: var(--white);
}
.dim-tol {
  display: inline-block;
  font-size: 9px;
  line-height: 1;
  color: var(--gray-500);
  vertical-align: super;
  margin-left: 4px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================
   QUICK-ACCESS DEMOS (qf/1..4)
   ========================================================= */

/* === Вариант 1: боковой sticky sidebar === */
.qa1-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.qa1-sidebar {
  position: sticky;
  top: calc(var(--util-h) + var(--header-h) + 16px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  max-height: calc(100vh - var(--util-h) - var(--header-h) - 32px);
  overflow-y: auto;
}
.qa1-sidebar h4 {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 8px 12px 12px;
}
.qa1-sidebar a {
  display: block;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-radius: var(--radius);
  font-weight: 500;
  line-height: 1.3;
}
.qa1-sidebar a:hover { background: var(--gray-50); color: var(--blue-500); }
.qa1-sidebar a.is-active {
  background: var(--blue-500);
  color: var(--white);
  font-weight: 700;
}
@media (max-width: 820px) {
  .qa1-wrap { grid-template-columns: 1fr; }
  .qa1-sidebar {
    position: static;
    max-height: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px;
  }
  .qa1-sidebar h4 { display: none; }
  .qa1-sidebar a { display: inline-block; padding: 6px 12px; }
}

/* === Вариант 2: горизонтальная лента снизу === */
.qa2-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
}
.qa2-strip h4 {
  width: 100%;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 8px;
}
.qa2-strip a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--gray-700);
  background: var(--gray-50);
  border-radius: 100px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.qa2-strip a:hover { background: var(--blue-500); color: var(--white); }
.qa2-strip a.is-active { background: var(--navy-900); color: var(--white); }

/* === Вариант 3: выпадающий список в углу === */
.qa3-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.qa3-dropdown { position: relative; }
.qa3-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
}
.qa3-trigger:hover { border-color: var(--blue-500); color: var(--blue-500); }
.qa3-trigger::after {
  content: "▾";
  font-size: 12px;
  color: var(--gray-500);
}
.qa3-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 280px;
  display: none;
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
}
.qa3-dropdown.is-open .qa3-menu { display: block; }
.qa3-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-radius: var(--radius);
  font-weight: 500;
}
.qa3-menu a:hover { background: var(--gray-50); color: var(--blue-500); }
.qa3-menu a.is-active { background: var(--blue-500); color: var(--white); }

/* === Вариант 4: узкая буквенная полоса слева === */
.qa4-wrap {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
}
.qa4-rail {
  position: sticky;
  top: calc(var(--util-h) + var(--header-h) + 16px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - var(--util-h) - var(--header-h) - 32px);
  overflow-y: auto;
}
.qa4-rail a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-500);
  border-radius: var(--radius);
  letter-spacing: .02em;
}
.qa4-rail a:hover { background: var(--gray-50); color: var(--blue-500); }
.qa4-rail a.is-active {
  background: var(--blue-500);
  color: var(--white);
}
@media (max-width: 820px) {
  .qa4-wrap { grid-template-columns: 1fr; }
  .qa4-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    max-height: none;
  }
  .qa4-rail a {
    flex: 0 0 auto;
    width: auto;
    padding: 0 14px;
  }
}


/* =========================================================
   ВАРИАНТ 5: SLIDE-IN OVERLAY-MENU (поверх страницы)
   ========================================================= */
.qa5-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--blue-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.qa5-trigger:hover { background: var(--blue-600, #1e40af); }
.qa5-trigger .ic {
  display: inline-flex;
  width: 22px; height: 22px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.18);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
}

.qa5-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* затемнение */
.qa5-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 90;
}
.qa5-overlay.is-open { opacity: 1; visibility: visible; }

/* панель */
.qa5-panel {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: 320px;
  max-width: 90vw;
  background: var(--white);
  box-shadow: 8px 0 32px rgba(0,0,0,.18);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.qa5-panel.is-open { transform: translateX(0); }

.qa5-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--navy-900);
  color: var(--white);
}
.qa5-panel-head h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0;
}
.qa5-close {
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.qa5-close:hover { background: rgba(255,255,255,.22); }

.qa5-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.qa5-panel-body a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 20px;
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.qa5-panel-body a:hover {
  background: var(--gray-50);
  color: var(--blue-500);
}
.qa5-panel-body a.is-active {
  background: var(--gray-50);
  color: var(--blue-500);
  border-left-color: var(--blue-500);
  font-weight: 600;
}
.qa5-panel-body .ic {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 7px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
}
.qa5-panel-body a.is-active .ic {
  background: var(--blue-500);
  color: var(--white);
}

body.qa5-no-scroll { overflow: hidden; }

@media (max-width: 820px) {
  .qa5-trigger { padding: 10px 16px; font-size: 13px; }
  .qa5-panel { width: 280px; }
}


/* =========================================================
   СТРАНИЦА «О КОМПАНИИ»
   ========================================================= */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-hero-text { max-width: 560px; }
.about-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.about-hero-logo img {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,.08));
}
@media (max-width: 1024px) {
  .about-hero { grid-template-columns: 1fr; gap: 32px; }
  .about-hero-logo { min-height: 200px; }
  .about-hero-logo img { max-width: 320px; }
}
@media (max-width: 640px) {
  .about-hero-logo img { max-width: 240px; }
}

.about-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-list li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 14px; height: 2px;
  background: var(--blue-500);
}

.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.about-value {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.about-value:hover {
  border-color: var(--blue-500);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.about-value .letter {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  color: var(--white);
  border-radius: 12px;
  font-size: 28px;
  font-weight: 700;
}
.about-value h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--navy-900);
}
.about-value p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.55;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.about-stat {
  padding: 28px 20px;
  background: var(--white);
  border: 2px solid var(--blue-500);
  border-radius: var(--radius);
  text-align: left;
}
.about-stat strong {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.about-stat span {
  font-size: 13px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.about-partners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.about-partner {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-top: 4px solid var(--blue-500);
  border-radius: var(--radius);
}
.about-partner .badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gray-100);
  color: var(--blue-500);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 4px;
  margin-bottom: 12px;
}
.about-partner h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--navy-900);
}
.about-partner p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}

.about-contacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.contact-block h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.contact-block p {
  margin: 0;
  font-size: 15px;
  color: var(--gray-800);
  line-height: 1.6;
}
.contact-block a {
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 600;
}
.contact-block a:hover { color: var(--blue-500); }

@media (max-width: 1024px) {
  .about-values,
  .about-partners,
  .about-contacts { grid-template-columns: repeat(2, 1fr); }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .about-values,
  .about-partners,
  .about-contacts,
  .about-stats { grid-template-columns: 1fr; }
}


/* =========================================================
   ФОТОГАЛЕРЕЯ + LIGHTBOX
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-100);
  text-decoration: none;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(11,37,69,.85));
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: 0;
  transition: opacity .25s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-caption { opacity: 1; padding: 10px 8px 8px; font-size: 11px; }
}

body.lb-no-scroll { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 42, .92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0,0,0,.4);
}
.lightbox-caption {
  margin-top: 14px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
}
.lightbox-counter {
  position: absolute;
  top: 24px; right: 32px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.22); }
.lightbox-close { top: 24px; left: 32px; font-size: 20px; }
.lightbox-prev  { left: 32px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 32px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; font-size: 18px; }
  .lightbox-close { top: 12px; left: 12px; }
  .lightbox-prev  { left: 8px; }
  .lightbox-next  { right: 8px; }
  .lightbox-counter { top: 12px; right: 60px; }
}


/* =========================================================
   СТРАНИЦА «КОНТАКТЫ»
   ========================================================= */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-top: 4px solid var(--blue-500);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.contact-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--blue-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  margin-bottom: 14px;
}
.contact-tag--alt { background: var(--navy-900); }
.contact-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--navy-900);
}
.contact-address {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-left: 3px solid var(--blue-500);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-800);
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
  font-size: 14.5px;
  color: var(--gray-700);
  line-height: 1.5;
}
.contact-list li:first-child { border-top: none; padding-top: 0; }
.contact-list strong {
  flex: 0 0 110px;
  color: var(--navy-900);
  font-weight: 600;
}
.contact-list a {
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 600;
}
.contact-list a:hover { color: var(--blue-500); }

/* Карты */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.map-block h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--navy-900);
}
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--gray-500);
}

/* Реквизиты */
.reqv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.reqv-block {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.reqv-block h3 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.reqv-block dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
}
.reqv-block dt {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}
.reqv-block dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--navy-900);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media print {
  .header-stack, .footer, .breadcrumb-bar,
  .btn-outline, #order, .eyebrow, .section-alt,
  .contact-form, .lightbox { display: none !important; }
  .section { padding: 16px 0 !important; }
  .reqv-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .contacts-grid,
  .maps-grid,
  .reqv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .reqv-block dl { grid-template-columns: 1fr; gap: 4px 0; }
  .reqv-block dd { margin-bottom: 12px; }
}


/* =========================================================
   ПОЛИТИКА ОБРАБОТКИ ПЕРСОНАЛЬНЫХ ДАННЫХ
   ========================================================= */

.policy-doc {
  max-width: 920px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--gray-700);
}
.policy-doc h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 40px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  line-height: 1.3;
}
.policy-doc h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.policy-doc h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 24px 0 8px;
}
.policy-doc p {
  margin: 0 0 14px;
  line-height: 1.7;
}
.policy-doc ul,
.policy-doc ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.policy-doc li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.policy-doc strong {
  color: var(--navy-900);
}
.policy-doc a {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.policy-doc a:hover {
  color: var(--blue-600);
}

.policy-appendix {
  margin-top: 48px;
  padding: 32px 28px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.policy-appendix > h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  text-align: center;
  letter-spacing: .02em;
  font-size: 20px;
}
.policy-purpose {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}
.policy-purpose h3 {
  margin-top: 0;
  font-size: 16px;
  color: var(--blue-600);
}
.policy-purpose p {
  margin-bottom: 8px;
  font-size: 14.5px;
}
.policy-purpose p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .policy-doc { font-size: 15px; }
  .policy-doc h2 { font-size: 19px; margin-top: 32px; }
  .policy-appendix { padding: 24px 18px; }
  .policy-purpose { padding: 16px 18px; }
}


/* =========================================================
   BLOCK: ДОКУМЕНТЫ (ссылка на политику в /about/)
   ========================================================= */

.docs-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.docs-bar .eyebrow { margin: 0; }
.docs-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy-900);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  min-width: 320px;
}
.docs-link strong {
  font-size: 16px;
  font-weight: 600;
}
.docs-link span {
  font-size: 13px;
  color: var(--gray-500);
}
.docs-link:hover {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-md);
  color: var(--blue-600);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .docs-bar { gap: 16px; }
  .docs-link { min-width: 0; width: 100%; }
}


/* =========================================================
   FORM: ЧЕКБОКС СОГЛАСИЯ С ПОЛИТИКОЙ
   ========================================================= */

.field.field-agree {
  display: flex;
  flex-direction: row; /* переопределяем column из .field — иначе галочка падает на отдельную строку */
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gray-700);
}
.field-agree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}
.field-agree label,
.field-agree .agree-label {
  cursor: pointer;
  user-select: none;
}
.field-agree a {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.field-agree a:hover { color: var(--blue-600); }
.field-agree.is-error {
  color: #b91c1c;
}
.field-agree.is-error a { color: #b91c1c; }


/* =========================================================
   КОРЗИНА-ЗАЯВКА: степпер, счётчик, /cart/, тост
   ========================================================= */

/* Колонка «Кол-во» в таблице типоразмеров */
.data-table .t-qty {
  width: 1px;
  white-space: nowrap;
  text-align: right;
}
/* В одну строку: размер + степперы + input */
.qty-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.qty-compact .t-len {
  display: inline-block;
  font-weight: 600;
  color: var(--gray-900);
  margin-right: 2px;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue-500);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, color .15s, background .15s;
}
.qty-stepper:hover {
  border-color: var(--blue-500);
  background: var(--gray-50);
}
.qty-stepper:active { transform: translateY(1px); }
/* Степперы количества: «+» зелёный, «−» красный только когда позиция добавлена */
.qty-stepper[data-step="+1"] {
  color: #1E8E4E;
  border-color: #BFE3CE;
  background: #F0FAF3;
}
.qty-stepper[data-step="+1"]:hover {
  border-color: #1E8E4E;
  background: #DCF3E2;
}
.qty-stepper[data-step="-1"].qty-on {
  color: #D9534F;
  border-color: #F0B9B7;
  background: #FDF1F0;
}
.qty-stepper[data-step="-1"].qty-on:hover {
  border-color: #D9534F;
  background: #FBE4E2;
}
.qty-input {
  width: 56px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin: 0 4px;
  padding: 0 4px;
  background: var(--white);
  color: var(--gray-700);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30,90,200,.15);
}

/* Строка «уже в корзине» — мягкий зелёный фон */
.data-table tbody tr.is-in-cart {
  background: #d0f3ca;
}
.data-table tbody tr.is-in-cart .qty-input {
  border-color: var(--blue-500);
  color: var(--blue-600);
  font-weight: 600;
}

/* Блок «Добавить в заявку» под таблицей */
.add-to-cart-bar {
  display: flex;
  flex-direction: row-reverse; /* надпись слева, кнопка прижата к правому краю (под столбцом «Кол-во») */
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.add-to-cart-bar .add-to-cart-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.add-to-cart-hint {
  font-size: 13px;
  color: var(--gray-500);
}

/* Счётчик в утилит-баре (десктоп) */
.util-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  transition: background .15s;
}
.util-cart:hover { background: rgba(255,255,255,.22); color: #fff; }
.util-cart svg { width: 14px; height: 14px; fill: currentColor; }
.util-cart-count {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--white);
  color: var(--navy-900);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.util-cart.is-empty .util-cart-count { display: none; }

/* Счётчик в основной шапке (мобилы) */
.header-cart {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--navy-900);
  text-decoration: none;
}
.header-cart:hover { background: var(--gray-50); color: var(--navy-900); }
.header-cart svg { width: 22px; height: 22px; fill: currentColor; }
.header-cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--blue-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.header-cart.is-empty .header-cart-count { display: none; }

/* =========================================================
   МОБИЛЬНОЕ МЕНЮ (гамбургер + дровер)
   На десктопе всё это полностью скрыто (display: none),
   включается только на ≤820px.
   ========================================================= */
.menu-toggle {
  display: none; /* на десктопе прячем */
  width: 44px;
  height: 44px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy-900);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.menu-toggle:hover { background: var(--gray-50); }
.menu-toggle svg {
  fill: currentColor;
  display: block;
}
.menu-toggle .menu-toggle-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon  { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: block; }

.mobile-nav {
  display: none; /* на десктопе прячем весь блок целиком */
}

/* Страница /cart/ */
.cart-empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 16px;
}
.cart-empty a { color: var(--blue-500); text-decoration: underline; }

.cart-group { margin-bottom: 28px; }
.cart-group-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 12px;
}
.cart-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
}
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cart-row:last-child { border-bottom: 0; }
.cart-row-name strong {
  display: block;
  color: var(--navy-900);
  font-size: 15px;
}
/* Позиция корзины — ссылка на карточку товара */
.cart-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.cart-row-link:hover strong {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cart-row-link .cart-row-type { color: var(--gray-500); }
.cart-row-type {
  font-size: 12.5px;
  color: var(--gray-500);
}
.cart-row-qty { display: inline-flex; align-items: center; }
.cart-row-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cart-row-remove:hover { background: #fee2e2; color: #b91c1c; }

.cart-section-title {
  margin: 36px 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
}
.cart-form { max-width: 720px; margin: 0 auto; }
.cart-hint {
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 24px;
}

@media (max-width: 640px) {
  .cart-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 14px;
  }
  .cart-row-actions { grid-column: 2; grid-row: 1; }
  .cart-row-qty { grid-column: 1 / -1; }
}

/* Тост корзины */
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}
.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* CTA «Заказать»: активное состояние, когда ведёт в корзину */
.header-cta.is-cart-active {
  background: #0F7A45;       /* зелёный — сигнал «в заявке» */
  box-shadow: 0 0 0 3px rgba(15,122,69,.15);
}
.header-cta.is-cart-active:hover { background: #0d6c3c; }

/* Правый блок хедера: «Заказать» + «Войти» + «Заявка» вплотную друг к другу */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

/* Кнопка авторизации в белом меню (гость → «Войти», залогинен → имя) */
.header-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy-900);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.header-auth svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}
.header-auth-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-auth:hover { border-color: var(--blue-500); color: var(--blue-500); }
/* Залогиненный — синий акцент, чтобы отличалось от «Войти» */
.header-auth.is-in {
  border-color: var(--blue-500);
  color: var(--blue-500);
}
.header-auth.is-in:hover { color: var(--blue-600); border-color: var(--blue-600); }

/* Блок «Итого / Очистить всё» в /cart/ */
.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.cart-summary-text {
  font-size: 15px;
  color: var(--navy-900);
}
.cart-summary-text strong { font-weight: 700; }
.cart-clear-all {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--gray-700);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.cart-clear-all:hover {
  border-color: #b91c1c;
  color: #b91c1c;
  background: #fef2f2;
}
@media (max-width: 640px) {
  .cart-summary { flex-direction: column; align-items: stretch; }
  .cart-clear-all { width: 100%; }
}



/* =========================================================
   Меню быстрого доступа между карточками фасонных частей
   ========================================================= */
.qf-rail-toggle {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-600, #1A4DAD);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
  transition: transform .2s, background .2s;
}
.qf-rail-toggle:hover {
  background: var(--blue-600, #1A4DAD);
  transform: translateY(-50%) scale(1.05);
}
.qf-rail-toggle svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}
/* Кнопка с надписью «Каталог» (фасонные части МАКОН) */
.qf-rail-toggle--labeled {
  width: auto;
  padding: 0 18px 0 14px;
  gap: 8px;
  border-radius: 999px;
  font: 600 14px var(--font-sans, Inter, Roboto, sans-serif);
  letter-spacing: .2px;
}
.qf-rail-toggle--labeled svg {
  width: 18px;
  height: 18px;
}

.qf-rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translate(120%, -50%);
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 14px 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  z-index: 95;
  max-height: 80vh;
  overflow-y: auto;
  width: 220px;
  transition: transform .25s ease-out;
}
.qf-rail.is-open {
  transform: translate(0, -50%);
}
.qf-rail h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue-600, #1A4DAD);
  margin: 0 0 8px;
  padding: 0 4px;
  text-align: center;
}
.qf-rail-group {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border, #e2e8f0);
}
.qf-rail-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.qf-rail-group h5 {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500, #64748b);
  margin: 0 0 6px;
  padding: 0 4px;
  text-align: center;
}
.qf-rail a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-900, #0f172a);
  text-decoration: none;
  background: var(--gray-50, #f8fafc);
  transition: background .15s, color .15s;
  line-height: 1.2;
}
.qf-rail a .qf-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.qf-rail a .qf-name {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--gray-500, #64748b);
  margin-top: 1px;
  line-height: 1.25;
}
.qf-rail a:hover {
  background: var(--gray-50, #F4F6FA);
  color: var(--blue-600, #1A4DAD);
}
.qf-rail a:hover .qf-name {
  color: var(--blue-600, #1A4DAD);
}
.qf-rail a.is-active,
.qf-rail a.is-active:hover {
  background: var(--blue-600, #1A4DAD);
  color: #fff;
}
.qf-rail a.is-active .qf-name,
.qf-rail a.is-active:hover .qf-name {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
  .qf-rail-toggle {
    width: 40px;
    height: 40px;
    right: 12px;
  }
  /* На мобиле labeled-кнопка остаётся круглой: текст «Каталог» не влезает в 40px */
  .qf-rail-toggle--labeled {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
  }
  .qf-rail-toggle--labeled .qf-rail-toggle-label {
    display: none;
  }
  .qf-rail-toggle--labeled svg {
    width: 20px;
    height: 20px;
  }
  .qf-rail {
    right: 12px;
    width: 200px;
    padding: 10px 8px;
  }
  .qf-rail a .qf-name {
    font-size: 10px;
  }
}

/* =========================================================
   АВТОРИЗАЦИЯ / ЛИЧНЫЙ КАБИНЕТ (вход, регистрация)
   ========================================================= */
.auth-section { padding: clamp(48px, 6vw, 80px) 0 96px; }
.auth-container { display: flex; flex-direction: column; align-items: center; }
.auth-head {
  text-align: center;
  max-width: 520px;
  margin-bottom: 28px;
}
.auth-head h1 { margin: 0 0 10px; }
.auth-lead {
  color: var(--gray-500);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.auth-card--wide { max-width: 640px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
/* воздух между лейблом и полем: было впритык */
.auth-form .field { gap: 9px; }
.auth-form .field label {
  display: block;
  line-height: 1.35;
  letter-spacing: .01em;
}
.auth-error {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(196,30,60,.25);
  background: #FDF2F4;
  color: #B0233F;
  font-size: 14px;
}
.auth-submit { width: 100%; justify-content: center; }
.auth-alt {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
}
.auth-alt a { color: var(--blue-500); font-weight: 600; }
.auth-alt a:hover { color: var(--blue-600); }
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-700);
}
.auth-agree input { margin-top: 3px; flex: none; }
.auth-agree a { color: var(--blue-500); }
.auth-agree a:hover { text-decoration: underline; }
.auth-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .auth-card { padding: 24px 18px; }
  .auth-cols-2 { grid-template-columns: 1fr; }
}

/* =========================================================
   ЛИЧНЫЙ КАБИНЕТ (профиль + архив заявок)
   ========================================================= */
.acct-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}
.acct-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.acct-card h2 {
  font-size: 20px;
  margin: 0 0 24px;
  color: var(--navy-900);
}
.acct-form { display: flex; flex-direction: column; gap: 20px; }
/* воздух между лейблом и полем: было впритык */
.acct-form .field { gap: 9px; }
.acct-form .field label {
  display: block;
  line-height: 1.35;
  letter-spacing: .01em;
}
.acct-submit { width: 100%; justify-content: center; }
.acct-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
}
.acct-meta {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--gray-500);
}
.acct-meta a { color: var(--blue-500); font-weight: 600; }
.acct-meta a:hover { color: var(--blue-600); }

/* Опасная зона: самоудаление аккаунта */
.acct-danger {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e8c8c8;
  border-radius: 10px;
  background: #fdf6f6;
}
.acct-danger .acct-note { display: block; margin: 0 0 12px; }
.acct-danger .btn { width: 100%; justify-content: center; }

/* флеш об успехе */
.acct-flash {
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(15,122,69,.25);
  background: #F0F9F3;
  color: #0F7A45;
  font-size: 14px;
  text-align: center;
}

/* пустой архив */
.acct-empty {
  padding: 32px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
}
.acct-empty p { margin: 0 0 8px; }
.acct-empty a { color: var(--blue-500); font-weight: 600; }
.acct-empty a:hover { color: var(--blue-600); }

/* список заявок */
.acct-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acct-order {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--white);
}
/* Админка (/admin/orders/): контур заявок темнее, чем в кабинете клиента */
.admin-orders-list .acct-order {
  border: 1px solid #9AA7BC;
}
.acct-order-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.acct-order-num { font-weight: 700; color: var(--navy-900); font-size: 15px; }
.acct-order-date { color: var(--gray-500); font-size: 13px; }

/* статус-бейджи */
.acct-status {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.acct-status--new       { background: rgba(30,90,200,.1);  color: var(--blue-500); }
.acct-status--in_work   { background: #FEF3C7;             color: #B45309; }
.acct-status--shipped   { background: #EDE9FE;             color: #6D28D9; }
.acct-status--done      { background: rgba(15,122,69,.12); color: #0F7A45; }
.acct-status--cancelled { background: var(--gray-50);      color: var(--gray-500); }

.acct-order-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--gray-500);
}
.acct-order-meta b { color: var(--navy-900); font-weight: 600; }

/* таблица позиций */
.acct-order-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.acct-order-items th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--border);
}
.acct-order-items td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--gray-700);
  vertical-align: top;
}
.acct-order-items tr:last-child td { border-bottom: 0; }
.acct-order-items .num { text-align: right; white-space: nowrap; }

.acct-repeat { margin-top: 14px; }
.acct-order-comment { margin-top: 12px; }
.acct-order-comment summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--blue-500);
  font-weight: 600;
}
.acct-order-comment pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 13px;
  white-space: pre-wrap;
  color: var(--gray-700);
}

@media (max-width: 1024px) {
  .acct-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .acct-card { padding: 20px 16px; }
  .acct-order { padding: 14px; }
  .acct-order-items th:nth-child(2),
  .acct-order-items td:nth-child(2) { display: none; }
}

/* =========================================================
   АДМИН-ПАНЕЛЬ
   ========================================================= */
.admin-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-stat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}
.admin-stat-label {
  font-size: 13px;
  color: var(--gray-500);
}
.admin-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-search input[type="search"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-search input:focus,
.admin-search select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30,90,200,.12);
}
.admin-search select {
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.admin-users td {
  vertical-align: middle;
}
.admin-users .num a {
  font-weight: 700;
  color: var(--blue-500);
}
.admin-row--off td {
  opacity: .55;
}
.admin-actions {
  white-space: nowrap;
}
.admin-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.admin-inline .btn {
  padding: 7px 12px;
  font-size: 13px;
}
.admin-inline select {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.admin-btn--danger:hover {
  border-color: #B0233F;
  color: #B0233F;
}
.admin-order-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  align-items: center;
}
@media (max-width: 820px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .admin-nav { flex-wrap: wrap; }
  .admin-order-actions { flex-direction: column; align-items: stretch; }
}
