.wcpvg-gallery-wrapper {
    width: 100%;
    max-width: 600px;
}

.wcpvg-thumbs-left,
.wcpvg-thumbs-right {
    display: flex;
    gap: 15px;
}

.wcpvg-thumbs-right {
    flex-direction: row-reverse;
}

.wcpvg-thumbs-left .wcpvg-main-display,
.wcpvg-thumbs-right .wcpvg-main-display {
    flex: 1;
}

.wcpvg-main-display {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: var(--wcpvg-aspect, 1/1);
}

.wcpvg-slide {
    width: 100%;
    height: 100%;
}

.wcpvg-slide > a,
.wcpvg-slide > a > img,
.wcpvg-slide > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wcpvg-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wcpvg-video-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wcpvg-video-placeholder {
    width: 100%;
    height: 100%;
}

.wcpvg-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, .7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, transform .3s;
}

.wcpvg-play-btn:hover {
    background: rgba(0, 0, 0, .9);
    transform: translate(-50%, -50%) scale(1.1);
}

.wcpvg-play-btn svg {
    width: 36px;
    height: 36px;
    fill: #fff;
    margin-left: 5px;
}

.wcpvg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: box-shadow .3s;
    z-index: 10;
}

.wcpvg-nav:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

.wcpvg-nav svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.wcpvg-nav-prev {
    left: 15px;
}

.wcpvg-nav-next {
    right: 15px;
}

.wcpvg-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wcpvg-dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, .3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background .3s;
}

.wcpvg-dot.active,
.wcpvg-dot:hover {
    background: rgba(0, 0, 0, .8);
}

.wcpvg-thumb {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .3s;
}

.wcpvg-thumb:hover,
.wcpvg-thumb.active {
    border-color: #000;
}

.wcpvg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcpvg-thumb-placeholder {
    width: 100%;
    height: 100%;
}

.wcpvg-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

#wcpvg-video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
}

.wcpvg-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .9);
}

.wcpvg-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
}

.wcpvg-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}

.wcpvg-lightbox-media video,
.wcpvg-lightbox-media iframe {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: none;
}

.wcpvg-lightbox-media img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
}

/* Thumbnail carousel wrapper */
.wcpvg-thumb-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
}

.wcpvg-thumbs-left .wcpvg-thumb-carousel,
.wcpvg-thumbs-right .wcpvg-thumb-carousel {
    flex-direction: column;
    width: 92px;
    margin-top: 0;
    align-items: center;
}

/* Scrollable track - hide scrollbar, JS-driven */
.wcpvg-thumbnails {
    display: flex;
    gap: 10px;
    overflow: hidden;
    scroll-behavior: smooth;
    flex: 1;
    /* Remove max-width and padding - carousel controls this */
    margin-top: 0;
    padding: 0;
}

.wcpvg-thumbnails-vertical {
    flex-direction: column;
    max-height: calc(6 * 80px + 5 * 10px);
    width: 80px;
    flex-shrink: 0;
    overflow: hidden;
    scroll-behavior: smooth;
}

/* Carousel prev/next buttons */
.wcpvg-thumb-prev,
.wcpvg-thumb-next {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: box-shadow .2s, opacity .2s;
    padding: 0;
    z-index: 5;
}

.wcpvg-thumb-prev:hover,
.wcpvg-thumb-next:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.wcpvg-thumb-prev:disabled,
.wcpvg-thumb-next:disabled {
    opacity: .35;
    cursor: default;
    box-shadow: none;
}

.wcpvg-thumb-prev svg,
.wcpvg-thumb-next svg {
    fill: #333;
    display: block;
}

@media (max-width: 767px) {
    .wcpvg-gallery-wrapper.wcpvg-thumbs-left,
    .wcpvg-gallery-wrapper.wcpvg-thumbs-right {
        flex-direction: column;
    }

    .wcpvg-gallery-wrapper.wcpvg-thumbs-left[data-mobile-thumbs="top"],
    .wcpvg-gallery-wrapper.wcpvg-thumbs-right[data-mobile-thumbs="top"] {
        flex-direction: column;
    }

    .wcpvg-gallery-wrapper.wcpvg-thumbs-left[data-mobile-thumbs="bottom"],
    .wcpvg-gallery-wrapper.wcpvg-thumbs-right[data-mobile-thumbs="bottom"] {
        flex-direction: column-reverse;
    }

    .wcpvg-gallery-wrapper[data-mobile-thumbs="bottom"] .wcpvg-thumb-carousel,
    .wcpvg-gallery-wrapper[data-mobile-thumbs="top"] .wcpvg-thumb-carousel {
        flex-direction: row;
        width: auto;
        margin-top: 15px;
        align-items: center;
    }

    .wcpvg-gallery-wrapper[data-mobile-thumbs="top"] .wcpvg-thumb-carousel {
        margin-top: 0;
        margin-bottom: 15px;
    }

    .wcpvg-gallery-wrapper[data-mobile-thumbs="bottom"] .wcpvg-thumbnails-vertical,
    .wcpvg-gallery-wrapper[data-mobile-thumbs="top"] .wcpvg-thumbnails-vertical {
        flex-direction: row;
        width: auto;
        max-height: none;
        max-width: calc(6 * 80px + 5 * 10px);
    }

    .wcpvg-gallery-wrapper.wcpvg-thumbs-left[data-mobile-thumbs="bottom"] .wcpvg-main-display,
    .wcpvg-gallery-wrapper.wcpvg-thumbs-right[data-mobile-thumbs="bottom"] .wcpvg-main-display {
        flex: none;
        width: 100%;
    }
}
