/* General Carousel Container */
.owl-carousel,
.owl-carousel .owl-item {
    -webkit-tap-highlight-color: transparent; /* Disable highlight on tap */
    position: relative;
}

/* Main Carousel Settings */
.owl-carousel {
    display: none; /* Hide the carousel until it's ready */
    width: 100%; /* Full width */
    z-index: 1; /* Ensure it's above other content */
}

/* Stage Container for the Items */
.owl-carousel .owl-stage {
    position: relative;
    -ms-touch-action: pan-Y; /* Enable vertical touch scrolling */
    touch-action: manipulation;
    -moz-backface-visibility: hidden; /* Improve performance */
}

/* Clearfix Hack to Ensure Proper Layout */
.owl-carousel .owl-stage:after {
    content: "."; /* Invisible content for clearing floats */
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}

/* Stage Outer Container for Overflow Management */
.owl-carousel .owl-stage-outer {
    position: relative;
    overflow: hidden;
    -webkit-transform: translate3d(0, 0, 0); /* Enable GPU acceleration */
}

/* Item Styling */
.owl-carousel .owl-item,
.owl-carousel .owl-wrapper {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0); /* Optimize performance */
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
}

.owl-carousel .owl-item {
    min-height: 1px; /* Ensure items have a minimum height */
    float: left;
    -webkit-backface-visibility: hidden;
    -webkit-touch-callout: none; /* Disable touch callout */
}

.owl-carousel .owl-item img {
    display: block;
    width: 100%; /* Responsive image width */
}

/* Hide Dots and Navigation when Disabled */
.owl-carousel .owl-dots.disabled,
.owl-carousel .owl-nav.disabled {
    display: none;
}

/* Display Carousel when Loaded */
.no-js .owl-carousel,
.owl-carousel.owl-loaded {
    display: block;
}

/* Dots and Navigation Cursor Style */
.owl-carousel .owl-dot,
.owl-carousel .owl-nav .owl-next,
.owl-carousel .owl-nav .owl-prev {
    cursor: pointer;
    -webkit-user-select: none; /* Prevent text selection */
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Remove Button Defaults */
.owl-carousel .owl-nav button.owl-next,
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel button.owl-dot {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0 !important;
    font: inherit;
}

/* Loading State for Carousel */
.owl-carousel.owl-loading {
    opacity: 0;
    display: block;
}

/* Hidden State for Carousel */
.owl-carousel.owl-hidden {
    opacity: 0;
}

/* Hide Items While Refreshing */
.owl-carousel.owl-refresh .owl-item {
    visibility: hidden;
}

/* Dragging State */
.owl-carousel.owl-drag .owl-item {
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Cursor Change on Grab */
.owl-carousel.owl-grab {
    cursor: move;
    cursor: grab;
}

/* RTL Support */
.owl-carousel.owl-rtl {
    direction: rtl;
}

.owl-carousel.owl-rtl .owl-item {
    float: right;
}

/* Animation Classes */
.owl-carousel .animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.owl-carousel .owl-animated-in {
    z-index: 0;
}

.owl-carousel .owl-animated-out {
    z-index: 1;
}

/* Fade Out Animation */
.owl-carousel .fadeOut {
    animation-name: fadeOut;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Height Transition for Responsive Adjustments */
.owl-height {
    transition: height 0.5s ease-in-out;
}

/* Lazy Loading Settings */
.owl-carousel .owl-item .owl-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.owl-carousel .owl-item .owl-lazy:not([src]),
.owl-carousel .owl-item .owl-lazy[src^=""] {
    max-height: 0;
}

/* Image Settings for Lazy Loading */
.owl-carousel .owl-item img.owl-lazy {
    transform-style: preserve-3d;
}

/* Video Wrapper */
.owl-carousel .owl-video-wrapper {
    position: relative;
    height: 100%;
    background: #000;
}

/* Video Play Icon Styling */
.owl-carousel .owl-video-play-icon {
    position: absolute;
    height: 80px;
    width: 80px;
    left: 50%;
    top: 50%;
    margin-left: -40px;
    margin-top: -40px;
    background: url(owl.video.play.png) no-repeat;
    cursor: pointer;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    transition: transform 0.1s ease;
}

/* Video Play Icon Hover Effect */
.owl-carousel .owl-video-play-icon:hover {
    -ms-transform: scale(1.3, 1.3);
    transform: scale(1.3, 1.3);
}

/* Hide Play Icon and Thumbnail When Video is Playing */
.owl-carousel .owl-video-playing .owl-video-play-icon,
.owl-carousel .owl-video-playing .owl-video-tn {
    display: none;
}

/* Video Thumbnail Settings */
.owl-carousel .owl-video-tn {
    opacity: 0;
    height: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    transition: opacity 0.4s ease;
}

/* Video Frame Settings */
.owl-carousel .owl-video-frame {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
}
