/* ==========================================================================
   Штыковские двери — дизайн-система демо-сайта
   Концепция ТЗ 2.2: «Качество, надёжность и стиль»
   Антрацит + светлый фон + зелёный акцент. Mobile-first.
   ========================================================================== */

:root {
    /* Цвет */
    --ink: #16181a;
    --ink-2: #3a4045;
    --muted: #6b7379;
    --muted-2: #9aa1a6;
    --line: #e4e6e8;
    --line-2: #f0f1f2;
    --bg: #ffffff;
    --bg-2: #f6f7f5;
    --bg-3: #eef0ed;
    --anthracite: #1b1f22;
    --anthracite-2: #24292d;
    --accent: #2e6b4e;
    --accent-ink: #235741;
    --accent-tint: #eaf2ed;
    --sale: #b4462c;
    --sale-tint: #fdefeb;
    --star: #d9a441;
    --white: #fff;

    /* Типографика */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --h1: clamp(28px, 6vw, 54px);
    --h2: clamp(23px, 4vw, 38px);
    --h3: clamp(19px, 2.6vw, 26px);

    /* Ритм */
    --gap: 16px;
    --pad: 16px;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 1px 2px rgba(22, 24, 26, .06), 0 8px 24px rgba(22, 24, 26, .06);
    --shadow-lg: 0 4px 12px rgba(22, 24, 26, .1), 0 24px 60px rgba(22, 24, 26, .14);
    --header-h: 60px;
    --bottombar-h: 60px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 1024px) {
    :root {
        --pad: 32px;
        --gap: 24px;
        --header-h: 104px;
        --bottombar-h: 0px;
    }
}

/* ============================ Сброс ============================ */
*, *::before, *::after { box-sizing: border-box; }

/* overflow-x и на html: закрытое мобильное меню стоит за правым краем экрана
   (position: fixed), и без этого оно растягивает страницу по горизонтали */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: var(--bottombar-h);
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ============================ Раскладка ============================ */
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }
.container--narrow { max-width: 880px; }

.section { padding: 48px 0; }
.section--tight { padding: 32px 0; }
.section--alt { background: var(--bg-2); }
.section--dark { background: var(--anthracite); color: #e9ebec; }
.section--dark h2, .section--dark h3 { color: #fff; }

@media (min-width: 1024px) {
    .section { padding: 80px 0; }
    .section--tight { padding: 48px 0; }
}

.section__head {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    justify-content: space-between; gap: 12px; margin-bottom: 24px;
}
.section__head h2 { margin: 0; }
.section__sub { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }

.eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.section--dark .eyebrow { color: #7fb99a; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (min-width: 700px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 699px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* ============================ Кнопки ============================ */
.btn {
    --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 11px 22px;
    background: var(--btn-bg); color: var(--btn-fg);
    border: 1px solid var(--btn-bd); border-radius: var(--radius);
    font-size: 15px; font-weight: 600; letter-spacing: .01em; text-align: center;
    transition: background .18s var(--ease), color .18s var(--ease),
                border-color .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { --btn-bg: var(--accent-ink); --btn-bd: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line); }
.btn--outline:hover { --btn-bg: var(--bg-2); --btn-fg: var(--ink); --btn-bd: var(--muted-2); }
.btn--dark { --btn-bg: var(--anthracite); --btn-bd: var(--anthracite); }
.btn--dark:hover { --btn-bg: #000; --btn-bd: #000; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: transparent; }
.btn--ghost:hover { --btn-bg: var(--bg-2); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--bg-2); --btn-bd: var(--bg-2); }
.btn--onDark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .5); }
.btn--onDark:hover { --btn-bg: rgba(255, 255, 255, .12); --btn-bd: #fff; }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 15px 30px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; color: var(--accent); border-bottom: 1px solid transparent;
    transition: gap .18s var(--ease), border-color .18s var(--ease);
}
.link-arrow:hover { gap: 12px; border-color: currentColor; }
.link-arrow::after { content: "→"; }

/* Иконочная кнопка */
.ibtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; background: transparent; border: 0;
    border-radius: var(--radius); position: relative; color: inherit;
    transition: background .18s var(--ease);
}
.ibtn:hover { background: rgba(0, 0, 0, .06); }
.ibtn svg { width: 21px; height: 21px; }
.ibtn__count {
    position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px;
    padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}
.ibtn__count:empty, .ibtn__count[data-count="0"] { display: none; }

/* На телефоне в шапке остаются поиск, корзина и бургер — остальное живёт
   в бургер-меню и нижней панели, иначе шапка не помещается в 360 px. */
.ibtn--wide { display: none; }
@media (min-width: 700px) { .ibtn--wide { display: inline-flex; } }

/* ============================ Хедер ============================ */
.header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header__top { display: none; }

@media (min-width: 1024px) {
    .header__top {
        display: block; background: var(--anthracite); color: #c9ced1; font-size: 13px;
    }
    .header__top .container { display: flex; align-items: center; justify-content: space-between; height: 40px; }
    .header__top a:hover { color: #fff; }
    .header__topnav { display: flex; gap: 22px; }
}

.header__main {
    display: flex; align-items: center; gap: 10px;
    height: var(--header-h);
}
@media (min-width: 1024px) { .header__main { height: 64px; gap: 26px; } }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark {
    width: 34px; height: 40px; border: 2px solid var(--accent); border-radius: 2px;
    position: relative; flex-shrink: 0;
}
.logo__mark::before {
    content: ""; position: absolute; inset: 5px 5px 5px 11px;
    border-left: 2px solid var(--accent); opacity: .55;
}
.logo__mark::after {
    content: ""; position: absolute; right: 7px; top: 50%; width: 5px; height: 5px;
    border-radius: 50%; background: var(--accent); transform: translateY(-50%);
}
.logo__text { line-height: 1.1; }
.logo__text b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.logo__text span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 1024px) { .logo__text b { font-size: 18px; } }

.nav { display: none; }
@media (min-width: 1024px) {
    .nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
    .nav__link {
        padding: 10px 12px; font-size: 15px; font-weight: 600; border-radius: var(--radius);
        transition: background .18s var(--ease), color .18s var(--ease);
    }
    .nav__link:hover { background: var(--bg-2); }
    .nav__link.is-active { color: var(--accent); }
}

.header__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
@media (min-width: 1024px) { .header__actions { margin-left: 0; } }

.header__phone { display: none; }
@media (min-width: 1200px) {
    .header__phone { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; }
    .header__phone small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
}

.header__cta { display: none; }
@media (min-width: 1024px) { .header__cta { display: inline-flex; } }

.burger { display: inline-flex; }
@media (min-width: 1024px) { .burger { display: none; } }

/* Мобильное меню */
.mmenu {
    position: fixed; inset: 0; z-index: 80; background: var(--bg);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .28s var(--ease);
    visibility: hidden;
}
.mmenu.is-open { transform: none; visibility: visible; }
.mmenu__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px var(--pad); border-bottom: 1px solid var(--line); min-height: var(--header-h);
}
.mmenu__body { flex: 1; overflow-y: auto; padding: 8px var(--pad) 24px; }
.mmenu__link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0; border-bottom: 1px solid var(--line-2);
    font-size: 17px; font-weight: 600;
}
.mmenu__group { padding: 10px 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mmenu__foot { padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* Нижняя панель (мобильная) */
.bottombar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, .98);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 1024px) { .bottombar { display: none; } }
.bottombar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--bottombar-h); background: none; border: 0; position: relative;
    font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .01em;
}
.bottombar__item svg { width: 21px; height: 21px; }
.bottombar__item.is-active { color: var(--accent); }
.bottombar__item .ibtn__count { top: 6px; right: 50%; margin-right: -22px; }

/* ============================ Хлебные крошки ============================ */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current] { color: var(--ink-2); }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--muted-2); }
.crumbs li:last-child::after { content: none; }
.crumbs ol { display: contents; }
.crumbs li { display: flex; gap: 6px; }

/* ============================ Карточка товара ============================ */
.card {
    display: flex; flex-direction: column; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--muted-2); box-shadow: var(--shadow); }
@media (hover: hover) { .card:hover { transform: translateY(-2px); } }

.card__media { position: relative; aspect-ratio: 3 / 4; background: var(--bg-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }

.card__badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.card__fav {
    position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .92); border: 0; border-radius: 50%; color: var(--ink-2);
    transition: color .18s var(--ease), background .18s var(--ease);
}
.card__fav:hover, .card__fav.is-on { color: var(--sale); }
.card__fav svg { width: 18px; height: 18px; }

.card__body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 12px; }
@media (min-width: 700px) { .card__body { padding: 16px; } }
.card__style { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card__title { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0; }
@media (min-width: 700px) { .card__title { font-size: 16px; } }
.card__meta { font-size: 13px; color: var(--muted); margin-top: -2px; }
.card__price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.card__price b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card__price s { font-size: 13px; color: var(--muted); }
.card__actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; }

.badge {
    display: inline-block; padding: 4px 8px; border-radius: 3px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--anthracite); color: #fff;
}
.badge--sale { background: var(--sale); }
.badge--new { background: var(--accent); }
.badge--hit { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.badge--stock { background: var(--accent-tint); color: var(--accent-ink); }
.badge--order { background: var(--bg-3); color: var(--ink-2); }

/* ============================ Формы ============================ */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field__label i { color: var(--sale); font-style: normal; }
.input, .select, .textarea {
    width: 100%; min-height: 46px; padding: 11px 14px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
    outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7379' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 11px; padding-right: 36px; }
.field.is-error .input, .field.is-error .select, .field.is-error .textarea { border-color: var(--sale); }
.field__err { display: none; margin-top: 5px; font-size: 12px; color: var(--sale); }
.field.is-error .field__err { display: block; }

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.check a { color: var(--accent); text-decoration: underline; }
.check.is-error { color: var(--sale); }

/* ============================ Модальные окна ============================ */
.modal {
    position: fixed; inset: 0; z-index: 90; display: none;
    align-items: flex-end; justify-content: center;
    background: rgba(16, 18, 20, .55); padding: 0;
}
@media (min-width: 700px) { .modal { align-items: center; padding: 24px; } }
.modal.is-open { display: flex; }
.modal__box {
    position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
    background: var(--bg); border-radius: 14px 14px 0 0; padding: 22px var(--pad) calc(22px + env(safe-area-inset-bottom));
    animation: sheet .28s var(--ease);
}
@media (min-width: 700px) { .modal__box { border-radius: var(--radius-lg); padding: 30px; animation: pop .22s var(--ease); } }
.modal__box--wide { max-width: 900px; }
@keyframes sheet { from { transform: translateY(24px); opacity: .6; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal__close {
    position: absolute; top: 10px; right: 10px; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted);
}
.modal__close:hover { background: var(--bg-2); color: var(--ink); }
.modal__title { margin: 0 30px 6px 0; font-size: 22px; }
.modal__sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* Уведомления */
.toasts {
    position: fixed; left: 50%; bottom: calc(var(--bottombar-h) + 14px); transform: translateX(-50%);
    z-index: 100; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px;
    pointer-events: none;
}
@media (min-width: 1024px) { .toasts { left: auto; right: 24px; bottom: 24px; transform: none; } }
.toast {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px;
    background: var(--anthracite); color: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); font-size: 14px; animation: toastIn .26s var(--ease);
}
.toast--ok { background: var(--accent-ink); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ============================ Прочее ============================ */
.tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 100px;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.tag:hover { border-color: var(--muted-2); }
.tag.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag button { background: none; border: 0; padding: 0; line-height: 1; opacity: .7; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.rating b { color: var(--ink); }
.rating svg { width: 14px; height: 14px; color: var(--star); }

.note {
    padding: 14px 16px; background: var(--accent-tint); border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: var(--ink-2);
}
.note--demo { background: var(--bg-2); border-color: var(--muted-2); }

.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Появление при скролле (ТЗ 2.2) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================ Футер ============================ */
.footer { background: var(--anthracite); color: #a9b0b4; padding: 40px 0 24px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; } }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer li { margin-bottom: 9px; }
.footer .logo__text b, .footer .logo__text span { color: #fff; }
.footer .logo__text span { color: #7d868b; }
.footer__bottom {
    margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: #7d868b;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 16px; }

.socials { display: flex; gap: 10px; }
.socials a {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.socials a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.socials svg { width: 17px; height: 17px; }

/* Плавающие мессенджеры */
.fab {
    position: fixed; right: 14px; bottom: calc(var(--bottombar-h) + 14px); z-index: 65;
    display: flex; flex-direction: column-reverse; align-items: center; gap: 10px;
}
@media (min-width: 1024px) { .fab { right: 24px; bottom: 24px; } }
.fab__main {
    width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
    box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center;
    transition: transform .2s var(--ease), background .2s var(--ease);
}
.fab__main:hover { background: var(--accent-ink); transform: scale(1.05); }
.fab__main svg { width: 25px; height: 25px; }
.fab__list { display: none; flex-direction: column; gap: 10px; }
.fab.is-open .fab__list { display: flex; }
.fab__item {
    width: 46px; height: 46px; border-radius: 50%; border: 0; color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
    animation: pop .2s var(--ease);
}
.fab__item svg { width: 21px; height: 21px; }
.fab__item--wa { background: #25d366; }
.fab__item--tg { background: #2aabee; }
.fab__item--max { background: #6c5ce7; font-weight: 800; font-size: 13px; }
.fab__item--call { background: var(--anthracite); }

/* ============================ Поиск ============================ */
.search__list { margin-top: 8px; max-height: 56vh; overflow-y: auto; }
.search__item {
    display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
    padding: 10px; border-radius: var(--radius); transition: background .16s var(--ease);
}
.search__item:hover { background: var(--bg-2); }
.search__item img { width: 48px; height: 64px; object-fit: cover; border-radius: 3px; background: var(--bg-2); }
.search__item b { display: block; font-size: 15px; font-weight: 600; }
.search__item small { display: block; font-size: 12px; color: var(--muted); }
.search__item em { font-style: normal; font-weight: 700; white-space: nowrap; }

/* ============================ Способы связи ============================ */
.contact-ways { display: grid; gap: 8px; }
.contact-way {
    display: block; width: 100%; text-align: left; padding: 13px 16px;
    background: var(--bg-2); border: 1px solid transparent; border-radius: var(--radius);
    transition: border-color .16s var(--ease), background .16s var(--ease);
}
.contact-way:hover { background: var(--white); border-color: var(--accent); }
.contact-way b { display: block; font-size: 15px; }
.contact-way span { display: block; font-size: 13px; color: var(--muted); }

/* ============================ Квиз ============================ */
.quiz__progress { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; margin-right: 40px; }
.quiz__progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.quiz__step { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.quiz__q { font-size: 21px; margin-bottom: 16px; }
.quiz__opts { display: grid; gap: 8px; }
.quiz__opt {
    padding: 14px 16px; text-align: left; background: var(--bg-2);
    border: 1px solid transparent; border-radius: var(--radius); font-weight: 600;
    transition: border-color .16s var(--ease), background .16s var(--ease), transform .12s var(--ease);
}
.quiz__opt:hover { background: #fff; border-color: var(--accent); transform: translateX(3px); }

.thanks__ico {
    width: 62px; height: 62px; margin: 6px auto 16px; border-radius: 50%;
    background: var(--accent-tint); color: var(--accent); font-size: 30px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ============================ Переключатель версий ============================ */
.vsw {
    display: inline-flex; padding: 3px; margin-right: 4px;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 100px;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.vsw__b {
    padding: 6px 11px; border-radius: 100px; color: var(--muted); white-space: nowrap;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.vsw__b:hover { color: var(--ink); }
.vsw__b.is-on { background: var(--accent); color: #fff; }
@media (max-width: 480px) { .vsw__b { padding: 6px 9px; font-size: 11px; } }

/* На телефоне переключатель версий уезжает в бургер-меню: в шапке уже
   заняты поиск, корзина и сам бургер */
@media (max-width: 699px) { .header__actions .vsw { display: none; } }
.mmenu__vsw { display: flex; gap: 8px; }
.mmenu__vsw a, .mmenu__vsw button {
    flex: 1; padding: 12px; text-align: center; border-radius: var(--radius);
    background: var(--bg); border: 1px solid var(--line);
    font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.mmenu__vsw a.is-on, .mmenu__vsw button.is-on {
    background: var(--accent); border-color: var(--accent); color: #fff;
}

/* На телефоне в шапке: логотип, переключатель версий, корзина, бургер.
   Поиск переехал в бургер-меню — иначе с тремя версиями шапка не влезает в 360 px */
@media (max-width: 699px) {
    .header__actions > [data-modal="modal-search"] { display: none; }
    .logo__text span { display: none; }
}
.mmenu__search {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 13px 14px; margin-bottom: 6px;
    background: var(--bg-2); border: 0; border-radius: var(--radius);
    font-size: 15px; font-weight: 600; color: var(--muted); text-align: left;
}
.mmenu__search svg { width: 19px; height: 19px; flex-shrink: 0; }
[data-theme="hybrid"] .mmenu__search { border-radius: var(--pill); }
