@import "tailwindcss";
@import "flowbite/src/themes/default";
@plugin "flowbite/plugin";
@source "../node_modules/flowbite";

@custom-variant dark (&:where(.dark, .dark *));

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 7));
    }
}

.slider {
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: auto;
}

.slider .slide-track {
    animation: scroll 40s linear infinite;
    display: flex;
    width: calc(250px * 14);
}

.slider .slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider .slide img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.dark .slider {
    background: rgb(17, 24, 39);
}

/* Mega Menu Positioning */
#mega-menu-full-dropdown,
#vendor-mega-menu-dropdown,
#about-mega-menu-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Owl Carousel Custom Styles */
.owl-carousel .owl-dots {
    display: none !important;
}

.owl-dots-container {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 5px;
    z-index: 20;
}

.owl-dots-container .owl-dot {
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4) !important;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.owl-dots-container .owl-dot::before {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border-radius: 50%;
}

.owl-dots-container .owl-dot.active {
    background-color: white !important;
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.owl-carousel .item {
    position: relative;
    overflow: hidden;
}

.owl-carousel .item img {
    transition: transform 0.7s ease;
}

.owl-carousel .active .item img {
    transform: scale(1.05);
}

.owl-prev-custom,
.owl-next-custom {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.owl-prev-custom:hover,
.owl-next-custom:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Lazy Load Styles */
.owl-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.owl-lazy.owl-lazy-loaded {
    opacity: 1;
}

.owl-carousel .owl-item .item {
    position: relative;
}

.owl-carousel .owl-item .item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.owl-carousel .owl-item.active .item::before {
    display: none;
}

/* Loading Indicator */
.carousel-loading {
    position: relative;
    min-height: 400px;
}

.dark .carousel-loading {
    background-color: #1f2937;
}

.carousel-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #dc2626;
    animation: loader-spin 1s infinite linear;
    z-index: 20;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.owl-carousel {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.owl-carousel.owl-loaded {
    opacity: 1;
}

/* Progres Bar untuk Slide */
.owl-carousel .owl-dots::before {
    display: none;
}

.owl-carousel .slide-progress {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    max-width: 100px;
    background-color: white;
    border-radius: 2px;
    transition: width 5s linear;
    z-index: 20;
}

.owl-carousel.paused .slide-progress {
    transition: none;
}