.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    color: #111111;
    border-bottom: 1px solid #e8e8e8;
}

.header__main {
    background: #ffffff;
}

.header__main-row {
    display: flex;
    align-items: center;
    min-height: 72px;
    gap: 28px;
}

.header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header__logo img {
    height: 62px;
    width: auto;
    display: block;
}

.header__nav {
    flex: 1;
}

.nav__list {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__list a {
    display: block;
    padding: 8px 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
    text-decoration: none;
    white-space: nowrap;
}

.nav__list a:hover,
.nav__list a.active {
    color: var(--color-primary);
}

.header__actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.header__search-btn {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #111111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__search-btn:hover {
    color: var(--color-primary);
}
.header__search {
    display: block;
    background: #ffffff;
    padding: 0 0 18px 0;
}

.search-form {
    display: flex;
    align-items: center;
    max-width: 620px;
    gap: 0;
}

.search-form input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    background: #ffffff;
    color: #111111;
    border: 1px solid #dddddd;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.search-form button {
    height: 44px;
    min-width: 90px;
    padding: 0 18px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-weight: 700;
    cursor: pointer;
}

.mobile-menu,
.mobile-menu__overlay,
.header__menu-btn {
    display: none !important;
}

@media (max-width: 1024px) {
    .header__nav {
        display: none;
    }

    .header__logo img {
        height: 54px;
    }

    .header__main-row {
        min-height: 66px;
    }
}

/* ============================================
   Mobile fix: убираем горизонтальный скролл хедера
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.header,
.header__main,
.header__main-row {
    max-width: 100%;
}

/* Планшеты: ужимаем меню, пока оно ещё видно */
@media (max-width: 1280px) {
    .header__main-row {
        gap: 18px;
    }

    .nav__list {
        gap: 16px;
    }

    .nav__list a {
        font-size: 18px;
    }

    .header-inline-search input {
        width: 170px;
    }
}

/* Мобильная версия: меню убираем, поиск остаётся */
@media (max-width: 768px) {
    .header__main-row {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 64px;
        width: 100%;
    }

    .header__nav {
        display: none !important;
    }

    .header__logo {
        flex: 0 0 auto;
    }

    .header__logo img {
        height: 34px;
        max-width: 92px;
        width: auto;
    }

    .header-inline-search {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        height: 38px;
    }

    .header-inline-search input {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: 100%;
        font-size: 13px;
        padding: 0 10px;
    }

    .header-inline-search button {
        flex: 0 0 auto;
        padding: 0 10px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Очень узкие экраны */
@media (max-width: 420px) {
    .header__main-row {
        gap: 8px;
    }

    .header__logo img {
        height: 28px;
        max-width: 78px;
    }

    .header-inline-search {
        height: 36px;
    }

    .header-inline-search input {
        font-size: 12px;
        padding: 0 8px;
    }

    .header-inline-search button {
        padding: 0 8px;
        font-size: 12px;
    }
}