/* ===== FIXES для работы без JS ===== */

/* Hero: показываем первый слайд */
.experience-layouts-carouselHeroBannerFullwidth .swiper-container {
    overflow: visible !important;
}
.experience-layouts-carouselHeroBannerFullwidth .swiper-wrapper {
    display: block !important;
    height: auto !important;
    transform: none !important;
}
.experience-layouts-carouselHeroBannerFullwidth .swiper-slide {
    display: none !important;
    width: 100% !important;
}
.experience-layouts-carouselHeroBannerFullwidth .swiper-slide:first-child {
    display: block !important;
}

/* Видео: нормальные размеры */
.b-video_component-wrapper {
    width: 100%;
    position: relative;
    min-height: 450px;
}
@media (min-width: 768px) {
    .b-video_component-wrapper { min-height: 700px; }
}
.b-video_component-video {
    width: 100% !important;
    height: auto !important;
    min-height: 450px;
    object-fit: cover;
    display: block !important;
}
@media (min-width: 768px) {
    .b-video_component-video { min-height: 700px; }
}
@media (max-width: 767px) {
    .b-video_component-video.m-desktop { display: none !important; }
    .b-video_component-video.m-mobile  { display: block !important; }
}
@media (min-width: 768px) {
    .b-video_component-video.m-mobile  { display: none !important; }
    .b-video_component-video.m-desktop { display: block !important; }
}

/* ---- Карусель товаров (product filter) ---- */
.b-carousel_filter-carousels .swiper-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
}
.b-carousel_filter-carousels .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    transform: none !important;
    align-items: flex-start !important;
}
.b-carousel_filter-carousels .swiper-slide {
    width: 230px !important;
    min-width: 230px !important;
    flex-shrink: 0 !important;
    height: auto !important;
}
@media (max-width: 767px) {
    .b-carousel_filter-carousels .swiper-slide {
        width: 160px !important;
        min-width: 160px !important;
    }
}

/* ---- Header: not sticky ---- */
.b-header {
    position: relative !important;
    z-index: 200 !important;
    background: transparent !important;
}
@media (min-width: 1280px) {
    /* Give header a real height — b-header_components is position:absolute so header collapses otherwise */
    .b-header {
    }
    /* Keep position:absolute (original CSS), dark bg like original pre-scroll state */
    .b-header_components {
        background-color: rgba(0, 0, 0, 0.55) !important;
        background: rgba(0, 0, 0, 0.55) !important;
    }
    /* Remove overflow:hidden so flyout dropdowns are not clipped */
    .b-header_components-nav {
        overflow: visible !important;
        z-index: 100 !important;
    }
    .b-menu_bar {
        z-index: 100 !important;
    }
    .b-menu_bar-flyout {
        z-index: 200 !important;
    }
}

/* ---- Desktop utility bar: override white text to black (JS normally swaps colors on scroll) ---- */
.b-header_components .b-header_utility-row {
    color: #000 !important;
    border-color: #e5e5e5 !important;
}
.b-header_components .b-header_utility-link,
.b-header_components .b-header_utility-link * {
    color: #000 !important;
}
.b-header_components .b-header_utility .m-border {
    background-color: #e5e5e5 !important;
}
.b-header_components .b-header_utility-beats {
    color: #000 !important;
}

/* ---- Предотвращаем горизонтальный overflow страницы ---- */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ---- Карусель карточек/баннеров (b-carousel_simple) ---- */
.b-carousel_simple {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
.b-carousel_simple .swiper-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.b-carousel_simple .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    transform: none !important;
    align-items: stretch !important;
    width: max-content !important;
}
/* Desktop: 4 карточки в ряд */
@media (min-width: 1200px) {
    .b-carousel_simple .swiper-wrapper {
        width: 100% !important;
    }
    .b-carousel_simple .swiper-slide {
        flex: 1 1 calc(25% - 19px) !important;
        width: calc(25% - 19px) !important;
        min-width: 0 !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }
}
/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .b-carousel_simple .swiper-slide {
        width: 57vw !important;
        min-width: 57vw !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }
}
/* Mobile: 1.35 карточки */
@media (max-width: 767px) {
    .b-carousel_simple .swiper-slide {
        width: 74vw !important;
        min-width: 74vw !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }
}

/* fullwidth block wrapper */
.b-fullwidth-container {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* ---- Карточка товара — минимальные исправления без переопределения стилей ---- */
.b-product_tile-image_wrapper,
.g-lazy_container {
    display: block !important;
    width: 100% !important;
}
.b-product_tile-image {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ---- Nav flyout on hover (JS normally adds .m-show_flyout class) ---- */
@media (min-width: 1280px) {
    /* Bridge the gap between nav link and flyout so mouse doesn't leave hover zone */
    .b-menu_bar-item {
        padding-bottom: 20px !important;
        margin-bottom: -20px !important;
    }
    .b-menu_bar-item:hover > .b-menu_bar-flyout {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) translateY(0) !important;
    }
    /* Keep flyout open while hovering over it */
    .b-menu_bar-flyout:hover {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    /* Compact flyout — cap height, hide overflow, white bg */
    .b-menu_bar-flyout {
        max-height: 420px !important;
        overflow: hidden !important;
        background: #fff !important;
    }
    .b-menu_bar-flyout_inner {
        max-height: 420px !important;
        overflow-y: auto !important;
    }
    /* Smaller flyout banner images */
    .b-menu_bar-flyout_img {
        max-height: 300px !important;
        object-fit: cover !important;
        width: 100% !important;
    }
    /* Compact inner container */
    .b-menu_bar-flyout_inner_container {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}

/* Скрываем кнопки prev/next без JS */
.swiper-button-prev,
.swiper-button-next {
    display: none !important;
}

/* Скрываем спиннер у lazy-изображений (без JS он никогда не убирается) */
.g-lazy_spinner { display: none !important; }
.g-lazy_container .g-lazy_spinner { display: none !important; }

/* ---- Royal Pop / b-collection-list — показываем все тайлы без JS ---- */
.js-product-tile[hidden] {
    display: block !important;
}
.b-collection-row.row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}
.js-product-tile.b-fullwidth_block_item {
    flex: 1 1 calc(50% - 10px) !important;
    min-width: 280px !important;
    box-sizing: border-box !important;
}
@media (max-width: 767px) {
    .js-product-tile.b-fullwidth_block_item {
        flex: 1 1 100% !important;
    }
}
.b-collection-show_more { display: none !important; }

