.header {
    position: relative;
    z-index: 100;
}

.no-scroll {
    overflow: hidden;
    /* Для iOS */
    position: fixed;
    width: 100%;
    height: 100%;
}

.header header {
    position: relative;
    z-index: 200;
}

.header_content {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    position: relative;
    z-index: 9;
}

.header .top_bar {
    height: 44px;
    border-bottom: solid #eeeeee 1px;
}

.selector_region_lang {
    display: flex;
    position: relative;
    gap: 10px;
}

.selector_region,
.selector_lang {}

.selector_current {
    padding-right: 10px;
    font-size: 13px;
    line-height: 44px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    color: #4b4e58;
}

.selector_current .selector_title {
    gap: 10px;
}

.selector_current.active .menu_item_arrow.menu_item_arrow-down {
    transform: rotate(270deg);
}

.selector_current:before {
    content: " ";
    position: absolute;
    width: 5px;
    height: 5px;
    border-left: solid #8c8c8c 2px;
    border-bottom: solid #8c8c8c 2px;
    right: 0px;
    top: 19px;
    transform: rotate(315deg);
}

.selector_current:hover {
    color: var(--theme-base-color);
}

.selector_current:hover:before {
    border-left: solid var(--theme-base-color) 2px;
    border-bottom: solid var(--theme-base-color) 2px;

}

.selector_current.active {
    color: var(--theme-base-color);
}

.selector_single:before {
    display: none;
}

.selector_single {
    padding-right: 0px;
    cursor: auto;
}

.selector_current.active:before {
    border-left: solid var(--theme-base-color) 2px;
    border-bottom: solid var(--theme-base-color) 2px;
    transform: rotate(135deg);
    top: 21px;
}

.selector_lang_options {
    display: none;
    position: absolute;
    top: 38px;
    background: #ffffff;
    padding: 0;
    box-shadow: 0px 0px 16px #00000036;
    border-radius: 5px;
    z-index: 99;
}

.selector_lang_options.active {
    display: block;
}

.selector_lang_option {}

.selector_lang_option a {
    color: #292929;
    text-decoration: none;
    display: block;
    padding: 10px 30px;
}

.selector_lang_option a:hover {
    color: var(--theme-base-color);
}

.header .phone_callback {
    display: flex;
    gap: 20px;
    height: 44px;
    justify-content: end;
}

.phone_header {
    font-weight: bold;
    color: #4b4e58;
    font-size: 16px;
    line-height: 44px;
    cursor: pointer;
}

.phone_header a {
    color: #4b4e58;
    /* color: black; */
    text-decoration: none;
    display: flex;
    gap: 8px;
}

.callback_header {
    line-height: 44px;
    font-weight: 500;
    color: #4b4b4b;
    cursor: pointer;
}


.header .burger_menu {}

.header .burger_menu-area {
    height: 40px;
}

.header .burger_menu-area img {
    transition: 0.4s;
}

.mobile_menu_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile_menu_header_icon img {
    height: 50px;
}

.mobile_menu_header_close {
    position: relative;
    width: 35px;
    height: 35px;
    border: 1px solid var(--theme-base-color);
    border-radius: 30px;
    cursor: pointer;
}

.mobile_menu_header_close:after {
    content: "";
    transform: rotate(45deg);
    position: absolute;
    top: 15px;
    left: 8px;
    width: 18px;
    height: 2px;
    background: var(--theme-base-color);
}

.mobile_menu_header_close:before {
    content: "";
    transform: rotate(-45deg);
    position: absolute;
    top: 15px;
    left: 8px;
    width: 18px;
    height: 2px;
    background: var(--theme-base-color);
}



.header .burger_menu-area.active {}

.header .burger_menu-area.active img {
    transform: rotate(-90deg);
}






.header .bottom_bar {
    padding: 18px 0px;
    height: 80px;
    border-bottom: solid #eeeeee 1px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.header .bottom_bar_logo {}

.header .bottom_bar_logo a {
    display: block;
    width: 100%;
    height: 100%;
}

.header .bottom_bar_logo img {
    max-width: 100%;
    max-height: 100%;
}

.header .bottom_bar_slogan {
    font-size: 14px;
    line-height: 22px;
    color: #8c8c8c;
}

.header .bottom_bar_menu {}

.header .bottom_bar_search {}

.header .bottom_bar_icon_btn {}

.header .bottom_bar_icon_btn-area {
    height: 40px;
    display: flex;
    gap: 0;
}

.header .bottom_bar_icon_btn-area a {
    display: block;
    height: 40px;
    padding: 5px;
}

.header .bottom_bar_icon_btn-area img {
    height: 30px;
    opacity: 0.7;
    cursor: pointer;
}

.header .bottom_bar_button {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header .search-button {
    cursor: pointer;
    width: 30px;
}












.megamenu {
    display: flex;
    gap: 20px;
    height: 100%;
}

.megamenu_item {}


.megamenu_item a {
    /* display: block; */
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    color: #292929;
    text-decoration: none;
    line-height: 44px;
}

.megamenu_item a.active {
    color: var(--theme-base-color);
}

.megamenu_item a:hover {
    color: var(--theme-base-color);
}

.megamenu_item.active {
    color: var(--theme-base-color);
}

.megamenu_item .menu_item_arrow {
    display: none;
}

.menu_item_arrow-down {
    transform: rotate(90deg);
}

.submenu {
    position: absolute;
    z-index: 2;
    background: #fff;
    left: 0px;
    right: 0px;
}

.submenu.active {
    box-shadow: 0px 0px 10px #00000042;
}

.submenu_section {
    display: none;
    padding: 30px 0px 50px 0px;
}

.submenu_section.active {
    display: block;
}

.submenu_section_elements {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.btn3-mob {
    display: none;
}

.btn3-dekstop {
    display: block;
}


.submenu_section_title {
    font-weight: 500;
    font-size: 36px;
    line-height: 44px;
    padding-bottom: 40px;
    text-align: center;
    color: var(--theme-base-color);
}

.submenu_element {
    opacity: 1;
    width: calc(33% - 20px);
    min-width: 300px;
}

.not_image .submenu_element {
    opacity: 1;
    width: calc(25% - 40px);
    min-width: auto;
}

.submenu_element a {
    text-decoration: none;
    display: block;
    position: relative;
}

.submenu_element .title {
    position: absolute;
    top: 34px;
    left: 115px;
    font-size: 18px;
    color: #292929;
    transition: 0.3s;
}

.not_image .submenu_element .title {
    left: 0px;
    top: 0px;
    position: relative;
}


.submenu_element .image {
    height: 100px;
    width: 100px;
    position: relative;
}

.not_image .submenu_element .image {
    display: none;
}

.submenu_element .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50px;
    transition: 0.3s;
}

.submenu_element:hover .image img {
    box-shadow: 0px 0px 11px #0000003d;
}

.submenu_element:hover .title {
    color: var(--theme-base-color);
}

@media (min-width: 991px) and (max-width: 1300px) {
    .megamenu {
        gap: 10px;
    }

    .header .bottom_bar_button {
        gap: 10px;
    }

    .megamenu_item a {
        font-size: 16px;
    }

    .header_content .bottom_bar_button .btn {
        min-width: 130px;
    }

    .header .bottom_bar_logo img {
        max-width: 150px;
    }

    .submenu_element {
        min-width: 280px;
    }
}

@media (max-width: 991px) {
    .selector_current {
        font-size: 16px;
        color: black;
        line-height: 38px;
    }

    .selector_region_lang {
        flex-direction: column;
    }

    .submenu {
        z-index: 120;
    }

    .selector_lang_option a {
        text-decoration: none;
        display: block;
        padding: 0;
        color: black;
    }

    .selector_lang_options {
        position: static;
        box-shadow: none;
    }

    .phone_header a {
        color: black;
        font-weight: 400;
    }

    .selector_current:before {
        display: none;
    }

    .mobile_menu .phone_block {
        padding-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        color: black;
    }

    .submenu.active {}

    .submenu.active>.container {
        height: 100%;
    }

    .not_image .submenu_element {
        width: 100%;
    }

    .submenu_element .image {
        height: 60px;
        width: 60px;
    }

    .submenu_element .title {
        top: 15px;
        left: 75px;
    }

    /* Выезд через transform (GPU), а не left/right — без пересчёта раскладки на каждом кадре.
       Закрытые панели скрыты (visibility), чтобы не рисовались и не ловили касания. */
    .submenu_section {
        overflow-y: scroll;
        display: block;
        top: 70px;
        border-top: solid #cccccc 1px;
        position: fixed;
        bottom: 0px;
        left: 0px;
        right: 0px;
        transform: translate3d(-100%, 0, 0);
        visibility: hidden;
        transition: transform 0.2s ease, visibility 0s linear 0.2s;
        background: #fff;
        padding: 30px;
    }

    .submenu_section.active {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        transition: transform 0.2s ease, visibility 0s;
    }

    .submenu_section_title {
        font-size: 24px;
        line-height: 28px;
        position: absolute;
        top: 0px;
        left: 0px;
        right: 0px;
        padding: 20px 20px 20px 70px;
        text-align: left;
    }

    .mobile_menu_content .btn3 {
        width: 100% !important;
        text-align: center !important;
    }

    .megamenu_item .menu_item_arrow {
        display: block;
    }

    .megamenu_item .menu_item_text,
    .megamenu_item a {
        font-weight: 500 !important;
        line-height: 38px;
    }

    .submenu_section_elements {
        padding-top: 60px;
    }

    .not_image .submenu_section_elements {
        flex-direction: column;
    }


    .submenu_section_title:after {
        content: "";
        position: absolute;
        background: url(/medialibrary/system/arrow.svg);
        height: 46px;
        width: 46px;
        left: 20px;
        top: 12px;
        transform: rotate(180deg);
    }

    .btn3-dekstop {
        display: none;
    }

    .btn3-mob {
        display: block;
    }

    .search-button-mob {
        padding: 5px;
    }

    .header_mobile_social_block {
        gap: 20px;
        padding-bottom: 40px;
    }

}


/* Выезд через transform (GPU), а не left/right — без пересчёта раскладки на каждом кадре */
.mobile_menu {
    position: fixed;
    left: 0px;
    right: 0px;
    background: #fff;
    padding: 10px 20px;
    z-index: 110;
    top: 0;
    bottom: 0px;
    box-shadow: 0px 0px 40px #0000009c;
    transform: translate3d(-100%, 0, 0);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    will-change: transform;
}

.mobile_menu_content {}

.mobile_menu.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
}

.mobile_menu .megamenu {
    flex-direction: column;
    gap: 2px;
    padding-bottom: 15px;
}

.mobile_menu .selector_region_lang_area {
    /* border-bottom: solid #d7d7d7 1px; */
    padding-top: 10px;
    /* padding-bottom: 10px; */
    font-weight: 500;
    color: black;
}

.mobile_menu .phone_block {
    padding-top: 10px;


}

.mobile_menu .phone_header,
.mobile_menu .callback_header {
    line-height: 34px;
    height: auto;
}

.megamenu-padding {
    padding: 0 10px 0;
}

.submenu_section_title a {
    text-decoration: none;
    color: inherit;
}


@media (max-width: 991px) {
    .header {
        height: 60px;
    }

    .header_content {
        position: fixed;
        width: 100%;
    }

    .header .bottom_bar {
        padding: 10px 0px;
        height: 60px;
        justify-content: space-between;
        gap: 20px;
    }

    .header .bottom_bar_logo a {
        display: block;
        height: 40px;
        min-width: 170px;
    }

    .mobile_menu.active~header .header_content {
        display: none;
    }

    #mobile_menu_block .mobile_menu_content {
        height: 100%;
    }

    #mobile_menu_block .megamenu-padding {
        height: calc(100% - 70px);
        overflow-y: scroll;
    }

    #mobile_menu_block .megamenu {
        height: auto;
    }

}


/* ===== Мобильный поиск (ТЗ 2.1, макет Figma «Abu-Dhabi»): кнопка в шапке и полноэкранный оверлей ===== */
/* Иконка 20×20 в рамке 24×24, как в макете; нажимаемая область больше — 40×40 */
.header .bottom_bar_icon_btn-area .msearch_open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -4px; /* рамка иконки 24×24 — в 16 px от края экрана, как в макете */
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.header .bottom_bar_icon_btn-area .msearch_open_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.header .bottom_bar_icon_btn-area .msearch_open img {
    width: 20px;
    height: 20px;
    opacity: 1; /* в макете иконка без прозрачности */
}

html.msearch-open,
html.msearch-open body {
    overflow: hidden;
}

.msearch {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #222428;
}

.msearch[hidden] {
    display: none;
}

.msearch_bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(12px + env(safe-area-inset-top)) 8px 12px 16px;
    border-bottom: 1px solid #e4e8f3;
}

/* Поле — компонент Search из макета: «таблетка», рамка #D6DAF1, лупа справа */
.msearch_form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 14px 20px;
    border: 1px solid #d6daf1;
    border-radius: 72px;
    background: #fff;
}

.msearch_form:focus-within {
    border-color: #9295b6;
}

.msearch_icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.msearch_input {
    flex: 1;
    min-width: 0;
    height: 26px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #222428;
    font-family: inherit;
    font-size: 18px; /* в макете 20px на десктопе; меньше 16px нельзя — iOS зумит страницу */
    line-height: 26px;
    -webkit-appearance: none;
    appearance: none;
}

.msearch_input::placeholder {
    color: #9295b6;
    opacity: 1;
}

.msearch_input::-webkit-search-cancel-button {
    display: none;
    -webkit-appearance: none;
}

.msearch_close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: #222428;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.msearch_results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

.msearch_hint,
.msearch_empty {
    padding: 24px 0;
    color: #9295b6;
    font-size: 16px;
    line-height: 24px;
}

.msearch_group {
    padding-top: 18px;
}

.msearch_group_title {
    padding-bottom: 4px;
    color: #9295b6;
    font-family: var(--font-heading, inherit);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.msearch_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e4e8f3;
    color: #222428;
    text-decoration: none;
}

.msearch_item:active {
    background: #f5f6fb;
}

.msearch_item_text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.msearch_item_name {
    font-size: 16px;
    line-height: 22px;
}

.msearch_item_meta {
    color: #9295b6;
    font-size: 13px;
    line-height: 18px;
}

.msearch_item_price {
    flex-shrink: 0;
    color: var(--theme-base-color, #032279);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.msearch_item mark {
    padding: 0;
    background: none;
    color: var(--theme-base-color, #032279);
    font-weight: 600;
}
