.catalog-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--main-background-color);
    color: var(--main-text-color);
    z-index: 1200;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.catalog-mobile._active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

body.catalog-mobile-open {
    overflow: hidden;
}

/* Кнопка фильтра и плавающие виджеты не должны лезть поверх каталога */
body.catalog-mobile-open .open-filter,
body.catalog-mobile-open .social {
    display: none !important;
}

.catalog-mobile__header {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    min-height: 6rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid #E8EAF3;
}

.catalog-mobile__title {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 600;
    color: var(--secondary-background-color);
}

.catalog-mobile__close {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0 -1rem 0 0;
}

.catalog-mobile__close svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
    fill-rule: evenodd;
}

.catalog-mobile__body {
    -ms-flex: 1;
    flex: 1;
    min-height: 0;
    display: -ms-flexbox;
    display: flex;
}

/* Левая колонка с разделами */
.catalog-mobile__aside {
    -ms-flex: 0 0 11rem;
    flex: 0 0 11rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    background: var(--accent-background-color);
}

.catalog-mobile__tab {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    padding: 1.4rem 0.5rem;
    font-size: 1.1rem;
    line-height: 1.2;
    text-align: center;
    color: var(--third-text-color);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.catalog-mobile__tab_active {
    background: var(--main-background-color);
    border-left-color: var(--secondary-background-color);
    color: var(--secondary-background-color);
    font-weight: 600;
}

.catalog-mobile__tab-icon {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0 0 0.6rem;
}

.catalog-mobile__tab-icon svg,
.catalog-mobile__tab-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.catalog-mobile__tab-icon svg {
    fill: currentColor;
}

.catalog-mobile__tab-text {
    display: block;
    max-width: 100%;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Правая часть с подкатегориями */
.catalog-mobile__panels {
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 1.5rem 1.5rem 3rem;
}

.catalog-mobile__panel {
    display: none;
}

.catalog-mobile__panel_active {
    display: block;
}

.catalog-mobile__panel-title {
    display: block;
    margin: 0 0 1.2rem;
    font-size: 1.7rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--secondary-background-color);
    text-decoration: none;
}

.catalog-mobile__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-mobile__card-link {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    padding: 0.6rem 0.6rem 1rem;
    border-radius: 1rem;
    background: var(--accent-background-color);
    color: var(--main-text-color);
    text-decoration: none;
}

.catalog-mobile__card-image {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 9rem;
    padding: 0.6rem;
    margin: 0 0 0.8rem;
    background: var(--main-background-color);
    border-radius: 0.8rem;
    overflow: hidden;
}

.catalog-mobile__card-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.catalog-mobile__card-title {
    display: block;
    font-size: 1.25rem;
    line-height: 1.25;
    text-align: center;
}

.catalog-mobile__all {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 1.5rem 0 0;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-background-color);
    text-decoration: none;
}

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

@media (min-width: 560px) {
    .catalog-mobile__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .catalog-mobile__aside {
        -ms-flex: 0 0 13rem;
        flex: 0 0 13rem;
    }
}

@media (min-width: 900px) {
    .catalog-mobile__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
