/* ==========================================================================
   header.css — новая шапка сайта + hero
   Портировано из утверждённых мокапов:
     docs/superpowers/mockups/header-home.html    (архетип B — видео-hero, суперсет)
     docs/superpowers/mockups/header-product.html (архетип A — компактный; CSS общей
       части шапки в этом мокапе побайтово совпадает с header-home.html, поэтому
       отдельных «product-only» правил не потребовалось)

   Шрифт Klimat уже подключается темой через fonts.css — @font-face-блоки из
   мокапов сюда не перенесены. Тёмная тема мокапа (prefers-color-scheme/
   data-theme) — презентационная, на реальном сайте не нужна (шапка всегда
   белый текст на тёмной подложке-скриме).

   Постер (`--sh-poster`) шапки/hero задаётся на уровне шаблона (per-page),
   поэтому var(--sh-poster) без фолбэка — значение всегда приходит извне.
   ========================================================================== */

/* Токены мокапа скопированы НЕ в :root (во избежание коллизий с style.css),
   а на корневые классы модуля — те же имена переменных, чтобы остальной CSS
   резолвился без изменений. */
.site-header,
.hero,
.m-header,
.m-drawer,
.m-hero-v {
    --g-900: #3a791b;
    --g-800: #418123;
    --g-700: #4c8e2d;
    --g-600: #519531;
    --g-500: #558132;
    --g-400: #549733;
    --lime: #70a842;
    --paper: #f6f6f6;
    --card: #ffffff;
    --ink: #343434;
    --muted: #7b7b7b;
    --line: #e6e6e6;
    --shadow: 0 10px 30px rgba(28, 36, 22, .14);
    --radius: 12px;
    --klimat: 'Klimat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ================= HEADER (desktop) ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: var(--klimat);
    background: linear-gradient(180deg, rgba(12, 20, 6, .88) 0%, rgba(12, 20, 6, .66) 55%, rgba(12, 20, 6, .58) 100%), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover;
    transition: background .25s ease, box-shadow .25s ease;
}

.site-header::before {
    content: none;
}

.sh-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.site-header img {
    display: block;
}

/* utility strip */
.sh-utility {
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
}

.sh-utility .sh-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
}

.sh-loc button {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.sh-loc img {
    height: 16px;
    width: auto;
}

.sh-loc .city {
    border-bottom: 1px dotted rgba(255, 255, 255, .7);
    padding-bottom: 1px;
}

.sh-loc button:hover .city {
    border-color: #fff;
}

.sh-loc .arr {
    height: 6px;
    margin-left: 1px;
    opacity: .85;
}

.sh-uleft {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.sh-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    white-space: nowrap;
}

.sh-info svg {
    width: 15px;
    height: 15px;
    color: var(--lime);
    flex-shrink: 0;
}

.sh-util-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sh-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}

.sh-email:hover {
    background: rgba(112, 168, 66, .85);
    transform: translateY(-1px);
}

.sh-email svg {
    width: 17px;
    height: 17px;
}

.sh-util-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, .2);
}

.sh-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 32px;
    padding: 0 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}

.sh-social a:hover {
    background: rgba(112, 168, 66, .85);
    transform: translateY(-1px);
}

.sh-social a img {
    height: 17px;
    width: auto;
}

.sh-social a svg {
    width: 17px;
    height: 17px;
}

.sh-social a.chan {
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
}

.sh-social a.chan img {
    height: 15px;
}

/* main bar */
.sh-main .sh-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 76px;
    transition: height .25s ease;
}

.sh-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sh-brand img {
    height: 50px;
    width: auto;
    transition: height .25s ease;
}

.sh-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.sh-nav > a,
.sh-nav > .has-mega > a {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: background .15s ease;
}

.sh-nav > a:hover,
.sh-nav > .has-mega:hover > a {
    background: rgba(255, 255, 255, .14);
}

.has-mega {
    position: relative;
}

.has-mega > a .arr {
    width: 11px;
    height: auto;
    transition: transform .2s ease;
}

.has-mega:hover > a .arr {
    transform: rotate(180deg);
}

/* mega dropdown with prices */
.mega {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 360px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 50px rgba(10, 18, 4, .35);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
    z-index: 60;
}

/* :hover/:focus-within — базовое раскрытие, работает и без JS (клавиатура тоже).
   .is-open добавляет js/header.js: он держит панель ещё ~220 мс после ухода
   курсора, иначе на пути к панели по диагонали :hover рвётся и меню схлопывается
   под рукой. .is-closed (Escape) перекрывает всё — правило ниже по файлу. */
.has-mega:hover .mega,
.has-mega:focus-within .mega,
.has-mega.is-open .mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-mega.is-closed .mega {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
}

.mega::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* Один столбец: название слева, минимальная цена справа. Миниатюр нет —
   шесть досок из лиственницы на превью 96 px неразличимы и выбирать не помогают,
   а колонка цен, выровненная по правому краю, сканируется сверху вниз. */
.mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mega-list li {
    margin: 0;
}

.mega-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* border-box: у темы нет глобального сброса, иначе padding прибавляется
       к min-height и строка раздувается 44 → 60 px */
    box-sizing: border-box;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    text-decoration: none;
    color: var(--ink);
    transition: background .15s ease, color .15s ease;
}

/* без translateY: в сетке сдвиг читался как «карточка поднялась»,
   в списке шесть прыгающих строк — только шум */
.mega-list a:hover {
    background: color-mix(in srgb, var(--lime) 10%, transparent);
}

.mega-list .mt {
    flex: 1;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.25;
}

.mega-list .mp {
    flex: none;
    font-size: 13.5px;
    color: var(--g-800);
    font-weight: 700;
    white-space: nowrap;
    /* одинаковая ширина цифр — иначе правая колонка «пляшет» по разрядам */
    font-variant-numeric: tabular-nums;
}

.mega-list .mp span {
    color: var(--muted);
    font-weight: 500;
}

/* actions: phone + callback under it, then cart */
.sh-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.sh-phoneblock {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sh-phoneblock .ph-lg {
    width: 36px;
    height: 36px;
    color: #fff;
    flex-shrink: 0;
}

.site-header.is-stuck .ph-lg {
    width: 30px;
    height: 30px;
}

.sh-phonewrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.sh-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    color: #fff;
}

.sh-phone .ph-ic {
    width: 20px;
    height: 20px;
    color: #fff;
    flex-shrink: 0;
}

.sh-phone .num {
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

.sh-callback {
    all: unset;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .88);
    border-bottom: 1px dotted rgba(255, 255, 255, .55);
    line-height: 1.1;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}

.sh-callback:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.sh-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;              /* сбросить глобальный button{padding:25px 44px} — иначе 90×52 вместо 48×48 (как в макете) */
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    cursor: pointer;
    transition: background .15s ease;
}

.sh-cart:hover {
    background: rgba(255, 255, 255, .2);
}

.sh-cart img {
    height: 26px;
    width: 26px;
    flex: 0 0 auto;
    object-fit: contain;
}

.sh-cart .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--lime);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #24350f;
}

/* STUCK / condensed (JS toggles .is-stuck on scroll) */
/* Служебное состояние: js/header.js на один кадр меряет, насколько .is-stuck
   схлопывает шапку. С переходами offsetHeight вернул бы ещё не анимированную
   высоту, и защита от мигания получила бы схлопывание = 0. */
.site-header.is-measuring,
.site-header.is-measuring *,
.m-header.is-measuring,
.m-header.is-measuring * {
    transition: none !important;
}

.site-header.is-stuck {
    box-shadow: 0 10px 26px rgba(10, 18, 4, .55);
}

.site-header.is-stuck::before {
    opacity: 0;
}

.site-header.is-stuck .sh-utility {
    max-height: 0;
    opacity: 0;
    padding: 0;
    overflow: hidden;
    border-color: transparent;
}

.site-header.is-stuck .sh-main .sh-inner {
    height: 60px;
}

.site-header.is-stuck .sh-brand img {
    height: 36px;
}

.site-header.is-stuck .sh-callback {
    display: none;
}

.site-header.is-stuck .sh-phone .num {
    font-size: 18px;
}

.site-header.is-stuck .sh-cart {
    width: 44px;
    height: 44px;
}

/* ================= MOBILE HEADER + DRAWER ================= */
.m-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, rgba(12, 20, 6, .9) 0%, rgba(12, 20, 6, .72) 100%), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover;
    box-shadow: 0 4px 14px rgba(10, 18, 4, .35);
}

.m-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
}

.m-burger {
    /* 44x44 — минимум тач-цели, его проверяет tests/e2e/smoke.spec.ts.
       Было 40x40. Внимание: `all: unset` сбрасывает и min-width, и box-sizing,
       поэтому попытки задать размер через .mobmenubtn в style.css (в том числе
       правило «гарантированный тач-таргет ≥48px») на этот элемент НЕ действуют —
       размер задаётся только здесь. */
    all: unset;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    background: rgba(255, 255, 255, .1);
}

.m-burger i {
    display: block;
    width: 19px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.m-logo {
    flex: 1;
    display: flex;
    align-items: center;
}

.m-logo img {
    height: 32px;
    width: auto;
}

.m-icon {
    all: unset;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .1);
}

.m-icon img {
    height: 22px;
    width: auto;
}

.m-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.m-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--lime);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--g-800);
}

.m-locstrip {
    border-top: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px;
    color: #fff;
    font-size: 13px;
    max-height: 44px;
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
}

.m-header.is-stuck .m-locstrip {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
}

.m-locstrip img {
    height: 14px;
    width: auto;
}

.m-locstrip .city {
    border-bottom: 1px dotted rgba(255, 255, 255, .6);
}

.m-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
}

.m-drawer .scrim {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 4, .5);
    /* затемнение кликабельно (js/mobile-nav-a11y.js): полоска рядом с панелью
       выглядит как «нажми, чтобы закрыть», и раньше на тап не отвечала */
    cursor: pointer;
}

.m-drawer .panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    /* 92%, а не 88%: на 393 px у строки «Брус обрезной лиственница» до цены
       оставалось 17 px. Полоску затемнения сохраняем — это и признак слоя
       поверх страницы, и зона закрытия под большой палец. */
    width: 92%;
    background: var(--card);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.m-drawer .d-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(12, 20, 6, .9) 0%, rgba(12, 20, 6, .72) 100%), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover;
}

.m-drawer .d-top img {
    height: 30px;
    width: auto;
}

.m-drawer .d-close {
    /* 44x44 — минимум тач-цели, его проверяет tests/e2e/smoke.spec.ts.
       Было 34x34. Как и у .m-burger, `all: unset` сбрасывает min-width
       и box-sizing, поэтому размер задаётся только здесь. */
    all: unset;
    cursor: pointer;
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
}

.m-menu {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.m-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    text-decoration: none;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.m-menu li a .chev {
    color: var(--muted);
}

.m-menu li.primary a {
    color: var(--g-800);
}

.m-menu details > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    color: var(--g-800);
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.m-menu details > summary::-webkit-details-marker {
    display: none;
}

.m-menu .chev {
    transition: transform .2s ease;
    color: var(--muted);
}

.m-menu details[open] > summary .chev {
    transform: rotate(180deg);
}

.m-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: color-mix(in srgb, var(--lime) 6%, transparent);
}

.m-submenu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 18px 11px 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.m-submenu li a .sp {
    color: var(--g-800);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.m-social {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.m-social a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    border-radius: 10px;
    background: var(--g-800);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.m-social a img {
    height: 20px;
    width: auto;
}

.m-social a svg {
    height: 20px;
    width: 20px;
}

.d-contact {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.d-contact .p {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.d-contact .p .ph-ic {
    width: 26px;
    height: 26px;
    padding: 6px;
    box-sizing: border-box;
    background: var(--g-800);
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

.d-contact .lbl {
    font-size: 12px;
    color: var(--muted);
}

.d-contact .row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.d-cta {
    all: unset;
    cursor: pointer;
    text-align: center;
    background: var(--g-500);
    color: #fff;
    font-weight: 700;
    padding: 13px;
    border-radius: 11px;
    font-size: 15px;
}

/* Responsive toggle: .site-header (desktop, Task 3) vs .m-header (mobile, Task 5)
   both render unconditionally in header.php — show only one per viewport. Same
   750px breakpoint header.php already uses to sync the hero video
   (window.innerWidth > 750). */
@media (max-width: 750px) {
    .site-header {
        display: none;
    }
}

@media (min-width: 751px) {

    .m-header,
    .m-drawer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ================= HOME VARIANT: video/poster hero =================
   Только на главной (архетип B) шапка становится прозрачной и «пропускает»
   .hero под собой; на компактном архетипе (все остальные страницы) эти
   правила не активируются, т.к. модификатор .is-hero на .site-header/.m-header
   не добавляется — фон остаётся тем, что задан в базовых правилах выше
   (постер через var(--sh-poster) на самой шапке). Модификатор `.is-hero`
   не встречался в мокапах как отдельный класс — добавлен здесь по аналогии
   с уже существующим состоянием `.is-stuck`, т.к. в мокапах эта секция была
   безусловной (`.site-header{background:transparent!important}`), что при
   простом слиянии двух архетипов в один файл сломало бы компактный хедер
   на всех остальных страницах. См. отчёт task-1-report.md, раздел «Concerns». */
.site-header.is-hero {
    background: transparent !important;
}

.site-header.is-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(12, 20, 6, .8) 0%, rgba(12, 20, 6, .3) 55%, rgba(12, 20, 6, 0) 100%);
}

.site-header.is-hero.is-stuck {
    background: linear-gradient(180deg, rgba(12, 20, 6, .9) 0%, rgba(12, 20, 6, .78) 100%), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover !important;
}

.site-header.is-hero.is-stuck::before {
    opacity: 0;
}

.hero {
    position: relative;
    margin-top: -118px;
    padding-top: 118px;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0e1408;
}

/* Листинги используют тот же .hero (600px, контент по центру) что и главная —
   единая высота hero-scrim и одинаковый «уровень глаз» H1. Крошки не в
   .hero-content (иначе сдвигали бы центрируемый блок), а отдельным слоем
   .hero-crumbs (position:absolute), поэтому центрируемый контент идентичен главной. */
.hero-crumbs {
    position: absolute;
    top: 130px;                 /* сразу под шапкой (118px) */
    left: 0;
    right: 0;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}
.hero-crumbs .breadcrumbs { overflow: visible; }
.hero-crumbs .breadcrumbs a { color: rgba(255, 255, 255, .82); }
.hero-crumbs .breadcrumbs a:hover { color: #fff; }
.hero-crumbs .breadcrumbs .breadcrumbs__item + .breadcrumbs__item::before { color: rgba(255, 255, 255, .5); }

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(10, 16, 5, .85) 0%, rgba(10, 16, 5, .58) 45%, rgba(10, 16, 5, .22) 100%), url("/wp-content/uploads/2022/08/point.png");
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 50px;
    width: 100%;
    color: #fff;
}

.hero-content h1 {
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 16px;
    text-wrap: balance;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.hero-lead {
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.5;
    color: rgba(255, 255, 255, .92);
    margin: 0 0 28px;
}

.hero-adv {
    list-style: none;
    /* 40px под блоком, а не 32: пауза перед CTA должна быть заметно больше гэпа
       между рядами плиток (16px), иначе кнопка читается как ещё одна строка
       списка. Высоту hero это не трогает — секция держит min-height 600px. */
    margin: 0 0 40px;
    padding: 0;
    /* Grid по max-content, а не flex-wrap: колонки остаются по содержимому (короткий
       пункт «Работаем с НДС» не растягивается на равную долю и не оставляет пустоту,
       как при 1fr), но количество колонок задаём мы. У flex-wrap перенос шёл по факту
       заполнения строки и на средних ширинах давал 3+1 — четвёртый пункт висел
       сиротой под пустой третью строки. minmax(0, …) — предохранитель: если контент
       вдруг шире контейнера, колонка сжимается и текст переносится, а не вылезает. */
    display: grid;
    grid-template-columns: repeat(4, minmax(0, max-content));
    justify-content: start;
    align-items: start;    /* иконки соседей по ряду на одной линии, даже если текст в разное число строк */
    gap: 16px 40px;
}

/* Замер на стейдже (2026-08-01): четыре плитки занимают 1169px, столько .hero-content
   отдаёт при окне ~1270px; порог с запасом на полосу прокрутки. Ниже — 2×2. */
@media (max-width: 1300px) {
    .hero-adv {
        grid-template-columns: repeat(2, minmax(0, max-content));
    }
}

.hero-adv li {
    display: flex;
    flex-direction: row;      /* иконка слева, текст справа — как в мобильном .m-hv-adv */
    align-items: center;
    gap: 12px;
    color: #fff;
    line-height: 1.3;
}

.hero-adv li .ad-ic {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(112, 168, 66, .2);
    border: 1px solid rgba(112, 168, 66, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-adv li .ad-ic svg {
    width: 25px;
    height: 25px;
    color: var(--lime);
}

.hero-adv li .ad-tx {
    font-size: 15.5px;
    font-weight: 600;
    max-width: 22ch;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-cta .btn-primary {
    all: unset;
    cursor: pointer;
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    padding: 16px 40px;
    background: linear-gradient(to bottom, #70a842, #418123);
    border-radius: 7px;
    box-shadow: 0 10px 20px rgba(65, 130, 40, .4);
    transition: all .4s ease;
}

.hero-cta .btn-primary:hover {
    background: linear-gradient(to bottom, #70a842, #4c8e2d);
    box-shadow: 0 10px 20px rgba(65, 130, 40, .6);
}

/* Белая кнопка (напр. «Калькулятор цены» на листингах) — на .btn-primary поверх */
.hero-cta .btn-primary.btn-white {
    background: #fff;
    color: #418123;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}
.hero-cta .btn-primary.btn-white:hover {
    background: linear-gradient(to bottom, #70a842, #418123);   /* при hover зеленеет, как .buy-btn--calc */
    color: #fff;                                                 /* текст белым на зелёном */
    box-shadow: 0 10px 20px rgba(65, 130, 40, .4);
}

.hero-cta .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, .55);
    padding-bottom: 2px;
}

.hero-cta .btn-ghost:hover {
    border-bottom-color: #fff;
}

/* Крошки внутри видео-hero (листинги: каталог/категория/фильтр) — светлые поверх scrim */
.hero-content .breadcrumbs {
    margin: 0 0 14px;
    overflow: visible;               /* в герое места хватает — без внутреннего скролла */
}
.hero-content .breadcrumbs a {
    color: rgba(255, 255, 255, .82);
}
.hero-content .breadcrumbs a:hover {
    color: #fff;
}
.hero-content .breadcrumbs .breadcrumbs__item + .breadcrumbs__item::before {
    color: rgba(255, 255, 255, .5);
}

/* mobile hero (постер — видео на мобильных не проигрывается) */
.m-header.is-hero {
    background: transparent;
}

.m-header.is-hero.is-stuck {
    background: linear-gradient(180deg, rgba(12, 20, 6, .92), rgba(12, 20, 6, .8)), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover;
}

.m-hero-v {
    position: relative;
    margin-top: -92px;
    padding-top: 92px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, rgba(10, 16, 5, .72), rgba(10, 16, 5, .5)), url("/wp-content/uploads/2022/08/point.png"), var(--sh-poster) center/cover;
}

.m-hv-in {
    position: relative;
    z-index: 2;
    padding: 14px 16px 22px;
}

.m-hv-in h1 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 10px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

.m-hv-in p {
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
    margin: 0 0 14px;
    line-height: 1.45;
}

.m-hv-adv {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.m-hv-adv li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.3;
}

.m-hv-adv li .ad-ic {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(112, 168, 66, .2);
    border: 1px solid rgba(112, 168, 66, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.m-hv-adv li .ad-ic svg {
    width: 18px;
    height: 18px;
    color: var(--lime);
}

.m-hv-cta {
    all: unset;
    cursor: pointer;
    display: block;
    text-align: center;
    background: var(--g-500);
    color: #fff;
    font-weight: 700;
    padding: 13px;
    border-radius: 11px;
    font-size: 15px;
}

/* mobile hero листингов: обе CTA одинаковой ширины (на всю колонку) — <button> сам
   по себе сжимается по контенту, поэтому явно тянем на 100%. */
.m-hero-v--listing .m-hv-cta {
    width: 100%;
    box-sizing: border-box;
}

/* mobile hero: вторичная сплошная кнопка (напр. «Калькулятор цены» той же кнопкой) */
.m-hv-cta--sec {
    margin-top: 10px;
}
/* mobile hero: белый вариант вторичной кнопки */
.m-hv-cta--white {
    background: #fff;
    color: #418123;
}

/* mobile hero: вторичная ссылка (напр. «Калькулятор цены» → #calc на листингах) */
.m-hv-ghost {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #fff;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* mobile hero: крошки светлыми поверх постера */
.m-hv-in .breadcrumbs {
    margin: 0 0 10px;
    overflow: visible;
}
.m-hv-in .breadcrumbs a {
    color: rgba(255, 255, 255, .82);
}
.m-hv-in .breadcrumbs .breadcrumbs__item + .breadcrumbs__item::before {
    color: rgba(255, 255, 255, .5);
}

/* ===== Category/filter intro relocated to body (compact archetype, Task 7) ===== */
.cat-intro{padding:22px 0 6px}
.cat-intro .wr{max-width:1400px;margin:0 auto;padding:0 50px}
.cat-intro .breadcrumbs,.cat-intro nav{font-size:13px;color:#7b7b7b;margin-bottom:10px}
.cat-intro h1{font-size:clamp(24px,3vw,34px);font-weight:800;color:#343434;letter-spacing:-.01em;margin:0 0 14px;line-height:1.1;text-wrap:balance}
.cat-intro p{color:#515151;font-size:16px;line-height:1.5;margin:0 0 8px;max-width:70ch}
.cat-intro ul{list-style:none;margin:16px 0 20px;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 28px;max-width:900px}
.cat-intro ul li{position:relative;padding-left:28px;color:#343434;font-size:15px;line-height:1.4}
.cat-intro ul li::before{content:"\2713";position:absolute;left:0;top:2px;width:18px;height:18px;border-radius:50%;background:#70a842;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.cat-intro .mainbtns{display:flex;gap:14px;flex-wrap:wrap;margin-top:4px}
.cat-intro .mainbtns button{all:unset;cursor:pointer;background:#558132;color:#fff;font-weight:700;font-size:15px;padding:13px 26px;border-radius:11px;transition:background .15s ease}
.cat-intro .mainbtns button:hover{background:#549733}
.cat-intro .mainbtns .calcbtn{background:transparent;color:#418123;box-shadow:inset 0 0 0 1px #418123}
.cat-intro .mainbtns .calcbtn:hover{background:rgba(112,168,66,.1)}
@media (max-width:750px){.cat-intro .wr{padding:0 16px}.cat-intro ul{grid-template-columns:1fr}}

/* ===== Video-hero front page: let .hero define height (kill old .catalogbg tall min-height) ===== */
body.home #up{min-height:0}
body.home #up .over,body.home #up .line{display:none}


/* ===== Integration fixes (visual pass, 2026-07-19) ===== */
/* header moved OUT of #up (top-level) so position:sticky works page-wide */
#up{min-height:0}
.up-compact{background:none!important;padding:0}
.up-compact .main{padding:0}
.up-compact .over,.up-compact .line{display:none}
/* Сервисные страницы (компактный архетип): .semipage форсит 540px пустой полосы
   (min/max-height !important) — гасим, иначе большой пустой блок под шапкой.
   И заголовок был белым (для старого тёмного hero) → на светлом фоне тёмный. */
.up-compact.semipage{min-height:0!important;max-height:none!important;margin-bottom:0}
/* H1 сервисных страниц: типографика как у hero-заголовка листинга
   (Klimat, clamp 30–52, 700, плотный трекинг), но тёмным цветом. */
.up-compact .leftmain h1{
    color: #000;                 /* чистый чёрный, как остальные заголовки (не серый #343434) */
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 16px;
}
/* eye-level отступ — ТОЛЬКО на страницах с высоким хедером (видео-hero: главная/
   листинги, через центрированный .hero). Карточка товара и сервисные (компактный
   .up-compact) в этот скоуп НЕ входят: товар/дефолт — 0, сервисные — скромные 22px. */
.up-compact.semipage .main{padding-top:22px}
/* one hero per viewport (kill desktop duplication of mobile .m-hero-v) */
@media (min-width:751px){ .m-hero-v{display:none} }
@media (max-width:750px){ .hero{display:none} }


/* ===== Integration fixes batch 2 (2026-07-19) ===== */
/* cart icon: force size (something in style.css collapsed width to 0) */
body .site-header .sh-cart img{width:26px!important;height:26px!important;flex:0 0 26px!important}
/* basket badge font — clean numeric, not Klimat */
.sh-cart .badge,.m-icon .badge,.j-basket-items-q{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
/* Светлая гамма выпадайки (as in mockup) удалена 2026-07-30: её полностью
   перекрывает тёмная тема ниже по файлу, правила были мёртвыми. Тёмный блок
   сам бьёт глобальное a{color:#549733} — ради этого там !important. */
/* home: kill big top padding of .about right after the video hero */
body.home .about{padding-top:36px}
/* cat-intro buttons use old design-system look (green gradient) like the rest of the site */
.cat-intro .mainbtns button{background:linear-gradient(to bottom,#70a842,#418123);border-radius:7px;padding:16px 34px;font-size:17px;font-weight:400;box-shadow:0 10px 20px rgba(65,130,40,.35)}
.cat-intro .mainbtns .calcbtn{background:#fff;color:#418123;box-shadow:inset 0 0 0 1px #418123}


/* ===== Integration fixes batch 3 (2026-07-19) ===== */
/* Cart icon: img width collapsed to 0 in the live theme for unknown reason;
   render market.png as a bulletproof background-image on the button instead. */
body .site-header .sh-cart{background-color:rgba(255,255,255,.12);background-image:url("/wp-content/uploads/2022/08/market.png");background-size:26px 26px;background-position:center;background-repeat:no-repeat}
body .site-header .sh-cart:hover{background-color:rgba(255,255,255,.2)}
body .site-header .sh-cart img{display:none}
/* Reduce big top padding before product content (was .wrap.tovar padding-top:84px) */
body .wrap.tovar{padding-top:24px}


/* ===== Integration fixes batch 4 (2026-07-19) ===== */
/* video hero: point.png behind the video (shows where object-fit:cover leaves gaps) */

/* "Перезвоните мне" is a <button>: kill the global button:hover green gradient bleed */
.sh-callback,.sh-callback:hover,.sh-callback:focus,.sh-callback:active{background:none!important;box-shadow:none!important;padding:0!important}
.sh-callback:hover{color:#fff!important;border-bottom-color:#fff!important;transform:none!important}


/* ===== Integration fixes batch 5 (2026-07-19) ===== */
/* headings: restore old design-system weight (theme h1 = 700, mockup used 800) */
.hero-content h1,.m-hv-in h1,.cat-intro h1{font-weight:700}
/* category: remove cat-intro top padding (content right after header) */
.cat-intro{padding-top:0}


/* ===== Mega dropdown: DARK theme (user request, replaces mockup white) ===== */
.mega{background:#1e2a10!important;border-color:rgba(255,255,255,.14)!important;box-shadow:0 24px 50px rgba(0,0,0,.5)!important}
.mega-list a{color:#fff!important;border:0!important}
.mega-list a:hover,.mega-list a:focus-visible{background:rgba(255,255,255,.07)!important}
.mega-list a .mt{color:#fff!important;font-weight:700!important}
.mega-list .mp{color:#8ec63f!important}
.mega-list .mp span{color:rgba(255,255,255,.55)!important}
/* маркеры/отступы списка из style.css — выпадайка это навигация, не контентный список */
.mega-list{list-style:none!important;margin:0!important;padding:0!important}
.mega-list li{margin:0!important;padding:0!important}
/* видимый фокус: тема глобально гасит outline, с клавиатуры иначе не видно, где ты */
.mega-list a:focus-visible{outline:2px solid #8ec63f!important;outline-offset:-2px}

/* Mobile drawer socials: force row (style.css forces .m-social to display:block) */
.m-drawer .m-social{display:flex!important;flex-direction:row!important}
.m-drawer .m-social a{flex:1 1 0!important;min-width:0}

/* Mobile drawer: above the sticky order bar (.sticky-cta) + visible close X */
.m-drawer{z-index:100000!important}
.m-drawer .d-close{color:#fff!important;background:rgba(0,0,0,.28)!important}


/* Mobile drawer contacts: lighter phone weight, brand-colour email */
.d-contact .p{font-weight:600!important}
.d-contact a[href^="mailto:"]{color:#418123!important;text-decoration:none}
.d-contact a[href^="mailto:"]:hover{text-decoration:underline}

/* drawer close: white SVG X (WP was emoji-fying the ✖ char) */
.m-drawer .d-close svg{width:18px;height:18px;display:block}


/* ===== Админ-бар WordPress под залогиненным пользователем =====
   WP вешает на body класс .admin-bar и держит #wpadminbar как position: fixed
   с z-index 99999. Обе шапки сайта — sticky с top: 0, поэтому в залипшем
   состоянии уезжали ПОД бар: замер на стейдже до правки — перекрытие 32px на
   1366px и 46px на 760px (верхняя полоса шапки с городом/телефоном не видна).
   Сдвигаем шапки на высоту бара; высоты и брейкпоинты — те же, что в
   wp-admin/css/admin-bar.css, оттуда же порог 782px. */
body.admin-bar .site-header,
body.admin-bar .m-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header,
    body.admin-bar .m-header {
        top: 46px;
    }
}

/* Ниже 601px WP сам переводит бар в position: absolute — при прокрутке он
   уезжает со страницей (замер: низ бара на -823 при скролле 900), и сдвиг
   оставил бы под липкой шапкой пустую полосу 46px. */
@media screen and (max-width: 600px) {
    body.admin-bar .site-header,
    body.admin-bar .m-header {
        top: 0;
    }
}


/* ===== Цена «от N» первым пунктом списка преимуществ =====
   Цена — обычная плитка ряда: тот же шрифт и та же иконка-квадрат, что у
   остальных пунктов. Своих размеров ей не даём намеренно — акцент делает
   позиция (первая) и значок рубля, а не кегль (решение владельца 2026-08-01).
   Пунктов в ряду по-прежнему четыре: «Работаем с НДС» уступил место цене,
   пятая плитка не влезала бы в ширину .hero-content и осталась бы сиротой. */
.hero-adv li.hero-price .ad-tx {
    max-width: none;     /* 22ch не нужны: строка короткая и не переносится */
    white-space: nowrap;
}

/* «м²» приходит из lpk_min_price_unit_html() как <sup>2</sup>. Браузерный
   дефолт (0.83em) рядом с цифрами читается как обычная цифра — «540 ₽/м 2».
   Уменьшаем до пропорции настоящего индекса. */
.hero-adv li.hero-price sup,
.m-hv-adv li.m-hv-price sup {
    font-size: .6em;
    line-height: 0;
}
