/*
 * Product Owl sliders: equal card height per visible row.
 * Owl’s default floats/stage layout can prevent stretch; flex + explicit heights fix button alignment.
 */

/*
 * Owl Carousel 2 (owl.carousel.min.css) sets .owl-carousel { display: none } until .owl-loaded.
 * If jQuery’s plugin is missing, init bails, or a race prevents init, bands stay empty while
 * “View all” (grid, no Owl) still works. Show raw slides until Owl boots successfully.
 */
#categories-slider.owl-carousel:not(.owl-loaded),
#best-seller-slider.owl-carousel:not(.owl-loaded),
#new-arrival-slider.owl-carousel:not(.owl-loaded),
#home-category-scroller-1.owl-carousel:not(.owl-loaded),
#home-category-scroller-2.owl-carousel:not(.owl-loaded),
#home-category-scroller-3.owl-carousel:not(.owl-loaded),
#home-category-scroller-4.owl-carousel:not(.owl-loaded),
#home-category-scroller-5.owl-carousel:not(.owl-loaded),
#home-category-scroller-6.owl-carousel:not(.owl-loaded),
#home-feature-new-arrival-scroller.owl-carousel:not(.owl-loaded),
#home-feature-best-seller-scroller.owl-carousel:not(.owl-loaded) {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    gap: 0.75rem;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 0.25rem;
}

#categories-slider.owl-carousel:not(.owl-loaded) > *,
#best-seller-slider.owl-carousel:not(.owl-loaded) > *,
#new-arrival-slider.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-1.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-2.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-3.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-4.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-5.owl-carousel:not(.owl-loaded) > *,
#home-category-scroller-6.owl-carousel:not(.owl-loaded) > *,
#home-feature-new-arrival-scroller.owl-carousel:not(.owl-loaded) > *,
#home-feature-best-seller-scroller.owl-carousel:not(.owl-loaded) > * {
    flex: 0 0 auto;
    width: min(260px, 82vw);
    max-width: 82vw;
}

#categories-slider.owl-carousel:not(.owl-loaded) > * {
    width: min(200px, 42vw);
    max-width: 42vw;
}
#best-seller-slider.owl-carousel .owl-stage,
#new-arrival-slider.owl-carousel .owl-stage,
#home-category-scroller-1.owl-carousel .owl-stage,
#home-category-scroller-2.owl-carousel .owl-stage,
#home-category-scroller-3.owl-carousel .owl-stage,
#home-category-scroller-4.owl-carousel .owl-stage,
#home-category-scroller-5.owl-carousel .owl-stage,
#home-category-scroller-6.owl-carousel .owl-stage,
#home-feature-new-arrival-scroller.owl-carousel .owl-stage,
#home-feature-best-seller-scroller.owl-carousel .owl-stage {
    display: flex !important;
    align-items: stretch !important;
}
.owl-stage{
    padding-bottom: 20px;
    padding-top: 10px;
}
#best-seller-slider.owl-carousel .owl-item,
#new-arrival-slider.owl-carousel .owl-item,
#home-category-scroller-1.owl-carousel .owl-item,
#home-category-scroller-2.owl-carousel .owl-item,
#home-category-scroller-3.owl-carousel .owl-item,
#home-category-scroller-4.owl-carousel .owl-item,
#home-category-scroller-5.owl-carousel .owl-item,
#home-category-scroller-6.owl-carousel .owl-item,
#home-feature-new-arrival-scroller.owl-carousel .owl-item,
#home-feature-best-seller-scroller.owl-carousel .owl-item {
    display: flex !important;
    align-items: stretch !important;
    align-self: stretch !important;
    float: none !important;
    height: auto;
}

#best-seller-slider.owl-carousel .owl-item > *,
#new-arrival-slider.owl-carousel .owl-item > *,
#home-category-scroller-1.owl-carousel .owl-item > *,
#home-category-scroller-2.owl-carousel .owl-item > *,
#home-category-scroller-3.owl-carousel .owl-item > *,
#home-category-scroller-4.owl-carousel .owl-item > *,
#home-category-scroller-5.owl-carousel .owl-item > *,
#home-category-scroller-6.owl-carousel .owl-item > *,
#home-feature-new-arrival-scroller.owl-carousel .owl-item > *,
#home-feature-best-seller-scroller.owl-carousel .owl-item > * {
    flex: 1 1 auto;
    align-self: stretch !important;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: none;
}

/* Category / brand grids: stretch cards to the row’s tallest item */
.grid > .product-card-root {
    min-height: 0;
    height: 100%;
}

/* Hero main slider: undo global .owl-stage vertical padding (product carousels keep it) */
.hero-main-slider #hero-slider .owl-stage {
    padding-top: 0;
    padding-bottom: 0;
}

/*
 * Hero main slider: Owl’s stage wrappers don’t inherit the parent’s border-radius,
 * so corners can look uneven. Apply the same radius on every clipping layer (md+).
 */
@media (min-width: 768px) {
    .hero-main-slider #hero-slider.owl-carousel,
    .hero-main-slider #hero-slider .owl-stage-outer,
    .hero-main-slider #hero-slider .owl-stage,
    .hero-main-slider #hero-slider .owl-item,
    .hero-main-slider #hero-slider .owl-item > a,
    .hero-main-slider #hero-slider .owl-item > div {
        border-radius: 1rem;
        overflow: hidden;
    }
}
