/* ========================================================================
 *  gallery.css – Product Gallery Styles
 *  Loaded only on frontend single product pages.
 * ======================================================================== */


/* ========================================================================
 *  1. SWIPER THUMBNAILS CAROUSEL
 *  Container, slides, active state, navigation arrows.
 * ======================================================================== */

/* ---- 1a. Swiper container ---- */
.gallery-thumbs-swiper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
    margin-left: -10px !important;
}

/* ---- 1b. Slide styling ---- */
.gallery-thumbs-swiper .swiper-slide {
    box-sizing: border-box;
    cursor: pointer;
    border: solid 1px #ba9fcc3b;
}

.gallery-thumbs-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color .2s;
}

/* ---- 1c. Active thumbnail border ---- */
.gallery-thumbs-swiper .swiper-slide.thumb-active img {
    border-color: #BA9FCC;
}

/* ---- 1d. Navigation arrows (centered vertically) ---- */
.gallery-thumbs-swiper .swiper-button-next,
.gallery-thumbs-swiper .swiper-button-prev {
    width: 28px;
    height: 28px;
    background: #BA9FCC;
    border-radius: 50%;
    top: 50%;
    margin-top: 0;
    transform: translateY(-50%);
}

.gallery-thumbs-swiper .swiper-button-next::after,
.gallery-thumbs-swiper .swiper-button-prev::after {
    font-size: 12px;
    color: #fff;
    font-weight: 700;
}

.gallery-thumbs-swiper .swiper-button-prev { left: 2px; }
.gallery-thumbs-swiper .swiper-button-next { right: 2px; }

.gallery-thumbs-swiper .swiper-button-disabled {
    opacity: .35;
}



/* ========================================================================
 *  2. OVERRIDE BRIDGE THEME GALLERY LAYOUT
 *
 *  Bridge makes __wrapper inline-block (shrink-to-fit)
 *  and floats secondary images as a grid.
 *  We need: one image visible at a time, full-width.
 * ======================================================================== */

/* ---- 2a. Gallery wrapper – force block & full width ---- */
#product-carousel .woocommerce-product-gallery__wrapper {
    display: block !important;
    width: 100% !important;
}

/* ---- 2b. Image container – fixed aspect ratio, no layout shift ---- */
#product-carousel .woocommerce-product-gallery__image {
    display: block !important;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

/* ---- 2c. Image link – fill container (preserves lightbox click area) ---- */
#product-carousel .woocommerce-product-gallery__image a {
    display: block;
    width: 100%;
    height: 100%;
    border: solid 1px #ba9fcc3b;
}

/* ---- 2d. Image – cover-fit inside the square container ---- */
#product-carousel .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    object-position: center;
}

/* ---- 2e. Keep JS-hidden slides hidden despite Bridge float rules ---- */
#product-carousel .woocommerce-product-gallery__image[style*="display: none"] {
    display: none !important;
}

