
/* =========================================================
   HEADER V2
   Балтийский лизинг — новая навигация
========================================================= */

/* =========================================================
   1. DESKTOP — ОСНОВНАЯ СЕТКА
========================================================= */

.header--v2 .header__main {
    display: grid;

    grid-template-columns:
        220px
        minmax(0, 1fr)
        auto;

    grid-template-areas:
        "logo search actions"
        "catalog nav nav";

    column-gap: 24px;
    row-gap: 0;

    align-items: center;

    min-height: 0;

    padding-top: 16px;
    padding-bottom: 0;
}

/* =========================================================
   2. ЛОГОТИП
========================================================= */

.header--v2 .header__logo {
    grid-area: logo;
    margin: 0;
}

.header--v2 .header__logo img {
    display: block;
    max-width: 100%;
}

/* =========================================================
   3. ПОИСК
========================================================= */

.header--v2 .header-search-wrap {
    grid-area: search;

    width: 100%;
    min-width: 0;
    max-width: none;
}

.header--v2 .header-search-toggle,
.header--v2 .header-search {
    width: 100%;
}

/* =========================================================
   4. КАТАЛОГ
========================================================= */

.header--v2 .header-catalog-wrap {
    grid-area: catalog;

    padding: 12px 0;
}

.header--v2 .header-catalog {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 44px;

    gap: 10px;

    border: 1px solid #0134ff;
    border-radius: 12px;

    background: #0134ff;
    color: #ffffff;

    font-weight: 700;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.header--v2 .header-catalog:hover,
.header--v2 .header-catalog[aria-expanded="true"] {
    background: #0028cc;
    border-color: #0028cc;
    color: #ffffff;
}

/* Активная страница каталога */

.header--v2 .header-catalog.is-active {
    background: #0034ff;
    border-color: #0034ff;
    color: #ffffff;
}

/* =========================================================
   5. ДЕЙСТВИЯ СПРАВА
========================================================= */

.header--v2 .header__actions {
    grid-area: actions;

    display: flex;
    align-items: center;

    justify-self: end;

    gap: 16px;
}

/* Убираем игру «Шашки» */

.header--v2 .header-game-link {
    display: none !important;
}

/* =========================================================
   6. ОСНОВНАЯ НАВИГАЦИЯ
========================================================= */

.header--v2 .header-v2__nav {
    grid-area: nav;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: clamp(10px, 1.5vw, 22px);

    min-width: 0;

    padding: 12px 0;
}

/* Обычные пункты меню */

.header--v2 .header-v2__nav a,
.header--v2 .header-v2__soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 42px;

    padding: 0 15px;

    border-radius: 11px;

    white-space: nowrap;

    color: #182033;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}

/* Иконки пунктов */

.header--v2 .header-v2__nav svg {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;
}

/* Состояние обычного пункта */

.header--v2 .header-v2__nav a {
    position: relative;

    background: transparent;

    transition:
        background-color .2s ease,
        color .2s ease;
}

/* Наведение */

.header--v2 .header-v2__nav a:hover {
    background: #f5f7ff;
    color: #0134ff;
}

/* =========================================================
   7. АКТИВНЫЙ ПУНКТ НАВИГАЦИИ
========================================================= */

.header--v2 .header-v2__nav a.is-active,
.header--v2 .header-v2__nav a[aria-current="page"] {
    background: #edf2ff;
    color: #0134ff;

    font-weight: 700;
}

/* Убираем нижнее подчёркивание */

.header--v2 .header-v2__nav a.is-active::after,
.header--v2 .header-v2__nav a[aria-current="page"]::after {
    content: none;
    display: none;
}

/* Активный пункт при наведении */

.header--v2 .header-v2__nav a.is-active:hover,
.header--v2 .header-v2__nav a[aria-current="page"]:hover {
    background: #e5edff;
    color: #0134ff;
}

/* =========================================================
   8. БУДУЩИЕ РАЗДЕЛЫ
========================================================= */

.header--v2 .header-v2__soon {
    color: #9aa5b5;
    cursor: default;
}

.header--v2 .header-v2__soon small {
    padding: 3px 6px;

    border-radius: 5px;

    background: #f1f5f9;
    color: #94a3b8;

    font-size: 10px;
    font-weight: 600;
}

/* =========================================================
   9. ЛИЧНЫЙ КАБИНЕТ
========================================================= */

.header--v2 .header-v2__account {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: #64748b;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;

    cursor: default;
}

.header--v2 .header-v2__account svg {
    width: 21px;
    height: 21px;

    flex-shrink: 0;
}

/* =========================================================
   10. МОБИЛЬНЫЕ ССЫЛКИ
========================================================= */

/* На компьютере скрыты */

.header--v2 .header-v2__mobile-links {
    display: none;
}

/* =========================================================
   11. СОХРАНЯЕМ СЕМАНТИКУ HIDDEN
========================================================= */

.header--v2 [hidden] {
    display: none !important;
}

/* =========================================================
   12. TABLET / MOBILE — ДО 900 PX
========================================================= */

@media (max-width: 900px) {

    /* Основная сетка */

    .header--v2 .header__main {
        grid-template-columns:
            minmax(0, 1fr)
            auto
            auto;

        grid-template-areas:
            "logo actions catalog"
            "search search search";

        column-gap: 10px;
        row-gap: 12px;

        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Логотип */

    .header--v2 .header__logo {
        min-width: 0;
    }

    .header--v2 .header__logo img {
        max-width: 100%;
        height: 28px;
    }

    /* Действия */

    .header--v2 .header__actions {
        justify-self: end;
        gap: 6px;
    }

    /* Каталог */

    .header--v2 .header-catalog-wrap {
        padding: 0;
    }

    .header--v2 .header-catalog {
        width: 44px;
        height: 44px;

        padding: 0;
    }

    .header--v2 .header-catalog > span,
    .header--v2 .header-catalog__arrow {
        display: none;
    }

    /* Десктопное меню скрываем */

    .header--v2 .header-v2__nav {
        display: none;
    }

    /* Поиск */

    .header--v2 .header-search-wrap {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .header--v2 .header-search-toggle {
        width: 100%;
        height: 44px;

        justify-content: flex-start;

        padding: 0 15px;
    }

    .header--v2 .header-search-toggle span {
        display: inline;
    }

    .header--v2 .header-search {
        width: 100%;
    }

    /* Выпадающий каталог */

    .header--v2 .header-catalog-menu {
        z-index: 1100;
        top: calc(100% + 8px);

        max-height: calc(100dvh - 145px);

        overflow-y: auto;

        overscroll-behavior: contain;
    }

    /* Личный кабинет */

    .header--v2 .header-v2__account {
        flex-direction: column;
        justify-content: center;

        gap: 2px;

        font-size: 10px;
    }

    .header--v2 .header-v2__account svg {
        width: 21px;
        height: 21px;
    }

    /* =====================================================
       МОБИЛЬНЫЕ РАЗДЕЛЫ
    ===================================================== */

    .header--v2 .header-v2__mobile-links {
        display: flex;
        flex-direction: column;

        gap: 4px;

        margin-top: 16px;
        padding-top: 16px;

        border-top: 1px solid #e2e8f0;
    }

    /* Заголовок группы */

    .header--v2 .header-v2__mobile-heading {
        padding: 0 10px 8px;

        color: #94a3b8;

        font-size: 10px;
        font-weight: 800;

        letter-spacing: .1em;
    }

    /* Ссылки */

    .header--v2 .header-v2__mobile-links > a,
    .header--v2 .header-v2__mobile-soon {
        display: flex;
        align-items: center;

        gap: 12px;

        min-height: 46px;

        padding: 10px 12px;

        border-radius: 10px;

        color: #334155;

        font-size: 13px;
        font-weight: 600;

        text-decoration: none;
    }

    .header--v2 .header-v2__mobile-links > a span,
    .header--v2 .header-v2__mobile-soon span {
        flex: 1;
    }

    /* Иконки */

    .header--v2 .header-v2__mobile-links svg {
        width: 18px;
        height: 18px;

        flex-shrink: 0;
    }

    /* Hover */

    .header--v2 .header-v2__mobile-links > a:hover {
        background: #f5f7ff;
        color: #0134ff;
    }

    /* Активный пункт */

    .header--v2 .header-v2__mobile-links > a.is-active,
    .header--v2 .header-v2__mobile-links > a[aria-current="page"] {
        background: #edf2ff;
        color: #0134ff;

        font-weight: 700;
    }

    /* Будущие разделы */

    .header--v2 .header-v2__mobile-soon {
        color: #94a3b8;
        cursor: default;
    }

    .header--v2 .header-v2__mobile-soon small {
        font-size: 11px;
        font-weight: 500;
    }
}

/* =========================================================
   13. MOBILE — ДО 767 PX
========================================================= */

@media (max-width: 767px) {

    .header--v2 .header__main {
        column-gap: 8px;
        row-gap: 10px;
    }

    /* Логотип */

    .header--v2 .header__logo img {
        height: 26px;
    }

    /* Выпадающее меню */

    .header--v2 .header-catalog-menu {
        position: fixed;

        top: 120px;
        left: 14px;
        right: 14px;

        width: auto;
        max-width: none;
    }
}

/* =========================================================
   14. ACCESSIBILITY
========================================================= */

.header--v2 .header-v2__nav a:focus-visible,
.header--v2 .header-v2__mobile-links > a:focus-visible,
.header--v2 .header-catalog:focus-visible {
    outline: 2px solid #0134ff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .header--v2 .header-v2__nav a,
    .header--v2 .header-catalog {
        transition: none;
    }
}
