/* header.css — стили шапки. Все классы с префиксом css_header_.
   Подключать после colors.css. Шапка липнет к верху страницы. */

.css_header_header {
    background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg-soft) 100%);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-card);
}

.css_header_container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.css_header_logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.css_header_logo {
    height: 42px;
    width: auto;
    display: block;
}

/* Навигация */
.css_header_nav {
    flex-grow: 1;
}

.css_header_list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.css_header_link {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--c-text);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.15s, background 0.15s;
}

.css_header_link:hover {
    color: var(--c-accent);
    background: rgba(56, 189, 248, 0.08);
}

/* Блок справа: корзина и вход */
.css_header_right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.css_header_action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text);
    text-decoration: none;
    font-size: 14px;
    transition: border-color 0.15s, color 0.15s;
}

.css_header_action:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.css_header_action-badge {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--c-accent-dim);
    color: var(--c-accent);
    font-size: 12px;
    text-align: center;
}

/* Кнопка мобильного меню (бургер) */
.css_header_toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.css_header_toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--c-accent);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* Мобильная версия */
@media (max-width: 860px) {
    .css_header_toggle {
        display: flex;
    }

    .css_header_nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .css_header_nav.is-open {
        max-height: 400px;
    }

    .css_header_list {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px;
        gap: 4px;
    }

    .css_header_link {
        padding: 12px 14px;
    }

    /* анимация бургера в крестик */
    .css_header_toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .css_header_toggle.is-open span:nth-child(2) { opacity: 0; }
    .css_header_toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

