/* Markoon Gallery Adjustments */

/* 1. Uniform Thumbnail Height */
.woocommerce-product-gallery .flex-control-thumbs li {
    height: 100px;
    /* Adjust as needed */
    overflow: hidden;
    margin-bottom: 10px;
    /* Spacing */
}

.woocommerce-product-gallery .flex-control-thumbs li img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* Ensures images cover the square/rect without distortion */
    object-position: center;
}

/* 2. Video Slide Styling */
/* 2. Video Slide Styling */
.markoon-video-slide {
    margin: 0;
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 100%;
}

.markoon-video-slide video,
.markoon-video-slide iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
}

/* Fix for Elementor Widget if it uses Swiper */
/* Elementor Products often use Swiper. The video might need to be a swiper-slide */
.swiper-slide .markoon-video-slide {
    margin-top: 0;
}

/* 3. Video Thumbnail Overlay (Play Icon) */
.woocommerce-product-gallery .flex-control-thumbs li.markoon-video-thumb {
    position: relative;
}

.woocommerce-product-gallery .flex-control-thumbs li.markoon-video-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    pointer-events: none;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 4. Hide Zoom/Lightbox Trigger on Video Slides */
/* FlexSlider (Standard WC) */
.woocommerce-product-gallery:has(.markoon-video-slide.flex-active-slide) .woocommerce-product-gallery__trigger {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Swiper (Elementor etc.) */
.woocommerce-product-gallery:has(.markoon-video-slide.swiper-slide-active) .woocommerce-product-gallery__trigger {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}