.header {
    background-color: var(--text-dark);
    height: 76px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.logo {
    font-size: 26px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo strong { font-weight: 800; }
.nav { display: flex; gap: 35px; }

.nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover, .nav a.active { color: #a7a7a7; }
.header-actions { display: flex; align-items: center; gap: 25px; }

.icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s;
}
.icon-btn:hover { opacity: 0.6; }
.cart-btn { text-decoration: none; }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--accent-beige);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

/* ===== Бургер и мобильное меню ===== */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 16px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    z-index: 1003;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.nav-header-mobile {
    display: none;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

/* КРЕСТИК В ШАПКЕ */
.close-menu {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 1005;
}
.close-menu:hover {
    opacity: 0.6;
}
.close-menu svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* ===== Мобильный хедер ===== */
@media (max-width: 992px) {
    .burger-btn { display: flex; }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 25px 20px;
        gap: 15px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
        transition: right 0.4s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    .nav.active { right: 0; }
    .nav-header-mobile { display: flex; }

    .nav a {
        color: var(--text-dark);
        font-size: 16px;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        transition: color 0.2s ease;
    }

    .nav a.is-touched { color: var(--accent-beige-hover); }
    .nav a.active { color: var(--accent-beige-hover); font-weight: 600; }
}

/* ===== Прижимаем бургер к правому краю ===== */
@media (max-width: 992px) {
    .header-inner {
        gap: 15px;
    }
    .burger-btn {
        margin-left: 10px;   /* небольшой отступ от иконок */
    }
    .header-actions {
        margin-left: auto;   /* иконки прижаты вправо перед бургером */
    }
}