.mobile-header__actions,
.mobile-header__catalog,
.mobile-header__messengers,
.mobile-header__dialog {
    display: none;
}

@media (max-width: 768px) {
    #site-header {
        background: #fff;
    }

    #site-header .header-container {
        padding: 0;
    }

    #site-header .header-container > .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    #site-header .header-block {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        margin: 0;
        border-bottom: 1px solid #e4e0df;
    }

    #site-header .header-block > .header__burger,
    #site-header .header-block > .headers-block > .header-top,
    #site-header .header-block .header-bottom > .header-feedback,
    #site-header .header-container > .header-menu__block,
    #site-header > .header-menu__block {
        display: none;
    }

    #site-header .header-block > .menu:not(.open) {
        visibility: hidden;
    }

    #site-header .header-block > .header-logo {
        position: static;
        margin: 10px 0 10px 16px;
        justify-self: start;
    }

    #site-header .header-block > .header-logo a {
        display: block;
    }

    #site-header .header-block > .header-logo img {
        display: block;
        width: 93px;
        height: auto;
    }

    #site-header .mobile-header__actions {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-right: 16px;
        font-family: Arial, sans-serif;
    }

    .mobile-header__contact {
        display: grid;
        justify-items: end;
    }

    #site-header .mobile-header__phone {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 28px;
        color: #181818;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile-header__phone::after {
        content: "";
        width: 6px;
        height: 6px;
        box-sizing: border-box;
        border: solid currentColor;
        border-width: 0 1px 1px 0;
        transform: translateY(-2px) rotate(45deg);
    }

    #site-header .mobile-header__contacts {
        display: block;
        padding: 2px 0 4px;
        color: #a90000;
        font-size: 12px;
        line-height: 16px;
    }

    #site-header .header-block .mobile-header__menu {
        display: grid;
        place-items: center;
        box-sizing: border-box;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        background: #fff;
        border: 1px solid #e4e0df;
        border-radius: 7px;
        color: #181818;
        cursor: pointer;
    }

    .mobile-header__menu::before,
    .mobile-header__catalog::before {
        content: "";
        width: 17px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        box-shadow: 0 -5px currentColor, 0 5px currentColor;
    }

    #site-header .header-block > .headers-block {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        padding: 0 16px 12px;
    }

    #site-header .header-block .header-bottom {
        position: relative;
        display: flex;
        flex-direction: row;
        gap: 8px;
        margin: 0;
        width: 100%;
    }

    #site-header .mobile-header__catalog {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        gap: 7px;
        height: 44px;
        padding: 0 13px;
        border-radius: 7px;
        background: #c00;
        color: white;
        font: 700 13px/1 Arial, sans-serif;
    }

    #site-header .header-bottom > noindex {
        display: block;
        flex: 1;
        min-width: 0;
    }

    #site-header .header-bottom .header-search {
        width: 100%;
        margin: 0;
    }

    #site-header .header-bottom .search {
        position: static;
        box-sizing: border-box;
        width: 100%;
        height: 44px;
        margin: 0;
        border: 1px solid #e1dddd;
        border-radius: 7px;
        background: #f7f6f5;
    }

    #site-header .header-bottom .search__input {
        min-width: 0;
        flex: 1;
        width: 0;
        height: 100%;
        padding: 0 0 0 12px;
        font-size: 14px;
        color: #181818;
        background: transparent;
    }

    #site-header .header-bottom .search__input::placeholder {
        color: #595959;
    }

    #site-header .header-bottom .search__button {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
    }

    #site-header .header-bottom .search__button img {
        width: 19px;
        height: 19px;
        object-fit: contain;
        filter: brightness(.18);
    }

    #site-header .header-bottom .search__suggest {
        width: 100%;
        left: 0;
    }

    #site-header .mobile-header__messengers {
        display: flex;
        grid-column: 1 / -1;
        background: #f7f5f4;
        border-top: 1px solid #e4e0df;
    }

    #site-header .mobile-header__messenger {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 44px;
        color: #181818;
        font: 700 13px/1 Arial, sans-serif;
    }

    .mobile-header__messenger + .mobile-header__messenger {
        border-left: 1px solid #e4e0df;
    }

    .mobile-header__messenger img {
        width: 23px;
        height: 23px;
    }

    .mobile-header__messenger::after {
        content: attr(aria-label);
    }

    #site-header .mobile-header__dialog[open] {
        display: block;
        box-sizing: border-box;
        position: fixed;
        inset: 0;
        width: min(320px, calc(100% - 32px));
        max-width: none;
        margin: auto;
        padding: 18px;
        border: 1px solid #e4e0df;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 16px 56px #1818183d;
        color: #181818;
        font-family: Arial, sans-serif;
    }

    .mobile-header__dialog::backdrop {
        background: #18181860;
    }

    .mobile-header__dialog-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 9px;
    }

    .mobile-header__dialog-title {
        font-size: 19px;
    }

    .mobile-header__dialog-close {
        background: #f5f2f1;
        border: 0;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        padding: 0;
        color: #343030;
        font: 24px/1 Arial, sans-serif;
        cursor: pointer;
    }

    #site-header .mobile-header__call {
        display: grid;
        grid-template-columns: 19px 1fr;
        align-items: center;
        column-gap: 10px;
        padding: 10px 12px;
        border: 1px solid #e8e2df;
        border-radius: 8px;
        color: #181818;
        text-decoration: none;
    }

    .mobile-header__call + .mobile-header__call {
        margin-top: 7px;
    }

    .mobile-header__call img {
        grid-row: span 2;
    }

    .mobile-header__call span {
        font-size: 12px;
        color: #605857;
    }

    .mobile-header__call strong {
        font-size: 16px;
        line-height: 22px;
    }

    #site-header .mobile-header__callback {
        display: block;
        margin: 8px 0 0;
        min-height: 40px;
        padding: 0;
        background: transparent;
        border: 0;
        color: #a90000;
        font: 700 13px Arial, sans-serif;
        cursor: pointer;
    }

    #site-header .mobile-header__actions :focus-visible,
    #site-header .mobile-header__catalog:focus-visible,
    #site-header .mobile-header__messenger:focus-visible,
    #site-header .mobile-header__dialog :focus-visible,
    #site-header .header-bottom .search :focus-visible {
        outline: 2px solid #b30000;
        outline-offset: -2px;
    }
}

@media (max-width: 768px) {
    #site-header .mobile-header__max {
        padding: 0;
        border: 0;
        border-left: 1px solid #e4e0df;
        background: transparent;
        cursor: pointer;
    }

    .mobile-header__max-title::before {
        content: "Связь в MAX";
    }

    .mobile-header__max-note {
        margin: 0 0 12px;
        color: #463f3e;
        font-size: 14px;
        line-height: 1.45;
    }

    .mobile-header__max-note::before {
        content: "Готовим контакт для связи в MAX и уточняем его у поддержки. Пока напишите нам в Telegram или WhatsApp либо позвоните.";
    }

    .mobile-header__max-alternatives {
        display: flex;
        gap: 7px;
    }

    #site-header .mobile-header__max-alternatives .mobile-header__messenger {
        border: 1px solid #e8e2df;
        border-radius: 8px;
        background: #f7f5f4;
    }
}
