.menu-cat {
    position: static;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin: 0 10px 0 0;
}

.menu-cat__btn-container {
    cursor: pointer;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid #ffffff44;
    color: var(--secondary-text-color);
    border-radius: 5px;
    padding: 0 2rem;
    height: 4.6rem;
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.menu-cat:hover .menu-cat__btn-container {
    background: #fff;
    border-color: #fff;
    color: var(--secondary-background-color);
}

.menu-cat__btn-container svg {
    width: 1.3rem;
    height: 1.3rem;
    display: block;
    margin: 0 1rem 0 0;
}

/* Выпадающий каталог на всю ширину шапки */
.menu-cat__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 1rem 0 0 0;
    background: var(--main-background-color);
    box-shadow: 0px 10px 40px rgba(15, 76, 129, 0.18);
    border-radius: 1rem;
    color: var(--main-text-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.menu-cat__dropdown::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 1.5rem;
}

.menu-cat:hover .menu-cat__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-cat__dropdown-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: start;
    align-items: flex-start;
    padding: 1.5rem;
    max-height: calc(100vh - 32rem);
    min-height: 40rem;
}

/* Левая колонка — основные разделы */
.menu-cat__list {
    -ms-flex: 0 0 28rem;
    flex: 0 0 28rem;
    max-height: 100%;
    margin: 0;
    padding: 0 0.5rem 0 0;
    list-style: none;
    overflow-y: auto;
    align-self: stretch;
}

.menu-cat__item {
    margin: 0 0 0.6rem;
}

.menu-cat__link {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    min-height: 4.6rem;
    padding: 0.8rem 3.5rem 0.8rem 1.4rem;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 500;
    text-decoration: none;
    color: var(--main-text-color);
    background: var(--accent-background-color);
    border-radius: 0.8rem;
    transition: color 0.25s, background 0.25s;
}

.menu-cat__link:hover {
    color: var(--secondary-background-color);
    background: #e9edf5;
}

.menu-cat__item_active .menu-cat__link {
    background: var(--secondary-background-color);
    color: var(--secondary-text-color);
}

.menu-cat__icon {
    width: 2rem;
    height: 2rem;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 0 1rem 0 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

.menu-cat__icon svg,
.menu-cat__icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.menu-cat__icon svg {
    fill: currentColor;
}

.menu-cat__text-container {
    display: block;
    -ms-flex: 1;
    flex: 1;
}

.menu-cat__arrow {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    position: absolute;
    top: 50%;
    right: 1.4rem;
    margin: -0.55rem 0 0 0;
    opacity: 0.5;
}

.menu-cat__item_active .menu-cat__arrow {
    opacity: 1;
}

.menu-cat__arrow svg {
    display: block;
    width: 0.6rem;
    height: 1.1rem;
    fill: currentColor;
    fill-rule: evenodd;
}

/* Правая часть — подкатегории выбранного раздела */
.menu-cat__panels {
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
    max-height: 100%;
    align-self: stretch;
    overflow-y: auto;
    padding: 0 0.5rem 0 2rem;
}

.menu-cat__panel {
    display: none;
}

.menu-cat__panel_active {
    display: block;
}

.menu-cat__panel-title {
    display: inline-block;
    margin: 0.4rem 0 1.5rem;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--secondary-background-color);
    text-decoration: none;
}

.menu-cat__panel-title:hover {
    color: var(--accent-color);
}

.menu-cat__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-cat__card-link {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    padding: 0.8rem 0.8rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    color: var(--main-text-color);
    text-decoration: none;
    transition: border-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.menu-cat__card-link:hover {
    border-color: var(--accent-color);
    box-shadow: 0px 0px 20px rgba(170, 189, 206, 0.35);
    color: var(--accent-color);
}

.menu-cat__card-image {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 11rem;
    padding: 0.8rem;
    margin: 0 0 1rem;
    background: var(--accent-background-color);
    border-radius: 0.8rem;
    overflow: hidden;
}

.menu-cat__card-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.25s;
}

.menu-cat__card-link:hover .menu-cat__card-image img {
    transform: scale(1.05);
}

.menu-cat__card-title {
    display: block;
    font-size: 1.4rem;
    line-height: 1.3;
    text-align: center;
}

.menu-cat__all {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: end;
    justify-content: flex-end;
    margin: 1.5rem 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-background-color);
    text-decoration: none;
}

.menu-cat__all:hover {
    color: var(--accent-color);
}

.menu-cat__all svg {
    width: 0.6rem;
    height: 1.1rem;
    margin: 0 0 0 0.8rem;
    fill: currentColor;
}

/* Раздел без подкатегорий */
.menu-cat__single {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: start;
    align-items: flex-start;
    max-width: 36rem;
    text-decoration: none;
}

.menu-cat__single-image {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100%;
    height: 22rem;
    padding: 1.5rem;
    margin: 0 0 1.5rem;
    background: var(--accent-background-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.menu-cat__single-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.menu-cat__single-btn {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    padding: 1.2rem 2rem;
    border-radius: 0.8rem;
    background: var(--secondary-background-color);
    color: var(--secondary-text-color);
    font-size: 1.4rem;
    font-weight: 500;
    transition: background 0.25s;
}

.menu-cat__single:hover .menu-cat__single-btn {
    background: var(--accent-color);
}

.menu-cat__single-btn svg {
    width: 0.6rem;
    height: 1.1rem;
    margin: 0 0 0 1rem;
    fill: currentColor;
}

@media (min-width: 1440px) {
    .menu-cat__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
