
/* =========================================================
   DREAMSETUP PRODUCT GALLERY – v1.0.5
   ========================================================= */

.single-product .woocommerce-product-gallery {
    position: relative;
}

/* Main image */
.single-product .woocommerce-product-gallery .flex-viewport {
    border-radius: 8px;
    overflow: hidden;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a,
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    border-radius: 8px !important;
    overflow: hidden;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Thumbnail row */
.single-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 12px 0 0 !important;
    padding: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
    display: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    float: none !important;
    flex: 0 0 calc((100% - 30px) / 4);
    width: calc((100% - 30px) / 4) !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Thumbnail */
.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid transparent;
    border-radius: 8px !important;
    opacity: 1;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, opacity .18s ease;
    box-sizing: border-box;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover {
    transform: translateY(-1px);
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: #9b3cff;
}

/* Navigation arrows – use Astra/FlexSlider native buttons */
.single-product .woocommerce-product-gallery .flex-direction-nav {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    z-index: 20 !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav li {
    list-style: none !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.12) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 21 !important;
    color: #15151a !important;
    text-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: color .18s ease, transform .18s ease !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a:hover {
    color: #9b3cff !important;
    transform: translateY(-50%) scale(1.04) !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev {
    left: 14px !important;
    right: auto !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next {
    right: 14px !important;
    left: auto !important;
}

/* Remove Astra/FlexSlider icon font and draw clean CSS chevrons. */
.single-product .woocommerce-product-gallery .flex-direction-nav a::before {
    content: "" !important;
    display: block !important;
    width: 9px !important;
    height: 9px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 2px solid currentColor !important;
    border-right: 2px solid currentColor !important;
    font-family: inherit !important;
    font-size: 0 !important;
    line-height: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a::after {
    content: none !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev::before {
    transform: translate(-35%, -50%) rotate(-135deg) !important;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next::before {
    transform: translate(-65%, -50%) rotate(45deg) !important;
}

/* Counter */
.single-product .ds-gallery-counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 25;
    min-width: 46px;
    height: 28px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(20,20,24,.82);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

/* Zoom button */
.single-product .ds-gallery-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 25;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    color: #15151a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .18s ease, transform .18s ease;
}

.single-product .ds-gallery-zoom:hover {
    color: #9b3cff;
    transform: scale(1.04);
}

.single-product .ds-gallery-zoom svg {
    width: 19px;
    height: 19px;
}

/* Mobile */
@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery .flex-viewport,
    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a,
    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
        border-radius: 6px !important;
    }

    .single-product .woocommerce-product-gallery .flex-control-thumbs {
        gap: 7px;
        margin-top: 8px !important;
    }

    .single-product .woocommerce-product-gallery .flex-control-thumbs li {
        flex-basis: calc((100% - 21px) / 4);
        width: calc((100% - 21px) / 4) !important;
    }

    .single-product .woocommerce-product-gallery .flex-control-thumbs li,
    .single-product .woocommerce-product-gallery .flex-control-thumbs li img {
        border-radius: 6px !important;
    }

    .single-product .woocommerce-product-gallery .flex-direction-nav a {
        width: 36px !important;
        height: 36px !important;
        opacity: 1;
    }

    .single-product .woocommerce-product-gallery .flex-direction-nav a:after {
        font-size: 24px !important;
    }

    .single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev {
        left: 9px !important;
    }

    .single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next {
        right: 9px !important;
    }

    .single-product .ds-gallery-zoom {
        width: 36px;
        height: 36px;
        top: 9px;
        right: 9px;
    }

    .single-product .ds-gallery-counter {
        right: 9px;
        bottom: 9px;
    }
}


/* =========================================================
   v1.0.3 – custom arrows anchored to the main gallery
   ========================================================= */
.single-product .woocommerce-product-gallery .ds-gallery-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.12) !important;
    color: #15151a !important;
    opacity: 1 !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    visibility: visible !important;
}

.single-product .woocommerce-product-gallery .ds-gallery-prev { left: 14px !important; }
.single-product .woocommerce-product-gallery .ds-gallery-next { right: 14px !important; }

.single-product .woocommerce-product-gallery .ds-gallery-nav span {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    border-top: 2px solid currentColor !important;
    border-right: 2px solid currentColor !important;
    box-sizing: border-box !important;
}

.single-product .woocommerce-product-gallery .ds-gallery-prev span {
    transform: rotate(-135deg) !important;
    margin-left: 4px !important;
}

.single-product .woocommerce-product-gallery .ds-gallery-next span {
    transform: rotate(45deg) !important;
    margin-right: 4px !important;
}

.single-product .woocommerce-product-gallery .ds-gallery-nav:hover {
    color: #9b3cff !important;
}

@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery .ds-gallery-nav {
        width: 36px !important;
        height: 36px !important;
    }
    .single-product .woocommerce-product-gallery .ds-gallery-prev { left: 9px !important; }
    .single-product .woocommerce-product-gallery .ds-gallery-next { right: 9px !important; }
    .single-product .woocommerce-product-gallery .ds-gallery-nav span {
        width: 9px !important;
        height: 9px !important;
    }
}


/* v1.0.6 – force rounded corners on EACH individual thumbnail */
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    border-radius: 8px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 8px) !important;
    -webkit-clip-path: inset(0 round 8px) !important;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    border-radius: 8px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 8px) !important;
    -webkit-clip-path: inset(0 round 8px) !important;
}

@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery .flex-control-thumbs li,
    .single-product .woocommerce-product-gallery .flex-control-thumbs li img {
        border-radius: 6px !important;
        clip-path: inset(0 round 6px) !important;
        -webkit-clip-path: inset(0 round 6px) !important;
    }
}

/* Individual Astra gallery thumbnails */
.single-product .ast-woocommerce-product-gallery__image,
.single-product .ast-woocommerce-product-gallery__image img {
    border-radius: 8px !important;
    overflow: hidden !important;
}
