@media (max-width: 991px) {
    .header > .container {
        height: 67px !important;
    }

    .header .logo img {
        margin-block: 14px;
    }

    .header .navbar-toggle {
        margin-top: 16px;
    }

    .header .header_lang_select--mobile {
        margin-top: 14px;
    }

    .header-fixed .header + .main-container {
        padding-top: 71px !important;
    }
}

@media (min-width: 992px) {
    .header:not(.header-fixed-shrink) > .container {
        height: 67px !important;
    }

    .header:not(.header-fixed-shrink) .logo img {
        margin-top: 8px;
    }

    .header-fixed .header:not(.header-fixed-shrink) + .main-container {
        padding-top: 106px;
    }

    .header-fixed .header.header-fixed-shrink .navbar-nav > li > a {
        padding-block: 15px;
    }

    .header-fixed .header.header-fixed-shrink .nav > li > .search {
        padding-block: 16px 18px;
    }

    .header.header-fixed-shrink .header_lang_select {
        margin-top: 14px;
    }

    .header-fixed .header.header-fixed-shrink .nav .search-open {
        top: 52px;
    }

    .header.header-fixed-shrink .b_top_main_menu_dropdown {
        top: 100%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .header:not(.header-fixed-shrink) .logo img {
        margin-top: 14px;
    }
}

/* Shared by the Russian and English site headers. */
.header-fixed .wrapper > .header.header-sticky {
    background-color: rgba(255, 255, 255, .82);
    border-bottom-color: rgba(60, 60, 60, .12);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: margin .2s ease, background-color .18s ease;
}

.header-fixed .wrapper > .header.header-fixed-shrink {
    background-color: rgba(255, 255, 255, .92);
}

.header-sticky > .topbar-v1 {
    background-color: #fff;
}

.header-fixed .header.header-sticky .nav > li > .search-btn {
    position: relative;
    background: transparent;
    border-color: transparent;
    color: #41474b;
}

.header-fixed .header.header-sticky .nav > li > .search-btn:hover {
    color: #202427;
}

/* Preserve the theme's hit area in both header sizes. */
.header-sticky .search-btn::before {
    visibility: hidden;
}

.header-sticky .search-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask: var(--search-icon) center / contain no-repeat;
}

.header-sticky .search-btn.fa-search {
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");
}

.header-sticky .search-btn.fa-times {
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E");
}

.header-sticky .header_lang_select__lang {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.header.header-sticky .header_lang_select__lang img {
    width: 22px;
    height: auto;
    opacity: .75;
    filter: saturate(.65);
}

.header.header-sticky .header_lang_select__lang:is(:hover, :focus-visible) img {
    opacity: 1;
    filter: none;
}

@media (min-width: 992px) {
    .header-fixed .wrapper {
        --home-contact-height: 36px;
        --header-control-width: 40px;
        --header-control-gap: 2px;
    }

    .header .navbar-nav > li:not(.active) > a:where(:not(:hover, :focus)),
    .header .top-v1-contacts a:where(:not(:hover, :focus)) {
        color: #41474b;
    }

    .header .navbar-collapse > .container {
        display: flex;
        flex-direction: row-reverse;
        align-items: stretch;
    }

    .header .navbar-collapse > .container::before,
    .header .navbar-collapse > .container::after {
        display: none;
    }

    .header.header-sticky .navbar-collapse .header_lang_select {
        /* The theme's mobile helper still hides this control at exactly 992px. */
        display: block !important;
        width: var(--header-control-width);
        min-height: 40px;
        height: auto;
        margin: 0 0 0 var(--header-control-gap);
    }

    .header .navbar-collapse .nav:has(> li > .search-btn),
    .header .navbar-collapse .nav > li:has(> .search-btn) {
        display: flex;
    }

    .header .navbar-collapse :is(.sale_basket_small__pc, .header_icon_favcomp_block) {
        order: 1;
    }

    .header .navbar-collapse .navbar-nav:not(:has(.search-btn)) {
        order: 2;
    }

    .header-fixed .header.header-sticky .nav > li > .search-btn {
        width: var(--header-control-width);
        padding: 0;
        border: 0;
        bottom: auto;
    }
}

.header-fixed .wrapper > .kredo-home:has(> .alpha-wrap:first-child > #alpha-slider) {
    padding-top: var(--home-contact-height, 0px) !important;
}

/* Keep the slide controls behind the header and its open menus. */
.kredo-home > .alpha-wrap:first-child {
    isolation: isolate;
    --caption-inset: calc(92px - var(--home-contact-height, 0px));
}

.kredo-home #alpha-slider {
    /* The template also writes a height inline after the images load. */
    height: clamp(368px, 50vw, max(500px, 40vw)) !important;
    max-height: none;
}

.kredo-home #alpha-slider .alpha-caption {
    padding-top: var(--caption-inset);
    padding-bottom: 36px;
}

@media (max-width: 991px) {
    .header .nav > li > .search-btn:hover {
        color: #202427 !important;
    }

    .kredo-home > .alpha-wrap:first-child {
        --caption-inset: 76px;
    }

    .header .navbar-collapse.in,
    .header .navbar-collapse.collapsing {
        background-color: #fff;
    }
}

@media (max-width: 767px) {
    .kredo-home #alpha-slider .alpha-caption {
        padding-bottom: 8px;
    }
}
