body > header {
    /* padding-top: 15px; */

    box-shadow: 0 0 32px 0 rgba(0, 0, 0, 0.08);
    background: #fff;
    /* transform: rotate(-180deg); */
}

.header-row-1 {
    /* margin-bottom: 20px; */

    display: flex;
    justify-content: space-between;
    column-gap: 24px;
}

.header-row-1__address {
    display: flex;
    column-gap: 5px;

    font-weight: 500;
    font-size: 14px;

    margin: auto 0;
}

.header-row-1__address::before {
    content: "";
    display: inline-block;

    width: 18px;
    height: 18px;

    background-image: url(../icons/address_18.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center bottom;
}

.header-row-2 {
    padding-bottom: 15px;
}

#sf-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    column-gap: 24px;

    font-weight: 500;
    font-size: 15px;
}



#sf-menu a, #sf-menu a:visited {
    text-decoration: none;
}

#sf-menu a:hover, #sf-menu a:focus, #sf-menu a:active {
    text-decoration: underline;
}


.header-row-2 {
    display: grid;
    grid-template-columns: auto 380px;
    column-gap: 25px;
}

.header-col-1 {
    display: grid;
    grid-template-columns: 180px auto;
    column-gap: 25px;
}

.header-col-1-1 {
    display: flex;
    align-items: center;
}

.header-col-1-2 {
    border-radius: 6px;
    background: #f2f2f2;

    display: grid;
    grid-template-columns: auto 110px;
    column-gap: 25px;

    height: 71px;
}

.searchform-input-wrapper {
    display: flex;
    align-items: center;
    padding-left: 24px;
}

.searchform-input-wrapper > input {
    width: 100%;
    height: 100%;

    border: 0 none;
    background-color: transparent;

    font-size: 16px;
}

.searchform-input-wrapper > input::placeholder {
    opacity: 0.6;
}

.searchform-submit {
    margin: 8px 8px 8px 0;

    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;

    border: 0 none;
    background: #911504;

    font-size: 15px;
    color: #fff;

    cursor: pointer;
}

.header-col-2 {
    display: flex;
    justify-content: end;
    column-gap: 30px;

    position: relative;
}

.header-cart {
    aspect-ratio: 1;

    border-radius: 6px;
    background: #f2f2f2;

    position: relative;

    min-width: 37px;
}

.header-cart a {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background-image: url(../icons/cart.svg);
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
}

#header-menu {
    display: none;
}

#cart-count {
    background: #911504;
    width: 15px;
    height: 15px;
    font-size: 8px;
    text-align: center;
    color: #fff;
    font-weight: 500;

    border-radius: 50%;
    line-height: 15px;

    transform: translateX(50%) translateY(75%);
}

.header-contacts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    
    position: relative;
    z-index: 2;
}

.header-contacts a, .header-contacts a:visited {
    text-decoration: none;
    color: inherit;
}

.header-contacts a:hover, .header-contacts a:focus, .header-contacts a:active {
    text-decoration: underline;
}

.header-contacts .phone {
    font-weight: 500;
    font-size: 24px;
    letter-spacing: -0.02em;
    
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.header-contacts .phone::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23911504'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

/* Только для десктопа: hover работает */
@media (min-width: 768px) {
    .header-contacts:hover .phone::after {
        transform: rotate(180deg);
    }
}

.header-contacts .mail {
    font-weight: 400;
    font-size: 14px;
}

/* 2. Попап с дополнительными номерами */
.header-contacts__more {
    position: absolute;
    top: 100%;
    right: 0;
    width: auto;           /* ширина по содержимому */
    min-width: auto;
    white-space: nowrap;   /* номера в одну строку */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1000;
    
    /* анимация появления */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    margin-top: 10px;
}

/* "Мостик" для плавного наведения (только для десктопа) */
@media (min-width: 768px) {
    .header-contacts::after {
        content: '';
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        height: 20px;
        pointer-events: none;
    }
    
    .header-contacts:hover::after {
        pointer-events: auto;
    }
    
    .header-contacts:hover .header-contacts__more {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* Стили пунктов в попапе */
.header-contacts__more-item {
    padding: 8px 20px;
    transition: background-color 0.1s;
}

.header-contacts__more-item:hover {
    background-color: #f5f5f5;
}

.header-contacts__more-item .phone {
    font-size: 18px;
    font-weight: 500;
    justify-content: flex-start;
    white-space: nowrap;
}

.header-contacts__more-item .phone::after {
    display: none; /* убираем стрелку внутри попапа */
}

.header-contacts__more-item a {
    display: block;
    width: 100%;
}

@media (max-width: 767px) {
    .header-contacts .phone {
        font-size: 18px;   /* чуть меньше на мобильных */
        gap: 8px;
    }
    
    /* Стрелка превращается в серую кнопку */
    .header-contacts .phone::after {
        content: '';
        width: 32px;
        height: 32px;
        background-color: #f2f2f2;  /* серая как корзина */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23911504'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
        background-size: 16px;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 6px;          /* скругление как у корзины */
        transition: transform 0.2s ease;
        flex-shrink: 0;
        margin-left: 2px;
    }
    
    /* При открытой плашке стрелка вверх */
    .header-contacts.active .phone::after {
        transform: rotate(180deg);
    }
    
    /* ПОЛНОСТЬЮ ОТКЛЮЧАЕМ hover-эффекты на мобильных */
    .header-contacts:hover .phone::after,
    .header-contacts:hover .header-contacts__more {
        /* ничего не делаем, всё управляется через JS */
    }
    
    /* Попап на мобильных — на всю ширину снизу */
    .header-contacts__more {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        white-space: normal;        /* разрешаем перенос */
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        padding: 20px 0;
        margin-top: 0;
        z-index: 10000;
        
        /* отключаем все hover-эффекты */
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease;
        pointer-events: none;
    }
    
    .header-contacts.active .header-contacts__more {
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Заголовок попапа */
    .header-contacts__more::before {
        content: 'Другие наши номера';
        display: block;
        font-weight: 500;
        font-size: 16px;
        margin: 0 20px 16px 20px;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 12px;
    }
    
    /* Увеличиваем область касания */
    .header-contacts__more-item {
        padding: 16px 20px;
    }
    
    .header-contacts__more-item .phone {
        font-size: 20px;
        white-space: normal;
        word-break: break-word;
    }
    
    .header-contacts .phone a {
        padding: 8px 0;
    }
}


#menu-container #btn-menu-close {
    display: none;
    
    cursor: pointer;
    aspect-ratio: 1;
    width: 40px;
    height: 40px;
    margin-left: auto;

    border-radius: 6px;
    background: #f2f2f2;

    background-image: url(../icons/close.svg);
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
}


/* menu */
body.desktop #sf-menu {
    position: relative;
}

body.desktop #sf-menu .submenu {
    position: absolute;
    left: 0;
    top: 0;
    display: none;
}

body.desktop #sf-menu .submenu.transition-finished {
    left: -10000px;
}

body.desktop #sf-menu > li {
    line-height: 50px;
}

body.desktop #sf-menu > li * {
    line-height: normal;
}

    /* Главный контейнер */
    body.desktop #sf-menu > li.has-submenu.active > .submenu,
    body.desktop #sf-menu > li.has-submenu:hover > .submenu {
        display: block !important;
    }

    body.desktop #sf-menu [data-level=first] {
        background-color: #fff;
        width: 600px;
        right: 0;
        left: auto;
        top: 100%;
        z-index: 3;
        margin: 0;
        padding: 0;
        list-style-type: none;
        box-shadow: 0 0 32px 0 rgba(0, 0, 0, 0.14);
        border-radius: 8px;
        overflow: hidden;
    }

    body.desktop #sf-menu [data-level=first] > li {
        width: 50%;
        border-bottom: 1px solid #f2f2f2;
        border-right: 1px solid #f2f2f2;
    }

    body.desktop #sf-menu [data-level=first] > li > a {
        width: 100%;
        height: 49px;
        padding: 16px 16px 16px 18px;
        
        opacity: 0.7;
        font-size: 14px;

        display: flex;
        align-items: center;
    }

    body.desktop #sf-menu [data-level=first] > li:hover > a {
        background: #f2f2f2;
        text-decoration: none;
    }

    body.desktop #sf-menu [data-level=first] > li:hover > a::after, 
    body.desktop #sf-menu [data-level=first] > li:focus > a::after, 
    body.desktop #sf-menu [data-level=first] > li:active > a::after {
        content: "";
        width: 9px;
        height: 9px;

        background-image: url(../icons/sf-menu-arrow.svg);
        background-repeat: no-repeat;
        background-position: center;

        margin-left: auto;
    }
    
    /* /Главный контейнер */

    /* Правый контейнер */
    body.desktop #sf-menu [data-level=first] > li.has-submenu.active > .submenu,
    body.desktop #sf-menu [data-level=first] > li.has-submenu:hover > .submenu {
        display: block;
    }

    body.desktop #sf-menu [data-level=second] {
        margin: 0;
        padding: 30px 40px;
        list-style-type: none;

        position: absolute;
        top: 0;
        left: 50%;
        width: 50%;
        height: 100%;
    }

    body.desktop #sf-menu [data-level=second] li.container-title {
        font-size: 20px;
        line-height: 25px;
        margin-bottom: 10px;
    }

    body.desktop #sf-menu [data-level=second] li:not(.container-title) {
        margin-bottom: 8px;
    }

    body.desktop #sf-menu [data-level=second] li:not(.container-title) a {
        opacity: 0.7;
        font-size: 14px;
    }
    /* /Правый контейнер */

    /* Остальные контейнеры */
    body.desktop #sf-menu [data-level=second] li.has-submenu.active > .submenu,
    body.desktop #sf-menu [data-level=second] li.has-submenu:hover > .submenu {
        display: block;
        position: inherit;

        margin: 8px 0 0 0;
        padding: 0 0 0 20px;
        list-style-type: none;

    }

    body.desktop #sf-menu [data-level="second"] li.has-submenu > a {
        position: relative;
    }

    body.desktop #sf-menu [data-level="second"] li.has-submenu > a::before {
        content: "";
        display: block;
        width: 12px;
        height: 12px;

        background-image: url(../icons/sf-menu-arrow-2.svg);
        background-repeat: no-repeat;
        background-position: center;

        position: absolute;
        left: -15px;
        top: 0;
        bottom: 0;
        margin: auto 0;
    }

    body.desktop #sf-menu [data-level="second"] li.has-submenu:hover > a::before {
        transform: rotate(90deg);
    }
    /* /Остальные контейнеры */


/* /menu */

@media (max-width: 1080px) {
	.header-row-1 {
        flex-wrap: wrap;
        justify-content: end;

    }

    #menu-container {
        margin-left: auto;
    }

    .header-row-1__address {
        margin-top: 20px;
    }

    .header-row-2 {
        grid-template-columns: auto;
        row-gap: 20px;
    }
}

@media (max-width: 767px) {
    body.menu-is-open {
        overflow: hidden;
    }
	#menu-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        background-color: #fff;
        height: 100%;
        z-index: 100;

        transform: translateY(-150%);
        transition: transform 0.3s linear;

        padding: 20px 15px;
    }

    #menu-container.active {
        transform: translateY(0);
        
    }


    #menu-container.active #btn-menu-close {
        display: block;
    }

    #header-menu {
        display: block;

        aspect-ratio: 1;
        border-radius: 6px;
        background: #f2f2f2;
        position: relative;

        background-image: url(../icons/burger.svg);
        background-repeat: no-repeat;
        background-size: 70%;
        background-position: center;

        cursor: pointer;

        min-width: 37px;
    }

    .header-col-1 {
        grid-template-columns: 110px auto;
    }

    .header-col-2 {
        column-gap: 15px;
    }

    .header-col-1-1 img {
        width: 100%;
        height: auto;
    }

    .header-col-1-2 {
        height: 45px;
        column-gap: 15px;
    }

    .searchform-input-wrapper {
        padding-left: 12px;
    }

    .searchform-submit {
        margin: 0;
    }

    .header-row-1__address {
        font-size: 12px;
        margin: 20px 0;
    }


        
    #menu-container nav {
        padding-top: 20px;
    }

    #sf-menu .submenu {
        /* display: none; */
        display: block;

        max-height: 0;
        overflow: hidden;
        transition: all 0.2s ease-out;

        padding-left: 20px;
        list-style: none;
    }

    #menu-container #sf-menu {
        display: block;
    }

    #menu-container #sf-menu li {
        margin-bottom: 10px;

        background-color: #f2f2f2;
        border-radius: 8px;
        border: 1px solid #f2f2f2;
    }

    #menu-container #sf-menu ul.submenu li {
        margin: 0;
    }

    #menu-container #sf-menu a {
        display: block;
        width: 100%;
        font-size: 18px;
        white-space: nowrap;
        line-height: 30px;
        
        padding: 5px 10px;
        
    }

        
    #sf-menu li.has-submenu > a::after {
        content: "";
        background-image: url(../icons/arrow-mobile.svg);
        background-size: contain;
        background-position: center;
        width: 8px;
        height: 10px;
        display: inline-block;
        background-repeat: no-repeat;
        margin-left: 3px;
    }

    #sf-menu li.has-submenu:hover > a ~ .submenu,
    #sf-menu li.has-submenu > a.on-hover ~ .submenu {
        /* display: block; */

        max-height: 1000px;

        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
    }

    #sf-menu li.has-submenu:hover a ~ .submenu li,
    #sf-menu li.has-submenu:hover a.on-hover ~ .submenu li {
        margin: 0;
    }

    .header-contacts .phone {
        font-size: 17px;
    }
}

@media (max-width: 575px) {
	.header-col-1 {
        grid-template-columns: auto;
        row-gap: 15px;
    }

    .header-col-1-1 img {
        max-width: 150px;
        margin: 0 auto;
    }

    .header-row-1__address {
        margin: 20px auto;
    }
}