/* Общая настройка - Боттом*/

:root {
    --header-height: 112px;
}

body {
    padding-top: 135px;
}

.header {
    position: fixed;
    top: 0;
    z-index: 250;
    height: 135px;
    width: 100%;
    background-color: #fff;
}

.header .headerBottom {
    padding-top: 0;
    padding-bottom: 0;
}

.header .headerBottom .headerBottom__mainList {
    display: flex;
    justify-content: space-between;
}

.header .headerBottom .headerBottom__mainList > li {
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 12px 0;
    position: relative;
}

.header .headerBottom .headerBottom__mainList .headerBottom__mainListSplit {
    width: 1px;
    height: 34px;
    background-color: var(--gray-500);
    align-self: center;
    margin: 0 5px;
}


.headerBottom__mainLinkContainer {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Ссылка - 1 уровень */

.headerBottom__mainLink.headerBottom__mainLink:has(.headerBottom__mainLink--arrow) {
    display: flex;
    align-items: center;
    gap: 5px;
}

.headerBottom__mainLink .headerBottom__mainLink--arrow {
    background-image: url('/assets/img/header/arrow-bottom.svg');
    width: 14px;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    padding: 8px;
}

/* Подменю ссылки&nbsp;- 2, 3 уровень */

.headerBottom__submenuLink, .headerBottom__subSubLink {
    padding: 8px 10px;
    display: block;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.headerBottom__submenuLink .headerBottom__submenuLink--arrow {
    background-image: url(/assets/img/header/arrow-left.svg);
    margin-left: 10px;
    padding: 8px;
    background-repeat: no-repeat;
    width: 7px;
    height: 13px;
}

/* Настройка подменю */

.headerBottom__submenuLinkContainer:hover, .headerBottom__subSubLink:hover {
    background-color: var(--gray-hover);
}

.headerBottom__submenuLinkContainer:first-child:hover, .headerBottom__subSubLink:first-child:hover {
    border-top-right-radius: var(--border-radius-1);
    border-top-left-radius: var(--border-radius-1);
}

.headerBottom__submenuLinkContainer:last-child:hover, .headerBottom__subSubLink:last-child:hover {
    border-bottom-right-radius: var(--border-radius-1);
    border-bottom-left-radius: var(--border-radius-1);
}

.headerBottom__submenuLinkContainer:hover .headerBottom__submenuLink, .headerBottom__subSubLink:hover a {
    color: var(--gray-hover-text);
}

.headerBottom__submenuLinkContainer {
    position: relative;
}

.submenu, .subsubmenu {
    display: flex;
    opacity: 0;
    visibility: hidden;
    flex-direction: column;
    position: absolute;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-1);
    background-color: #fff;
    z-index: 10;
    max-height: 50vh;
}

.submenu {
    top: calc(100% - 5px);
    left: 0;
}

.subsubmenu {
    left: calc(100% + 1px);
    top: 0;
    max-height: 50vh;
    overflow-y: auto;
}

@media (min-width: 836px) {
    .submenu, .subsubmenu {
        transition: .3s;
    }

    .headerBottom__mainLinkContainer:hover .submenu, .headerBottom__submenuLinkContainer:hover .subsubmenu {
        visibility: visible;
        opacity: 1;
    }
}

body:not(:has(.bigBanner)) main {
    margin-top: 20px;
}

/* Общая настройка - топ */

.headerTop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.headerTop__address, .headerTop__phone {
    display: flex;
    gap: 5px;
    align-items: start;
}

.headerTop__phone {
    text-align: end;
}

.headerTop__address {
    margin-right: auto;
}

.header .socials {
    margin: 0 10px;
}

.header .socials .social__item {
    width: 40px;
    aspect-ratio: 1;
}

.header .socials .social__item img {
    width: 100%;
    height: 100%;
}

.subsubmenu::-webkit-scrollbar {
  width: 13px;
}

.subsubmenu::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 100px;
    border: 4px solid #ffffff;
}

.headerTop__nav, .headerTop__links {
    display: contents;
}

.headerTop__tabletLinks {
    display: none;
}

.burger {
    display: none;
}

.headerBottom__wrapper {
    background-color: var(--gray-200);
    width: 100%;
}

.headerBottom__toBack {
    display: none;
}

.headerBottom__socials {
    display: none;
}

.mobileGroup {
    display: none;
}

@media (max-width: 1279px) {
    body {
        padding-top: 144px;
    }

    .header {
        height: 144px;
    }

    .headerTop {
        flex-direction: column-reverse;
        gap: 0;
        padding: 0;
    }

    .headerTop__nav, .headerTop__links {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 10px 20px;
    }

    .headerTop__nav {
        background-color: var(--gray-300);
        gap: var(--default-gap);
    }

    .headerTop__tabletLinks {
        display: flex;
        margin-right: auto;
        align-items: center;
        gap: 15px;
    }

    .headerTop__linksLine {
        width: 1px;
        height: 20px;
        background: var(--gray-500);
    }

    .header .socials {
        margin: 0 20px;
    }

    .headerTop__address {
        margin-right: 0;
    }

    .headerLogo {
        height: 50px;
        margin-right: 10px;
    }

    .headerTop__icon {
        width: 17px;
    }

    .headerTop__links .button.button--55 {
        min-height: 50px;
        padding: 12px 10px;
    }

    .burger {
        width: 50px;
        min-width: 50px;
        aspect-ratio: 1;
        border-radius: var(--border-radius-1);
        background-color: var(--yellow-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 12px;
        cursor: pointer;
        gap: 5px;
    }

    .burger__container {
        margin-left: auto;
    }

    .headerBottom__wrapper {
        background-color: white;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }

    .headerBottom__wrapper.headerBottom__wrapper--active {
        display: flex;
    }

    .headerBottom {
        width: 100%;
    }
}

@media (max-width: 835px) {
    .header {
        height: var(--header-height);
    }

    body {
        padding-top: var(--header-height);
    }

    .headerTop__links {
        display: none;
    }

    .headerTop__nav {
        display: grid;
        grid-template-columns: 1fr max-content;
        gap: 0;
        background-color: var(--gray-200);
        padding: 0;
    }

    .headerTop__nav > * {
        padding: 8px 10px;
    }

    .headerTop__address {
        order: -2;
        font-size: 13px;
    }

    .headerTop__address .b3-tablet {
        font-size: 13px;
    }

    .headerTop__phone {
        order: -1;
    }

    .headerTop__address, .headerTop__phone {
        background-color: #fff;
        width: 100%;
        height: 100%;
        gap: 4px;
        align-items: center;
    }

    .burder {
        width: 40px;
        min-width: 40px;
    }

    .headerLogo {
        width: 150px;
        height: auto;
    }

    .headerBottom {
        position: fixed;
        top: var(--header-height);
        height: calc(100% - var(--header-height));
        width: 100%;
        background-color: var(--gray-200);
    }

    .header .headerBottom .headerBottom__mainList {
        flex-direction: column;
        justify-content: start;
    }

    .header .headerBottom .headerBottom__mainList .headerBottom__mainListSplit {
        height: 1px;
        width: 100%;
        padding: 0;
        background-color: var(--gray-300);
        display: block !important;
    }

    header .headerBottom .headerBottom__mainList .headerBottom__li {
        display: block !important;
        width: 100%;
    }

    .headerBottom__mainLink {
        width: 100%;
        display: flex;
        gap: 5px;
    }

    .headerBottom__mainLink .headerBottom__mainLink--arrow {
        margin-left: auto;
        background-image: url(/assets/img/icons/arrow.svg);
    }

    .headerBottom__mainLinkContainer {
        display: flex;
        gap: 5px;
        align-items: center;
    }

    .headerBottom__mainLinkContainer > .group {
        display: none;
    }

    .headerBottom__mainLinkContainer .mobileGroup {
        display: block;
        font-size: 17px;
        font-weight: 500;
        color: var(--text-color);
    }

    .headerBottom__socials {
        display: block;
    }

    .headerBottom__socials .socials {
        margin: 20px 0 10px;
    }

    .modal {
        padding: 20px;
    }

    .submenu, .subsubmenu {
        border-radius: 0;
        background: var(--gray-200);
        position: fixed;
        width: 100%;
        height: calc(100% - var(--header-height));
        top: var(--header-height);
        left: 0;
        max-height: 100%;
    }

    .headerBottom__submenuLink, .headerBottom__subSubLink {
        padding: 12px 10px;
    }

    .headerBottom__mainList .headerBottom__li:last-child, .headerBottom__submenuLink, .headerBottom__subSubLink {
        border-bottom: 1px solid var(--gray-300);
    }

    .headerBottom__toBack {
        display: flex;
        align-items: center;
        color: var(--yellow-color);
        padding: 20px 10px 12px;
        font-size: 17px;
        gap: 10px;
    }

    .headerBottom__toBack::before {
        content: '';
        background-color: var(--yellow-color);
        mask: url(/assets/img/icons/arrow.svg);
        -webkit-mask: url(/assets/img/icons/arrow.svg);
        rotate: 180deg;
        width: 7px;
        height: 13px;
    }

    .menu--active.submenu, .subsubmenu.menu--active {
        visibility: visible;
        opacity: 1;
    }
}