/**
 * Vivaia Product Color Carousel Styles
 */

/* Container */
.vivaia-product-carousel {
    position: relative;
    width: 100%;
    max-width: 68.75vw;
    margin: 0 auto;
    background-color: #e0e0e0;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Swiper Container */
.vivaia-product-carousel .product-color-swiper {
    position: relative;
    overflow: hidden;
}

.vivaia-product-carousel .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Slides */
.vivaia-product-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vivaia-product-carousel .swiper-slide a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.vivaia-product-carousel .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Non-active slides */
.vivaia-product-carousel .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.7;
    transform: scale(0.9);
}

/* Active slide */
.vivaia-product-carousel .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

/* Navigation Arrows */
.vivaia-product-carousel .pcc-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vivaia-product-carousel .pcc-nav-btn:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vivaia-product-carousel .pcc-nav-prev {
    left: 20px;
}

.vivaia-product-carousel .pcc-nav-next {
    right: 20px;
}

.vivaia-product-carousel .pcc-nav-btn svg {
    width: 18px;
    height: 18px;
}

.vivaia-product-carousel .pcc-nav-btn.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bottom Section */
.vivaia-product-carousel .carousel-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
}

/* Price Display */
.vivaia-product-carousel .price-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.vivaia-product-carousel .price-display .current-price {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 20px;
}

.vivaia-product-carousel .price-display .current-price del {
    font-weight: 400;
    opacity: 0.5;
    margin-right: 8px;
}

.vivaia-product-carousel .price-display .current-price ins {
    text-decoration: none;
}

.vivaia-product-carousel .price-display .original-price {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    opacity: 0.5;
    text-decoration: line-through;
}

/* Color Swatch */
.vivaia-product-carousel .color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.vivaia-product-carousel .swatch-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vivaia-product-carousel .swatch-image img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* Color swatch fallback (when no image is available) */
.vivaia-product-carousel .swatch-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.vivaia-product-carousel .color-name {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #000;
    text-align: center;
}

/* Check Availability Button */
.vivaia-product-carousel .check-availability-btn {
    display: block;
    width: 100%;
    max-width: 350px;
    padding: 15px 30px;
    background-color: #000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.vivaia-product-carousel .check-availability-btn:hover {
    background-color: #333;
}

/* Empty state */
.vivaia-product-carousel-empty {
    padding: 40px 20px;
    text-align: center;
    background-color: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.vivaia-product-carousel-empty p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .vivaia-product-carousel {
        max-width: 90vw;
    }

    .vivaia-product-carousel .pcc-nav-btn {
        width: 40px;
        height: 40px;
    }

    .vivaia-product-carousel .pcc-nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .vivaia-product-carousel .pcc-nav-prev {
        left: 10px;
    }

    .vivaia-product-carousel .pcc-nav-next {
        right: 10px;
    }
}

@media screen and (max-width: 768px) {
    .vivaia-product-carousel {
        max-width: 100%;
        padding: 15px;
    }

    .vivaia-product-carousel .swiper-slide:not(.swiper-slide-active) {
        opacity: 0.5;
        transform: scale(0.85);
    }

    .vivaia-product-carousel .carousel-bottom {
        margin-top: 15px;
        padding-top: 15px;
    }

    .vivaia-product-carousel .price-display {
        margin-bottom: 10px;
    }

    .vivaia-product-carousel .price-display .current-price {
        font-size: 14px;
        line-height: 18px;
    }

    .vivaia-product-carousel .color-swatch {
        gap: 5px;
        margin-bottom: 15px;
    }

    .vivaia-product-carousel .swatch-image img {
        width: 20px;
        height: 20px;
    }

    .vivaia-product-carousel .color-name {
        font-size: 12px;
    }

    .vivaia-product-carousel .check-availability-btn {
        padding: 12px 20px;
        font-size: 13px;
        max-width: 280px;
    }

    .vivaia-product-carousel .pcc-nav-btn {
        width: 36px;
        height: 36px;
    }

    .vivaia-product-carousel .pcc-nav-btn svg {
        width: 12px;
        height: 12px;
    }

    .vivaia-product-carousel .pcc-nav-prev {
        left: 5px;
    }

    .vivaia-product-carousel .pcc-nav-next {
        right: 5px;
    }
}

/* Hide navigation on touch devices with few slides */
@media (hover: none) {
    .vivaia-product-carousel .pcc-nav-btn {
        display: none;
    }
}

/* Elementor Editor Styles */
.elementor-editor-active .vivaia-product-carousel {
    min-height: 300px;
}

.elementor-editor-active .vivaia-product-carousel-empty {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
