/**
 * Product Image Gallery Widget Styles
 * Ultra-lightweight and performant
 *
 * @package Storedash_Checkout
 * @since 2.9.0
 */

/* ============================================
   Gallery Container
   ============================================ */

.storedash-product-gallery {
    position: relative;
    width: 100%;
}

.gallery-container {
    display: flex;
    gap: 16px;
}

/* ============================================
   Layout Variations
   ============================================ */

/* Thumbnails Left */
.gallery-layout-left .gallery-container {
    flex-direction: row;
}

.gallery-layout-left .product-thumbnails-wrapper {
    flex-direction: column;
    order: -1;
}

/* Thumbnails Right */
.gallery-layout-right .gallery-container {
    flex-direction: row;
}

.gallery-layout-right .product-thumbnails-wrapper {
    flex-direction: column;
}

/* Thumbnails Bottom */
.gallery-layout-bottom .gallery-container {
    flex-direction: column;
}

.gallery-layout-bottom .product-thumbnails-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Stacked (No Thumbnails) */
.gallery-layout-stacked .product-thumbnails-wrapper {
    display: none;
}

/* ============================================
   Main Gallery
   ============================================ */

.main-gallery-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 12px;
}

.main-gallery {
    width: 100%;
    height: 100%;
}

.main-image-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    background-color: transparent !important;
}

/* Override any WordPress/WooCommerce link styles */
.main-image-slide a,
.main-image-slide a:hover,
.main-image-slide a:active,
.main-image-slide a:focus {
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
}

.main-image-slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: transparent !important;
    background-color: transparent !important;
}

/* Override WordPress/WooCommerce image hover/active states */
.main-image-slide img:hover,
.main-image-slide img:active,
.main-image-slide img:focus {
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
}

/* ============================================
   Zoom Effect (Optional)
   ============================================ */

.storedash-product-gallery.has-zoom .main-image-slide {
    cursor: zoom-in;
}

.storedash-product-gallery.has-zoom .main-image-slide img {
    transition: transform 0.3s ease;
}

.storedash-product-gallery.has-zoom .main-image-slide:hover img {
    transform: scale(1.1);
}

/* ============================================
   Sale Badge & Out of Stock Badge
   ============================================ */

.main-gallery-container .sale-badge,
.main-gallery-container .out-of-stock-badge {
    position: absolute;
    display: inline-block !important;
    width: auto !important;
    max-width: max-content;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-gallery-container .sale-badge {
    background: #ef4444;
}

.main-gallery-container .out-of-stock-badge {
    background: #6b7280;
    padding: 8px 16px;
}

/* Default position: top-left (controlled by Elementor now) */
.badge-position-top-left .main-gallery-container .sale-badge {
    top: 16px;
    left: 16px;
}

.badge-position-top-right .main-gallery-container .sale-badge {
    top: 16px;
    right: 16px;
    left: auto;
}

.badge-position-bottom-left .main-gallery-container .sale-badge {
    bottom: 16px;
    left: 16px;
    top: auto;
}

.badge-position-bottom-right .main-gallery-container .sale-badge {
    bottom: 16px;
    right: 16px;
    top: auto;
    left: auto;
}

/* Out of Stock Badge Positioning */
.out-of-stock-position-top-left .main-gallery-container .out-of-stock-badge {
    top: 16px;
    left: 16px;
}

.out-of-stock-position-top-right .main-gallery-container .out-of-stock-badge {
    top: 16px;
    right: 16px;
    left: auto;
}

.out-of-stock-position-bottom-left .main-gallery-container .out-of-stock-badge {
    bottom: 16px;
    left: 16px;
    top: auto;
}

.out-of-stock-position-bottom-right .main-gallery-container .out-of-stock-badge {
    bottom: 16px;
    right: 16px;
    top: auto;
    left: auto;
}

.out-of-stock-position-center .main-gallery-container .out-of-stock-badge {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   Enlarge Button (Expand Icon)
   ============================================ */

.enlarge-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none; /* Can be overridden by Elementor border control */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0; /* Can be overridden by Elementor padding control */
}

/* Default position: top-right (controlled by Elementor now) */
.expand-icon-top-right .enlarge-btn {
    top: 16px;
    right: 16px;
}

.expand-icon-top-left .enlarge-btn {
    top: 16px;
    left: 16px;
    right: auto;
}

.expand-icon-bottom-right .enlarge-btn {
    bottom: 16px;
    right: 16px;
    top: auto;
}

.expand-icon-bottom-left .enlarge-btn {
    bottom: 16px;
    left: 16px;
    top: auto;
    right: auto;
}

.enlarge-btn:hover {
    background: #E65500;
    transform: scale(1.1);
}

.enlarge-btn:hover svg {
    stroke: #ffffff;
}

.enlarge-btn svg {
    stroke: #1f2937;
    transition: stroke 0.2s ease;
}

/* ============================================
   Navigation Arrows
   ============================================ */

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav-prev {
    left: 16px;
}

.gallery-nav-next {
    right: 16px;
}

/* Navigation hover animations - configurable */
.nav-anim-scale .gallery-nav-btn:hover {
    background: #E65500;
    transform: translateY(-50%) scale(1.1);
}

.nav-anim-scale-up .gallery-nav-btn:hover {
    background: #E65500;
    transform: translateY(calc(-50% - 4px)) scale(1.1);
}

.nav-anim-none .gallery-nav-btn:hover {
    background: #E65500;
    transform: translateY(-50%);
}

.gallery-nav-btn:hover svg {
    stroke: #ffffff;
}

.gallery-nav-btn svg {
    transition: stroke 0.2s ease;
}

/* Hide navigation on mobile */
@media (max-width: 768px) {
    .gallery-nav-btn {
        display: none;
    }
}

/* ============================================
   Thumbnails
   ============================================ */

.product-thumbnails-wrapper {
    display: flex;
    gap: 10px;
    position: relative;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0;
    flex-shrink: 0;
}

/* Override WordPress/WooCommerce thumbnail states */
.product-thumbnail:hover,
.product-thumbnail:active,
.product-thumbnail:focus {
    background: transparent !important;
    background-color: transparent !important;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: transparent !important;
    background-color: transparent !important;
}

/* Override WordPress/WooCommerce thumbnail hover/active states */
.product-thumbnail img:hover,
.product-thumbnail img:active,
.product-thumbnail img:focus {
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
}

.product-thumbnail:hover {
    border-color: #9ca3af;
    transform: translateY(-2px);
}

.product-thumbnail.active {
    border-color: #E65500;
    border-width: 2px;
}

/* ============================================
   Thumbnails Container (for vertical layouts)
   ============================================ */

.product-thumbnails-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Fix left/right layout positioning */
.gallery-layout-left .product-thumbnails-container {
    order: -1;
}

/* For left/right layouts: flex row with wrap to position thumbnails and chevrons */
.gallery-layout-left .product-thumbnails-container,
.gallery-layout-right .product-thumbnails-container {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Thumbnails wrapper takes full width and is ordered first */
.gallery-layout-left .product-thumbnails-wrapper,
.gallery-layout-right .product-thumbnails-wrapper {
    order: 1;
    width: 100%;
}

/* Chevrons are ordered after and sit on their own row */
.gallery-layout-left .thumbs-nav-up,
.gallery-layout-left .thumbs-nav-down,
.gallery-layout-right .thumbs-nav-up,
.gallery-layout-right .thumbs-nav-down {
    order: 2;
}

/* Vertical layout (left/right) */
.gallery-layout-left .product-thumbnails-wrapper,
.gallery-layout-right .product-thumbnails-wrapper {
    max-height: 500px;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Hide scrollbar for left/right layouts when there's vertical overflow */
.gallery-layout-left .product-thumbnails-wrapper::-webkit-scrollbar,
.gallery-layout-right .product-thumbnails-wrapper::-webkit-scrollbar {
    width: 0;
}

.gallery-layout-left .product-thumbnails-wrapper,
.gallery-layout-right .product-thumbnails-wrapper {
    scrollbar-width: none;
}

/* ============================================
   Vertical Navigation Buttons (Up/Down Chevrons)
   ============================================ */

.thumbs-nav-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    flex-shrink: 0;
}

.thumbs-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: #1f2937 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
    fill: none !important;
    transition: stroke 0.2s ease;
    display: block;
}

.thumbs-nav-btn:hover:not(.disabled) {
    background: #E65500;
    border-color: #E65500;
    transform: scale(1.05);
}

.thumbs-nav-btn:hover:not(.disabled) svg {
    stroke: #ffffff;
}

.thumbs-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.7);
}

/* Default stacking for bottom layout */
.gallery-layout-bottom .thumbs-nav-up {
    margin-bottom: 8px;
}

.gallery-layout-bottom .thumbs-nav-down {
    margin-top: 8px;
}

/* Chevron buttons styling for left/right layouts */
.gallery-layout-left .thumbs-nav-btn,
.gallery-layout-right .thumbs-nav-btn {
    margin: 8px 4px 0 4px;
    flex: 0 0 auto;
}

/* Show chevrons only when there's vertical overflow in left/right layouts */
.gallery-layout-left .product-thumbnails-container.has-vertical-overflow .thumbs-nav-btn,
.gallery-layout-right .product-thumbnails-container.has-vertical-overflow .thumbs-nav-btn {
    display: flex;
}

/* ============================================
   Thumbnail Display Modes (Bottom Layout)
   ============================================ */

/* Wrap Mode - allows multiple lines */
.thumbs-mode-wrap.gallery-layout-bottom .product-thumbnails-wrapper {
    flex-wrap: wrap;
    overflow: visible;
}

/* Slider Mode - horizontal scroll, single line */
.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    cursor: grab;
}

.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper:active {
    cursor: grabbing;
}

/* Custom scrollbar for horizontal slider */
.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper::-webkit-scrollbar {
    height: 6px;
}

.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
    margin: 8px 0;
}

.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
    transition: background 0.2s;
}

.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Add subtle fade effect at the end for slider mode */
.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 6px; /* Account for scrollbar */
    width: 40px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.thumbs-mode-slider.gallery-layout-bottom .product-thumbnails-wrapper.has-overflow::after {
    opacity: 1;
}

/* ============================================
   Lightbox - Full Screen Gallery
   ============================================ */

.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
}

.lightbox-content .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.image-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    opacity: 0.9;
}

/* Image counter */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.lightbox-counter .counter-separator {
    opacity: 0.6;
    margin: 0 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close svg {
    stroke: #ffffff;
}

/* Lightbox navigation */
.lightbox-content .swiper-button-prev,
.lightbox-content .swiper-button-next {
    color: #ffffff;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lightbox-content .swiper-button-prev:hover,
.lightbox-content .swiper-button-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-content .swiper-button-prev:after,
.lightbox-content .swiper-button-next:after {
    font-size: 20px;
}

/* ============================================
   Lightbox Thumbnail Strip
   ============================================ */

.lightbox-thumbnail-strip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    z-index: 10;
    max-width: 90vw;
    /* Hardware acceleration */
    will-change: transform;
    transform: translateX(-50%) translateZ(0);
}

.lightbox-thumbnails-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    scroll-behavior: smooth;
    cursor: grab;
    /* Performance optimizations */
    contain: layout style;
    -webkit-overflow-scrolling: touch;
}

.lightbox-thumbnails-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.lightbox-thumbnails-wrapper:active {
    cursor: grabbing;
}

.lightbox-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
    /* Reset button styles and force transparent background */
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Hardware acceleration */
    will-change: transform, opacity;
    transform: translateZ(0);
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    background: transparent !important;
    background-color: transparent !important;
}

.lightbox-thumb:hover,
.lightbox-thumb:active,
.lightbox-thumb:focus {
    background: transparent !important;
    background-color: transparent !important;
}

.lightbox-thumb:hover {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.6);
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: #ffffff;
    transform: scale(1.1) translateZ(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .lightbox-thumb {
        transition: none;
    }

    .lightbox-thumbnails-wrapper {
        scroll-behavior: auto;
    }
}

/* Responsive: Tablet */
@media (max-width: 768px) {
    .lightbox-thumbnail-strip {
        padding: 10px 12px;
        border-radius: 10px;
        bottom: 15px;
    }

    .lightbox-thumb {
        width: 50px;
        height: 50px;
    }

    .lightbox-thumbnails-wrapper {
        gap: 6px;
    }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .lightbox-thumbnail-strip {
        padding: 8px 10px;
        border-radius: 8px;
        bottom: 10px;
        max-width: 95vw;
    }

    .lightbox-thumb {
        width: 45px;
        height: 45px;
    }

    .lightbox-thumbnails-wrapper {
        gap: 5px;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .gallery-container {
        gap: 12px;
    }

    /* Force bottom layout on mobile */
    .gallery-layout-left .gallery-container,
    .gallery-layout-right .gallery-container {
        flex-direction: column;
    }

    /* Ensure main gallery appears first on mobile for all layouts */
    .gallery-layout-left .main-gallery-container,
    .gallery-layout-right .main-gallery-container,
    .gallery-layout-bottom .main-gallery-container {
        order: 0 !important;
    }

    /* Ensure thumbnails appear after main image on mobile - override desktop order */
    .gallery-layout-left .product-thumbnails-container,
    .gallery-layout-right .product-thumbnails-container,
    .gallery-layout-bottom .product-thumbnails-container {
        order: 1 !important;
    }

    .gallery-layout-left .product-thumbnails-wrapper,
    .gallery-layout-right .product-thumbnails-wrapper {
        flex-direction: row;
        order: 0; /* Reset order within container */
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
    }

    .main-gallery-container .sale-badge,
    .main-gallery-container .out-of-stock-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Update mobile badge positions */
    .badge-position-top-left .main-gallery-container .sale-badge {
        top: 12px;
        left: 12px;
    }

    .badge-position-top-right .main-gallery-container .sale-badge {
        top: 12px;
        right: 12px;
    }

    .badge-position-bottom-left .main-gallery-container .sale-badge {
        bottom: 12px;
        left: 12px;
    }

    .badge-position-bottom-right .main-gallery-container .sale-badge {
        bottom: 12px;
        right: 12px;
    }

    /* Out of Stock Badge mobile positions */
    .out-of-stock-position-top-left .main-gallery-container .out-of-stock-badge {
        top: 12px;
        left: 12px;
    }

    .out-of-stock-position-top-right .main-gallery-container .out-of-stock-badge {
        top: 12px;
        right: 12px;
    }

    .out-of-stock-position-bottom-left .main-gallery-container .out-of-stock-badge {
        bottom: 12px;
        left: 12px;
    }

    .out-of-stock-position-bottom-right .main-gallery-container .out-of-stock-badge {
        bottom: 12px;
        right: 12px;
    }

    .enlarge-btn {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .enlarge-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Hardware acceleration for smooth animations */
.main-gallery,
.product-lightbox,
.gallery-nav-btn,
.product-thumbnail {
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce repaints during scroll */
.product-thumbnails-wrapper {
    -webkit-overflow-scrolling: touch;
}

/* Prevent layout shift during image load */
.main-image-slide {
    min-height: 300px;
}

/* ============================================
   Loading State
   ============================================ */

.storedash-product-gallery.loading {
    opacity: 0.6;
    pointer-events: none;
}

.storedash-product-gallery.loading .main-gallery-container:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #E65500;
    border-radius: 50%;
    border-top-color: transparent;
    animation: gallery-spin 0.6s linear infinite;
}

@keyframes gallery-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   WordPress/WooCommerce Override Protection
   Force transparent backgrounds on all states
   ============================================ */

/* Override any WordPress/WooCommerce image wrapper styles */
.storedash-product-gallery .woocommerce-product-gallery__image,
.storedash-product-gallery .woocommerce-product-gallery__image a,
.storedash-product-gallery .woocommerce-product-gallery__image img,
.storedash-product-gallery .swiper-slide,
.storedash-product-gallery .swiper-slide a,
.storedash-product-gallery .swiper-slide img {
    background: transparent !important;
    background-color: transparent !important;
}

/* Override hover states */
.storedash-product-gallery .woocommerce-product-gallery__image:hover,
.storedash-product-gallery .woocommerce-product-gallery__image a:hover,
.storedash-product-gallery .woocommerce-product-gallery__image img:hover,
.storedash-product-gallery .swiper-slide:hover,
.storedash-product-gallery .swiper-slide a:hover,
.storedash-product-gallery .swiper-slide img:hover {
    background: transparent !important;
    background-color: transparent !important;
}

/* Override active/focus states */
.storedash-product-gallery .woocommerce-product-gallery__image:active,
.storedash-product-gallery .woocommerce-product-gallery__image:focus,
.storedash-product-gallery .woocommerce-product-gallery__image a:active,
.storedash-product-gallery .woocommerce-product-gallery__image a:focus,
.storedash-product-gallery .woocommerce-product-gallery__image img:active,
.storedash-product-gallery .woocommerce-product-gallery__image img:focus,
.storedash-product-gallery .swiper-slide:active,
.storedash-product-gallery .swiper-slide:focus,
.storedash-product-gallery .swiper-slide a:active,
.storedash-product-gallery .swiper-slide a:focus,
.storedash-product-gallery .swiper-slide img:active,
.storedash-product-gallery .swiper-slide img:focus {
    background: transparent !important;
    background-color: transparent !important;
}

/* Force transparent on all gallery elements */
.storedash-product-gallery *,
.storedash-product-gallery *:hover,
.storedash-product-gallery *:active,
.storedash-product-gallery *:focus {
    box-shadow: none !important;
}

/* Ensure Swiper wrapper has transparent background */
.storedash-product-gallery .swiper-wrapper {
    background: transparent !important;
    background-color: transparent !important;
}
