/* Product gallery: intentionally scoped to avoid WoodMart/Elementor collisions. */
.spd-gallery-root {
    width: 100%;
    min-width: 0;
}

.spd-gallery-root .spd-gallery-container {
    width: 100%;
    min-width: 0;
}

.spd-gallery-root .spd-featured-image {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 10px;
}

.spd-gallery-root .spd-featured-link {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
    cursor: zoom-in;
}

.spd-gallery-root .featured-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.spd-gallery-root .spd-gallery-thumbnails.swiper {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    min-width: 0;
}

.spd-gallery-root .spd-gallery-thumbnails .swiper-wrapper {
    align-items: stretch;
}

.spd-gallery-root .spd-gallery-thumbnails .swiper-slide {
    display: block;
    width: auto;
    height: auto;
    overflow: hidden;
    background: transparent;
    border-radius: 8px;
    text-align: initial;
    font-size: inherit;
}

.spd-gallery-root .spd-gallery-thumb-link {
    display: block;
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    line-height: 0;
}

.spd-gallery-root .gallery-thumbnail {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
}

.spd-gallery-root .spd-gallery-next,
.spd-gallery-root .spd-gallery-prev {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
    background: #fff;
    color: #202020;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.spd-gallery-root .spd-gallery-next::after,
.spd-gallery-root .spd-gallery-prev::after {
    font-size: 14px;
    font-weight: 700;
}

.spd-gallery-root .spd-gallery-next.swiper-button-disabled,
.spd-gallery-root .spd-gallery-prev.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

/* Only the Fancybox instance opened by this widget is customized. */
.spd-product-gallery-fancybox {
    --fancybox-bg: rgba(15, 15, 15, .96);
    z-index: 100000;
}

.spd-product-gallery-fancybox .fancybox__backdrop {
    background: rgba(15, 15, 15, .96);
}

.spd-product-gallery-fancybox .fancybox__slide {
    padding: 24px;
}

.spd-product-gallery-fancybox .fancybox__content {
    background: transparent;
}

.spd-product-gallery-fancybox .fancybox__image {
    object-fit: contain;
}

@media (max-width: 767px) {
    .spd-product-gallery-fancybox .fancybox__slide {
        padding: 8px;
    }

    .spd-gallery-root .spd-gallery-next,
    .spd-gallery-root .spd-gallery-prev {
        width: 30px;
        height: 30px;
        margin-top: -15px;
    }
}
