/* ============================================================
   LUXOMIX — общие стили (layout + общие компоненты)
   Источник: извлечено из static/luxomix-home_16.html
   + дополнено модалкой/формой из product, lightbox из about,
   search-strip из category.
   Страничные стили остаются в pages/*.ejs внутри <style>.
   ============================================================ */

/* ============================
   ШРИФТЫ (брендбук v2026: Songer Semi Expanded заголовки + Involve тело)
   Self-hosted в public/fonts/, см. BRAND_STYLE.md §2.
   ============================ */
@font-face { font-family: 'Songer SE'; src: url('/fonts/songer/SONGER_SE_Regular.otf')   format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Songer SE'; src: url('/fonts/songer/SONGER_SE_Medium.otf')    format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Songer SE'; src: url('/fonts/songer/SONGER_SE_Bold.otf')      format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Songer SE'; src: url('/fonts/songer/SONGER_SE_ExtraBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Songer SE'; src: url('/fonts/songer/SONGER_SE_Heavy.otf')     format('opentype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Involve';   src: url('/fonts/Involve-VF.ttf')                 format('truetype-variations'), url('/fonts/Involve-VF.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Involve';   src: url('/fonts/Involve-Oblique-VF.ttf')         format('truetype-variations'), url('/fonts/Involve-Oblique-VF.ttf') format('truetype'); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ============================
   ТОКЕНЫ БРЕНДА (BRAND_STYLE.md §1, прототип v2026)
   ============================ */
:root {
    /* Каркас UI */
    --c-primary:        #0E2D17;   /* Тёмно-зелёный forest — footer, hero overlay, основной dark green */
    --c-primary-alt:    #1F7A3A;   /* Bright-green — NEW бейдж, маркер списка, accents */
    --c-accent-bright:  #D3F272;   /* Яркий лайм — основной hover/active + pill КАТАЛОГ/Найти/Связаться + highlight ПРИРОДА */
    /* --c-accent-lime удалён в финальной итерации прототипа — всё на --c-accent-bright */
    --c-accent-magenta: #C3245A;   /* Магента — резервный, sale-бейджи */

    /* Поверхности */
    --c-bg:             #FFFFFF;   /* Основной фон сайта */
    --c-surface:        #F5F6F8;   /* Альтернативный серый — цв.линейка, применение */
    --c-surface-soft:   #FFEBE8;   /* Пудровый — секция «Как это выглядит» */
    --c-warm-gray:      #E8D3D1;   /* Тёплый пудровый-серый */

    /* Нейтральные */
    --c-text:           #1A1A1A;
    --c-text-muted:     #6B7280;
    --c-border:         #E5E7EB;

    /* Legacy alias — синий accent был основным CTA, теперь весь UI на зелёном. */
    --c-accent:         #0E2D17;
    --c-accent-hover:   #1F7A3A;

    /* Палитра красителей (ТЗ §2.3) — насыщенные HEX, ТОЛЬКО для карточек
       секции «Цветовая линейка красителей LUXOMIX». Фиолетовый в прототипе СОХРАНЁН. */
    --dye-yellow:       #F5C518;
    --dye-orange:       #F39200;
    --dye-red-orange:   #E84E1B;
    --dye-red:          #D52B1E;
    --dye-pink:         #E6007E;
    --dye-purple:       #7E3A93;
    --dye-dark-purple:  #3B1E5E;
    --dye-blue:         #2E5A87;
    --dye-turquoise:    #1E7A7A;
    --dye-green:        #9DC23B;
    --dye-brown:        #6B4423;
    --dye-red-brown:    #8B2E1F;
    --dye-black:        #1A1A1A;

    /* Шрифты — оба self-hosted */
    --f-heading: 'Songer SE', 'Onest', 'Bebas Neue', 'Impact', sans-serif;
    --f-body: 'Involve', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Размеры (desktop) */
    --fs-h1: 56px;
    --fs-h2: 40px;
    --fs-h3: 24px;
    --fs-body-l: 18px;
    --fs-body-m: 16px;
    --fs-body-s: 14px;

    /* Слой/раскладка */
    --container: 1280px;
    --container-pad: 24px;
    --header-h: 80px;
}

/* ============================
   БАЗОВЫЕ СТИЛИ
   ============================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--f-body);
    font-size: var(--fs-body-m);
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* H1/H2 — Songer SE 500 (Medium) uppercase. Лёгкие display CAPS — как в прототипе.
   Цвет — почти-чёрный, hero/CTA-блоки переопределяют на #fff локально. */
h1, h2 { font-family: var(--f-heading); font-weight: 500; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.04; color: var(--c-text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
/* H3 — Involve 700 (читабельно в карточках, не CAPS). */
h3 { font-family: var(--f-body); font-size: var(--fs-h3); font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.3; color: var(--c-text); }

.section { padding: 96px 0; }
.section-title { margin-bottom: 48px; }

/* ============================
   ШАПКА (ТЗ §2.8)
   ============================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    height: var(--header-h);
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
}

/* Логотип — растровый Luxomix® natural color из public/uploads/logo/.
   `luxomix-logo-green.webp` для светлой шапки (zелёный).
   `luxomix-logo-white.webp` для тёмного футера. */
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo__img { display: block; height: auto; }
.logo--header .logo__img { height: 36px; }
.logo--footer .logo__img { height: 48px; }
@media (max-width: 720px) {
    .logo--header .logo__img { height: 30px; }
}

/* Кнопка КАТАЛОГ — pill яркий-лайм #D3F272 с тёмно-зелёным текстом, Songer 800 caps. */
.btn-catalog {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--c-accent-bright);
    color: var(--c-primary);
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background .15s ease, color .15s ease;
}
.btn-catalog:hover { background: var(--c-primary); color: #fff; }
.btn-catalog svg { width: 18px; height: 18px; }
.btn-catalog__chevron { transition: transform .25s ease; }
.btn-catalog.is-open .btn-catalog__chevron { transform: rotate(180deg); }

/* Кнопка «Связаться с технологом» — pill яркий-лайм, единый с КАТАЛОГ. */
.btn-expert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--c-accent-bright);
    color: var(--c-primary);
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    flex-shrink: 0;
}
.btn-expert:hover { background: var(--c-primary); color: #fff; transform: translateY(-1px); }
@media (max-width: 1280px) { .btn-expert { display: none; } }

/* Навигация */
.nav { display: flex; gap: 28px; }
.nav a {
    font-size: var(--fs-body-m);
    font-weight: 500;
    color: var(--c-text);
    position: relative;
    padding: 6px 0;
    transition: color .15s ease;
}
.nav a:hover { color: var(--c-primary); }
/* Активный пункт — тёмно-зелёный + подчёркивание (BRAND_STYLE.md §3.1). */
.nav a.is-active { color: var(--c-primary); }
.nav a.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-primary);
}

/* Телефон */
.header__phone {
    margin-left: auto;
    font-weight: 600;
    color: var(--c-text);
    white-space: nowrap;
    font-size: var(--fs-body-m);
}

/* ============================
   БУРГЕР И МОБИЛЬНОЕ МЕНЮ (≤1080px)
   ============================ */
.btn-burger {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text);
    transition: background .15s ease;
    flex-shrink: 0;
}
.btn-burger:hover { background: var(--c-border); }
.btn-burger svg { width: 22px; height: 22px; }
.btn-burger .icon-close { display: none; }
.btn-burger.is-open .icon-burger { display: none; }
.btn-burger.is-open .icon-close { display: block; }

.mobile-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 24px 48px -16px rgba(14, 45, 23, 0.18);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 95;
    display: none;
}
.mobile-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-nav .container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 20px;
    padding-bottom: 20px;
}
.mobile-nav a {
    padding: 14px 16px;
    font-size: var(--fs-body-m);
    font-weight: 500;
    color: var(--c-text);
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.mobile-nav a:hover, .mobile-nav a:active { background: var(--c-surface); color: var(--c-accent); }
.mobile-nav__phone {
    margin-top: 8px;
    padding-top: 18px !important;
    border-top: 1px solid var(--c-border);
    color: var(--c-primary) !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
}

/* ============================
   МЕГАМЕНЮ (ТЗ §2.7)
   ============================ */
.megamenu-overlay {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.megamenu-overlay.is-open { opacity: 1; pointer-events: auto; }

.megamenu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    z-index: 95;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 24px 48px -16px rgba(14, 45, 23, 0.18);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
}
.megamenu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.megamenu__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 480px;
    gap: 0;
    padding: 32px 0;
}

.megamenu__left {
    border-right: 1px solid var(--c-border);
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    font-family: var(--f-body);
    font-size: var(--fs-body-m);
    font-weight: 500;
    color: var(--c-text);
    text-align: left;
    transition: background .15s, color .15s;
    cursor: pointer;
}
.mm-item:hover, .mm-item.is-active {
    background: var(--c-surface);
    color: var(--c-primary);
}
.mm-item.is-active { background: rgba(105, 128, 255, 0.08); color: var(--c-accent); }
.mm-item svg { width: 16px; height: 16px; opacity: 0.5; transition: transform .15s; }
.mm-item:hover svg, .mm-item.is-active svg { transform: translateX(3px); opacity: 1; }

.megamenu__right { padding: 8px 0 8px 48px; }

.mm-panel { display: none; animation: mmFade .25s ease; }
.mm-panel.is-active { display: block; }
@keyframes mmFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.mm-panel__title {
    font-family: var(--f-heading);
    font-size: 32px;
    text-transform: uppercase;
    color: var(--c-primary);
    margin-bottom: 8px;
}
.mm-panel__lead {
    font-size: var(--fs-body-s);
    color: var(--c-text-muted);
    margin-bottom: 28px;
    max-width: 520px;
}

.mm-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 32px;
}
.mm-sublink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--c-text);
    font-size: var(--fs-body-m);
    transition: background .12s, color .12s;
}
.mm-sublink:hover { background: var(--c-surface); color: var(--c-accent); }
.mm-sublink__swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.06);
}
.mm-sublink__bullet { color: var(--c-text-muted); font-size: 12px; width: 18px; text-align: center; }

.megamenu__close { display: none; }

@media (max-width: 900px) {
    /* Меню начинается ПОД шапкой (не под неё) — раньше стояло top:0 и
       header (z:100) перекрывал первые 80px меню (z:95), из-за чего
       первая категория «По цвету» была скрыта. Теперь меню занимает
       всё пространство от нижней кромки шапки до низа экрана. */
    .megamenu {
        top: var(--header-h);
        height: calc(100vh - var(--header-h));
        max-height: calc(100vh - var(--header-h));
    }
    .megamenu-overlay { display: none; }
    .megamenu__inner { grid-template-columns: 1fr; padding: 20px 16px 32px; min-height: 0; }
    .megamenu__left { border-right: none; border-bottom: 1px solid var(--c-border); padding: 0 0 16px; margin-bottom: 16px; }
    .megamenu__right { padding: 0; }
    .mm-subgrid { grid-template-columns: 1fr; }
    /* Свой крестик на мобиле не нужен — шапка с бургером остаётся видна,
       клик по бургеру закрывает меню. Скрываем чтобы не мозолил глаз
       над первой категорией. */
    .megamenu__close { display: none; }
}

/* ============================
   ХЛЕБНЫЕ КРОШКИ (ТЗ §5.5)
   ============================ */
.breadcrumbs {
    padding: 24px 0 0;
    font-size: var(--fs-body-s);
    color: var(--c-text-muted);
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumbs li::after {
    content: '/';
    color: var(--c-border);
}
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a {
    color: var(--c-text-muted);
    transition: color .12s;
}
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs li.is-current {
    color: var(--c-text);
    font-weight: 500;
}

@media (max-width: 640px) {
    .breadcrumbs { padding: 18px 0 0; }
    .breadcrumbs li::after { content: '›'; }
}

/* ============================
   ПОЛНОШИРИННЫЙ ПОИСК ПОД ШАПКОЙ (ТЗ §7)
   ============================ */
.search-strip {
    position: sticky;
    top: var(--header-h);
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: 16px 0;
}
.search-strip__inner {
    position: relative;
    width: 100%;
}
.search-strip input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: 0 130px 0 56px;
    font-family: inherit;
    font-size: var(--fs-body-m);
    background: var(--c-surface);
    transition: background .15s, border-color .15s;
}
.search-strip input:focus { outline: none; border-color: var(--c-accent); background: #fff; }
.search-strip .icon {
    position: absolute;
    left: 20px;
    top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px;
    color: var(--c-text-muted);
    pointer-events: none;
}
/*
   Кнопка «Найти» внутри полосы поиска.
   ВАЖНО: специфичный селектор — только прямой потомок .search-strip__inner.
   Если использовать .search-strip button — стили накроют .sd-chip в дропдауне
   подсказок (теги «Популярные запросы»), они станут синими «pill»-кнопками
   с position:absolute.
*/
.search-strip > .container > .search-strip__inner > button {
    position: absolute;
    right: 8px;
    top: 50%; transform: translateY(-50%);
    height: 42px; padding: 0 24px;
    background: var(--c-accent-bright); color: var(--c-primary);
    border-radius: 10px;
    font-family: var(--f-heading); font-size: 14px; letter-spacing: 1px;
    transition: background .15s, color .15s;
}
.search-strip > .container > .search-strip__inner > button:hover { background: var(--c-primary); color: #fff; }

/* ============================
   ПОИСК-ДРОПДАУН (общий, для search-strip и hero)
   ============================ */
.sd-wrap { position: relative; }
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px -16px rgba(14,45,23,.18);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
    padding: 16px;
    display: none;
}
.search-dropdown.is-open { display: block; }
.sd-section { margin-bottom: 16px; }
.sd-section:last-child { margin-bottom: 0; }
.sd-section__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-text-muted);
    margin-bottom: 8px;
    padding: 0 4px;
}
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.sd-chip {
    background: var(--c-surface);
    color: var(--c-text);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    transition: background .12s, color .12s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    position: static;
    height: auto;
    transform: none;
    right: auto;
    top: auto;
    font-family: var(--f-body);
    letter-spacing: 0;
}
.sd-chip:hover, .sd-chip.is-active { background: var(--c-accent); color: #fff; }

.sd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px;
    border-radius: 10px;
    color: var(--c-text);
    text-decoration: none;
    transition: background .12s;
    cursor: pointer;
}
.sd-item:hover, .sd-item.is-active { background: var(--c-surface); }
.sd-item__icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--c-accent);
    color: #fff;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-heading);
    font-size: 14px;
}
.sd-item__icon--cat svg { width: 18px; height: 18px; }
.sd-item__body { flex: 1; min-width: 0; }
.sd-item__name {
    font-weight: 500;
    font-size: var(--fs-body-s);
    color: var(--c-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sd-item__meta {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.sd-item__name mark { background: rgba(105,128,255,.18); color: var(--c-text); font-weight: 600; padding: 0 1px; border-radius: 2px; }

.sd-show-all {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 10px;
    font-family: var(--f-heading);
    font-size: 13px;
    letter-spacing: 1px;
    margin-top: 8px;
    transition: background .15s;
}
.sd-show-all:hover { background: var(--c-primary-alt); color: #fff; }
.sd-show-all svg { width: 14px; height: 14px; }

.sd-empty {
    padding: 24px;
    text-align: center;
    color: var(--c-text-muted);
    font-size: var(--fs-body-s);
}
.sd-empty strong { color: var(--c-text); display: block; margin-bottom: 4px; }

/* Hero search dark theme override */
.hero .search-dropdown {
    color: var(--c-text);
    text-align: left;
}

/* ============================
   МОДАЛКА ЗАЯВКИ (ТЗ §6.6)
   ============================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14,45,23,.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    padding: 24px;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
    background: #fff;
    border-radius: 24px;
    max-width: 520px;
    width: 100%;
    padding: 32px;
    transform: translateY(20px);
    transition: transform .25s;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal__close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--c-surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: background .12s;
}
.modal__close:hover { background: var(--c-border); }
.modal__close svg { width: 18px; height: 18px; }
.modal__head { margin-bottom: 20px; padding-right: 40px; }
.modal__title { font-family: var(--f-heading); font-size: 28px; color: var(--c-primary); text-transform: uppercase; line-height: 1; margin-bottom: 8px; }
.modal__lead { font-size: var(--fs-body-s); color: var(--c-text-muted); }
.modal__product {
    padding: 12px 14px;
    background: var(--c-surface);
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal__product-swatch { width: 36px; height: 36px; border-radius: 8px; background: var(--swatch, #E6007E); flex-shrink: 0; }
.modal__product-name { font-weight: 600; font-size: var(--fs-body-s); }
.modal__product-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }

/* ============================
   ПОЛЯ ФОРМЫ (модалка + inline-формы)
   ============================ */
.form-field { margin-bottom: 12px; position: relative; }
.form-field input, .form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--fs-body-m);
    color: var(--c-text);
    background: #fff;
    transition: border-color .15s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--c-accent); }
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field__required { color: #D52B1E; }
.form-checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--c-text-muted); margin: 14px 0 18px; }
.form-checkbox input { flex-shrink: 0; margin-top: 2px; }
.form-checkbox a { color: var(--c-accent); text-decoration: underline; }

/* ============================
   ОБЩИЕ КНОПКИ
   ============================ */
/* Глобальные CTA-кнопки — pill, Songer caps. Брайтовый лайм #D3F272 с тёмно-зелёным
   текстом. Hover — инверсия (тёмный фон, белый текст). Применяется в модалках,
   CTA-баннере «О нас», списке /in-product и т.д. */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--c-accent-bright);
    color: var(--c-primary);
    padding: 16px 30px;
    border-radius: 999px;
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: background .15s, color .15s, transform .15s;
    text-transform: uppercase;
}
.btn-primary:hover { background: var(--c-primary); color: #fff; transform: translateY(-1px); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: #fff;
    padding: 15px 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    transition: background .15s, border-color .15s;
    text-transform: uppercase;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.btn-ghost svg { width: 16px; height: 16px; }

/* ============================
   ЛАЙТБОКС ГАЛЕРЕИ
   ============================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(14,45,23,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
.lightbox__close {
    position: absolute;
    top: 24px; right: 24px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s;
}
.lightbox__close:hover { background: rgba(255,255,255,0.22); }
.lightbox__close svg { width: 22px; height: 22px; }

/* ============================
   ПОДВАЛ (ТЗ §2.8)
   ============================ */
.footer {
    background: var(--c-primary);
    color: rgba(255,255,255,0.75);
    padding: 80px 0 0;
    position: relative;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 56px;
}
.footer .logo__mark { color: #fff; }
.footer .logo__tagline { color: rgba(255,255,255,0.5); }
.footer__about {
    font-size: var(--fs-body-s);
    margin-top: 24px;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
}
.footer__certs {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.footer__cert {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.85);
}
.footer__col h4 {
    font-family: var(--f-heading);
    font-size: 14px;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 12px; }
.footer__col a { font-size: var(--fs-body-s); transition: color .15s; }
.footer__col a:hover { color: #fff; }

.footer__contact-item {
    font-size: var(--fs-body-s);
    margin-bottom: 16px;
    line-height: 1.5;
}
.footer__contact-item strong {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.footer__contact-item a { color: #fff; font-weight: 500; }

.footer__warehouses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.footer__warehouse {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}
.footer__warehouse strong { color: #fff; display: block; margin-bottom: 2px; font-weight: 500; }

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    flex-wrap: wrap;
    gap: 16px;
}
.footer__bottom a { color: rgba(255,255,255,0.7); }
.footer__bottom a:hover { color: #fff; }

/* ============================
   ЦВЕТОВАЯ ПОЛОСА (ТЗ §2.5)
   ============================ */
.color-strip {
    display: flex;
    height: 8px;
    width: 100%;
}
.color-strip span { flex: 1; }
.footer .color-strip { height: 10px; }
.hero .color-strip {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 1;
}

/* ============================
   АДАПТИВ (общие правила, страничные — в pages)
   ============================ */
@media (max-width: 1080px) {
    .nav { display: none; }
    .header__phone { display: none; }
    .btn-burger { display: flex; }
    .mobile-nav { display: block; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    :root { --fs-h1: 40px; --fs-h2: 28px; --fs-h3: 20px; --container-pad: 16px; }
    .section { padding: 64px 0; }
    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .footer__warehouses { grid-template-columns: 1fr; }
    .modal { padding: 24px; }
}

/* ====================================================================
   КОМПОНЕНТ: PRODUCT CARD (partials/product-card.ejs)
   Карточка товара в листинге каталога, бестселлеров, рекомендуемых SKU,
   результатов поиска. Раньше стили жили только в category.ejs — но
   карточка используется и на /, /product/:slug, /in-product/:slug.
   Поднято в общий main.css.
   ==================================================================== */
.product {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.product:hover {
    border-color: var(--c-accent);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -16px rgba(14,45,23,.12);
}
.product__visual {
    aspect-ratio: 4/3;
    position: relative;
    background: linear-gradient(135deg, var(--c-surface) 0%, #fff 100%);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.product__swatch {
    width: 110px; height: 110px;
    border-radius: 50%;
    box-shadow: 0 12px 30px -8px var(--swatch-color, var(--dye-red));
    background: var(--swatch-color, var(--dye-red));
    position: relative;
}
.product__swatch::after {
    content: '';
    position: absolute;
    top: 14%; left: 20%;
    width: 28%; height: 28%;
    background: rgba(255,255,255,.35);
    border-radius: 50%;
    filter: blur(6px);
}
/* Реальная фотография товара (если загружена в AdminJS как cover_image).
   Заполняет всю плашку product__visual. */
.product__photo {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}
.product:hover .product__photo { transform: scale(1.04); }
.product__price-badge {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(4px);
    color: var(--c-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product__badges {
    position: absolute;
    top: 14px; right: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.product__badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
}
.product__badge--best {
    background: linear-gradient(120deg, var(--dye-yellow) 0%, var(--dye-orange) 60%, var(--dye-red) 100%);
    box-shadow: 0 4px 12px -4px rgba(232, 78, 27, 0.35);
}
.product__badge--new {
    background: var(--c-primary-alt);
    box-shadow: 0 4px 12px -4px rgba(31, 122, 58, 0.35);
}
.product__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}
.product__body-top { padding: 18px 18px 12px; display: flex; flex-direction: column; flex: 1; }
.product__name { font-weight: 600; font-size: var(--fs-body-m); margin-bottom: 4px; line-height: 1.3; }
.product__color { font-size: var(--fs-body-s); color: var(--c-text-muted); margin-bottom: 12px; }
.product__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.product__tag {
    font-size: 11px;
    padding: 3px 9px;
    background: var(--c-surface);
    border-radius: 999px;
    color: var(--c-text);
}
.product__tag--form { background: rgba(105,128,255,.1); color: var(--c-accent); font-weight: 500; }
.product__btn {
    margin: 0 18px 18px;
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 10px;
    font-family: var(--f-heading);
    font-size: 13px;
    letter-spacing: 1px;
    transition: background .15s;
    cursor: pointer;
    border: none;
}
.product__btn:hover { background: var(--c-primary-alt); }
.product__btn svg { width: 14px; height: 14px; }

/* ====================================================================
   КОМПОНЕНТ: RECENT-ITEM (сайдбар «Последние материалы» в blog-detail).
   Раньше стили жили только в blog-list.ejs; на blog-detail.ejs виджет
   оставался «голым».
   ==================================================================== */
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 14px; padding: 0; margin: 0; }
.recent-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-border);
    color: inherit;
    text-decoration: none;
}
.recent-list li:last-child .recent-item { padding-bottom: 0; border-bottom: none; }
.recent-item__visual { width: 64px; height: 48px; border-radius: 8px; flex-shrink: 0; background: var(--c-surface); overflow: hidden; }
.recent-item__visual img { width: 100%; height: 100%; object-fit: cover; }
.recent-item__body { flex: 1; min-width: 0; }
.recent-item__title {
    font-size: 13px; font-weight: 600;
    color: var(--c-primary);
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recent-item:hover .recent-item__title { color: var(--c-accent); }
.recent-item__date { font-size: 11px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ====================================================================
   КОМПОНЕНТ: SIDE-CARD (общий блок сайдбара блога/in-product).
   Раньше стили дублировались в blog-list.ejs и blog-detail.ejs.
   Вынесено в общий main.css + добавлена мягкая тень для отделения от
   белого фона страницы (без тени блок «терялся» — белое на белом).
   ==================================================================== */
.side-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 32px -16px rgba(14, 45, 23, 0.16);
}
.side-card__title {
    font-family: var(--f-heading);
    font-size: 20px;
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* expert-card — тёмный вариант с CTA «Похожая задача? / Подобрать SKU» */
.expert-card { background: var(--c-primary); color: #fff; border: none; box-shadow: 0 18px 40px -20px rgba(14, 45, 23, 0.35); }
.expert-card .side-card__title { color: #fff; }
.expert-card__text { font-size: var(--fs-body-s); color: rgba(255,255,255,0.78); line-height: 1.55; margin-bottom: 18px; }
.expert-card__btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-accent-bright);
    color: var(--c-primary);
    padding: 12px 18px;
    border-radius: 10px;
    font-family: var(--f-heading);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background .15s, color .15s;
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}
.expert-card__btn:hover { background: var(--c-primary); color: #fff; }
.expert-card__btn svg { width: 14px; height: 14px; }
