header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 100px;
    background-color: transparent;
}

/* Логотип */
header .logo {
    width: 100px;
    height: 100px;
}

/* Навигация */
header nav {
    display: flex;
    gap: 35px;
}

header nav a {
    color: rgba(52, 52, 52, 1);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: rgba(52, 52, 52, 1);
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

/* Боковое меню */
header .side-block {
    display: flex;
    align-items: center;
    gap: 25px;
}

header .side-block .phone-number {
    display: flex;
    align-items: center;
    gap: 5px;
}

header .side-block .phone-number img {
    width: 20px;
    height: 20px;
}

header .side-block .phone-number span {
    color: rgba(29, 43, 79, 1);
    font-size: 18px;
    font-weight: 550;
}

header .side-block .cart {
    background-color: rgba(29, 43, 79, 1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

header .side-block .cart:hover {
    background-color: rgba(29, 43, 79, 0.85);
}

header .side-block .cart img {
    width: 16px;
    height: 16px;
}

header .side-block .cart span {
    color: rgba(255, 255, 255, 1);
    font-size: 16px;
    font-weight: 550;
}

header .side-block .cart .cart-count {
    background-color: rgba(244, 180, 0, 1);
    color: rgba(29, 43, 79, 1);
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
}

/* Переключатель языка */
header .side-block .language {
    display: flex;
    align-items: center;
    gap: 8px;
}

header .side-block .language a {
    color: rgba(80, 90, 110, 0.6);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

header .side-block .language a:hover {
    color: rgba(29, 43, 79, 1);
}

header .side-block .language a.active {
    color: rgba(29, 43, 79, 1);
    font-weight: 700;
}

header .side-block .language span {
    width: 1px;
    height: 14px;
    background-color: rgba(199, 209, 220, 1);
}

/* Бургер и мобильные элементы шапки */
header .left-block {
    display: none;
    align-items: center;
    gap: 15px;
}

header .left-block .burger {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background-color: rgba(29, 43, 79, 1);
    border: none;
    border-radius: 8px;
}

header .left-block .burger span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background-color: #ffffff;
}

header .left-block .phone-mobile img {
    width: 26px;
    height: 26px;
    display: block;
}

/* Мобильное меню */
header .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 98;
    background-color: rgba(29, 43, 79, 0.4);
}

header .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 440px;
    height: 100%;
    z-index: 99;
    background-color: rgba(29, 43, 79, 1);
    padding: 25px 30px;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

header .mobile-menu.open {
    transform: translateX(0);
}

header .mobile-menu .close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    padding: 0;
}

header .mobile-menu .language {
    position: relative;
    padding: 25px 0 15px 0;
}

header .mobile-menu .language .language-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
}

header .mobile-menu .language .language-button img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

header .mobile-menu .language.open .language-button img {
    transform: rotate(180deg);
}

header .mobile-menu .language .language-list {
    position: absolute;
    top: calc(100% - 8px);
    left: 0;
    z-index: 5;
    min-width: 90px;
    background-color: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

header .mobile-menu .language .language-list a {
    display: block;
    padding: 10px 16px;
    color: rgba(29, 43, 79, 1);
    font-size: 17px;
}

header .mobile-menu .language .language-list a.active {
    background-color: rgba(240, 243, 249, 1);
    font-weight: 700;
}

header .mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

header .mobile-menu nav a {
    color: #ffffff;
    font-size: 20px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

header .mobile-menu h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding: 40px 0 20px 0;
}

header .mobile-menu .contacts a,
header .mobile-menu .contacts div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    color: #ffffff;
    font-size: 16px;
}

header .mobile-menu .contacts img {
    width: 18px;
    height: 18px;
}

body.menu-open {
    overflow: hidden;
}

/* Адаптация шапки */
@media (max-width: 1440px) {
    header {
        padding: 15px 60px;
    }

    header nav {
        gap: 25px;
    }
}

@media (max-width: 1240px) {
    header {
        padding: 15px 40px;
    }

    header nav a {
        font-size: 16px;
    }

    header .side-block {
        gap: 15px;
    }

    header .side-block .phone-number span {
        font-size: 16px;
    }

    header .logo {
        width: 85px;
        height: 85px;
    }
}

@media (max-width: 1024px) {
    header {
        position: relative;
        background-color: #ffffff;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(233, 236, 243, 1);
    }

    header nav,
    header .side-block .language,
    header .side-block .phone-number {
        display: none;
    }

    header .left-block {
        display: flex;
    }

    header .logo {
        width: 62px;
        height: 62px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 16px;
    }

    header .logo {
        width: 52px;
        height: 52px;
    }

    header .side-block .cart {
        padding: 8px 12px;
    }

    header .side-block .cart span {
        font-size: 14px;
    }

    header .mobile-menu {
        padding: 20px 24px;
    }
}

@media (max-width: 360px) {
    header .left-block {
        gap: 10px;
    }

    header .side-block .cart span {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    header .side-block .cart span {
        display: none;
    }

    header .side-block .cart span.cart-count {
        display: inline-block;
    }

    header .logo {
        width: 46px;
        height: 46px;
    }
}

@media (min-width: 1680px) {
    header {
        padding-left: 12%;
        padding-right: 12%;
    }
}

header .side-block .cart span.cart-count[hidden] {
    display: none;
}
