/* Исправление шапки комплекct.html */

/* Логотип больше не ломается из-за SVG-фильтра */
#global-header img[src*="logo.png"] {
    display: block;
    width: auto;
    height: 100%;
    object-fit: contain;
    filter: none !important;
}

/* Единая широкая шапка */
#global-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

#global-header > div {
    max-width: 1440px !important;
    min-height: 76px;
    overflow: visible !important;
    gap: 24px !important;
}

/* Логотип */
#global-header > div > a:first-of-type {
    flex: 0 0 auto !important;
    min-width: 220px;
    white-space: nowrap;
}

#global-header > div > a:first-of-type span {
    color: #fff !important;
    white-space: nowrap;
}

/* Основное меню: не сжимается и не переносится */
#global-header nav.hidden.lg\\:flex {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 18px !important;
    white-space: nowrap !important;
}

#global-header nav.hidden.lg\\:flex > a,
#global-header nav.hidden.lg\\:flex > .group > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    flex: 0 0 auto !important;
}

/* Нормативная документация остаётся в одну строку */
#global-header nav.hidden.lg\\:flex > a[href="normativdoc.html"] {
    max-width: none !important;
    white-space: nowrap !important;
}

/* Телефон и корзина не сжимаются */
#global-header > div > div:last-child {
    flex: 0 0 auto !important;
    min-width: 220px;
    justify-content: flex-end;
    white-space: nowrap;
}

#global-header > div > div:last-child > .group > button {
    white-space: nowrap !important;
    font-size: 13px !important;
}

/* Выпадающие меню */
#global-header .megamenu-transition,
#global-header #contacts-dropdown {
    z-index: 10050 !important;
    white-space: normal !important;
}

/* Средние экраны: немного уменьшаем интервалы */
@media (min-width: 1024px) and (max-width: 1350px) {
    #global-header > div {
        gap: 12px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    #global-header > div > a:first-of-type {
        min-width: 185px;
    }

    #global-header nav.hidden.lg\\:flex {
        gap: 10px !important;
    }

    #global-header nav.hidden.lg\\:flex > a,
    #global-header nav.hidden.lg\\:flex > .group > button {
        font-size: 10px !important;
    }

    #global-header > div > div:last-child {
        min-width: 190px;
    }

    #global-header > div > div:last-child > .group > button {
        font-size: 11px !important;
    }
}

/* На телефоне шапка не влияет на мобильное меню */
@media (max-width: 1023px) {
    #global-header > div {
        min-height: 64px;
    }

    #global-header > div > a:first-of-type {
        min-width: 0;
    }

    #global-header > div > div:last-child {
        min-width: 0;
    }
}
