/* ==========================================================================
   Epack — таблица стилей нового дизайна
   Один источник правды по цвету, типографике и отступам.
   Старый style.css остаётся нетронутым, пока шаблоны не переедут.
   ========================================================================== */

/* --------------------------------------------------------------- ТОКЕНЫ -- */
:root {
    /* Фирменный цвет. В макетах Stitch часть экранов красилась через
       материаловский токен primary, который резолвится в бордовый #AD292D.
       Здесь единственный источник правды — переменные ниже. */
    --brand:          #EB5755;
    --brand-hover:    #BB4242;
    --brand-deep:     #811622;
    --brand-soft:     #FFF1F0;

    --ink:            #111111;
    --ink-2:          #6B6B6B;
    --ink-3:          #9A9A9A;
    --on-brand:       #FFFFFF;

    --bg:             #FFFFFF;
    --surface:        #FAFAFA;
    --surface-2:      #F5F5F5;
    --divider:        #F0F0F0;
    --border:         #E5E5E5;

    --success:        #28A745;
    --error:          #DC3545;

    /* Типографика */
    --font-text:      "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-num:       "Electrolize", var(--font-text);

    --fs-h1:          40px;  --lh-h1: 48px;
    --fs-h2:          30px;  --lh-h2: 38px;
    --fs-h3:          22px;  --lh-h3: 28px;
    --fs-h4:          18px;  --lh-h4: 24px;
    --fs-body:        16px;  --lh-body: 26px;
    --fs-sm:          14px;  --lh-sm: 20px;
    --fs-xs:          12px;  --lh-xs: 16px;

    /* Сетка и отступы, шаг 8px */
    --container:      1280px;
    --gutter:         24px;
    --s-1:  8px;  --s-2: 16px;  --s-3: 24px;  --s-4: 32px;
    --s-5: 40px;  --s-6: 56px;  --s-7: 80px;  --s-8: 112px;
    --s-sec: 48px;   /* вертикальное поле секции */

    /* Радиусы: сведены к четырём значениям вместо 3..32px вразнобой */
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  20px;
    --r-xl:  24px;

    --shadow-card:  0 1px 2px rgba(17, 17, 17, .04), 0 4px 16px rgba(17, 17, 17, .06);
    --shadow-pop:   0 8px 32px rgba(17, 17, 17, .14);

    --header-h:       104px;
    --header-h-slim:  64px;
}

/* ----------------------------------------------------------------- БАЗА -- */
*, *::before, *::after { box-sizing: border-box; }
/* Атрибут hidden проигрывает любому display в классе — например .cookie имеет
   display:flex, и полоса про cookie не убиралась по кнопке «Согласен».
   Возвращаем атрибуту приоритет один раз для всей вёрстки. */
[hidden] { display: none !important; }

html {
    /* фон задан явно: без этого браузер в тёмной теме подставляет свой
       под чёрный текст — на старом сайте так и было */
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
picture { display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 { margin: 0 0 var(--s-3); font-weight: 700; color: var(--ink); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }
p  { margin: 0 0 var(--s-2); }

/* цифры, цены и технические значения — Electrolize */
.num, .price, .spec-value { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Ритм секций. В макете между блоками 80px, и секции там — карточки без
   своих вертикальных полей. У нас полосы во всю ширину, поэтому поле
   служит ещё и внутренним отступом полосы: берём 48px сверху и снизу —
   96px между блоками. Было 80+80=160px, то есть вдвое больше макета. */
.section { padding-block: var(--s-sec); }
.section--tight { padding-block: var(--s-5); }
.section--surface { background: var(--surface); }

.eyebrow {
    font-size: var(--fs-xs); line-height: var(--lh-xs);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 600; color: var(--brand); margin-bottom: var(--s-1);
}
.lead { font-size: var(--fs-h4); line-height: 28px; color: var(--ink-2); }
.muted { color: var(--ink-2); }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* -------------------------------------------------------------- КНОПКИ -- */
/* Размер держится на padding, а не на фиксированной ширине: на старом сайте
   было padding:1px 6px + жёсткая ширина, и кнопки ломались на длинном тексте */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
    padding: 14px 28px;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-family: var(--font-text);
    font-size: var(--fs-body); font-weight: 600; line-height: 1.2;
    text-align: center; cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn--secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--secondary:hover { background: var(--brand-soft); color: var(--brand-hover); border-color: var(--brand-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--block { width: 100%; }
/* Состояния кнопки: обычное, наведение, нажатие, фокус с клавиатуры,
   отправка и отправлено. Заблокированная кнопка не бледная красная, а
   серая — так видно, что она недоступна, а не просто «под плёнкой». */
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(235, 87, 85, .35); }
.btn[disabled], .btn.is-disabled {
    background: var(--surface-2); border-color: var(--divider); color: var(--ink-3);
    cursor: not-allowed; transform: none; box-shadow: none;
}
.btn.is-disabled { pointer-events: none; }
/* пока идёт отправка — крутилка слева от текста */
.btn.is-loading { background: var(--brand); border-color: var(--brand); color: var(--on-brand); cursor: progress; }
.btn.is-loading::before {
    content: ""; width: 16px; height: 16px; margin-right: 2px;
    border: 2px solid rgba(255, 255, 255, .45); border-top-color: #FFFFFF; border-radius: 50%;
    animation: ep-spin .7s linear infinite;
}
/* короткое подтверждение после успешной отправки */
.btn.is-done { background: var(--success); border-color: var(--success); color: #FFFFFF; cursor: default; }
.btn.is-done::before { content: "✓"; margin-right: 4px; font-weight: 700; }
@keyframes ep-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation-duration: 2s; } }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow::after { content: "→"; transition: transform .16s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------- ФОРМЫ -- */
.field { display: block; margin-bottom: var(--s-2); }
/* Поля по дизайн-системе, COMPONENT 08: подпись обычным регистром 14px,
   поле на подложке #FAFAFA, на фокусе подложка белеет, рамка краснеет. */
.field__label {
    display: block; margin-bottom: 8px;
    font-size: var(--fs-sm); line-height: var(--lh-sm);
    font-weight: 600; color: var(--ink);
}
.field__control {
    width: 100%; padding: 12px 16px; min-height: 48px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--divider); border-radius: var(--r-md);
    font-family: var(--font-text); font-size: var(--fs-sm); line-height: 24px;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
/* В макете фокус показан только сменой рамки. Кольцо оставляем: без него
   переход по табу не видно, а по клавиатуре формы должны быть проходимы. */
.field__control:focus {
    outline: none;
    background: var(--bg); border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(235, 87, 85, .18);
}
.field__req { color: var(--brand); }
.field__control::placeholder { color: var(--ink-3); }
textarea.field__control { min-height: 112px; resize: vertical; }
.field__error { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--error); }
.field.has-error .field__control { border-color: var(--error); }

/* Согласие на обработку ПД. По 152-ФЗ галочка должна ставиться пользователем,
   поэтому checked по умолчанию нигде не ставим. */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: var(--s-2) 0; }
.consent input[type="checkbox"] {
    flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px;
    accent-color: var(--brand); cursor: pointer;
}
.consent label { font-size: var(--fs-xs); line-height: 17px; color: var(--ink-2); cursor: pointer; }
.consent a { text-decoration: underline; }

/* -------------------------------------------------------------- КАРТОЧКИ -- */
.card {
    background: var(--bg);
    border: 1px solid var(--divider);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.card--hover { transition: border-color .16s ease, box-shadow .16s ease; }
.card--hover:hover { border-color: var(--border); box-shadow: var(--shadow-card); }
.card__media { aspect-ratio: 4 / 3; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-3); }
.card__title { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; margin: 0 0 6px; }
.card__text { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-2); margin: 0 0 var(--s-2); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }

.grid { display: grid; gap: var(--s-3); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ------------------------------------------------------------ АДАПТИВ -- */
/* Один набор брейкпоинтов вместо 768/769/920 вперемешку */
@media (max-width: 1024px) {
    :root { --fs-h1: 34px; --lh-h1: 42px; --fs-h2: 26px; --lh-h2: 34px; --s-7: 56px; --s-sec: 40px; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    :root {
        --fs-h1: 28px; --lh-h1: 34px;
        --fs-h2: 22px; --lh-h2: 28px;
        --fs-h3: 18px; --lh-h3: 24px;
        --gutter: 16px;
        --s-7: 40px; --s-6: 32px; --s-sec: 32px;
    }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .btn--inline { width: auto; }
}

/* ========================================================================== */
/*  ШАПКА                                                                     */
/* ========================================================================== */
.hdr { position: sticky; top: 0; z-index: 100; background: var(--bg); }

.hdr__top { border-bottom: 1px solid var(--divider); }
.hdr__top-in {
    display: flex; align-items: center; gap: var(--s-3);
    min-height: 72px; padding-block: 12px;
}
.hdr__logo { flex: 0 0 auto; }
.hdr__logo img { width: 150px; height: auto; }

.hdr__place { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-xs); line-height: 16px; color: var(--ink-2); }
.hdr__pin { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }
.hdr__addr { display: block; color: var(--ink); }
.hdr__hours { display: block; }

.hdr__msg { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: var(--fs-xs); }
.hdr__msg-label { color: var(--ink-3); }
.hdr__msg-link { color: var(--ink-2); font-weight: 600; }
.hdr__msg-link:hover { color: var(--brand); }

/* Телефон, мессенджеры и кнопка стоят на одной линии: раньше под телефоном
   висела ссылка-пунктир «Заказать звонок», и правая часть шапки была на два
   яруса. Теперь действие одно — красная кнопка. */
.hdr__contact { display: flex; align-items: center; }
.hdr__phone { font-size: 20px; line-height: 24px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.hdr__phone:hover { color: var(--brand); }
.hdr__cta { flex: 0 0 auto; padding-inline: 22px; min-height: 44px; }

.hdr__burger { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer; }
.hdr__burger span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

/* --- строка навигации --- */
.hdr__nav { background: var(--brand); }
.hdr__nav-in { display: flex; align-items: center; gap: var(--s-2); position: relative; }

.nav { display: flex; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; }
.nav__link {
    display: flex; align-items: center; gap: 6px;
    padding: 14px 14px; color: var(--on-brand);
    font-size: var(--fs-sm); font-weight: 600; line-height: 20px; white-space: nowrap;
}
.nav__item--has-sub > .nav__link::after {
    content: ""; width: 0; height: 0; margin-left: 2px;
    border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px);
}
.nav__link:hover, .nav__item:hover > .nav__link { background: var(--brand-hover); color: var(--on-brand); }

.nav__sub {
    position: absolute; top: 100%; left: 0; z-index: 20;
    min-width: 260px; padding: var(--s-2);
    background: var(--bg); border: 1px solid var(--divider); border-radius: 0 0 var(--r-md) var(--r-md);
    box-shadow: var(--shadow-pop);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.nav__item:hover > .nav__sub, .nav__item:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub-list { margin: 0; padding: 0; list-style: none; }
.nav__sub-list a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); font-size: var(--fs-sm); line-height: 20px; }
.nav__sub-list a:hover { background: var(--brand-soft); color: var(--brand); }

/* Раньше у «Компании» панель привязывалась не к пункту, а ко всей строке
   меню (position: static у пункта) — из-за этого она открывалась в начале
   шапки, далеко от своего пункта. Теперь все пункты ведут себя одинаково,
   а прижимом к правому краю занимается скрипт. */
/* Широкое выпадающее меню с подписями — теперь у всех разделов, а не только
   у «Компании». Привязка к левому краю пункта, а если панель не влезает в
   окно, её сдвигает скрипт: порядок пунктов может меняться, и жёстко
   прижимать к правому краю нельзя. */
/* Панель узкая и в одну колонку, когда пунктов один-два, и широкая в две —
   когда их три и больше. Считаем через :has: у «Экспресс печати» один
   пункт, и панель на 720px оставляла пустую половину. */
.nav__sub--mega { left: 0; right: auto; width: 360px; max-width: calc(100vw - 48px); }
.nav__sub--mega:has(li:nth-child(3)) { width: min(720px, calc(100vw - 48px)); }
.nav__sub-list--mega { display: grid; grid-template-columns: 1fr; gap: 4px; }
.nav__sub--mega:has(li:nth-child(3)) .nav__sub-list--mega { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nav__sub-list--mega a { padding: 12px; }
.nav__sub-list--mega b { display: block; font-size: var(--fs-body); font-weight: 600; }
.nav__sub-list--mega span { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 16px; color: var(--ink-2); }

/* Поиск — иконка, разворачивается по клику.
   На старом сайте строка поиска занимала на мобильном целый ряд шапки. */
.nav__search-btn { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--on-brand); cursor: pointer; }
.nav__search-btn:hover { background: var(--brand-hover); }
/* Строка поиска накрывает меню справа. Раньше у неё были свои вертикальные
   поля, и белое поле вылезало за красную полосу; теперь она растянута на всю
   высоту ряда, а содержимое выровнено по центру. */
.nav__search {
    position: absolute; inset: 0 0 0 auto;
    display: flex; align-items: center; gap: 8px;
    width: min(560px, 100%); padding: 6px 0;
}
.nav__search-input {
    flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 14px;
    border: 1px solid transparent; border-radius: var(--r-sm);
    font: inherit; font-size: var(--fs-sm); color: var(--ink); background: var(--bg);
}
/* фокус видно: без кольца непонятно, куда набирать */
.nav__search-input:focus {
    outline: none; border-color: var(--brand-deep);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .55);
}
.nav__search-submit {
    flex: 0 0 auto; height: 36px; padding: 0 18px;
    border: 0; border-radius: var(--r-sm);
    background: var(--brand-deep); color: var(--on-brand);
    font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.nav__search-submit:hover { background: #6B0F1B; }
.nav__search-close {
    flex: 0 0 auto; display: grid; place-items: center;
    width: 36px; height: 36px;
    border: 0; border-radius: 50%;
    background: transparent; color: var(--on-brand); cursor: pointer;
}
.nav__search-close:hover { background: var(--brand-hover); }
.nav__search-close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }

/* сжатие при скролле: фиксированная шапка на 104px — это 17% экрана ноутбука */
.hdr.is-slim .hdr__place,
.hdr.is-slim .hdr__msg { display: none; }
.hdr.is-slim .hdr__top-in { min-height: 56px; padding-block: 6px; }
.hdr.is-slim .hdr__logo img { width: 112px; }

@media (max-width: 1200px) {
    .hdr__place, .hdr__msg { display: none; }
}
/* Бургер включаем с 1180px: ниже этой ширины девять пунктов меню не
   помещались в строку и вылезали за контейнер шапки. */
@media (max-width: 1180px) {
    .hdr__burger { display: block; margin-left: auto; }
    .hdr__nav { position: absolute; left: 0; right: 0; top: 100%; display: none; padding-block: var(--s-2); }
    /* Меню раскрыто и прибито к липкой шапке: с двумя раскрытыми подменю низ
       списка уходил за экран и добраться до него было нельзя. Даём высоту по
       экрану и свою прокрутку. */
    .hdr__nav.is-open { display: block; max-height: calc(100vh - 100%); max-height: calc(100dvh - 100%); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .hdr__nav-in { flex-direction: column; align-items: stretch; }
    .nav { flex-direction: column; }
    .nav__link { padding: 12px 0; font-size: var(--fs-body); }
    /* подменю раскрывается по тапу: раскрытыми сразу меню занимало 1600px */
    .nav__sub { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 var(--s-2) var(--s-2); }
    .nav__item.is-open > .nav__sub { display: block; }
    .nav__item--has-sub > .nav__link::after { margin-left: auto; transition: transform .16s ease; }
    .nav__item.is-open > .nav__link::after { transform: translateY(2px) rotate(180deg); }
    .nav__sub-list a { color: rgba(255,255,255,.9); }
    .nav__sub-list a:hover { background: rgba(255,255,255,.12); color: #fff; }
    /* на телефоне всегда одна колонка: правило с :has выше по весу,
       поэтому повторяем его здесь целиком */
    .nav__sub-list--mega,
    .nav__sub--mega:has(li:nth-child(3)) .nav__sub-list--mega { grid-template-columns: 1fr; }
    .nav__sub--mega,
    .nav__sub--mega:has(li:nth-child(3)) { width: auto; max-width: none; }
    .nav__sub-list--mega span { color: rgba(255,255,255,.7); }
    .nav__search-btn { display: none; }
    /* в раскрытом меню строка поиска стоит обычным рядом: лупы тут нет,
       закрывать нечего — крестик прячем */
    .nav__search { position: static; width: 100%; padding: var(--s-1) 0; }
    .nav__search-close { display: none; }
    .nav__search-input { height: 44px; font-size: var(--fs-body); }
    .nav__search-submit { height: 44px; }
}

@media (max-width: 640px) {
    /* на 390px логотип, телефон и бургер в один ряд не помещались,
       и бургер уезжал за край экрана */
    .hdr__top-in { gap: var(--s-2); min-height: 64px; }
    .hdr__logo img { width: 116px; }
    .hdr__phone { font-size: 17px; line-height: 20px; }
    .hdr__burger { margin-left: auto; }
}
/* ========================================================================== */
/*  ПОДВАЛ (эталон из макета)                                                 */
/* ========================================================================== */
/* По дизайн-системе (COMPONENT 09) у подвала сверху коралловый кант 4px,
   а ссылки на наведении белеют, а не краснеют — на тёмном так читаемее.
   Своего верхнего отступа подвалу не нужно: у последней секции уже есть
   нижнее поле. Вместе они давали 160px пустоты перед подвалом. */
.ftr { background: #111111; color: #D9D9D9; border-top: 4px solid var(--brand); }
.ftr a { color: #D9D9D9; }
.ftr a:hover { color: #FFFFFF; }
.ftr__main { padding-block: var(--s-6) var(--s-5); }

.ftr__cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: var(--s-5); }
.ftr__logo { display: inline-block; margin-bottom: var(--s-2); }
.ftr__logo img { width: 132px; height: auto; filter: brightness(0) invert(1); }
.ftr__about { margin-bottom: var(--s-2); font-size: var(--fs-sm); line-height: 22px; color: #A8A8A8; }

.ftr__ico { flex: 0 0 auto; color: var(--brand); }
.ftr__ico--dim { color: #6B6B6B; }
.ftr__addr { display: flex; align-items: flex-start; gap: 8px; margin-bottom: var(--s-3); font-size: var(--fs-sm); line-height: 20px; color: #A8A8A8; }
.ftr__addr .ftr__ico { margin-top: 2px; }

.ftr__msg-label { margin-bottom: 8px; font-size: var(--fs-xs); color: #8A8A8A; }
.ftr__msg { display: flex; flex-wrap: wrap; gap: 8px; }
.ftr__msg-btn {
    padding: 7px 14px; border: 1px solid #333; border-radius: var(--r-sm);
    font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; white-space: nowrap;
    transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.ftr__msg-btn:hover { border-color: var(--brand); background: rgba(235, 87, 85, .12); color: #FFF; }

.ftr__head { margin-bottom: var(--s-3); font-family: var(--font-num); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #FFF; }
.ftr__list { margin: 0; padding: 0; list-style: none; }
.ftr__list li + li { margin-top: 10px; }
.ftr__list a { font-size: var(--fs-sm); line-height: 20px; }

.ftr__row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: var(--fs-sm); line-height: 20px; }
.ftr__row--muted { color: #8A8A8A; }
.ftr__phone { font-size: 20px; font-weight: 700; color: #FFF; }
.ftr__mail { text-decoration: underline; }
.ftr__park { margin: var(--s-2) 0 var(--s-3); padding-top: var(--s-2); border-top: 1px solid #2A2A2A; font-size: 11px; line-height: 16px; letter-spacing: .03em; color: #8A8A8A; }

/* контурная, а не сплошная: на тёмном подвале заливка сливалась с фоном */
.ftr__cta {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding-inline: 22px;
    border: 0; border-radius: var(--r-sm);
    background: var(--brand); color: var(--on-brand);
    font-family: var(--font-text); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease;
}
.ftr__cta:hover { background: var(--brand-hover); color: var(--on-brand); }

.ftr__bar { background: #0B0B0B; border-top: 1px solid #1F1F1F; }
.ftr__bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); padding-block: var(--s-2); }
.ftr__copy { margin: 0; font-size: var(--fs-xs); line-height: 18px; color: #8A8A8A; }
.ftr__copy a { color: #A8A8A8; text-decoration: underline; }
.ftr__pay { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ftr__pay li { display: flex; align-items: center; height: 26px; padding: 4px 8px; background: #FFFFFF; border-radius: 5px; }
/* значки лежат на белых плашках: на чёрной плашке подвала фирменные цвета
   Visa и МИР не читаются */
.ftr__pay img { display: block; width: 42px; height: auto; }
.ftr__pay-text { padding-inline: 10px !important; background: transparent !important; border: 1px solid #333; font-family: var(--font-num); font-size: 10px; letter-spacing: .04em; color: #C7C7C7; white-space: nowrap; }

@media (max-width: 1024px) {
    .ftr__cols { grid-template-columns: 1fr 1fr; }
    .ftr__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .ftr__cols { grid-template-columns: 1fr; gap: var(--s-4); }
    .ftr__bar-in { flex-direction: column; align-items: flex-start; }
}

/* ========================================================================== */
/*  ХЛЕБНЫЕ КРОШКИ                                                            */
/* ========================================================================== */
/* По дизайн-системе (COMPONENT 04) крошки идут строкой 14px без линии снизу,
   текущая страница — полужирная. */
.crumbs { padding-block: var(--s-2); }
.crumbs__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: var(--lh-sm); }
.crumbs__item + .crumbs__item::before { content: "/"; margin-right: 6px; color: var(--ink-3); }
.crumbs__item a { color: var(--ink-2); }
.crumbs__item a:hover { color: var(--brand); }
.crumbs__item--current { color: var(--ink); font-weight: 600; }

/* ========================================================================== */
/*  ТЕКСТОВАЯ СТРАНИЦА                                                        */
/* ========================================================================== */
.textpage__in { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s-6); align-items: start; }
.textpage__body { max-width: 760px; }
.textpage__body h2 { margin-top: var(--s-5); }
.textpage__body h3 { margin-top: var(--s-4); }
.textpage__body ul, .textpage__body ol { margin: 0 0 var(--s-2); padding-left: 22px; }
.textpage__body li { margin-bottom: 6px; }
.textpage__body table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-3); font-size: var(--fs-sm); }
.textpage__body th, .textpage__body td { padding: 10px 12px; border: 1px solid var(--divider); text-align: left; }
.textpage__body th { background: var(--surface); font-weight: 600; }

.textpage__aside { position: sticky; top: calc(var(--header-h-slim) + var(--s-3)); }
.textpage__toc { padding: var(--s-3); background: var(--surface); border-radius: var(--r-md); }
.textpage__toc-head { margin-bottom: 10px; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.textpage__toc-list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: 20px; }
.textpage__toc-list li + li { margin-top: 8px; }
.textpage__toc-list a { color: var(--ink-2); }
.textpage__toc-list a:hover { color: var(--brand); }
.textpage__toc:empty, .textpage__toc-list:empty { display: none; }

@media (max-width: 1024px) {
    .textpage__in { grid-template-columns: 1fr; }
    .textpage__aside { display: none; }
}

/* ========================================================================== */
/*  МОДАЛЬНЫЕ ОКНА                                                            */
/* ========================================================================== */
/* выше панели виджета Битрикс24 (99999): попап согласия вызывается из его
   формы и должен ложиться поверх неё, а не под неё */
.popup {
    position: fixed; inset: 0; z-index: 100000;
    display: none; align-items: center; justify-content: center;
    padding: var(--s-3);
    background: rgba(17, 17, 17, .55);
}
.popup.is-open { display: flex; }
.popup__box {
    position: relative; width: 100%; max-width: 460px;
    max-height: calc(100vh - 48px); overflow-y: auto;
    padding: var(--s-4);
    background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.popup__close {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: var(--surface); color: var(--ink-2);
    font-size: 22px; line-height: 1; cursor: pointer;
}
.popup__close:hover { background: var(--brand-soft); color: var(--brand); }
.popup__title { margin-bottom: 6px; font-size: var(--fs-h3); line-height: var(--lh-h3); }
.popup__lead { margin-bottom: var(--s-3); font-size: var(--fs-sm); line-height: 20px; color: var(--ink-2); }

/* ========================================================================== */
/*  COOKIE                                                                     */
/* ========================================================================== */
.cookie {
    position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); z-index: 150;
    display: flex; align-items: center; gap: var(--s-3);
    max-width: 720px; margin-inline: auto;
    padding: var(--s-2) var(--s-3);
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-pop);
}
.cookie__text { flex: 1 1 auto; margin: 0; font-size: var(--fs-xs); line-height: 17px; color: var(--ink-2); }
.cookie__text a { text-decoration: underline; }
.cookie__btn { flex: 0 0 auto; min-height: 40px; padding-inline: 20px; }
@media (max-width: 640px) { .cookie { flex-direction: column; align-items: stretch; } }

/* ========================================================================== */
/*  ТАБЫ И АККОРДЕОН                                                          */
/* ========================================================================== */
.tabs__strip {
    display: flex; gap: var(--s-4); overflow-x: auto;
    margin-bottom: var(--s-4); padding-bottom: 2px;
    border-bottom: 1px solid var(--divider);
    scrollbar-width: none;
}
.tabs__strip::-webkit-scrollbar { display: none; }
.tabs__btn {
    flex: 0 0 auto; padding: 12px 4px;
    border: 0; border-bottom: 2px solid transparent; background: none;
    font-family: var(--font-text); font-size: var(--fs-sm); font-weight: 600;
    color: var(--ink-2); white-space: nowrap; cursor: pointer;
}
.tabs__btn:hover { color: var(--ink); }
.tabs__btn.is-active { color: var(--brand); border-bottom-color: var(--brand); }

.acc { border-top: 1px solid var(--divider); }
.acc__item { border-bottom: 1px solid var(--divider); }
.acc__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
    width: 100%; padding: 18px 0;
    border: 0; background: none;
    font-family: var(--font-text); font-size: var(--fs-h4); font-weight: 600; line-height: 24px;
    color: var(--ink); text-align: left; cursor: pointer;
}
.acc__head::after { content: "+"; flex: 0 0 auto; font-size: 24px; color: var(--brand); transition: transform .16s ease; }
.acc__item.is-open .acc__head::after { content: "−"; }
.acc__body { display: none; padding-bottom: var(--s-3); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2); }
.acc__item.is-open .acc__body { display: block; }

/* ========================================================================== */
/*  СЛУЖЕБНОЕ                                                                 */
/* ========================================================================== */
.ep-form .field:last-of-type { margin-bottom: var(--s-1); }
.af-message { margin-bottom: var(--s-2); padding: 12px 16px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.af-message--success { background: rgba(40, 167, 69, .1); color: var(--success); }
.af-message--error { background: rgba(220, 53, 69, .1); color: var(--error); }

/* [hidden] проигрывает display:flex — возвращаем приоритет */
.nav__search[hidden] { display: none; }
/* заголовок «Содержание» не нужен, пока оглавление пустое */
.textpage__toc:not(.is-ready) { display: none; }

/* подсказка валидации: рисуется скриптом, поэтому стиль один на все формы —
   и на новые, и на те страницы, что ещё на старой вёрстке */
.js-hint { display: block; margin-top: 4px; font-size: var(--fs-xs); line-height: 16px; color: var(--brand-hover); }

/* ========================================================================== */
/*  СОВМЕСТИМОСТЬ СО СТАРОЙ ВЁРСТКОЙ                                          */
/*  Прежняя шапка была position:fixed, и секции отбивались от неё падингом    */
/*  в 120–230px. Новая шапка стоит в потоке, поэтому отбивку снимаем.         */
/* ========================================================================== */
.banner { height: auto; padding: var(--s-5) 0 0; }
.banner-container { height: auto; }
.banner-content { height: auto; }
.banner-desc { height: auto; }
.breadcrumbs { height: auto; padding: var(--s-2) var(--s-3); }
.search-block { padding: var(--s-4) 0 0; }

/* старые секции ограничиваем по ширине страницы, иначе на широких экранах
   контент растекается, а на узких вылезает за окно */
.inside-page-section,
.prices-samples,
.production-block,
.product-header,
.main-section,
.contacts-section { max-width: var(--container); margin-inline: auto; padding-inline: var(--s-3); box-sizing: border-box; }

/* всё, что шире окна, должно прокручиваться внутри себя, а не растягивать страницу */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 1024px) {
    .banner { flex-wrap: wrap; padding: var(--s-4) 0 0; }
    .banner-container, .banner-desc { width: 100%; }
    .breadcrumbs { padding: var(--s-2); }
    .search-block { padding: var(--s-3) 0 0; }
}

/* ========================================================================== */
/*  ВИДЕОБЛОК С КНОПКОЙ ПРОИГРЫВАНИЯ                                          */
/* ========================================================================== */
.videobox { position: relative; overflow: hidden; margin-block: var(--s-3); border-radius: var(--r-lg); background: #000; line-height: 0; }
.videobox__media { display: block; width: 100%; height: auto; }
.videobox__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; padding-left: 6px;
    border: 2px solid #FFF; border-radius: 50%;
    background: rgba(235, 87, 85, .92); color: #FFF; cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    transition: transform .16s ease, background-color .16s ease;
}
.videobox__play:hover { background: var(--brand); transform: translate(-50%, -50%) scale(1.06); }
.videobox.is-playing .videobox__play { display: none; }
@media (max-width: 640px) { .videobox__play { width: 62px; height: 62px; } }

/* ========================================================================== */
/*  ПЛАВАЮЩАЯ КНОПКА СВЯЗИ (виджет Битрикс24)                                 */
/*  Виджет рисует себя сам, поэтому правим только то, что мешает:             */
/*  прижимаем к низу окна и обводим, иначе коралловый круг теряется на        */
/*  тёмном подвале.                                                           */
/* ========================================================================== */
.b24-widget-button-wrapper {
    position: fixed !important;
    bottom: 24px !important;
    z-index: 160 !important;
}
.b24-widget-button-wrapper .b24-widget-button-inner-block {
    box-shadow: 0 0 0 3px #FFFFFF, 0 10px 28px rgba(0, 0, 0, .45) !important;
}

/* на узком экране плашка cookie перекрывала кнопку */
@media (max-width: 900px) {
    .cookie { bottom: 104px; }
}

/* лента Marquiz растянута на всю ширину окна (width:100%; right:-15px) и
   перехватывает клики по левому краю контента — сжимаем до своего размера */
.fixed-button { width: auto !important; right: auto !important; }
@media (max-width: 1024px) {
    .fixed-button, .marquiz__container { display: none !important; }
}

/* ========================================================================== */
/*  КАРУСЕЛИ                                                                  */
/*  Блок «Похожая продукция» был шире окна и уезжал влево: ширина стояла      */
/*  фиксированной (1800/1756px) без центрирования.                            */
/* ========================================================================== */
.similar-block,
.newblock { max-width: var(--container); margin-inline: auto; padding-inline: var(--s-3); box-sizing: border-box; }
.similar-block .prod-list,
.owl-carousel { max-width: 100% !important; }
.owl-stage-outer { overflow: hidden; }

/* точки листинга: на узком экране карточек меньше, значит страниц больше —
   делаем их крупнее и заметнее, иначе по ним не попасть пальцем */
.owl-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: var(--s-3); }
.owl-theme .owl-dots .owl-dot { margin: 0; }
.owl-theme .owl-dots .owl-dot span {
    width: 10px; height: 10px; margin: 0;
    background: var(--border); border-radius: 50%;
    transition: background-color .16s ease, transform .16s ease;
}
.owl-theme .owl-dots .owl-dot.active span,
.owl-theme .owl-dots .owl-dot:hover span { background: var(--brand); }

@media (max-width: 860px) {
    .owl-dots { gap: 12px; margin-top: var(--s-4); }
    .owl-theme .owl-dots .owl-dot span { width: 14px; height: 14px; }
    .owl-theme .owl-dots .owl-dot.active span { transform: scale(1.15); }
}
@media (max-width: 560px) {
    .owl-dots { gap: 14px; }
    .owl-theme .owl-dots .owl-dot span { width: 16px; height: 16px; }
}

/* .in-page считался от 100vw — это ширина вместе с полосой прокрутки,
   поэтому секция всегда была шире окна и вылезала вправо */
.in-page { width: 100%; max-width: var(--container); margin-inline: auto; }

/* ========================================================================== */
/*  СТАРАЯ ВЁРСТКА НА УЗКИХ ЭКРАНАХ                                           */
/*  В style.css почти у всех секций боковые отступы по 50px — на телефоне это */
/*  четверть экрана. Сводим к общим полям контейнера.                         */
/* ========================================================================== */
@media (max-width: 1024px) {
    .item-desc,
    .item-desc-new { flex-direction: column; margin-inline: var(--s-3) !important; }
    .item-desc-left,
    .item-desc-right { width: 100% !important; }
    .in-page { width: auto; max-width: 100%; margin-inline: 0; }
    .about-block,
    .contacts-block,
    .newbottomform,
    .inside-container,
    .prices-samples,
    .production-block,
    .similar-block { margin-inline: var(--s-3) !important; padding-inline: 0; }
}
@media (max-width: 640px) {
    .page-header-text { margin-inline: var(--s-3) !important; }
    .item-banner img,
    .product-banner { border-radius: var(--r-md); }
}

/* ========================================================================== */
/*  КАРТОЧКА ПРОДУКТА                                                         */
/* ========================================================================== */
.phero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-4); align-items: start; margin-top: var(--s-4); }
.phero__img { width: 100%; height: auto; border-radius: var(--r-lg); object-fit: cover; }
.phero__panel {
    position: sticky; top: calc(var(--header-h-slim) + var(--s-3));
    display: flex; flex-direction: column; gap: 12px;
    padding: var(--s-3); background: var(--surface); border-radius: var(--r-lg);
}
.phero__price { margin: 0 0 4px; font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
    .phero { grid-template-columns: 1fr; }
    .phero__panel { position: static; }
}

/* преимущества */
.feat { display: flex; flex-direction: column; gap: 10px; }
.feat__ico { width: 48px; height: 48px; }
.feat__text { margin: 0; font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }

/* этапы работы */
.steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.steps__lead { margin: 0; font-size: var(--fs-sm); line-height: 24px; color: var(--ink-2); }
.steps__lead a { text-decoration: underline; }
.steps__list { counter-reset: none; margin: 0; padding: 0; list-style: none; }
.steps__item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); font-size: var(--fs-body); line-height: var(--lh-body); }
.steps__item:last-child { border-bottom: 1px solid var(--border); }
.steps__num {
    flex: 0 0 auto; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand); color: var(--on-brand);
    font-size: var(--fs-sm); font-weight: 700;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: var(--s-3); } }

/* оплата и доставка */
.rowlist { display: flex; flex-direction: column; }
.rowlist__item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--divider); }
.rowlist__item:last-child { border-bottom: 0; }
.rowlist__ico { flex: 0 0 auto; width: 40px; height: 40px; }
.rowlist__title { margin: 0 0 4px; font-size: var(--fs-body); font-weight: 600; line-height: 22px; }
.rowlist__text { margin: 0; font-size: var(--fs-sm); line-height: 21px; color: var(--ink-2); }

/* карточка в карусели */
/* Карточка продукции по дизайн-системе, COMPONENT 03: подложка #FAFAFA,
   картинка вложенным блоком со своим радиусом, на наведении карточка
   «поднимается» на белый фон. */
.pcard {
    position: relative;
    display: flex; flex-direction: column; height: 100%;
    padding: var(--s-2);
    background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-lg);
    color: var(--ink);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pcard:hover { background: var(--bg); border-color: rgba(235, 87, 85, .3); box-shadow: var(--shadow-card); color: var(--ink); }
.pcard__media {
    display: block; overflow: hidden;
    aspect-ratio: 429 / 337;
    background: var(--surface-2);
    border: 1px solid var(--divider); border-radius: var(--r-md);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
/* Тело карточки забирает всю свободную высоту: тогда цена прижимается
   к его низу, а отбивка с кнопками — к низу карточки. Иначе при текстах
   разной длины полоса и кнопки в соседних карточках стоят на разной
   высоте, и ряд выглядит рваным. */
.pcard__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: var(--s-2) var(--s-1) 0; }
.pcard__title {
    font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; color: var(--ink);
    transition: color .16s ease;
}
.pcard:hover .pcard__title { color: var(--brand); }
/* растянутая ссылка: клик по любому месту карточки ведёт на раздел,
   но ссылки в подвале лежат выше и работают сами по себе */
a.pcard__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard__text { font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }
.pcard__price { margin-top: auto; padding-top: var(--s-1); font-size: var(--fs-h4); font-weight: 700; }
.pcard__price-label { font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.pcard__foot {
    position: relative; z-index: 1;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1);
    margin: var(--s-3) var(--s-1) 0; padding-top: var(--s-2);
    border-top: 1px solid var(--divider);
}
/* Обе ссылки одной высоты, чтобы при переносе на узком экране
   отбивка не разъезжала. */
.pcard__calc, .pcard__more { line-height: 22px; }
.pcard__calc {
    font-family: var(--font-num);
    font-size: var(--fs-sm); font-weight: 700; color: var(--brand);
}
.pcard__calc::after { content: " →"; }
.pcard__calc:hover { color: var(--brand-hover); }
.pcard__more { font-size: var(--fs-sm); font-weight: 600; color: var(--brand); }
.pcard__more:hover { color: var(--brand-hover); }

/* галерея примеров */
/* .owl-item в старом style.css — флекс-контейнер. Без явной ширины карточка
   схлопывалась в ноль, пока картинка не загрузилась. */
.gcard { display: block; flex: 1 1 auto; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: var(--surface); }
.gcard img { width: 100%; height: 100%; object-fit: cover; }

/* отзывы */
.rev { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: var(--s-3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); }
.rev__top { display: flex; align-items: center; gap: 12px; }
.rev__avatar { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.rev__name { margin: 0; font-size: var(--fs-body); font-weight: 600; line-height: 22px; }
.rev__date { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.rev__stars { color: #F5A623; line-height: 0; }
.rev__text { flex: 1 1 auto; margin: 0; font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }
.rev__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rev__ya { font-size: var(--fs-xs); color: var(--ink-3); text-decoration: underline; }

/* логотипы клиентов */
/* auto-fit, а не auto-fill: логотипов шесть, и на широком экране пустые
   колонки схлопываются — ряд заполняет всю ширину, а не жмётся влево. */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-2); }
.logos__item { display: grid; place-items: center; height: 88px; padding: var(--s-2); background: var(--bg); border: 1px solid var(--divider); border-radius: var(--r-md); }
.logos__item img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .16s ease, opacity .16s ease; }
.logos__item:hover img { filter: none; opacity: 1; }

/* партнёрский блок */
.offer__title { max-width: 22ch; }
.offer__lead { margin-bottom: var(--s-3); font-size: var(--fs-h4); color: var(--ink-2); }
.offer__foot { margin-top: var(--s-3); }

/* форма в конце страницы */
/* Блок заявки. Был в две колонки: слева только заголовок и одна строка, справа
   форма — левая половина оставалась пустой на всю высоту формы. В макете этот
   блок собран иначе: узкая колонка по центру, заголовок над формой, поля в два
   столбца. Так пустоты не остаётся, а форма не растягивается на всю ширину. */
.leadform__in { display: block; max-width: 780px; margin-inline: auto; }
.leadform__in > :first-child { margin-bottom: var(--s-4); text-align: center; }
.leadform__title { margin-bottom: 10px; }
.leadform__lead { margin: 0 auto; max-width: 56ch; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2); }
.leadform__in > :first-child .eyebrow { margin-bottom: 6px; }
.leadform__box {
    padding: var(--s-4);
    background: var(--bg);
    border: 1px solid var(--divider); border-radius: var(--r-xl);
}
.section--surface .leadform__box { background: var(--bg); }

/* поля в два столбца: имя с телефоном, почта со способом связи. Комментарий,
   капча, согласие и кнопка занимают всю ширину. В модалках форма остаётся
   в одну колонку — правило привязано к .leadform__box. */
.leadform__box .ep-form {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--s-3);
}
.leadform__box .ep-form > .g-recaptcha,
.leadform__box .ep-form > .consent,
.leadform__box .ep-form > .field__error,
.leadform__box .ep-form > button,
.leadform__box .ep-form > .partner-form__note { grid-column: 1 / -1; }
.leadform__box .ep-form > .field:has(textarea) { grid-column: 1 / -1; }
/* Необязательная почта идёт отдельной строкой под обязательными полями:
   в паре с телефоном она оставляла бы пустую половину ряда. */
.leadform__box .ep-form > .field--wide { grid-column: 1 / -1; }
.leadform__box .ep-form > button { margin-top: var(--s-2); }

@media (max-width: 640px) {
    .leadform__box { padding: var(--s-3); }
    .leadform__box .ep-form { grid-template-columns: 1fr; }
}

/* ========================================================================== */
/*  КОНТЕНТ СТРАНИЦЫ                                                          */
/*  Текст держим в читаемой колонке, но сам блок не сужаем: внутри контента   */
/*  встречаются таблицы цен, калькулятор и карусели — им нужна вся ширина.    */
/* ========================================================================== */
.article > :where(p, h2, h3, h4, h5, ul, ol, blockquote, dl) { max-width: 76ch; }
.article h2 { margin-top: var(--s-5); }
.article h3 { margin-top: var(--s-4); }
.article ul, .article ol { margin: 0 0 var(--s-2); padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article img { height: auto; border-radius: var(--r-md); }
.article table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-3); font-size: var(--fs-sm); }
.article th, .article td { padding: 10px 12px; border: 1px solid var(--divider); text-align: left; }
.article th { background: var(--surface); font-weight: 600; }

/* блок с примерами цен внутри контента был зажат в 144px: ширина 100%
   вместе с боковыми margin по 40px не помещалась в колонку */
.article .calc-inside { flex-wrap: wrap; gap: var(--s-3); }
.article .calc-preview { flex: 1 1 320px; min-width: 0; margin: 0; }
.article .price-table { margin: var(--s-2) 0; }

/* ========================================================================== */
/*  КАТАЛОГ                                                                   */
/* ========================================================================== */
.cathero { position: relative; margin-top: var(--s-4); border-radius: var(--r-lg); overflow: hidden; }
.cathero__img { display: block; width: 100%; height: clamp(220px, 28vw, 380px); object-fit: cover; }
.cathero__panel {
    position: absolute; inset: auto 0 0 0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2);
    padding: var(--s-3);
    /* картинки баннеров пёстрые, слабой подложки не хватало для читаемости */
    background: linear-gradient(to top, rgba(17, 17, 17, .92) 0%, rgba(17, 17, 17, .72) 55%, rgba(17, 17, 17, 0) 100%);
}
.cathero__text { margin: 0; max-width: 46ch; font-size: var(--fs-h4); line-height: 26px; color: #FFFFFF; }
@media (max-width: 640px) {
    .cathero__panel { position: static; background: var(--ink); }
    .cathero__text { font-size: var(--fs-sm); line-height: 22px; }
}


/* Карусели товаров. Owl раскладывает ленту блоком, поэтому карточки
   в одном ряду получаются разной высоты и низы не совпадают. Делаем
   ленту флексом: элементы растягиваются по самому высокому, а карточка
   заполняет элемент — у неё уже задано height: 100%.
   Класс prod-list есть у всех каруселей товаров и только у них,
   остальные карусели сайта правило не трогает. */
.prod-list.owl-carousel .owl-stage { display: flex; }
.prod-list.owl-carousel .owl-item { display: flex; }
.prod-list.owl-carousel .owl-item > * { width: 100%; }

/* постраничная навигация pdoPage */
.pager { margin-top: var(--s-4); }
.pager .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager .pagination li a,
.pager .pagination li span {
    display: grid; place-items: center; min-width: 40px; height: 40px; padding-inline: 12px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    font-family: var(--font-num); font-size: var(--fs-sm); color: var(--ink-2);
}
.pager .pagination li a:hover { border-color: var(--brand); color: var(--brand); }
.pager .pagination li.active span,
.pager .pagination li.active a { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* Виджет reCAPTCHA — фиксированные 304px. На экране 390px он вместе с
   падингами формы вылезал за край, поэтому на узких масштабируем. */
@media (max-width: 430px) {
    .leadform__box { padding: var(--s-3) var(--s-2); }
    .popup__box { padding: var(--s-3) var(--s-2); }
    .g-recaptcha { transform: scale(.85); transform-origin: 0 0; height: 66px; }
}

/* ========================================================================== */
/*  ЛИСТИНГИ И ПОИСК                                                          */
/* ========================================================================== */
.empty { max-width: 56ch; padding: var(--s-4); background: var(--surface); border-radius: var(--r-lg); }
.empty__title { margin: 0 0 8px; font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; }
.empty__text { margin: 0 0 var(--s-3); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2); }
.empty .btn + .btn { margin-left: 8px; }

.searchbox { display: flex; flex-wrap: wrap; gap: 8px; max-width: 640px; margin-top: var(--s-3); }
.searchbox__input {
    flex: 1 1 240px; min-height: 48px; padding: 0 16px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    font: inherit; font-size: var(--fs-body); color: var(--ink); background: var(--bg);
}
.searchbox__input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.results { display: flex; flex-direction: column; }
.result { padding: var(--s-3) 0; border-bottom: 1px solid var(--divider); }
.result:first-child { border-top: 1px solid var(--divider); }
.result__title { margin: 0 0 4px; font-size: var(--fs-h4); line-height: 24px; }
.result__title a { color: var(--ink); }
.result__title a:hover { color: var(--brand); }
.result__url { margin: 0 0 6px; font-family: var(--font-num); font-size: var(--fs-xs); color: var(--ink-3); word-break: break-all; }
.result__text { margin: 0; font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }

/* ========================================================================== */
/*  ПОРТФОЛИО                                                                 */
/*  Снимки лежат в TV primery на страницах продукции; у части продуктов       */
/*  галерея пустая — такие группы не показываем.                              */
/* ========================================================================== */
.pgroup + .pgroup { margin-top: var(--s-5); }
.pgroup__title { margin-bottom: var(--s-2); font-size: var(--fs-h3); line-height: var(--lh-h3); }
.pgroup__title a { color: var(--ink); }
.pgroup__title a:hover { color: var(--brand); }
.pgroup__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2); }
/* :empty здесь не годится: в сетке остаются переводы строк из чанка,
   поэтому пустые группы прячет скрипт по отсутствию карточек */
.pgroup[hidden] { display: none; }

/* ========================================================================== */
/*  СТРАНИЦА ОТЗЫВА                                                           */
/* ========================================================================== */
.revpage { max-width: 800px; }
.revpage__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.revpage__avatar { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.revpage__name { margin: 0; font-size: var(--fs-h2); line-height: var(--lh-h2); }
.revpage__date { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
.revpage__stars { margin-left: auto; }
.revpage__text { font-size: var(--fs-body); line-height: var(--lh-body); }
.revpage__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--divider); }
@media (max-width: 640px) { .revpage__stars { margin-left: 0; width: 100%; } }

/* ========================================================================== */
/*  ЗАПИСЬ БЛОГА                                                              */
/* ========================================================================== */
.post { max-width: 840px; }
.post .eyebrow a { color: var(--brand); }
.post__cover { display: block; width: 100%; height: auto; margin: var(--s-3) 0; border-radius: var(--r-lg); }
.post__body { margin-top: var(--s-3); font-size: var(--fs-body); line-height: var(--lh-body); }
.post__foot { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--divider); }

/* ========================================================================== */
/*  КОНТАКТЫ                                                                  */
/* ========================================================================== */
.contacts-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.contacts-col > h2:first-child { margin-top: 0; }

.cinfo { margin: 0 0 var(--s-3); }
.cinfo__label { margin-top: var(--s-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cinfo__value { margin: 4px 0 0; font-size: var(--fs-body); line-height: 24px; }
.cinfo__phone { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
.cinfo__phone:hover { color: var(--brand); }
.cinfo__msg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.cinfo__msg .ftr__msg-btn { border-color: var(--border); color: var(--ink-2); }
.cinfo__msg .ftr__msg-btn:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.contacts-photo { display: block; width: 100%; max-width: 420px; height: auto; margin-bottom: var(--s-2); border-radius: var(--r-lg); }
.contacts-legal { margin-bottom: var(--s-3); font-size: var(--fs-xs); line-height: 18px; color: var(--ink-3); }

/* карта стояла жёстко 700×600 и на телефоне вылезала за экран */
.mapbox { position: relative; aspect-ratio: 7 / 6; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); }
.mapbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 1024px) {
    .contacts-grid { grid-template-columns: 1fr; gap: var(--s-4); }
    .mapbox { aspect-ratio: 4 / 3; }
}

/* форма партнёра */
.field__req { color: var(--brand); }
.partner-form__note { margin: var(--s-2) 0 0; font-size: var(--fs-sm); line-height: 20px; color: var(--ink-2); }
.partner-form__note--ok { color: var(--success); }
.partner-form__note--error { color: var(--error); }

/* ========================================================================== */
/*  СТРАНИЦА 404                                                              */
/* ========================================================================== */
.e404 { max-width: 640px; text-align: center; margin-inline: auto; }
.e404__code { margin: 0; font-size: 96px; line-height: 1; font-weight: 700; color: var(--brand-soft); }
.e404__title { margin: 0 0 var(--s-2); }
.e404__text { margin: 0 auto var(--s-3); max-width: 48ch; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2); }
.e404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: var(--s-4); }
.e404__search { justify-content: center; margin-inline: auto; }

/* ========================================================================== */
/*  СТАРАЯ МОДАЛКА КАЛЬКУЛЯТОРА                                               */
/*  popup_wantCheeper живёт внутри чанков калькулятора и открывается через     */
/*  style.display — его разметку не трогаем, чтобы не сломать расчёт.          */
/*  Но z-index у неё был 2, ниже шапки (100) и плашек, поэтому затемнение      */
/*  уходило под контент, а окно перекрывалось. Поднимаем и центрируем.         */
/* ========================================================================== */
.popup-legacy { z-index: 100010 !important; background-color: rgba(17, 17, 17, .55) !important; }
.popup-legacy .popup-content {
    max-width: min(420px, calc(100vw - 32px));
    width: 100%;
    margin: max(6vh, 24px) auto;
    border: 0;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop);
}
.popup-legacy .close { position: absolute; top: 12px; right: 16px; font-size: 26px; line-height: 1; color: var(--ink-2); }
.popup-legacy .popup-content { position: relative; }

/* ========================================================================== */
/*  ФОРМА ВИДЖЕТА БИТРИКС24                                                   */
/*  Панель формы приезжает без фона — и локально, и на боевом сайте: текст в   */
/*  ней чёрный, кнопка коралловая, то есть подложка задумана белой, но её нет. */
/*  Из-за этого форма читалась поверх страницы и выглядела прозрачной.        */
/* ========================================================================== */
.b24-window-panel {
    background: #FFFFFF !important;
    box-shadow: -8px 0 48px rgba(17, 17, 17, .28) !important;
}
.b24-form-wrapper,
.b24-form-header,
.b24-form-content,
.b24-form-sign { background: #FFFFFF !important; }

/* затемнение должно лежать под панелью, а не поверх неё */
.b24-widget-button-shadow { z-index: 99998 !important; }

@media (max-width: 640px) {
    .b24-window-panel { width: 100% !important; max-width: 100% !important; }
}


/* ========================================================================== */

/* ========================================================================== */
/*  ФОРМЫ: ПОДПИСЬ ОБОРАЧИВАЕТ ПОЛЕ                                           */
/*  Одинаковые id ломали label.for, когда чанк формы попадал на страницу       */
/*  дважды — в модалке и в секции. Теперь связь задаёт вложенность.            */
/* ========================================================================== */
.field__label .field__control { margin-top: 6px; }
.field__label { cursor: pointer; }
.field__label > input,
.field__label > select,
.field__label > textarea { text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--ink); }

.consent__label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent__label > span { font-size: var(--fs-xs); line-height: 17px; color: var(--ink-2); }
.consent__label > input[type="checkbox"] {
    flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
    accent-color: var(--brand); cursor: pointer;
}

/* «Безнал с НДС» был 10px — мельче нижней границы читаемости */
.ftr__pay-text { font-size: 11px !important; }

/* Точки листинга были 16px — по такой цели тяжело попасть пальцем. Сам
   кружок оставляем прежним, увеличиваем зону нажатия до 40px. Задаём её
   размером кнопки, а не отступами: padding тут перебивался и не срабатывал.
   Зазор в .owl-dots уменьшаем на ту же величину, чтобы на глаз ничего не
   разъехалось. */
.owl-theme .owl-dots .owl-dot,
.owl-dots .owl-dot {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; padding: 0; margin: 0;
}
.owl-dots { gap: 0; }
@media (max-width: 900px) { .owl-dots { gap: 0; margin-top: var(--s-3); } }

/* ========================================================================== */
/*  КАЛЬКУЛЯТОР                                                               */
/*  Разметку не трогаем: её скрипты завязаны на эти классы и на внешний        */
/*  сервис расчёта. Стили вешаем прямо на .calc, а не на обёртку, — тогда     */
/*  калькулятор выглядит одинаково и из шаблона, и из контента страницы.      */
/*  В старой вёрстке было три вложенные рамки по 3–5px, заголовок с отступом  */
/*  50px и margin: 0 100px — он не совпадал по краям со страницей.            */
/* ========================================================================== */
.calc { margin: 0; }

.calc-border {
    margin: 0;
    padding: var(--s-4);
    background: var(--bg);
    border: 2px solid var(--brand);
    border-radius: var(--r-lg);
}

.calc-header {
    margin: 0 0 var(--s-3);
    font-family: var(--font-text);
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
    font-weight: 600;
    color: var(--ink);
}

.calc-inside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: var(--s-4);
    align-items: start;
}
.calc-form,
.calc-preview { width: auto !important; margin: 0; }

.calc-preview {
    padding: var(--s-3);
    background: var(--bg);
    border: 1px solid var(--brand);
    border-radius: var(--r-md);
}

.calc-technic-inf-text { margin: 0 0 var(--s-2); font-size: var(--fs-h4); font-weight: 600; }
.calc-technic-inf { padding: 0; background: transparent; border: 0; border-radius: 0; }

/* align-items: end — в ячейке «Количество этикеток» над полем стоит ряд
   кнопок с готовыми тиражами, поэтому она выше соседней. Без этого
   поле «Ширина этикетки» повисало у верха ряда, а под ним зияла
   пустота. Прижимаем содержимое ячеек к низу — поля встают на одну
   линию. Работает во всех трёх вариантах калькулятора: разметка
   у них общая. */
.calc-inside .input-container {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2) var(--s-3); padding: 0;
    align-items: end;
}
/* В старом style.css у .input-box задана высота (95px, на мобильном 60px) и
   justify-content:end. Поля новой вёрстки выше, содержимое переставало
   помещаться и подпись выезжала НАД блоком — на телефоне она наползала на
   заголовок «Техническая информация». Высоту отдаём содержимому. */
.calc-inside .input-box { margin: 0; height: auto; min-height: 0; padding-bottom: 0; justify-content: flex-start; }
.calc-inside .input-name { display: block; margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

.calc-inside .calc-inf-input,
.calc-inside .calc-inf-input-new {
    width: 100%; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    font: inherit; font-size: var(--fs-body); color: var(--ink); background: var(--bg);
}
.calc-inside select { width: 100% !important; }
.calc-inside .calc-inf-input:focus,
.calc-inside .calc-inf-input-new:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.calc .submit-button,
.calc .calc-button {
    min-height: 48px; margin: var(--s-3) 0 0; padding-inline: 24px;
    width: 100%; max-width: 280px;
    border: 0; border-radius: var(--r-sm);
    background: var(--brand); color: var(--on-brand);
    font-family: var(--font-text); font-size: var(--fs-body); font-weight: 600; cursor: pointer;
}
.calc .submit-button:hover,
.calc .calc-button:hover { background: var(--brand-hover); }

@media (max-width: 1024px) {
    .calc-inside { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .calc-border { padding: var(--s-3); }
    .calc-header { font-size: var(--fs-h3); line-height: var(--lh-h3); }
    .calc-inside .input-container { grid-template-columns: 1fr; }
    .calc .submit-button, .calc .calc-button { max-width: none; }
}

/* ========================================================================== */
/*  ПОПАП СОГЛАСИЯ НА ОБРАБОТКУ ДАННЫХ                                        */
/*  Заменяет модалку виджета Битрикс24: та приезжает без стилей.              */
/* ========================================================================== */
.popup__box--wide { max-width: 640px; }
.consent-doc { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.consent-doc p { margin: 0 0 var(--s-2); font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }
.consent-doc h3 { margin: var(--s-3) 0 6px; font-size: var(--fs-body); line-height: 22px; font-weight: 600; color: var(--ink); }
.consent-doc a { text-decoration: underline; }
.consent-doc__foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2);
    margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--divider);
}
@media (max-width: 640px) {
    .consent-doc { max-height: 46vh; }
    .consent-doc__foot .btn { width: 100%; }
}

/* ========================================================================== */
/*  БЛОКИ, У КОТОРЫХ НЕ БЫЛО СТИЛЕЙ                                           */
/*  Вёрстка этих классов приехала из шаблонов, а правил в css не завели —      */
/*  браузер рисовал их по умолчанию, и блоки «ехали». Собрано по макетам       */
/*  _local/stitch4 (главная — epack_brand_lock_9).                            */
/* ========================================================================== */

/* --- первый экран главной ------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4);
    align-items: stretch;
}
.hero__text {
    display: flex; flex-direction: column;
    padding: var(--s-5);
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--r-xl);
}
.hero__text .eyebrow {
    display: inline-flex; align-items: center; align-self: flex-start;
    margin-bottom: var(--s-3); padding: 5px 12px;
    background: var(--bg); border: 1px solid var(--divider); border-radius: 999px;
}
.hero__title {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-h1); line-height: var(--lh-h1);
    font-weight: 700; color: var(--ink);
}
.hero__text .lead { margin: 0 0 var(--s-3); font-size: var(--fs-body); line-height: var(--lh-body); }

/* два столбца с красными галочками — как в макете */
.hero__list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px var(--s-3);
    margin: 0 0 var(--s-4); padding: 0; list-style: none;
}
.hero__list li {
    position: relative; padding-left: 28px;
    font-size: var(--fs-sm); line-height: 20px; font-weight: 500; color: var(--ink);
}
.hero__list li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--brand); color: var(--on-brand);
    font-size: 11px; font-weight: 700; line-height: 1;
}
.hero__actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
    margin: auto 0 0;
}
.hero__media {
    overflow: hidden; min-height: 360px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--r-xl);
}
.hero__video { display: block; width: 100%; height: 100%; min-height: 360px; object-fit: cover; }

@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; }
    .hero__media, .hero__video { min-height: 260px; }
}
@media (max-width: 640px) {
    .hero__text { padding: var(--s-3); }
    .hero__list { grid-template-columns: 1fr; }
    .hero__title { font-size: 30px; line-height: 38px; }
    .hero__actions .btn { width: 100%; }
}

/* --- карточки «Примеры стоимости» ----------------------------------------- */
.pricecards { margin-top: var(--s-4); }
.pricecard {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--divider);
    border-radius: var(--r-xl);
}
.pricecard__media {
    display: flex; align-items: center; justify-content: center;
    height: 220px; padding: var(--s-3);
    background: var(--surface);
}
.pricecard__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pricecard__body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); }
.pricecard__name {
    margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4);
    font-weight: 600; color: var(--ink);
}
.pricecard__specs {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    gap: 6px var(--s-2); margin: 0;
}
.pricecard__specs dt { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-2); }
.pricecard__specs dd {
    margin: 0; text-align: right;
    font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink);
}
.pricecard__price {
    margin: auto 0 0; padding-top: var(--s-2);
    border-top: 1px solid var(--divider);
    font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; color: var(--ink);
}
.pricecard__unit { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }

/* --- текст с боковой колонкой фактов -------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: var(--s-5);
    align-items: start;
}
.about-facts {
    padding: var(--s-4);
    background: var(--bg);
    border: 1px solid var(--divider);
    border-radius: var(--r-xl);
}
/* Верхние края колонок должны совпадать: у заголовка в текстовой колонке
   свой отступ сверху (40px), а карточка фактов начинается от верха сетки —
   из-за этого блоки выглядели съехавшими друг относительно друга. */
.about-grid > * > :first-child,
.pagehead > * > :first-child { margin-top: 0; }
.about-more { margin: var(--s-4) 0 0; }
.about-video { margin-top: var(--s-3); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: var(--s-4); } }

/* --- список преимуществ. Имя класса нейтральное: «adv» и «promo»
   вырезают блокировщики рекламы, и блок пропадал у части посетителей --------------------------------------------------- */
.facts__title {
    margin: 0 0 var(--s-3);
    font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; color: var(--ink);
}
.facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.facts li {
    position: relative; padding-left: 28px;
    font-size: var(--fs-sm); line-height: 20px; color: var(--ink);
}
.facts li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    font-size: 11px; font-weight: 700; line-height: 1;
}

/* --- обёртка калькулятора на отдельной странице --------------------------- */
.calcbox { margin-inline: auto; }

/* --- вводная часть блока «Этапы работы» ----------------------------------- */
.steps__intro { max-width: 68ch; margin-bottom: var(--s-4); }

/* --- поля формы: многострочное и подсказка -------------------------------- */
.field__control--area { min-height: 96px; padding-block: 12px; resize: vertical; }
.field__hint { display: block; margin-top: 6px; font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--ink-2); }

/* --- колонка контактов в подвале ------------------------------------------ */
.ftr__col--contact { display: flex; flex-direction: column; gap: 10px; }

/* ========================================================================== */
/*  СТАРАЯ РАЗМЕТКА ВНУТРИ КОНТЕНТА СТРАНИЦ                                   */
/*  Тексты страниц писали под прежнюю вёрстку: в контенте остались классы с    */
/*  жёсткими отступами по 40–50px, ширинами в calc(100vw - 550px) и своей      */
/*  типографикой. Новая сетка про них не знает — блоки уезжали за контейнер,   */
/*  а размеры шрифта не совпадали с остальной страницей. Контент не трогаем,   */
/*  приводим его к новой сетке отсюда.                                        */
/* ========================================================================== */

/* ширина и отступы: всё живёт внутри .container, свои поля не нужны */
.in-page,
.cards-container,
.price-table,
.production-cards,
.about-company-text-block { width: auto; max-width: 100%; margin-inline: 0; }
.cards-container { margin-bottom: var(--s-4); gap: var(--s-3); }
.production-cards { margin-bottom: var(--s-4); }
.price-table { margin: var(--s-3) 0; }

/* типографика: тот же масштаб, что и у остального текста */
.about-company-text {
    width: auto; margin: 0 0 var(--s-2);
    font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2);
}
.desc-original-item-header {
    margin: var(--s-4) 0 var(--s-2);
    font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; color: var(--ink);
}
.desc-original-item-text {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2);
}
.desc-original-item-ul { margin: 0 0 var(--s-2); padding-left: 22px; }
.desc-original-item-li { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-2); }
.preview-text { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-3); }

/* карточки из старого контента — в оформлении нового дизайна */
.main-cards { flex-wrap: wrap; gap: var(--s-3); align-items: stretch; }
.main-card {
    width: auto; flex: 1 1 280px; max-height: none;
    padding: var(--s-4) var(--s-3);
    border: 1px solid var(--divider); border-radius: var(--r-xl);
}
.main-card-header {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; color: var(--ink);
}
.main-card-inside-text { margin: 0 0 var(--s-2); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-2); }

.production-card { width: 100%; max-width: 270px; height: auto; aspect-ratio: 1 / 1; margin: 0; border-radius: var(--r-lg); }
.production-card-name {
    padding: 10px 12px; border-radius: 0 0 var(--r-lg) var(--r-lg);
    background: rgba(255, 255, 255, .92);
    font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600;
}

/* блок цен из контента */
.price-string { gap: var(--s-2); margin-bottom: var(--s-1); }
.price-header { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 700; }
.price-header-text { margin: 0 0 var(--s-3); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-2); }
.price-text, .price-item, .price-item-header { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.price-item-header { margin-bottom: var(--s-2); font-weight: 600; }

/* --- шапка секции: надзаголовок, заголовок и ссылка справа ----------------- */
/* В макетах у каждой секции сверху красная подпись капсом, а ссылка «смотреть
   все» стоит справа на одной линии с заголовком. У нас надзаголовок был только
   на первом экране, а ссылки уезжали под блок. */
.sec-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: var(--s-2) var(--s-3); margin-bottom: var(--s-4);
}
.sec-head > div { min-width: 0; }
.sec-head .eyebrow { margin-bottom: 4px; }
.sec-head h2 { margin: 0; }
.sec-head__aside { flex: 0 0 auto; }
.sec-head + .sec-note { margin-top: calc(var(--s-4) * -1 + var(--s-1)); }
@media (max-width: 640px) { .sec-head { margin-bottom: var(--s-3); } }

/* В макете поля набраны 14px. На айфоне Safari масштабирует страницу, когда
   фокусируется поле мельче 16px, — на телефоне возвращаем 16px. */
@media (max-width: 640px) {
    .field__control,
    .calc-inside .calc-inf-input,
    .calc-inside .calc-inf-input-new,
    .calc-inside select { font-size: var(--fs-body); }
}

/* ========================================================================== */
/*  КАЛЬКУЛЯТОР: ОФОРМЛЕНИЕ ПОД МАКЕТ «ВАРИАНТ A»                             */
/*  Разметку чанка не трогаем — на ней висит расчёт: id calcForm, message,     */
/*  calc_it, price_per_one, calc_count, calc_total, calc_per_one,              */
/*  wantCheeperFormBtn_Placeholder, popup_wantCheeper, select[name=material]   */
/*  и цель Метрики calcForm. Меняем только внешний вид.                       */
/* ========================================================================== */

.calc-header {
    margin: 0 0 var(--s-4);
    font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 700; color: var(--ink);
    text-align: left;
}

/* левая колонка — карточка с полями */
.calc-technic-inf-container {
    padding: var(--s-3);
    background: var(--bg);
    border: 1px solid var(--divider); border-radius: var(--r-lg);
}
.calc-technic-inf-text {
    margin: 0 0 var(--s-3);
    font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; color: var(--ink);
}

/* правая колонка — панель предварительного расчёта */
.calc-preview { display: flex; flex-direction: column; gap: var(--s-2); }
.calc-preview .price-header { margin: 0; font-family: var(--font-num); color: var(--ink); }
.calc-preview .price-header-text {
    margin: 0 0 var(--s-2);
    font-family: var(--font-text);
    font-size: var(--fs-xs); line-height: var(--lh-xs);
    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
}
.calc-preview .price-text {
    margin: 0; padding-top: var(--s-2); border-top: 1px solid var(--divider);
    font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; color: var(--ink);
}
.calc-preview .price-table { display: grid; gap: 0; margin: 0; }
.calc-preview .price-string {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-2); margin: 0; padding: 10px var(--s-1);
    border-radius: var(--r-sm);
}
.calc-preview .price-string:first-child { padding-bottom: 6px; }
/* строка с посчитанным тиражом — как выделенная строка в макете */
.calc-preview .price-string:last-child { background: var(--brand-soft); }
.calc-preview .price-item-header {
    margin: 0; font-family: var(--font-text);
    font-size: var(--fs-xs); line-height: var(--lh-xs);
    text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--ink-3);
}
.calc-preview .price-item { font-family: var(--font-num); font-size: var(--fs-sm); color: var(--ink); }
.calc-preview .price-item:last-child { color: var(--brand); font-weight: 700; }
.calc-preview .preview-text {
    margin: var(--s-1) 0 0;
    font-size: var(--fs-xs); line-height: 17px; color: var(--ink-3);
}
#message:not(:empty) {
    padding: 10px 12px; border-radius: var(--r-sm);
    background: var(--brand-soft); color: var(--brand);
    font-size: var(--fs-sm); font-weight: 600;
}

/* кнопки расчёта: те же, что и везде на сайте */
.calc-inside .submit-button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 14px 28px;
    border: 1px solid transparent; border-radius: var(--r-md);
    background: var(--brand); color: var(--on-brand);
    font-family: var(--font-text); font-size: var(--fs-body); font-weight: 600; line-height: 1.2;
    cursor: pointer;
    transition: background-color .16s ease;
}
.calc-inside .submit-button:hover { background: var(--brand-hover); }
.calc-inside .submit-button.disabled { opacity: .6; cursor: wait; }
#wantCheeperFormBtn { width: 100%; margin-top: var(--s-2); }

/* быстрый выбор тиража над полем «Количество этикеток» */
.calc-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-1); }
.calc-preset {
    padding: 7px 12px;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--divider); border-radius: var(--r-sm);
    font-family: var(--font-num); font-size: var(--fs-xs); line-height: 16px;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.calc-preset:hover { border-color: var(--brand); color: var(--brand); }
.calc-preset.is-active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* --- карточка услуги ------------------------------------------------------ */
.scard {
    display: flex; flex-direction: column; gap: var(--s-1); height: 100%;
    padding: var(--s-3);
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--divider); border-radius: var(--r-lg);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.scard:hover { border-color: rgba(235, 87, 85, .3); box-shadow: var(--shadow-card); color: var(--ink); }
.scard__title { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }
.scard:hover .scard__title { color: var(--brand); }
.scard__text { font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }
.scard__more { margin-top: auto; padding-top: var(--s-2); font-size: var(--fs-sm); color: var(--brand); }
@media (max-width: 1024px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .grid--4 { grid-template-columns: 1fr; } }

/* --- фильтр портфолио ----------------------------------------------------- */
.pfilter { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-4); }
.pfilter:empty { display: none; }
.pfilter__chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--divider); border-radius: 999px;
    font-family: var(--font-text); font-size: var(--fs-sm); line-height: 20px; font-weight: 600;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.pfilter__chip i { font-family: var(--font-num); font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); }
.pfilter__chip:hover { border-color: var(--brand); color: var(--brand); }
.pfilter__chip:hover i { color: var(--brand); }
.pfilter__chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pfilter__chip.is-active i { color: rgba(255, 255, 255, .75); }

/* --- шапка страницы с плашками фактов ------------------------------------- */
.pagehead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: var(--s-5);
    align-items: start;
}
.pagehead__text h1 { margin: 0 0 var(--s-2); }
.pagehead__facts { display: grid; gap: var(--s-2); }
.factcard {
    padding: var(--s-2) var(--s-3);
    background: var(--surface);
    border: 1px solid var(--divider); border-radius: var(--r-md);
}
.factcard__label {
    margin: 0 0 4px;
    font-size: var(--fs-xs); line-height: var(--lh-xs);
    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
}
.factcard__value { margin: 0; font-size: var(--fs-sm); line-height: 22px; font-weight: 600; color: var(--ink); }
@media (max-width: 900px) { .pagehead { grid-template-columns: 1fr; gap: var(--s-3); } }

/* --- «О компании»: текст по сетке, факты строкой под ним ------------------ */
/* Боковых колонок на странице больше нет, текст идёт во всю ширину.
   Строку при этом держим читаемой: на 1280 px без ограничения в ней
   было бы под 150 знаков, глаз на такой длине теряет начало строки. */
.about-intro { max-width: 72ch; }
.about-mission { margin-top: var(--s-4); }
/* Абзацы миссии — в две колонки. Текста мало, ширина большая: в одну
   колонку строка вышла бы под 145 знаков, а справа пустовала бы
   половина экрана. break-inside держит абзац целым, чтобы он не рвался
   между колонками. */
.about-mission__text { columns: 2; column-gap: var(--s-5); }
.about-mission__text p { break-inside: avoid; margin-top: 0; }
@media (max-width: 900px) { .about-mission__text { columns: 1; } }
/* Адрес, график, телефон и почта — то, что раньше занимало две высокие
   колонки справа. Одной строкой под текстом это занимает вчетверо меньше
   высоты и заполняет ширину, которая иначе пустовала. */
.aboutinfo {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--s-2); margin-top: var(--s-4);
}
.aboutinfo__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 0; }

/* Окно согласия виджета Битрикс24. Раньше мы белили только .b24-window-panel —
   это боковая панель с формой. У окна согласия другой класс, поэтому оно
   выезжало чёрным прямоугольником: текст в нём тёмный, подложки нет. */
.b24-window-popup,
.b24-window-popup-wrapper,
.b24-window-popup-head,
.b24-window-popup-body { background: #FFFFFF !important; color: var(--ink) !important; }
/* Скругление и тень переехали на само окно ниже: здесь .b24-window-popup —
   это затемнение во весь экран, и скруглять его незачем. */
.b24-window-popup-title { color: var(--ink) !important; }

/* Подсказка «Поле обязательно для заполнения» — компонент виджета. Он вешает
   её абсолютом под полем (bottom: -8px), из-за чего она ложилась поверх
   подписи следующего поля. Возвращаем в поток: теперь она раздвигает форму
   и ничего не перекрывает. position: relative, а не static, чтобы значок и
   уголок подсказки остались привязаны к ней самой. */
/* Показываем подсказку только у поля, которое виджет сам пометил ошибкой
   классом b24-form-control-alert. Иначе под необязательными полями
   («Название компании», «Комментарий») оставались оранжевые полоски с одной
   лишь подписью поля. */
.b24-form-control-alert-message { display: none !important; }
.b24-form-control-alert .b24-form-control-alert-message {
    position: relative !important;
    top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    display: block !important;
    width: fit-content; max-width: 100%;
    margin-top: 8px !important;
    border-radius: var(--r-sm) !important;
    padding: 6px 10px 6px 30px !important;
    font-size: var(--fs-xs) !important;
    line-height: 16px !important;
}

/* ссылка на полный список под коротким блоком вопросов */
.faq-home__more { margin: var(--s-3) 0 0; }

/* Пустое место под ошибку не занимает строку: спан появляется, только когда
   сервер вернул текст. Заметно в блоке заявки, где поля разложены сеткой. */
.field__error:empty { display: none; }

/* У части страниц introtext пуст — пустая подпись не должна занимать строку. */
.nav__sub-list--mega span:empty { display: none; }


/* Панель правых пунктов меню прижимается правым краем к своему пункту.
   Класс ставит скрипт, когда места справа не хватает. */
.nav__sub--mega.is-right { left: auto; right: 0; }

/* Галка согласия обязательна. Подсвечиваем блок, когда её забыли: системная
   подсказка браузера висит сбоку от крошечного квадрата и её легко не увидеть. */
.consent--error input[type="checkbox"] { outline: 2px solid var(--error); outline-offset: 2px; }
.consent--error > span,
.consent--error label { color: var(--error); }

/* Оплата и доставка в блоке заявки: две короткие колонки под текстом. */
.leadform__terms {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
    margin-top: var(--s-3); padding-top: var(--s-3);
    border-top: 1px solid var(--divider);
    text-align: left;
}
.leadform__term-head {
    margin: 0 0 4px;
    font-size: var(--fs-xs); line-height: var(--lh-xs);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--brand);
}
.leadform__term-text { margin: 0; font-size: var(--fs-sm); line-height: 22px; color: var(--ink-2); }
.leadform__terms-more { margin: var(--s-2) 0 0; }
@media (max-width: 640px) { .leadform__terms { grid-template-columns: 1fr; gap: var(--s-2); } }

/* Ссылки внутри согласия в форме виджета Битрикс24: текст приходит одной
   строкой, поэтому нужные куски размечает скрипт. Подчёркиваем их, чтобы было
   видно, что это ссылки. */
.b24-consent-link {
    color: var(--brand) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.b24-consent-link:hover { color: var(--brand-hover) !important; }
.b24-consent-note { margin: 6px 0 0 !important; font-size: var(--fs-xs); line-height: 16px; }

/* Кнопка «Заказать звонок» остаётся в шапке на всех ширинах — это единственное
   действие в верхнем ряду. На узких экранах ужимаем её, чтобы поместилась
   рядом с логотипом, телефоном и бургером. */
@media (max-width: 1180px) {
    .hdr__cta { padding-inline: 16px; min-height: 40px; font-size: var(--fs-sm); }
}
@media (max-width: 640px) {
    .hdr__top-in { flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
    .hdr__contact { margin-left: auto; }
    .hdr__cta { width: auto; padding-inline: 14px; min-height: 38px; font-size: var(--fs-xs); }
}

/* --- окно согласия из виджета Битрикс24 ---------------------------------
   Виджет показывает документ в своём окне: текст на тысячу с лишним точек,
   а кнопки «Принимаю» и «Не принимаю» — в самом конце. Человек нажимал на
   галочку и попадал в документ, который надо пролистать до низа, чтобы
   найти кнопку. Разметку окна задаёт Битрикс и поменять её нельзя, поэтому
   приводим в порядок оформлением: кнопки прижимаем к нижнему краю, чтобы
   они были на виду сразу.

   Классы чужие, поэтому меняем только внешний вид: ни одного правила,
   которое влияло бы на работу формы. */

/* Затемнение как у наших окон. */
.b24-window-popup {
    background: rgba(17, 17, 17, .55);
    padding: var(--s-3);
}

.b24-window-popup-wrapper {
    width: 100%;
    max-width: 640px;
    /* Окно не выше экрана: иначе кнопки внизу уезжают за край. */
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

/* Высота окна по экрану, а не по длине документа. */
.b24-window-scrollable {
    /* Высоту задаёт окно, а этот блок занимает всё, что осталось,
       и прокручивается внутри себя. */
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
}

.b24-window-popup-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.b24-window-popup-title {
    font-weight: 600;
    color: var(--ink, #111);
}

.b24-window-popup-body {
    padding-bottom: 0;
}

/* Кнопки видны сразу. Прилипание (sticky) здесь не работает: раскладка
   окна у Битрикса такова, что элемент остаётся в конце длинного текста.
   Поэтому вынимаем кнопки из потока и прижимаем к низу самого окна —
   оно с position:relative, так что отсчёт идёт от него. */
.b24-window-popup-wrapper .b24-form-btn-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: var(--s-3, 16px) var(--s-4, 24px);
    background: #fff;
    box-shadow: 0 -10px 18px -10px rgba(0, 0, 0, .18);
}

/* Место под кнопки, чтобы конец документа не уезжал под них. */
.b24-window-scrollable {
    padding-bottom: 96px;
}

/* Подсказка «Прокрутите до конца» больше не нужна и закрывала собой кнопки. */
.b24-form-scroll-textable {
    display: none !important;
}

.b24-window-popup-body .b24-form-btn {
    border-radius: 8px;
}

@media (max-width: 480px) {
    .b24-window-popup-wrapper { max-height: 92vh; }
}

/* Заголовок и текст документа — в типографике сайта. */
.b24-window-popup-head {
    padding: var(--s-3) var(--s-4) var(--s-2);
    border-bottom: 1px solid var(--divider);
}

.b24-window-popup-title {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
    font-weight: 600;
    color: var(--ink);
}

.b24-window-popup-body {
    padding: var(--s-3) var(--s-4) 0;
    font-size: var(--fs-sm);
    line-height: 22px;
    color: var(--ink-2);
}

.b24-window-popup-body p { margin: 0 0 var(--s-2); }

/* Крестик — как в наших окнах. */
.b24-window-close {
    top: 14px;
    right: 14px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-2);
    opacity: 1;
}

.b24-window-close:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

/* Полоса прокрутки тонкая и неброская: документ длинный, и жирная полоса
   посреди окна выглядит грубо. */
.b24-window-scrollable::-webkit-scrollbar { width: 6px; }
.b24-window-scrollable::-webkit-scrollbar-thumb {
    background: var(--divider);
    border-radius: 3px;
}
.b24-window-scrollable::-webkit-scrollbar-thumb:hover { background: #d8d8d8; }
.b24-window-scrollable::-webkit-scrollbar-track { background: transparent; }

/* Кнопки в оформлении сайта. */
.b24-window-popup-wrapper .b24-form-btn-container {
    gap: var(--s-2);
    border-top: 1px solid var(--divider);
}

.b24-window-popup-wrapper .b24-form-btn {
    border-radius: var(--r-sm);
    font-weight: 600;
    padding: 12px 20px;
}

/* Виджет задаёт свои цвета и скругления более сильными правилами, поэтому
   здесь приходится настаивать. Только внешний вид, поведение не трогаем. */
.b24-window-popup {
    background: rgba(17, 17, 17, .55) !important;
}

.b24-window-popup-wrapper {
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-pop) !important;
    background: var(--bg) !important;
}

.b24-window-popup-head,
.b24-window-popup-body,
.b24-window-popup-wrapper .b24-form-btn-container {
    background: var(--bg) !important;
}
