/**
 * Modernized Owl Carousel Core
 * Optimized for High-Volume Product Catalogs & Mobile Performance
 */

.owl-carousel {
    display: none;
    width: 100%;
    z-index: 1;
    position: relative;
    /* Use content-visibility for off-screen items to save CPU power */
    content-visibility: auto;
    contain-intrinsic-size: 1px 300px;
}

.owl-carousel .owl-stage {
    position: relative;
    display: flex; /* Modern replacement for float:left */
    touch-action: manipulation;
    /* Fixes flickering on scroll */
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.owl-carousel .owl-stage:after {
    content: "";
    display: table;
    clear: both;
}

.owl-carousel .owl-stage-outer {
    position: relative;
    overflow: hidden;
    /* GPU Acceleration */
    transform: translate3d(0, 0, 0);
}

.owl-carousel .owl-item {
    position: relative;
    min-height: 1px;
    flex: 0 0 auto; /* Modern flex-based sizing */
    backface-visibility: hidden;
    user-select: none;
    -webkit-touch-callout: none;
}

.owl-carousel .owl-item img {
    display: block;
    width: 100%;
    /* Prevents layout shift while loading 50k images */
    aspect-ratio: auto; 
    height: auto;
    object-fit: cover;
}

/* Control Elements */
.owl-carousel .owl-dots.disabled,
.owl-carousel .owl-nav.disabled {
    display: none !important;
}

.no-js .owl-carousel,
.owl-carousel.owl-loaded {
    display: block;
}

.owl-carousel .owl-dot,
.owl-carousel .owl-nav .owl-next,
.owl-carousel .owl-nav .owl-prev {
    cursor: pointer;
    user-select: none;
    background: transparent;
    border: none;
    padding: 0 !important;
    transition: opacity 0.3s ease;
}

/* Loading States - Prevent "Flash of Unstyled Content" */
.owl-carousel.owl-loading {
    opacity: 0;
    display: block;
}

.owl-carousel.owl-hidden {
    opacity: 0;
}

.owl-carousel.owl-drag .owl-item {
    touch-action: none;
    user-select: none;
}

.owl-carousel.owl-grab {
    cursor: move;
    cursor: grab;
}

/* RTL Support */
.owl-carousel.owl-rtl {
    direction: rtl;
}

/* Modern Animations using hardware acceleration */
.owl-carousel .animated {
    animation-duration: 600ms; /* Snappier for UX */
    animation-fill-mode: both;
    will-change: transform, opacity;
}

.owl-carousel .fadeOut {
    animation-name: fadeOut;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Smooth Height for varied product title lengths */
.owl-height {
    transition: height 0.3s ease-in-out;
}

/* Lazy Loading Optimization */
.owl-carousel .owl-item .owl-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

.owl-carousel .owl-item img.owl-lazy {
    transform-style: preserve-3d;
}