/* Один кадр использует место, ранее занятое повторной миниатюрой. */
[data-product-media-gallery].card-slider--single-image .card-slider__item {
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-product-media-gallery].card-slider--single-image .card-slider__img {
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 480px;
}
.catalog-sidebar-toggle, .catalog-sidebar-close { display: none; }
.cat-nav, .nav-list { overflow-wrap: anywhere; }
/* Все товары загруженной страницы раскрыты независимо от режима, cookie и фильтров. */
.list-expand:has(.produts, .product-line-list), .list-expand[data-grid-visible] {
    max-height: none;
    overflow: visible;
}
.list-expand:has(.produts, .product-line-list)::after, .list-expand[data-grid-visible]::after {
    display: none;
}
.list-expand:has(.produts, .product-line-list) ~ .mininpz-actions #toggleProductsBtn,
#toggleProductsBtn[hidden] {
    display: none;
}

@media (max-width: 1199px) {
    .catalog-sidebar-toggle, .catalog-sidebar-close {
        display: block;
        min-height: 44px;
        padding: 10px 16px;
        border: 1px solid #c9ced8;
        border-radius: 4px;
        color: #222840;
        background: #fff;
        cursor: pointer;
    }
    .catalog-sidebar-toggle {
        position: fixed;
        top: 50%;
        left: 0;
        z-index: 1101;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 56px;
        margin: 0;
        padding: 0;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        color: #d92832;
        box-shadow: 2px 2px 10px #0002;
        transform: translateY(-50%);
        touch-action: manipulation;
    }
    .catalog-sidebar-toggle__arrow {
        display: block;
        font: 36px/1 Arial, sans-serif;
    }
    .catalog-sidebar-toggle[aria-expanded="true"] {
        left: min(348px, calc(100vw - 52px));
    }
    .catalog-sidebar-toggle[aria-expanded="true"] .catalog-sidebar-toggle__arrow {
        transform: rotate(180deg);
    }
    .catalog-sidebar-toggle:focus-visible {
        outline: 2px solid #d92832;
        outline-offset: 2px;
    }
    .catalog-sidebar-close { margin-bottom: 12px; }
    .content .sidebar[data-catalog-drawer] {
        display: none;
        float: none;
        position: fixed;
        inset: 8px auto 8px 8px;
        /* Оставляем место для стрелки справа от раскрытого меню даже на 320 px. */
        width: calc(100vw - 60px) !important;
        max-width: 340px !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100dvh - 16px) !important;
        margin: 0 !important;
        padding: 12px;
        box-sizing: border-box;
        transform: none !important;
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 1100;
        box-shadow: 0 4px 24px #0006;
    }
    .content .sidebar[data-catalog-drawer][data-open="true"] { display: block; }
    .sidebar[data-catalog-drawer] .sidebar__open { display: none !important; }
    .sidebar[data-catalog-drawer] .sidebar-list { max-height: none; }
    .sidebar[data-catalog-drawer] > .sticky,
    .sidebar[data-catalog-drawer] > .stop {
        position: static !important;
        width: 100% !important;
        top: auto !important;
    }
    .content_flex { display: block; }
    .content_flex > .products-price, .content_inner.c-card > .card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 0;
        margin-left: 0;
    }
}
