/* Публичный прайс-лист. Деловой премиальный стиль: документ коммерческого предложения —
   тёмно-синий, один латунный акцент, тёплая «бумажная» гамма нейтральных,
   антиква Cormorant Garamond для заголовков и Manrope для данных (обе с кириллицей). */
:root {
  --navy: #0f2440;
  --navy-2: #17325a;
  --navy-ink: #0b1b31;
  --accent: #1d4f8f;          /* ссылки, фокус */
  --accent-hover: #163f73;
  --brass: #a8834a;           /* единственный декоративный акцент */
  --brass-soft: #f7f1e6;
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #16202e;
  --muted: #5f646d;
  --faint: #8e8b85;
  --line: #e6e2da;
  --line-strong: #d3cdc2;
  --zebra: #fbfaf8;
  --hover: #f6f3ee;
  --plate: #f6f4f0;            /* подложка под фото товара */
  --hairline: #efebe4;         /* тонкие линии внутри карточки */
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(15, 36, 64, 0.06);
  --shadow: 0 1px 2px rgba(15, 36, 64, 0.05), 0 10px 28px -18px rgba(15, 36, 64, 0.28);
  --header-h: 64px;
  --gutter: 32px;
  --font: 'Manrope', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Cormorant Garamond', 'Cormorant', 'Noto Naskh Arabic', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
body:has(.lightbox[open]) { overflow: hidden; }

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.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;
}

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

main { flex: 1 0 auto; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--navy);
  color: #fff;
  border-bottom: 2px solid var(--brass);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.site-header :focus-visible { outline-color: #d9c29a; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: 0.01em; white-space: nowrap; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none;
  background: transparent; color: #d9c29a; box-shadow: inset 0 0 0 1.5px #d9c29a;
  border: 0; padding: 0; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.brand-mark[aria-expanded="true"] { background: #d9c29a; color: var(--navy); }
@media (hover: hover) { .brand-mark:hover { background: #d9c29a; color: var(--navy); } }
.brand-name { color: inherit; }
.brand-mark svg { stroke-width: 2.2; }

.search { position: relative; flex: 1 1 auto; max-width: 480px; display: block; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.55); pointer-events: none; transition: color 0.2s; }
.search input {
  width: 100%; height: 38px; padding-block: 0; padding-inline: 38px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06); color: #fff; font: inherit; font-size: 14px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: rgba(255, 255, 255, 0.55); }
.search input:hover { border-color: rgba(255, 255, 255, 0.28); }
.search input:focus { outline: none; background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 0 0 3px rgba(217, 194, 154, 0.45); }
.search input:focus::placeholder { color: var(--faint); }
.search:focus-within svg { color: var(--faint); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link {
  position: relative; color: rgba(255, 255, 255, 0.78); font-weight: 500; font-size: 14px;
  padding: 8px 10px; white-space: nowrap; transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 1.5px;
  background: #d9c29a; transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { transform: scaleX(1); }
body:not(:has(#contact-list > li, #contacts-actions > *)) .nav-contacts { display: none; }

/* Меню «≡»: выпадает под шапкой; прайс-лист, бренды с отступом, заявка, контакты. */
.menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.menu-list { display: grid; max-width: 380px; padding: 6px 0 10px; }
.menu-link {
  display: flex; align-items: center; min-height: 46px; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--navy-ink); font-size: 16px; font-weight: 600; text-align: start; cursor: pointer;
}
@media (hover: hover) { .menu-link:hover { color: var(--brass); } }
.menu-list > :last-child, .menu-list > :last-child > .menu-link { border-bottom: 0; }
.menu-brands { display: grid; padding-block: 2px 6px; padding-inline: 16px 0; border-bottom: 1px solid var(--line); }
.menu-brand { min-height: 40px; border-bottom: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.menu-brand[aria-current="true"] { color: var(--navy); font-weight: 700; }
.menu-brand[aria-current="true"]::before { content: ''; width: 6px; height: 6px; margin-inline-end: 8px; border-radius: 50%; background: var(--brass); }
.menu-quote:empty { display: none; }

.lang-switch { display: flex; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--radius-sm); overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  color: rgba(255, 255, 255, 0.7); font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  padding: 7px 11px; transition: background 0.2s, color 0.2s;
}
.lang-switch button + button { border-inline-start: 1px solid rgba(255, 255, 255, 0.22); }
.lang-switch button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.lang-switch button[aria-pressed='true'] { background: #fff; color: var(--navy); }

/* ---------- Шапка документа: крупный заголовок + штамп даты ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px;
  padding-top: 48px; padding-bottom: 36px;
}
.hero h1 {
  position: relative; margin: 0; padding-top: 22px;
  color: var(--navy-ink); font-family: var(--serif); font-size: clamp(48px, 5.6vw, 84px); line-height: 0.95; font-weight: 500; letter-spacing: -0.02em;
}
.hero h1::before { content: ''; position: absolute; inset-inline-start: 2px; top: 0; width: 56px; height: 3px; background: var(--brass); }

.hero-side { display: grid; gap: 14px; justify-items: stretch; min-width: 360px; }
/* Дата цен — одна строка между тонкими линиями: подпись в начале, дата в конце. */
.asof {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0;
  padding: 12px 2px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.asof-label { color: var(--brass); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
:lang(ar) .asof-label { letter-spacing: 0; font-size: 13px; }
.asof-date { color: var(--navy-ink); font-family: var(--serif); font-size: 22px; line-height: 1.1; font-weight: 600; font-variant-numeric: lining-nums; white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-secondary { background: var(--card); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); }

/* ---------- Таблица ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 20px; margin-bottom: 10px; }
/* Фильтр по бренду: «таблетки», выбранная — тёмно-синяя. */
.brand-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--navy); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.count { margin: 0; color: var(--muted); font-size: 13px; font-weight: 500; }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap.is-scrollable { overflow-x: auto; }
/* В блоке со своим скроллом шапка таблицы липнет к блоку, а не к окну — сдвиг под шапку сайта там не нужен. */
.table-wrap.is-scrollable .price-table thead th { top: 0; }

.price-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.price-table thead th {
  position: sticky; top: calc(var(--header-h) + 2px); z-index: 2;
  background: var(--navy); color: rgba(255, 255, 255, 0.86);
  padding: 12px 7px; font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase;
  text-align: center; vertical-align: middle;
}
.price-table thead th + th { border-inline-start: 1px solid rgba(255, 255, 255, 0.08); }
.price-table thead th:first-child { border-start-start-radius: calc(var(--radius) - 1px); text-align: start; padding-inline-start: 18px; }
.price-table thead th:last-child { border-start-end-radius: calc(var(--radius) - 1px); }
.price-table thead .col-price { background: var(--navy-2); color: #e6d3ad; width: 104px; box-shadow: inset 0 -2px 0 var(--brass); }

.price-table tbody td, .price-table tbody th {
  padding: 10px 7px; border-top: 1px solid var(--line);
  text-align: center; vertical-align: middle; font-weight: 400;
}
.price-table tbody tr:nth-child(1 of :not([hidden])) > * { border-top: 0; }
.price-table tbody tr:nth-child(even of :not([hidden])) { background: var(--zebra); }
.price-table tbody tr { transition: background 0.15s; }
.price-table tbody tr:hover { background: var(--hover); }
.price-table tbody tr:nth-last-child(1 of :not([hidden])) > :first-child { border-end-start-radius: var(--radius); }
.price-table tbody tr:nth-last-child(1 of :not([hidden])) > :last-child { border-end-end-radius: var(--radius); }
/* Колонка цены — тонированная полоса, как в бумажном прайсе. */
.price-table tbody td:has(> .price, > .price-request) { background: var(--brass-soft); border-left: 1px solid #ece3d2; border-right: 1px solid #ece3d2; }

.price-table .cell-name { text-align: start; padding-inline-start: 18px; font-weight: 600; color: var(--navy-ink); font-size: 14px; min-width: 124px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; color: #2c3747; }
.ean { font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; color: #2c3747; }
.dash { color: #b9c0ca; }
.langs { color: #2c3747; white-space: nowrap; }
.price-table .langs { min-width: 64px; white-space: normal; } /* в таблице языки в две строки — место под колонку заказа */

.price { font-weight: 700; color: var(--navy-ink); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-request { color: var(--muted); font-size: 12.5px; font-style: italic; white-space: nowrap; }

/* Миниатюры */
.thumb { width: 84px; height: 52px; border-radius: var(--radius-sm); }
.thumb {
  display: inline-block; vertical-align: middle; padding: 4px; cursor: zoom-in;
  background: var(--plate); border: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; } /* белый фон фото сливается с подложкой */
.thumb:hover { border-color: var(--navy); box-shadow: 0 4px 12px -6px rgba(15, 36, 64, 0.35); }
/* Артворк: в таблице — «Открыть» и значок «Скачать», в карточке — две кнопки под фото. */
.artwork-cell { display: inline-flex; gap: 6px; }
.artwork-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--navy); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.artwork-link:hover { border-color: var(--navy); }
.artwork-actions { display: none; }

/* Карточки (телефон) */
.cards { display: none; list-style: none; margin: 0; padding: 0; }

/* Пустые состояния */
.state {
  padding: 52px 24px; text-align: center;
  background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.state-title { margin: 0 0 16px; color: var(--navy-ink); font-size: 16px; font-weight: 600; }
.state-title:last-child { margin-bottom: 0; }

/* ---------- Преимущества ---------- */

/* ---------- Контакты ---------- */
.contacts { margin-top: 56px; }
.contacts:not(:has(#contact-list > li, #contacts-actions > *)) { display: none; }
.contacts-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--navy);
  box-shadow: var(--shadow-sm);
}
.contacts-main { min-width: 0; }
.contacts-title { margin: 0 0 16px; color: var(--navy-ink); font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 600; }
.contact-list { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.contact-list:empty { display: none; }
.contact { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--ink); }
a.contact:hover .contact-value { color: var(--accent); }
.contact-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--navy); box-shadow: inset 0 0 0 1px var(--line-strong); flex: none; }
.contact-label { display: block; font-size: 11px; color: var(--faint); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-value { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; transition: color 0.2s; }
.contacts-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts-actions:empty { display: none; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 64px; padding: 24px 0 28px; background: var(--navy); border-top: 2px solid var(--brass); color: rgba(255, 255, 255, 0.72); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.footer-title { color: #fff; font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }
.footer-meta { font-variant-numeric: tabular-nums; }

/* ---------- Лайтбокс ---------- */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 17, 31, 0.86); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in 0.18s ease-out; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 72px 100px; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%; max-height: 100%; }
.lb-img {
  display: block; max-width: min(1280px, 100%); max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px);
  object-fit: contain; background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
}
.lb-caption { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 14.5px; }
.lb-slot { color: rgba(255, 255, 255, 0.7); }
.lb-count { padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.12); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-sm); cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: #fff;
  transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-btn:focus-visible { outline: 2px solid #d9c29a; outline-offset: 3px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 28px; }
.lb-next { right: 28px; }
.lb-close { top: 20px; right: 20px; }

/* ---------- Средние экраны ---------- */
@media (max-width: 1180px) {
  .header-inner { gap: 18px; }
  .brand-name { display: none; }
  .hero { grid-template-columns: 1fr; align-items: start; gap: 24px; }
  .hero-side { min-width: 0; max-width: 480px; }
}

/* ---------- Телефон: карточки вместо таблицы ---------- */
@media (max-width: 768px) {
  :root { --gutter: 16px; }
  /* шапка (меню, язык, поиск) едет вместе со страницей; якоря — ниже неё */
  html { scroll-padding-top: 124px; }
  .menu { max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
  .header-inner { flex-wrap: wrap; height: auto; gap: 12px; padding-top: 12px; padding-bottom: 14px; }
  .brand { order: 1; flex: 1 1 auto; min-width: 0; }
  .brand-name { display: block; overflow: hidden; text-overflow: ellipsis; }
  .lang-switch { order: 2; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 42px; }
  .site-nav { display: none; }

  .hero { padding-top: 24px; padding-bottom: 20px; gap: 18px; }
  .hero h1 { font-size: 54px; padding-top: 16px; }
  .hero-side { max-width: none; }
  .asof-date { font-size: 20px; }

  .table-wrap { display: none; }
  .cards { display: grid; gap: 14px; }
  /* Карточка — чистый белый лист: одна тонкая рамка, фото на мягкой подложке, цена антиквой, данные тонкими линиями. */
  .card {
    padding: 16px 16px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 36, 64, 0.04), 0 12px 24px -22px rgba(15, 36, 64, 0.35);
  }
  .card-media { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .card .thumb {
    width: 100%; height: auto; aspect-ratio: 5 / 4; padding: 12px;
    border: 0; border-radius: 10px; background: var(--plate); box-shadow: none;
  }
  /* одно фото — того же размера, что каждое из двух у батончиков, по центру */
  .card .card-media-one > .thumb { grid-column: 1 / -1; justify-self: center; width: calc(50% - 4px); }
  /* вертикальное фото (банка): одно — высокая подложка, в паре с блоком — обе квадратные */
  .card .card-media .thumb.thumb-tall { aspect-ratio: 4 / 5; }
  .card .card-media:not(.card-media-one):has(.thumb-tall) .thumb { aspect-ratio: 1; }
  .card .artwork-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .card .artwork-actions .btn {
    height: 34px; padding: 0 10px; gap: 6px; border-color: var(--line); background: transparent;
    font-size: 13px; font-weight: 600; text-decoration: none;
  }
  .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 18px 0 10px; }
  .card-head:first-child { margin-top: 0; } /* товар без фото */
  .card-name { margin: 0; color: var(--navy-ink); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
  .card-price { flex: none; text-align: end; }
  .card-price .price { font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--navy); }
  /* Характеристики — плитками: значение крупно, подпись под ним; по три (логистика) или по два в ряд, ряды — тонкими линиями */
  .card-specs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 16px; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .spec { grid-column: span 2; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 3px; padding: 11px 0 10px; border-bottom: 1px solid var(--hairline); min-width: 0; }
  .spec-half { grid-column: span 3; }
  .spec dt { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
  .spec dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  .spec-text dd { font-size: 14px; letter-spacing: 0; }
  .card-specs .spec-end { border-bottom: 0; } /* последний ряд */
  .card .card-order { display: flex; margin: 0 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .card .card-order .order-truck { margin-inline-start: auto; }

  .contacts { margin-top: 40px; }
  .contacts-panel { padding: 22px 18px; }
  .contact-list { flex-direction: column; }
  .contacts-actions, .contacts-actions > * { width: 100%; }

  .lb-stage { padding: 64px 12px 96px; }
  .lb-img { max-height: calc(100dvh - 220px); padding: 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Заявка «Request a quote» (таск 04) ---------- */
.nav-quote { cursor: pointer; margin-inline-start: 6px; padding: 7px 14px; border: 1px solid #d9c29a; border-radius: var(--radius-sm); background: transparent; color: #fff; }
.nav-quote::after { display: none; }
.nav-quote:hover { background: #d9c29a; color: var(--navy); }
.btn:disabled { cursor: default; opacity: 0.8; transform: none; }

body:has(.quote[open]) { overflow: hidden; }
.quote {
  width: min(640px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-top: 3px solid var(--navy); border-radius: var(--radius); overflow: hidden;
  background: var(--card); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(6, 15, 30, 0.6);
}
.quote::backdrop { background: rgba(6, 15, 30, 0.6); backdrop-filter: blur(4px); }
.quote[open] { animation: lb-in 0.18s ease-out; }
.quote-form { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.quote-head h2 { margin: 0; color: var(--navy-ink); font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 600; }
.quote-x {
  width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); cursor: pointer; flex: none;
  display: grid; place-items: center; background: var(--bg); color: var(--muted); transition: background 0.15s, color 0.15s;
}
.quote-x:hover { background: var(--line); color: var(--ink); }
.quote-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 24px 20px; display: grid; gap: 18px; }
.quote-intro { margin: 0; color: var(--muted); }

.q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.q-grid .q-span { grid-column: 1 / -1; }
.q-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
/* «Заказ в коробках / паллетах»: две «таблетки», выбранная — тёмно-синяя. */

/* ---------- Заказ прямо в прайсе: паллеты счётчиком или вся фура одной кнопкой ---------- */
.order { display: inline-flex; align-items: center; gap: 8px; }
.order-qty { display: inline-flex; align-items: stretch; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.order.has-qty .order-qty { border-color: var(--navy); }
.order-step { width: 32px; padding: 0; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.order-step:hover { background: var(--hover); }
.order-input {
  width: 46px; padding: 0 2px; border: 0; border-inline: 1px solid var(--line); border-radius: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}
.order-input:focus { outline: none; background: var(--brass-soft); }
.order-unit { color: var(--muted); font-size: 12.5px; }
.order-truck {
  height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card);
  color: var(--navy); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.order-truck:hover { border-color: var(--navy); }
.order-truck[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.order :focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cell-order { white-space: nowrap; }
.order-cell { gap: 5px; }
.order-cell .order-qty { height: 32px; }
.order-cell .order-input { width: 44px; border-inline: 0; }
.order-cell .order-truck { height: 32px; padding: 0 9px; font-size: 12.5px; }

/* Панель заказа внизу экрана: итог и кнопка «Оформить заявку» */
.order-bar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(560px, calc(100% - 32px));
  padding: 10px 10px 10px 18px; border-radius: 12px; background: var(--navy); color: #fff;
  box-shadow: 0 16px 36px -14px rgba(15, 36, 64, 0.6);
}
.order-bar[hidden] { display: none; }
.order-bar-text { min-width: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.order-bar-label { display: block; color: rgba(255, 255, 255, 0.7); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.order-bar .btn { flex: none; height: 40px; background: #fff; color: var(--navy); border-color: #fff; }
.order-bar .btn:hover { background: var(--brass-soft); }
body.has-order { padding-bottom: 88px; } /* панель не закрывает конец страницы */

.q-label { font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 0; }
.q-req { color: #c62828; }
.quote input:not([type]), .quote select, .quote textarea {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s;
}
.quote textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.quote input:focus, .quote select:focus, .quote textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 36, 64, 0.12); }
.q-field.invalid :is(input, select, textarea), .q-item.invalid input { border-color: #c62828; background: #fffafa; }
.q-error { font-size: 13px; color: #c62828; }
.q-error:empty { display: none; }

.q-products { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 6px; }
.q-items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.q-products.invalid .q-items { border-color: #c62828; }
.q-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 12px; }
.q-item + .q-item { border-top: 1px solid var(--line); }
.q-item-name { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.q-item-input { display: flex; align-items: center; gap: 8px; }
.quote .q-item-input input { width: 92px; height: 38px; text-align: end; font-variant-numeric: tabular-nums; }
.q-unit { width: 38px; color: var(--muted); font-size: 13px; }
.q-item .q-error { grid-column: 1 / -1; text-align: end; }

.q-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.q-alert { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fdecec; color: #9f1d1d; font-size: 14px; font-weight: 500; }
.q-alert-contacts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.q-alert-contacts a { color: #9f1d1d; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.quote-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--card); }
.q-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: q-spin 0.7s linear infinite; }
.is-sending .q-spinner { display: inline-block; }
@keyframes q-spin { to { transform: rotate(360deg); } }

.q-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: var(--radius-sm); border-left: 3px solid var(--brass);
  background: var(--navy); color: #fff; font-weight: 600; box-shadow: var(--shadow); animation: lb-in 0.18s ease-out;
}

@media (max-width: 768px) {
  .quote { width: 100%; max-height: calc(100dvh - 12px); margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
  .quote-form { max-height: calc(100dvh - 12px); }
  .quote-head { padding: 16px 16px 0; }
  .quote-head h2 { font-size: 20px; }
  .quote-body { padding: 10px 16px 16px; }
  .q-grid { grid-template-columns: 1fr; }
  .quote input:not([type]), .quote select, .quote textarea { font-size: 16px; } /* iOS не увеличивает страницу при фокусе */
  .quote-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .quote-foot .btn { flex: 1 1 0; }
}
