/* ==========================================================================
   WooCommerce Vertical Carousel & Video Gallery Stylesheet
   ========================================================================== */

.wcvgv-gallery-container {
    display: flex;
    gap: 15px;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Position: Left (Vertical Thumbnails on Left)
   -------------------------------------------------------------------------- */
.wcvgv-gallery-container.wcvgv-position-left {
    flex-direction: row;
}

.wcvgv-gallery-container.wcvgv-position-left .wcvgv-thumbs-wrapper {
    width: 90px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wcvgv-gallery-container.wcvgv-position-left .wcvgv-main-wrapper {
    flex-grow: 1;
    min-width: 0;
    /* Prevents swiper overflow flex bug */
}

/* --------------------------------------------------------------------------
   Position: Bottom (Horizontal Thumbnails)
   -------------------------------------------------------------------------- */
.wcvgv-gallery-container.wcvgv-position-bottom {
    flex-direction: column-reverse;
}

.wcvgv-gallery-container.wcvgv-position-bottom .wcvgv-thumbs-wrapper {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* --------------------------------------------------------------------------
   Thumbnail Slider & Controls
   -------------------------------------------------------------------------- */
.wcvgv-thumbs-wrapper {
    user-select: none;
}

.wcvgv-thumbs-slider {
    width: 100%;
    height: 100%;
    max-height: 480px;
    overflow: hidden;
    position: relative;
}

.wcvgv-thumb-slide {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.wcvgv-thumb-slide.swiper-slide-thumb-active,
.wcvgv-thumb-slide:hover {
    opacity: 1;
}

.wcvgv-thumb-inner {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect ratio square */
    background: #f7f7f7;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.wcvgv-thumb-slide.swiper-slide-thumb-active .wcvgv-thumb-inner {
    border-color: #2563eb;
    /* Primary accent color */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.wcvgv-thumb-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video badge indicator on thumbnail */
.wcvgv-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.wcvgv-thumb-slide:hover .wcvgv-video-badge {
    transform: translate(-50%, -50%) scale(1.15);
    background: #e11d48;
    /* Red play badge */
}

/* Vertical thumbnail nav buttons */
.swiper-button-prev-custom,
.swiper-button-next-custom {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    z-index: 10;
    transition: all 0.2s ease;
    margin: 4px 0;
}

.swiper-button-prev-custom:hover,
.swiper-button-next-custom:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed !important;
}

/* --------------------------------------------------------------------------
   Main Image Slider & Video Embed
   -------------------------------------------------------------------------- */
.wcvgv-main-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.wcvgv-main-slider {
    width: 100%;
    height: 100%;
}

.wcvgv-main-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.wcvgv-image-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wcvgv-image-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.wcvgv-image-wrap.wcvgv-zoomable {
    cursor: zoom-in;
}

/* Responsive Video Container (16:9) */
.wcvgv-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* 4:3 default product ratio */
    height: 0;
    background: #000000;
    overflow: hidden;
}

.wcvgv-video-wrap iframe,
.wcvgv-video-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Main slider arrows */
.wcvgv-main-slider .swiper-button-prev,
.wcvgv-main-slider .swiper-button-next {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.85);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.wcvgv-main-slider .swiper-button-prev:after,
.wcvgv-main-slider .swiper-button-next:after {
    font-size: 16px !important;
    font-weight: bold;
    color: #1e293b !important;

}

.wcvgv-main-slider .swiper-button-prev:hover,
.wcvgv-main-slider .swiper-button-next:hover {
    background: #ffffff;
    transform: scale(1.08);
}

/* Main slider pagination (mobile) */
.wcvgv-pagination {
    display: none;
}

.wcvgv-pagination .swiper-pagination-bullet-active {
    background: #2563eb;
}

/* --------------------------------------------------------------------------
   Responsive Layout (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .wcvgv-gallery-container.wcvgv-position-left {
        flex-direction: column-reverse;
    }

    .wcvgv-gallery-container.wcvgv-position-left .wcvgv-thumbs-wrapper {
        width: 100%;
        flex-direction: row;
        margin-top: 10px;
    }

    .wcvgv-thumbs-slider {
        max-height: 90px;
    }

    .wcvgv-pagination {
        display: block;
    }

    .swiper-button-prev-custom,
    .swiper-button-next-custom {
        transform: rotate(-90deg);
    }
}

/* --------------------------------------------------------------------------
   Image Lightbox Modal
   -------------------------------------------------------------------------- */
.wcvgv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.wcvgv-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.wcvgv-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.wcvgv-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.wcvgv-modal-close:hover {
    color: #ef4444;
}