/* Keep the measured height in normal flow when the two header rows pin. */
#tdk-header-slot { min-height: var(--tdk-header-height, 0px); }
#tdk-header-slot.tdk-viewport-header > #topHeader,
#tdk-header-slot.tdk-viewport-header > #subHeader {
    position: fixed !important;
    inset-inline: 0;
    width: auto;
}
#tdk-header-slot.tdk-viewport-header > #topHeader { top: 0; }
#tdk-header-slot.tdk-viewport-header > #subHeader { top: var(--tdk-upper-height, 0px); }
#subHeader #logo img { height: auto; }
@media (max-width: 1023.98px) {
    #left > .collapsed { display: none; }
}

#catalogElement #elementSmallNavigation,
#catalogElement #elementSmallNavigation.fixed {
    position: sticky;
    top: var(--tdk-header-height, 0px);
    z-index: 2;
}
#elementContainer #pictureContainer .item a img { height: auto; }
#tableContainer #elementTools .fixContainer,
#tableContainer #elementNavigation .tabs {
    position: sticky;
    top: calc(var(--tdk-header-height, 0px) + 50px);
    bottom: auto;
    left: auto;
    width: auto;
    margin-top: 0;
}

/* The artwork has different aspect ratios. Keep the first banner's frame
   at every viewport width and fit the full image inside it. */
#promoBlock #slider { aspect-ratio: 1500 / 728; overflow: hidden; }
#promoBlock #slider .slideBox {
    display: flex;
    padding: 0;
    margin: 0;
    height: 100%;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
#promoBlock #slider .slideBox::-webkit-scrollbar { display: none; }
#promoBlock #slider .slideBox > li {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    scroll-snap-align: start;
}
#promoBlock #slider .slideBox img,
#promoBlock #slider .slideVideoContainer { display: block; width: 100%; height: 100%; object-fit: contain; }
#promoBlock #slider ol.pager { display: flex; transform: translateX(-50%); }
#promoBlock #slider .pager button { display: block; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; }

/* Reserve the first screen until Bitrix renders delivery and payment steps. */
#bx-soa-order-form:has(#bx-soa-order) {
    min-height: 100vh;
    min-height: 100svh;
}

/* On first entry Bitrix selects the delivery region, then collapses the
   unvisited steps and their submit button. Render that state immediately. */
@media (max-width: 767px) {
    #bx-soa-order:has(#bx-soa-region.bx-selected):not(:has(.bx-soa-section:not(#bx-soa-region)[data-visited="true"])) #bx-soa-total-mobile .bx-soa-cart-total-button-container,
    #bx-soa-order:has(#bx-soa-region.bx-selected):not(:has(.bx-soa-section:not(#bx-soa-region)[data-visited="true"])) .bx-soa-section:not(.bx-selected):not(#bx-soa-basket) > .bx-soa-section-content {
        display: none !important;
    }
}


#newsContainer .column .item .bigPicture img { height: auto; }

#newsDetail .bigPicture img { height: auto; }

/* A web font swap can push the last item onto another line. Use the
   existing local fallback for the entire breadcrumb row from first paint. */
#breadcrumbs { font-family: Arial, sans-serif; }
@media (max-width: 767px) {
    #breadcrumbs .arrow { margin-inline: 7px; }
}
