.header-bottom > .container {
    perspective: 1000px;
    z-index: 100;
}

.menu-catalog .container,
.menu-catalog menu {
    overflow: hidden;
    height: 630px;
}

/* ---------- БЛОК menu ---------- */
.main-catalog-menu {
    --p20: 20px;
    display: flex;
    background-color: #ffffff;
    border-radius: 10px;
    background: #FFF;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
    max-width: 1400px;
    width: 100%;
    /*height: calc(100vh - 100px);*/
    margin: 0 auto;
    position: absolute;
    z-index: 200;
    left: 0px;
    overflow: auto;
    padding: var(--p20);

    transform-origin: top center;
    transform: rotateX(-30deg);    /* скрыт – повёрнут вверх */
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.4s;
    pointer-events: none;
}
.main-catalog-menu.active {
    transform: rotateX(0deg);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* ---------- ЛЕВАЯ КОЛОНКА (меню 1-го уровня) ---------- */
.catalog__menu {
    width: 272px;
    background: #ffffff;
    flex-shrink: 0;
    padding: 0 var(--p20) 0 0;
}

/* Группа пунктов меню (разделитель — нижняя линия) */
.menu-group {
    position: relative;
    border-bottom: 1px solid #B3B3B3;
    padding: 5px 0;
}
.menu-group:before {
    content: '';
    position: absolute;
    top: 0;
    right: calc(var(--p20) * -1);
    height: 100%;
    border-right: 1px solid #B3B3B3;
}
.menu-group:first-child {
    padding-top: 0;
}
.menu-group:last-child {
    border-bottom: none;
}

/* Пункт меню (родительский) */
.menu-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s;
    color: #1e2a3e;
    font-weight: 500;
}
.menu-item.active,
.menu-item:hover {
    border-radius: 10px;
    background: #F7F7F7;
}

/* Иконка слева */
.menu-item__icon {
    width: 22px;
    height: 20px;
    margin-right: 10px;
    text-align: center;
}
.menu-item__icon img {
    height: auto;
    max-width: 100%;
}

/* Текст пункта */
.menu-item__text {
    flex: 1;
    color: var(--Dark-Gray, #404040);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.15px;
}

/* Стрелка справа */
.menu-item__arrow {
    width: 16px;
    height: 16px;
    font-size: 20px;
    color: #8e9aaf;
    transition: transform 0.2s, color 0.2s;
    background: url('/local/templates/loftwood/images/arrow-2.svg') no-repeat;
    pointer-events: none;
}
.menu-item.active .menu-item__arrow,
.menu-item:hover .menu-item__arrow {
    color: #0057b3;
    transform: translateX(2px);
}

/* ---------- ПРАВАЯ КОЛОНКА (контент подпунктов) ---------- */
.catalog__panel {
    flex: 1;
    background: #ffffff;
    padding: 0 0 0 20px;
    min-height: 520px;
    transition: all 0.2s;
}

/* Каждый блок с подпунктами — по умолчанию скрыт */
.panel-content {
    display: none;
    animation: fadeSlideIn 0.2s ease-out;
}
.panel-content__overlay {
    display: grid;
    gap: 1.59%;
    /* Левая колонка: 39.42% (421px / 1068px * 100%) */
    /* Правая колонка: 59.00% (630px / 1068px * 100%) */
    /* Отступ: 1.59% (17px / 1068px * 100%) */
    grid-template-columns: 39.42% 59.00%;
    grid-template-rows: auto 1fr;
}
.panel-content__overlay._empty {
    display: block;
}
/* Заголовок раздела (родительская категория) */
.panel-content__title {
    align-self: start;
    height: fit-content;
    color: #404040;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
    margin: 0 0 25px;
    display: inline-block;
}
.panel-content__wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}
.panel-content__group {
    width: calc(50% - 10px);
}
.panel-content__subtitle {
    display: block;
    color: #404040;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.15px;
    margin: 0 0 15px;
}
/* Список дочерних пунктов (2 уровень) */
.panel-content__list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.panel-content__list-item {
    transition: transform 0.1s;
    border-bottom: 1px dashed transparent;
    display: inline-block;
    width: fit-content;
}
.panel-content__list-item a {
    transition: color 0.15s;
    color: var(--Dark-Gray, #404040);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.12px;
}
.panel-content__list-item:hover a {
    color: #C79D6D;
}
.panel-content__list-item:hover {
    color: #0057b3;
    transform: translateX(4px);
    border-bottom-color: #cbd5e1;
}

/* Баннер (рекламный / новинка) */
.panel-content-banner-wrapp {
    position: relative;
    grid-row: 1 / 3;       /* от первой до третьей линии (две строки) */
    grid-column: 2 / 3;    /* вторая колонка */
}
.panel-content__banner {
    position: relative;
}
.panel-content__banner:not(:last-child) {
    margin-bottom: 15px;
}
.panel-content__banner--horizontal {
    min-height: 115px;
    border-radius: 10px;
    padding: 27px 35px;
}
.panel-content__banner:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.03);
}
.panel-content__banner img {
    border-radius: 10px;
    vertical-align: top;
}
.banner-img {
    width: 100%;
    height: auto;
}
.panel-content__banner--horizontal .banner-text {
    position: static;
}
.banner-text {
    display: flex;
    justify-content: space-between;
    position: absolute;
    left: 35px;
    right: 35px;
    bottom: 30px;
    z-index: 10;
    color: #404040;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
}
.banner-text strong {
    display: block;
    margin-bottom: 7px;
    color: #404040;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}
.banner-text__pair {

}
.banner-text__pair p {
    margin-bottom: 0;
    text-align: left;
}
.banner-text__more {
    align-self: flex-end;
    color: #404040;
    text-align: right;
    font-family: Panton;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 110%; /* 19.8px */
    letter-spacing: 0.18px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    text-align: right;
}
.banner-text__link[href=""] {
    display: none;
}
.banner-text__link[href]:not([href=""]) {
    position: absolute;
    inset: 0 0 0 0;
    z-index: 20;
}
/* анимация появления панели */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- CSS :hover — отображение нужной панели по data-атрибутам ---------- */
/* Используем современный :has() для связывания левого пункта и правого блока */
.catalog:has(.menu-item[data-for="tables-chairs"]:hover) .panel-content[data-panel="tables-chairs"],
.catalog:has(.menu-item[data-for="beds"]:hover) .panel-content[data-panel="beds"],
.catalog:has(.menu-item[data-for="mirrors-decor"]:hover) .panel-content[data-panel="mirrors-decor"],
.catalog:has(.menu-item[data-for="sofas-chairs"]:hover) .panel-content[data-panel="sofas-chairs"],
.catalog:has(.menu-item[data-for="cabinets"]:hover) .panel-content[data-panel="cabinets"],
.catalog:has(.menu-item[data-for="hallways"]:hover) .panel-content[data-panel="hallways"],
.catalog:has(.menu-item[data-for="outdoor"]:hover) .panel-content[data-panel="outdoor"],
.catalog:has(.menu-item[data-for="sale"]:hover) .panel-content[data-panel="sale"],
.catalog:has(.menu-item[data-for="business"]:hover) .panel-content[data-panel="business"] {
    display: block;
}

/* Доп. стили для адаптивности (при сужении экрана колонки подстраиваются) */
@media (max-width: 768px) {
    .header-bottom > .container {
        perspective: none;
        z-index: auto;
    }
    .main-catalog-menu {
        --p20: 15px;
        z-index: 20002;
        top: 64px;
        overflow: auto;
        height: calc(100vh - 133px);
        border-radius: 0;
        background-color: #F7F7F7;
        box-shadow: none;
    }
    .catalog__menu {
        background-color: transparent;
    }
    .panel-content__overlay {
        display: block;
    }
    .panel-content__list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .panel-content {
        height: 100vh;
        background-color: #F7F7F7;
    }
    .catalog__panel {
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        padding: 15px;
        z-index: -1;
        border-radius: 0;
        background-color: transparent;
    }
    .catalog__panel.active {
        z-index: 1;
    }
    .panel-content__title {
        display: none;
    }
    .banner-text strong {
        color: #404040;
        font-size: 27px;
    }
    .panel-content__banner--horizontal {
        padding: 20px;
    }
    .banner-text {
        left: 20px;
        bottom: 20px;
        right: 20px;
    }
    .banner-text__more {
        font-size: 16px;
    }
}

/* маленький декоративный акцент */
.menu-item:active {
    background-color: #eef2ff;
}