/* ============================================================
   МЕГАМЕНЮ (шаблон menu_5columns_v2)
   ============================================================ */

/* --- Обёртка мегаменю (перенесена из общего шаблона) --- */
.catalog-dd.mega {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #fff;
    z-index: 10;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition-duration: 200ms;
    transition-property: transform, opacity;
    transition-timing-function: ease;
}

/* Показ при наведении на пункт меню «Каталог» */
header nav > ul > li:hover .catalog-dd.mega {
    display: block;
    visibility: visible;
    pointer-events: all;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Внутренняя обёртка */
.catalog-dd-inner {
    padding-top: 13px;
}

.catalog-dd.mega .container {
    max-width: 1880px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Внутренний контейнер (белая карточка) */
.menu-content {
    border: 1px solid #D4D4D4;
    display: flex;
    height: auto;
    background: white;
    border-radius: 8px;
    width: 100%;
}

/* Раскладка 5 колонок */
.menu-content--5cols {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
}

/* --- Ограничение ширины мегаменю --- */
.main-menu__wrapp .catalog-dd.mega {
    max-width: 1150px;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 5px;
    background: transparent;
}

.main-menu__wrapp .catalog-dd-inner {
    padding-top: 13px;
}

.main-menu__wrapp .catalog-dd.mega .container {
    padding: 0;
}

/* ============================================================
   КОЛОНКА 1: Разделы 1-го уровня
   ============================================================ */
.mega-menu-sections-col {
    width: 20%;
    border-right: 1px solid #eee;
    padding: 10px 0;
}

.mega-menu-section {
    position: relative;
}

.mega-menu-section a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 15px;
    font-size: 15px;
    line-height: 18px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #333;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.mega-menu-section__icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Активный раздел: бордовая полоска + фон */
.mega-menu-section.active a {
    background: #f7f3f0;
    color: #8b1d1d;
}

.mega-menu-section.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #8b1d1d;
}

/* ============================================================
   КОЛОНКИ 2-4: Подгруппы
   ============================================================ */
.menu-subsections-wrapper {
    width: 55%;
    display: flex;
    flex-direction: column;
}

.subsection-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    height: 100%;
    gap: 15px;
    padding: 15px 0;
}

.menu-subcol {
    width: 32%;
    padding: 0 10px 15px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Заголовок группы 2-го уровня: чёрный + линия 50px */
.menu-group-title {
    color: #000;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 12px 0 10px;
    padding-bottom: 8px;
    position: relative;
}

.menu-group-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 1px;
    background: #8b1d1d;
}

.menu-group-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-subsection-b a {
    display: inline-block;
    padding: 4px 0;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 300;
    transition: color .15s ease;
}

.menu-subsection-b a:hover {
    color: #8b1d1d;
}

/* ============================================================
   КОЛОНКА 5: УТП
   ============================================================ */
.menu-images {
    width: 20%;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-utp {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5efe9;
    border-radius: 4px;
    overflow: hidden;
    min-height: 180px;
    display: flex;
}

.menu-utp__inner {
    position: relative;
    z-index: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.menu-utp__title {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.25;
}

.menu-utp__text {
    width: 60%;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.menu-utp__image {
    margin: 8px 0;
}
.menu-utp__image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.menu-utp__btn {
    display: inline-block;
    margin-top: auto;
    font-size: 13px;
    color: #8b1d1d;
    text-decoration: none;
}
.menu-utp__btn .arrow {
    display: inline-block;
    transition: transform .15s;
}
.menu-utp__btn:hover .arrow {
    transform: translateX(3px);
}