/**
 * header.css — Шапка Урал-РТИ
 *
 * Цветовая схема: #212b62 (тёмно-синий из лого) + зелёный (#27ae60)
 * Минималистичный стиль, вся информация читается на тёмном фоне.
 */

/* ─── Переменные ─── */
:root {
    --h-primary:      #212b62;
    --h-primary-dark: #191f4a;
    --h-primary-light:#3a4580;
    --h-accent:       #e8a530;
    --h-accent-hover: #d4922a;
    --h-orange:       #e8a530;
    --h-orange-hover: #d4922a;
    --h-green:        #27ae60;
    --h-green-light:  #2ecc71;
    --h-bg-dark:      #191f4a;
    --h-nav-height:   48px;
    --h-text:         rgba(255,255,255,.92);
    --h-text-muted:   rgba(255,255,255,.6);
}


/* ===================================================
   1. TOP BAR
   =================================================== */

.top-bar {
    background: var(--h-primary-dark);
    color: var(--h-text);
    font-size: 13px;
    position: relative;
    z-index: 1001;
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    gap: 16px;
}

.top-bar__left,
.top-bar__right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Город-селектор */
.city-selector {
    position: relative;
}

.city-selector__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.city-selector__btn:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.35);
}

.city-selector__icon {
    color: var(--h-orange);
    flex-shrink: 0;
}

.city-selector__name {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-selector__arrow {
    flex-shrink: 0;
    opacity: .7;
    transition: transform var(--transition);
    font-size: 9px;
}

.city-selector.is-open .city-selector__arrow {
    transform: rotate(180deg);
}

/* Выпадашка городов */
.city-selector__list {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    min-width: 340px;
    max-height: 360px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 9999;
    overflow: hidden;
}

.city-selector.is-open .city-selector__list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.city-selector__list-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--c-border);
}

.city-selector__list-header h4 {
    color: var(--c-dark);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.city-selector__search {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: var(--c-light);
}

.city-selector__search:focus {
    border-color: var(--h-primary-light);
    background: #fff;
}

.city-selector__search-wrap {
    position: relative;
}

.city-selector__search-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-gray);
}

.city-selector__list-body {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
}

.city-selector__list-body::-webkit-scrollbar { width: 5px; }
.city-selector__list-body::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 10px; }

.city-selector__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--c-dark);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.city-selector__item:hover {
    background: #eaf2f8;
}

.city-selector__item--active {
    background: var(--h-primary);
    color: #fff;
}

.city-selector__region {
    font-size: 11px;
    opacity: .6;
    margin-left: auto;
}

/* График */
.top-bar__schedule {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: .85;
}

.top-bar__dot {
    width: 7px;
    height: 7px;
    background: var(--h-green-light);
    border-radius: 50%;
    animation: rt-pulse 2s infinite;
}

@keyframes rt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* Ссылки */
.top-bar__link {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar__link:hover { color: #fff; }

.top-bar__link svg { flex-shrink: 0; }

.top-bar__divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
}


/* ===================================================
   2. HEADER (белый, sticky)
   =================================================== */

.header {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition);
    color: var(--c-dark);
}

.header--scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 20px;
}

/* Лого */
.header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header__logo-img {
    max-height: 56px;
    width: auto;
}

.header__logo-fallback {
    font-size: 22px;
    font-weight: 900;
    color: var(--h-primary);
    letter-spacing: -.5px;
}

/* Email-блок (оранжевая рамка — ключевой CTA) */
.header__email-block {
    display: flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #fef9e7, #fdebd0);
    border: 2px solid var(--h-orange);
    border-radius: var(--radius-lg);
    padding: 8px 6px 8px 16px;
    transition: var(--transition);
    animation: rt-email-glow 4s ease-in-out infinite;
}

@keyframes rt-email-glow {
    0%, 90%, 100% { box-shadow: 0 0 0 0 rgba(243,156,18,0); }
    95% { box-shadow: 0 0 0 6px rgba(243,156,18,.15); }
}

.header__email-block:hover {
    border-color: var(--h-orange-hover);
    box-shadow: 0 4px 16px rgba(243,156,18,.2);
}

.header__email-icon {
    width: 36px;
    height: 36px;
    background: var(--h-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    color: #fff;
}

.header__email-info {
    display: flex;
    flex-direction: column;
}

.header__email-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--h-orange-hover);
    line-height: 1;
    margin-bottom: 2px;
}

.header__email-address {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -.3px;
    text-decoration: none;
}

.header__email-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--h-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.header__email-copy:hover {
    background: var(--h-orange-hover);
    transform: scale(1.08);
}

.header__email-copy:active {
    transform: scale(.95);
}

.header__email-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(.8);
    background: var(--h-green);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10000;
}

.header__email-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--h-green);
}

.header__email-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Телефон */
.header__phone-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header__phone-label {
    font-size: 11px;
    color: var(--c-gray);
    font-weight: 500;
}

.header__phone-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-dark);
    text-decoration: none;
    letter-spacing: -.5px;
    transition: color var(--transition);
}

.header__phone-number:hover { color: var(--h-primary); }

.header__callback-link {
    font-size: 12px;
    color: var(--h-primary-light);
    font-weight: 500;
    border: none;
    background: none;
    border-bottom: 1px dashed var(--h-primary-light);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: var(--transition);
}

.header__callback-link:hover {
    color: var(--h-primary);
    border-color: var(--h-primary);
}

/* Кнопка «Свободные остатки» (зелёная) */
.header__stock-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--h-green), #219a52);
    color: #fff;
    padding: 12px 22px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.header__stock-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transition: .5s;
}

.header__stock-btn:hover::before { left: 100%; }

.header__stock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,.4);
    color: #fff;
}

.header__stock-btn svg { flex-shrink: 0; }

.header__stock-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.header__stock-text small {
    font-size: 10px;
    font-weight: 500;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.header__stock-pulse {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: rt-pulse 1.5s infinite;
    flex-shrink: 0;
}

/* Кнопка «Оставить заявку» (красная) */
.header__request-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--h-green);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.header__request-btn:hover {
    background: var(--h-green-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(39,174,96,.35);
}

.header__request-btn svg { flex-shrink: 0; }

/* ═══ Корзина в шапке ═══ */
.header__cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--h-orange);
    background: transparent;
    border: 2px solid var(--h-orange);
    border-radius: 10px;
    padding: 10px;
    transition: all .2s;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.header__cart-btn:hover {
    background: var(--h-orange);
    color: #fff;
}
.header__cart-btn svg {
    width: 22px;
    height: 22px;
}
.header__cart-count {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--h-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 5px;
}

/* ═══ Остатки в top-bar (зелёный акцент) ═══ */
.top-bar__link--stock {
    color: #4caf50 !important;
    font-weight: 600;
    position: relative;
}
.top-bar__link--stock:hover {
    color: #66bb6a !important;
}
.top-bar__pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
    margin-left: 4px;
    animation: rt-pulse 2s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes rt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(1.5); }
}

/* ═══ Подкатегории в мега-меню ═══ */
.mega-menu__sub-links {
    list-style: none;
    margin: 2px 0 6px 16px;
    padding: 0;
}
.mega-menu__sub-links a {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: 2px 0;
    display: block;
    transition: color .15s;
}
.mega-menu__sub-links a:hover { color: var(--h-accent); }

.mega-menu__links--products a {
    font-style: italic;
    color: rgba(255,255,255,.65);
}
.mega-menu__links--products a:hover { color: #fff; }

.mega-menu__cat-count {
    font-size: 11px;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.7);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
}

/* Мобильный телефон (скрыт на десктопе) */
.header__mobile-phone {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    color: var(--c-dark);
    transition: background var(--transition);
}

.header__mobile-phone:hover { background: var(--c-light); }

/* Бургер (скрыт на десктопе) */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    border: 2px solid var(--c-border);
    cursor: pointer;
    background: none;
    transition: background var(--transition);
}

.header__burger:hover { background: var(--c-light); }

.header__burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--c-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.header__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.header__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ===================================================
   3. NAV BAR (синий)
   =================================================== */

.nav-bar {
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
    position: relative;
    z-index: 999;
}

.nav-bar__inner {
    display: flex;
    align-items: center;
}

/* Триггер каталога */
.nav-bar__catalog-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    border-radius: 0;
    height: var(--h-nav-height);
    flex-shrink: 0;
}

.nav-bar__catalog-trigger:hover,
.nav-bar__catalog-trigger.is-active {
    background: rgba(255,255,255,.25);
}

.nav-bar__hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.nav-bar__hamburger span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.nav-bar__catalog-trigger.is-active .nav-bar__hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.nav-bar__catalog-trigger.is-active .nav-bar__hamburger span:nth-child(2) { opacity: 0; }
.nav-bar__catalog-trigger.is-active .nav-bar__hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Меню в nav-bar */
.nav-bar__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0; padding: 0;
    flex: 1;
    height: var(--h-nav-height);
}

.nav-bar__menu > li {
    position: relative;
    height: 100%;
}

.nav-bar__menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 18px;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

/* Подчёркивание (оранж) */
.nav-bar__menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px; right: 18px;
    height: 3px;
    background: var(--h-orange);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-bar__menu > li > a:hover,
.nav-bar__menu > li.current-menu-item > a,
.nav-bar__menu > li.current-menu-ancestor > a {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.nav-bar__menu > li > a:hover::after,
.nav-bar__menu > li.current-menu-item > a::after,
.nav-bar__menu > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
}

/* Иконки в пунктах */
.nav-bar__menu > li > a svg {
    flex-shrink: 0;
    width: 16px; height: 16px;
    opacity: .7;
}

.nav-bar__menu > li > a:hover svg { opacity: 1; }

/* Подменю (dropdown) */
.nav-bar__menu .sub-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: var(--transition);
    padding: 8px;
    z-index: 998;
    list-style: none;
}

.nav-bar__menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-bar__menu .sub-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--c-dark);
    text-decoration: none;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-bar__menu .sub-menu a svg {
    width: 16px; height: 16px;
    color: var(--h-primary-light);
    flex-shrink: 0;
}

.nav-bar__menu .sub-menu a:hover {
    background: #eaf2f8;
    color: var(--h-primary);
}

/* Кнопка поиска */
.nav-bar__search-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--h-nav-height);
    height: var(--h-nav-height);
    color: rgba(255,255,255,.8);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-bar__search-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}


/* ===================================================
   4. MEGA MENU
   =================================================== */

.mega-menu {
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: #fff;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: var(--transition);
    z-index: 998;
}

.mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 32px 0;
}

.mega-menu__category {
    padding: 16px;
    border-radius: var(--radius-lg);
    transition: background var(--transition);
}

.mega-menu__category:hover {
    background: #f0f6fb;
}

.mega-menu__cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-border);
    text-decoration: none;
    transition: border-color var(--transition);
}

.mega-menu__category:hover .mega-menu__cat-header {
    border-color: var(--h-primary-light);
}

.mega-menu__cat-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.mega-menu__cat-icon svg {
    width: 22px; height: 22px;
}

.mega-menu__cat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-dark);
}

.mega-menu__links {
    list-style: none;
    margin: 0; padding: 0;
}

.mega-menu__links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #5d6d7e;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.mega-menu__links li a::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-border);
    flex-shrink: 0;
    transition: background var(--transition);
}

.mega-menu__links li a:hover {
    color: var(--h-primary);
    padding-left: 6px;
}

.mega-menu__links li a:hover::before {
    background: var(--h-primary);
}

.mega-menu__all-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--h-primary-light);
    text-decoration: none;
    transition: var(--transition);
}

.mega-menu__all-link:hover {
    color: var(--h-primary);
}


/* ===================================================
   5. MOBILE OVERLAY + SIDEBAR
   =================================================== */

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition);
}

.mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.mobile-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-light);
    flex-shrink: 0;
}

.mobile-sidebar__logo img { max-height: 32px; width: auto; }

.mobile-sidebar__close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--c-dark);
    transition: var(--transition);
}

.mobile-sidebar__close:hover { background: var(--c-light); }

.mobile-sidebar__body {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Email в мобильном */
.mobile-sidebar__email-block {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fef9e7, #fdebd0);
    border: 2px solid var(--h-orange);
    border-radius: var(--radius-lg);
}

.mobile-sidebar__email-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--h-orange-hover);
    margin-bottom: 6px;
    display: block;
}

.mobile-sidebar__email-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-sidebar__email-address {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-dark);
    text-decoration: none;
}

/* Телефон в мобильном */
.mobile-sidebar__phone-block {
    text-align: center;
}

.mobile-sidebar__phone-number {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--c-dark);
    text-decoration: none;
    letter-spacing: -.5px;
    margin-bottom: 4px;
}

.mobile-sidebar__phone-number--second {
    font-size: 17px;
    font-weight: 600;
    color: var(--c-gray);
}

.mobile-sidebar__callback {
    font-size: 12px;
    color: var(--h-primary-light);
    font-weight: 500;
    border: none;
    background: none;
    border-bottom: 1px dashed var(--h-primary-light);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

/* Кнопки мобильные */
.mobile-sidebar__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-sidebar__stock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--h-green), #219a52);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-sidebar__stock-btn:hover { color: #fff; }

.mobile-sidebar__pulse {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: rt-pulse 1.5s infinite;
}

.mobile-sidebar__request-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--h-accent), var(--h-accent-hover));
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

/* Каталог-ссылка мобильная */
.mobile-sidebar__catalog-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--h-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-sidebar__catalog-link:hover {
    background: var(--h-primary-dark);
    color: #fff;
}

/* Навигация мобильная */
.mobile-sidebar__nav {
    list-style: none;
    margin: 0; padding: 0;
}

.mobile-sidebar__nav > li {
    border-bottom: 1px solid var(--c-border);
}

.mobile-sidebar__nav > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    color: var(--c-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color var(--transition);
}

.mobile-sidebar__nav > li > a:hover { color: var(--h-primary); }

.mobile-sidebar__nav > li.current-menu-item > a {
    color: var(--h-primary);
}

.mobile-sidebar__nav .sub-menu {
    list-style: none;
    padding: 0 0 8px 16px;
}

.mobile-sidebar__nav .sub-menu a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--c-gray);
    text-decoration: none;
}

.mobile-sidebar__nav .sub-menu a:hover { color: var(--c-dark); }


/* ===================================================
   6. SEARCH OVERLAY
   =================================================== */

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay__box {
    width: 100%;
    max-width: 680px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    transform: translateY(-20px) scale(.95);
    transition: var(--transition);
}

.search-overlay.is-open .search-overlay__box {
    transform: translateY(0) scale(1);
}

.search-overlay__form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-overlay__icon {
    color: var(--c-gray);
    padding-left: 12px;
    flex-shrink: 0;
}

.search-overlay__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-family: inherit;
    padding: 14px 0;
    color: var(--c-dark);
    background: transparent;
}

.search-overlay__close {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--c-light);
    border: none;
    cursor: pointer;
    color: var(--c-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.search-overlay__close:hover { background: var(--c-border); }


/* ===================================================
   7. RESPONSIVE
   =================================================== */

@media (max-width: 1200px) {
    .header__email-block { display: none; }

    .nav-bar__menu > li > a {
        padding: 0 12px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .top-bar__schedule,
    .top-bar__divider:first-of-type { display: none; }

    .top-bar__right .top-bar__link:not(:first-child),
    .top-bar__right .top-bar__divider { display: none; }

    .header__inner { height: 70px; }

    .header__phone-block { display: none; }
    .header__stock-btn .header__stock-text small { display: none; }

    .nav-bar { display: none; }

    .header__mobile-phone { display: flex; }
    .header__burger { display: flex; }
}

@media (max-width: 640px) {
    .top-bar__inner { height: 38px; font-size: 12px; }

    .header__inner { height: 60px; gap: 10px; }

    .header__logo-img { max-height: 40px; }

    .header__stock-btn {
        padding: 10px 14px;
        font-size: 12px;
        gap: 6px;
    }

    .header__stock-btn .header__stock-text { display: none; }
    .header__request-btn { display: none; }
    .header__cart-btn {
        border: none;
        padding: 6px;
    }

    .search-overlay { padding-top: 20px; padding: 16px; }

    .mega-menu__inner {
        grid-template-columns: 1fr 1fr;
        padding: 20px 0;
    }
}

@media (max-width: 420px) {
    .city-selector__name { max-width: 80px; }
    .top-bar__right { display: none; }

    .header__logo-img { max-height: 34px; }

    .header__stock-btn { padding: 8px 10px; }

    .mega-menu__inner { grid-template-columns: 1fr; }
}

/* ═══ Модалка формы — z-index выше шапки ═══ */
.rt-modal-overlay,
.modal-overlay {
    z-index: 10000 !important;
}
.rt-modal,
.modal,
.rt-modal__box,
.modal__box {
    z-index: 10001 !important;
}
body.modal-open .top-bar,
body.modal-open .header,
body.modal-open .nav-bar {
    z-index: 99 !important;
}
