/* ================================================
   Новая шапка A-MUR
   ================================================ */

/* ---- Сброс старых стилей ---- */
#header { min-height: 0 !important; margin: 0 !important; background: #fff !important; }
.header_grey_line { display: none !important; }
#logo { position: static !important; margin: 0 !important; display: flex !important;
    align-items: center !important; flex-shrink: 0 !important; text-decoration: none !important; }
#logo img { max-height: 64px !important; width: auto !important; }

#basket { position: static !important; width: auto !important; height: auto !important; margin: 0 !important; }
#basket .basket_products, #basket .basket_products_angel,
#basket .basket_products_bottom, #basket .basket_products_center,
#basket .count { display: none !important; }

#reserve_time_container { position: static !important; top: auto !important; right: auto !important; width: auto !important; z-index: auto !important; }
#reserve_time { display: inline !important; width: auto !important; height: auto !important;
    font-size: inherit !important; font-weight: inherit !important; color: inherit !important; }

#search_form { display: flex !important; position: static !important; left: auto !important;
    transform: none !important; margin: 0 !important; flex-shrink: 0 !important; width: auto !important; }
#search_form .search_input, #search_form .search_submit { display: none !important; }

#main_menu { display: flex !important; width: auto !important; height: auto !important;
    table-layout: auto !important; margin: 0 !important; padding: 0 !important; }
#main_menu li { display: flex !important; float: none !important; width: auto !important;
    min-width: 0 !important; vertical-align: baseline !important; }

/* ---- Верхняя белая полоса ---- */
.hdr-top {
    background: #fff;
    border-bottom: 1px solid #EDE3E1;
    padding: 12px 0;
}
.hdr-top__inner {
    max-width: 1210px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
}

/* Лого */
.hdr-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.hdr-logo img { max-height: 56px; width: auto; }

/* Инфо-блок (режим роботи) */
.hdr-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #1A1A1A;
    line-height: 1.45;
    flex-shrink: 0;
}
.hdr-info__icon { width: 20px; height: 20px; flex-shrink: 0; color: #C4716A; margin-top: 1px; }
.hdr-info__red { color: #C4716A; display: block; }

/* Название магазина */
.hdr-shop-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #1A1A1A;
    margin-right: auto;
}
.hdr-shop-title strong { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.hdr-shop-title span  { font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.4px; color: #666; }

/* ---- Группа: корзина + авторизация (одинаковая высота) ---- */
.hdr-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
    min-height: 55px;
}
.hdr-actions .hdr-basket,
.hdr-actions .hdr-auth {
    align-self: stretch;
}

/* ---- Корзина ---- */
.hdr-basket {
    display: flex !important;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: #1A1A1A !important;
    flex-shrink: 0;
    border: 1px solid #E5D8D3;
    border-radius: 10px;
    padding: 0 12px;
    box-sizing: border-box;
    transition: border-color .2s;
}
.hdr-basket:hover { border-color: #C4716A !important; }

.hdr-basket__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.hdr-basket__icon { width: 26px; height: 26px; color: #888; }
.hdr-basket__count {
    position: absolute;
    top: -7px; right: -9px;
    background: #C4716A; color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 50%;
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 2px; line-height: 1;
}

.hdr-basket__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Строка "Кошик · 3 товари" */
.hdr-basket__row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}
.hdr-basket__label { font-size: 12px; color: #888; }
.hdr-basket__label::after { content: ':'; }
.hdr-basket__qty { font-size: 12px; color: #1A1A1A; }

/* Сумма — крупно */
.hdr-basket__summ {
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1;
    white-space: nowrap;
}

/* Пустая корзина */
.hdr-basket .basket_empty { font-size: 12px; color: #999; display: block !important; }

/* Инлайн-резерв */
.hdr-reserve-inline { display: none; align-items: center; gap: 3px; }
.hdr-reserve-inline:not(.none) { display: flex !important; }
.hdr-reserve-inline.none { display: none !important; }
.hdr-reserve-inline__label { font-size: 10px; color: #C4716A; }
.hdr-reserve-inline #reserve_time { font-size: 11px !important; font-weight: 700 !important; color: #C4716A !important; display: inline !important; }

/* ---- Авторизация ---- */
.hdr-auth {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border: 1px solid #E5D8D3;
    border-radius: 10px;
    padding: 0 12px;
    box-sizing: border-box;
    transition: border-color .2s;
}
.hdr-auth:hover { border-color: #C4716A; }
.hdr-auth__icon { width: 20px; height: 20px; color: #C4716A; flex-shrink: 0; }

/* Сброс иконок-замков из styles.css */
.hdr-auth ul { list-style: none !important; margin: 0 !important; padding: 0 !important;
    display: flex !important; flex-direction: column !important; gap: 1px !important; }
.hdr-auth ul li { margin: 0 !important; padding: 0 !important;
    background: none !important; float: none !important; }
.hdr-auth ul li.enter,
.hdr-auth ul li.reg { background-image: none !important; padding-left: 0 !important; }
.hdr-auth ul li a,
.hdr-auth ul li #enter_link {
    font-size: 12px !important; color: #1A1A1A !important;
    text-decoration: none !important; cursor: pointer;
    background: none !important; padding: 0 !important; display: block !important;
}
.hdr-auth ul li a:hover,
.hdr-auth ul li #enter_link:hover { color: #C4716A !important; }
.hdr-auth ul li.enter #enter_link { font-weight: 600; }
.hdr-auth__links > a { font-size: 12px; color: #1A1A1A; text-decoration: none; display: block; }
.hdr-auth__links > a:hover { color: #C4716A; }

/* Языковое меню */
.hdr-lang { flex-shrink: 0; }
.hdr-lang #lang_menu { list-style: none !important; margin: 0 !important; padding: 0 !important;
    display: flex !important; flex-direction: column; gap: 1px; }
.hdr-lang #lang_menu li { margin: 0 !important; padding: 0 !important;
    background: none !important; float: none !important; font-size: 11px; color: #999; }
.hdr-lang #lang_menu li a { color: #1A1A1A; text-decoration: none; font-size: 11px; }
.hdr-lang #lang_menu li a:hover { color: #C4716A; }

/* ---- Обёртка меню ---- */
.main_menu_wrapper {
    display: flex !important;
    flex-direction: column !important;
}

/* ---- Нижняя бежевая строка меню ---- */
/* Когда JS вешает menu_fixed при скролле — не даём старым стилямломать flex */
.menu_fixed .hdr-menu-bar,
.hdr-menu-wrap .hdr-menu-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-direction: row !important;
}
.menu_fixed .hdr-menu-bar #main_menu,
.hdr-menu-wrap .hdr-menu-bar #main_menu {
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    min-width: 0 !important;
}
.menu_fixed .hdr-menu-bar #search_form,
.hdr-menu-wrap .hdr-menu-bar #search_form {
    flex-shrink: 0 !important;
    margin-left: 8px !important;
    display: flex !important;
    position: static !important;
    width: auto !important;
    transform: none !important;
}

.hdr-menu-wrap {
    display: flex;
    background: #EDE3E1;
    border-bottom: 1px solid #E5D8D3;
    overflow: visible;
    position: relative;
    z-index: 100;
}
/* Когда JS вешает menu_fixed на hdr-menu-bar — он выходит из потока,
   hdr-menu-wrap схлопывается. Фиксим минимальной высотой: */
.hdr-menu-bar.menu_fixed ~ * { display: none; }
.hdr-menu-bar.menu_fixed {
    background: #EDE3E1 !important;
    border-bottom: 1px solid #E5D8D3 !important;
}
.hdr-menu-bar {
    max-width: 1210px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    align-items: center;
    box-sizing: border-box;
}
.hdr-menu-bar #main_menu {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    list-style: none;
    margin: 0 !important; padding: 0 !important;
    height: auto !important; width: auto !important;
    flex-wrap: nowrap;
    overflow: visible;
    min-width: 0;
}
.hdr-menu-bar #main_menu li {
    display: flex !important;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    position: relative;
    white-space: nowrap;
    font-size: 14px;
    color: #1A1A1A;
    float: none !important; width: auto !important;
    min-width: 0 !important; margin: 0 !important;
}
.hdr-menu-bar #main_menu li a {
    font-size: 14px; color: #1A1A1A;
    text-decoration: none; display: block;
}
.hdr-menu-bar #main_menu li:hover > a,
.hdr-menu-bar #main_menu li:hover { color: #C4716A; }
.hdr-menu-bar #main_menu li.active a { color: #C4716A; font-weight: 600; }

.hdr-menu-bar #search_form { flex-shrink: 0; margin-left: 8px; }
.hdr-search {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid #D0C4C0; border-radius: 20px;
    padding: 5px 12px; background: #fff;
}
.hdr-search__input {
    border: none !important; outline: none !important;
    background: transparent !important; box-shadow: none !important;
    font-family: inherit; font-size: 13px; color: #1A1A1A;
    width: 140px; padding: 0 !important; height: auto !important;
    margin: 0 !important; border-radius: 0 !important;
    transition: width .2s;
}
.hdr-search__input::placeholder { color: #BBB; }
.hdr-search__btn {
    background: none; border: none; cursor: pointer; padding: 0;
    display: flex; align-items: center; color: #C4716A;
}
.hdr-search__btn svg { width: 16px; height: 16px; }

/* ================================================
   АДАПТИВ
   ================================================ */

/* 1100px — чуть теснее */
@media (max-width: 1100px) {
    .hdr-top__inner { gap: 14px; }
    .hdr-menu-bar #main_menu li { padding: 0 10px; }
    .hdr-search__input { width: 110px; }
    .hdr-shop-title { display: none; }
}

/* 900px — скрываем режим работы текст, оставляем только иконку */
@media (max-width: 900px) {
    .hdr-top__inner { gap: 12px; }
    .hdr-info__text { display: none; }
    .hdr-info { gap: 0; }
    .hdr-lang { display: none; }
    .hdr-menu-bar { padding: 0 12px; }
    .hdr-menu-bar #main_menu li { padding: 0 8px; font-size: 13px; }
    .hdr-menu-bar #main_menu li a { font-size: 13px; }
    .hdr-search__input { width: 90px; }
}

/* 768px — мобильная шапка */
@media (max-width: 768px) {
    .hdr-top { padding: 8px 0; }
    .hdr-top__inner { padding: 0 12px; gap: 10px; }
    .hdr-logo img { max-height: 44px; }

    /* Режим работы — скрываем полностью */
    .hdr-info { display: none !important; }

    /* Название — однострочно, мелко */
    .hdr-shop-title { display: flex; }
    .hdr-shop-title strong { font-size: 12px; }
    .hdr-shop-title span { display: none; }

    /* Корзина — компактная: только иконка + сумма */
    .hdr-basket { padding: 6px 10px; gap: 8px; }
    .hdr-basket__row { display: none; }
    .hdr-basket__summ { font-size: 13px; }

    /* Авторизация — только иконка */
    .hdr-auth { padding: 6px 10px; }
    .hdr-auth__links { display: none; }

    /* Меню — горизонтальный скролл */
    .main_menu_wrapper .hdr-menu-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hdr-menu-bar { width: max-content; min-width: 100%; }
    .hdr-menu-bar #main_menu li { height: 38px; padding: 0 10px; font-size: 13px; }

    /* Поиск — схлопывается, раскрывается по фокусу */
    .hdr-search__input { width: 0; }
    .hdr-search:focus-within .hdr-search__input,
    .hdr-search.open .hdr-search__input { width: 130px; }
}

/* 560px — минимальный экран */
@media (max-width: 560px) {
    .hdr-shop-title { display: none; }
    .hdr-top__inner { justify-content: space-between; }

    /* Корзина — только иконка + счётчик, без суммы */
    .hdr-basket__summ { display: none; }
    .hdr-basket__info { display: none; }
    .hdr-basket { gap: 0; padding: 6px 10px; }

    /* Меню — шрифт ещё меньше */
    .hdr-menu-bar #main_menu li { padding: 0 8px; font-size: 12px; }
    .hdr-menu-bar #main_menu li a { font-size: 12px; }
}

/* 400px — совсем маленький */
@media (max-width: 400px) {
    .hdr-logo img { max-height: 36px; }
    .hdr-top__inner { padding: 0 8px; gap: 8px; }
    .hdr-menu-bar { padding: 0 8px; }
}
