/**
 * Product Carousel Widget CSS
 */

.elementor-product-carousel-wrapper {
    --arrow-size: 44px;
    --arrow-color: #fff;
    --arrow-bg: rgba(0, 0, 0, 0.6);
    --thumbnail-active-border: #000;
    --thumbnail-opacity: 0.5;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
}


/* Loading state */

.elementor-product-carousel-wrapper.is-loading .product-thumbs {
    opacity: 0;
    visibility: hidden;
}

.elementor-product-carousel-wrapper .product-thumbs {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


/* Main carousel */

.elementor-product-carousel-wrapper .product-carousel-main {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 5px;
}

.elementor-product-carousel-wrapper .product-carousel-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: relative;
    background: #fff;
}

.elementor-product-carousel-wrapper .product-carousel-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
    position: relative;
    display: block;
}

/* Lightbox trigger */

.elementor-product-carousel-wrapper .epc-lightbox-trigger {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.elementor-product-carousel-wrapper .epc-lightbox-trigger:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.03);
}

.elementor-product-carousel-wrapper .epc-lightbox-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.elementor-product-carousel-wrapper .epc-lightbox-items {
    display: none;
}


/* Thumbnails */

.elementor-product-carousel-wrapper .product-thumbs-wrapper {
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
}

.elementor-product-carousel-wrapper .product-thumbs {
    width: 100%;
    overflow: hidden;
}

.elementor-product-carousel-wrapper .product-thumbs .swiper-slide {
    cursor: pointer;
    border: 2px solid transparent;
    opacity: var(--thumbnail-opacity);
    transition: all 0.3s ease;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
    height: 80px;
    position: relative;
    box-sizing: border-box;
}

.elementor-product-carousel-wrapper .product-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--thumbnail-active-border);
}

.elementor-product-carousel-wrapper .product-thumbs img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Navigation arrows */

.elementor-product-carousel-wrapper .swiper-button-next,
.elementor-product-carousel-wrapper .swiper-button-prev {
    width: var(--arrow-size);
    height: var(--arrow-size);
    background-color: var(--arrow-bg);
    color: var(--arrow-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-product-carousel-wrapper .swiper-button-next:after,
.elementor-product-carousel-wrapper .swiper-button-prev:after {
    font-size: calc(var(--arrow-size) / 2.5);
    font-weight: bold;
}


/* Responsive styles */

@media (max-width: 767px) {
    .elementor-product-carousel-wrapper {
        --arrow-size: 36px;
    }
    .elementor-product-carousel-wrapper .product-thumbs .swiper-slide {
        border-width: 1px;
    }
}


/* Fix for Elementor editor */

.elementor-editor-active .elementor-product-carousel-wrapper .product-carousel-main {
    min-height: 200px;
}

.elementor-editor-active .elementor-product-carousel-wrapper .product-thumbs {
    min-height: 60px;
}
