/* ── WC Variation Image Carousel ── */
.wcvc-carousel-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* ── Main image ── */
.wcvc-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: #f7f7f7;
}
.wcvc-main-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .25s ease;
}
.wcvc-main-image video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ── Prev / Next arrows ── */
.wcvc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, box-shadow .2s;
    padding: 0;
    line-height: 1;
    font-size: 0;
}
.wcvc-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.wcvc-arrow svg {
    width: 18px;
    height: 18px;
    stroke: #333;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.wcvc-arrow--prev { left: 10px; }
.wcvc-arrow--next { right: 10px; }

/* ── Counter badge ── */
.wcvc-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
}

/* ── Thumbnail strip ── */
.wcvc-thumbnails {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.wcvc-thumbnails::-webkit-scrollbar {
    height: 4px;
}
.wcvc-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}
.wcvc-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: .6;
    transition: opacity .2s, border-color .2s;
}
.wcvc-thumb.active,
.wcvc-thumb:hover {
    opacity: 1;
    border-color: #333;
}
.wcvc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wcvc-thumb--video {
    position: relative;
}
.wcvc-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    pointer-events: none;
}
.wcvc-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #333;
    color: #fff;
    font-size: 18px;
}

/* ── Lightbox ── */
.wcvc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.wcvc-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}
.wcvc-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,.4);
}
.wcvc-lightbox video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,.4);
    background: #000;
}
.wcvc-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.wcvc-lightbox .wcvc-arrow {
    position: absolute;
}
.wcvc-lightbox .wcvc-arrow--prev { left: 20px; }
.wcvc-lightbox .wcvc-arrow--next { right: 20px; }

/* ── Hide default WooCommerce gallery when carousel is active ── */
.wcvc-has-carousel .woocommerce-product-gallery__wrapper,
.wcvc-has-carousel .flex-viewport,
.wcvc-has-carousel .flex-control-thumbs,
.wcvc-has-carousel .flex-direction-nav,
.wcvc-has-carousel .woocommerce-product-gallery__trigger {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .wcvc-arrow { width: 34px; height: 34px; }
    .wcvc-arrow svg { width: 15px; height: 15px; }
    .wcvc-thumb { width: 52px; height: 52px; }
}
