/* =======================================================
   HEADER
======================================================= */

.site-header {
    position: relative;
    z-index: 100;
    margin: 10px 0 5px;
    font-family: Inter, sans-serif;
}

.header-container {
    max-width: 1400px;
    margin: auto;
    height: 80px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(180deg, #07111f, #0c1930);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

/* =======================================================
   LOGO
======================================================= */

.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.header-logo img {
    width: 48px;
    height: auto;
}

.header-logo span {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
}

/* =======================================================
   MENU
======================================================= */

.header-nav {
    display: flex;
    gap: 26px;
}

.header-nav a {
    color: #dbe8ff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: .25s;
}

.header-nav a:hover {
    color: #fff;
}

/* =======================================================
   SEARCH
======================================================= */

.header-search {
    flex: 1;
}

.header-search form {
    position: relative;
}

.header-search input {
    width: 100%;
    height: 46px;
    border: none;
    outline: none;
    border-radius: 12px;
    padding: 0 48px 0 18px;
    background: #142540;
    color: #fff;
    font-size: 14px;
}

.header-search input::placeholder {
    color: #8fa5c8;
}

.header-search button {
    position: absolute;
    right: 0;
    top: 0;
    width: 46px;
    height: 46px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search img {
    width: 18px;
    height: 18px;
    filter: invert(1) brightness(100%);
    transition: .25s;
}

/* =======================================================
   ACTIONS
======================================================= */

.header-actions {
    display: flex;
    gap: 20px;
}

.header-action {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #dbe8ff;
    font-size: 12px;
    font-weight: 600;
    transition: .25s;
}

.header-action img {
    width: 22px;
    height: 22px;
    filter: brightness(0) saturate(100%) invert(1);   /* ← чисто белый */
    transition: .25s;
}

.header-action:hover {
    color: #fff;
}

.header-action:hover img {
    transform: translateY(-2px);
}

#headerFavBtn.has-items img {
    filter: none;
}

.compare-counter {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    background: #2f7bff;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-counter {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    background: #2f7bff;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =======================================================
   BURGER
======================================================= */

.header-burger {
    display: none;
    margin-left: auto;
}

/* =======================================================
   OVERLAY (изначально скрыт везде)
======================================================= */

.header-overlay {
    display: none;           /* скрыт на десктопе */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 200;
}

.header-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.header-drawer {
    position: absolute;
    right: 0;
    top: 0;
    width: 290px;
    height: 100%;
    background: #091423;
    padding: 90px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform: translateX(100%);
    transition: transform .3s;
}

.header-overlay.active .header-drawer {
    transform: translateX(0);
}

.header-drawer a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

/* =======================================================
   MOBILE
======================================================= */

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }
}

@media (max-width: 950px) {
    .header-nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .header-burger {
        display: flex;
        width: 46px;
        height: 46px;
        border: none;
        background: rgba(255, 255, 255, .08);
        border-radius: 12px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .header-burger span {
        width: 22px;
        height: 2px;
        background: #fff;
        transition: .3s;
    }

    .header-burger.active span:nth-child(1) {
        transform: rotate(45deg) translateY(5px);
    }

    .header-burger.active span:nth-child(2) {
        opacity: 0;
    }

    .header-burger.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-5px);
    }

    /* На мобильных показываем оверлей */
    .header-overlay {
        display: block;
    }
    
    .header-drawer .header-action {
    align-items: flex-start;
    }
    
    .header-drawer .header-action {
    margin-bottom: 15px; /* или больше */
    }
    
    .header-drawer .header-action:last-child {
    margin-bottom: 0;
    }
}