/* EUROSPACE header v4 */

@media (min-width: 992px) {
    .eurospace-demo-header .es-header-v4 {
        position: relative;
        z-index: 1000;
        min-height: 62px;
        overflow: visible !important;
        border-bottom: 1px solid rgba(82, 41, 28, .09);
    }

    .eurospace-demo-header .es-header-v4 .container {
        overflow: visible !important;
    }

    .eurospace-demo-header .es-header-v4__inner {
        min-height: 62px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 26px;
        overflow: visible;
    }

    .eurospace-demo-header .es-header-v4__nav {
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
    }

    .eurospace-demo-header .es-header-v4__menu {
        display: flex;
        align-items: stretch;
        gap: clamp(26px, 2.6vw, 48px);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .eurospace-demo-header .es-header-v4__item {
        position: relative;
        display: flex;
        align-items: stretch;
    }

    .eurospace-demo-header .es-header-v4__link {
        min-height: 62px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #52291c;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .eurospace-demo-header .es-header-v4__chevron {
        font-size: 12px;
        transform: translateY(-1px);
    }

    .eurospace-demo-header .es-header-v4__dropdown {
        position: absolute;
        z-index: 5000;
        top: calc(100% - 1px);
        left: -14px;
        min-width: 270px;
        display: grid;
        gap: 1px;
        margin: 0;
        padding: 9px;
        list-style: none;
        border: 1px solid rgba(82,41,28,.14);
        border-radius: 12px;
        background: rgba(255,255,255,.99);
        box-shadow: 0 18px 48px rgba(62,33,24,.16);
        opacity: 0;
        visibility: hidden;
        transform: translateY(7px);
        transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
    }

    .eurospace-demo-header .es-header-v4__item:nth-child(2) .es-header-v4__dropdown {
        min-width: 320px;
    }

    .eurospace-demo-header .es-header-v4__dropdown a {
        display: block;
        padding: 10px 12px;
        border-radius: 8px;
        color: #52291c;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        text-decoration: none;
        white-space: nowrap;
    }

    .eurospace-demo-header .es-header-v4__dropdown a:hover {
        background: #f5efeb;
    }

    .eurospace-demo-header .es-header-v4__item.has-dropdown:hover .es-header-v4__dropdown,
    .eurospace-demo-header .es-header-v4__item.has-dropdown:focus-within .es-header-v4__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .eurospace-demo-header .es-header-v4__contacts {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .eurospace-demo-header .es-header-v4__phones {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .eurospace-demo-header .es-header-v4__phone {
        color: #52291c;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .eurospace-demo-header .es-header-v4__messengers {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .eurospace-demo-header .es-header-v4__icon {
        width: 31px;
        height: 31px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(82,41,28,.17);
        border-radius: 50%;
        background: rgba(255,255,255,.6);
        transition: transform .14s ease, background .14s ease;
    }

    .eurospace-demo-header .es-header-v4__icon:hover {
        transform: translateY(-1px);
        background: #fff;
    }

    .eurospace-demo-header .es-header-v4__icon img {
        width: 17px;
        height: 17px;
        display: block;
        object-fit: contain;
    }

    /* Старые пункты справа в большой строке больше не нужны. */
    .eurospace-demo-header .es-demo-desktop-nav,
    .eurospace-demo-header .es-single-catalog-cta,
    .eurospace-demo-header .main-head_menu {
        display: none !important;
    }
}

.es-header-v4-footer {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(26px, 3vw, 52px);
    width: 100%;
}

.es-header-v4-footer__column {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
}

.es-header-v4-footer__column .footer-menu {
    display: grid;
    gap: 8px;
}

.es-header-v4-mobile__children {
    display: grid;
    gap: 4px;
    margin: 6px 0 12px;
    padding-left: 15px;
    list-style: none;
}

@media (max-width: 1280px) and (min-width: 992px) {
    .eurospace-demo-header .es-header-v4__menu {
        gap: 20px;
    }

    .eurospace-demo-header .es-header-v4__inner,
    .eurospace-demo-header .es-header-v4__contacts {
        gap: 10px;
    }

    .eurospace-demo-header .es-header-v4__link,
    .eurospace-demo-header .es-header-v4__phone {
        font-size: 13px;
    }

    .eurospace-demo-header .es-header-v4__phones {
        gap: 9px;
    }

    .eurospace-demo-header .es-header-v4__icon {
        width: 28px;
        height: 28px;
    }

    .eurospace-demo-header .es-header-v4__icon img {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 991px) {
    .eurospace-demo-header .es-header-v4 {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .es-header-v4-footer {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .es-header-v4-footer {
        grid-template-columns: 1fr;
    }
}
