/**
 * WooCommerce Ultra Gallery - Frontend Styles
 */

/* CSS Custom Properties */
:root {
    --wug-thumbnail-size: 80px;
    --wug-thumbnail-gap: 8px;
    --wug-border-radius: 14px;
    --wug-nav-size: 44px;
    --wug-transition: 200ms ease;
    --wug-aspect-ratio: 4/5;
    --wug-gallery-width: 50%;
}

/* Gallery Container */
.wug-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    position: relative;
    margin-bottom: 25px;
}

/* Gallery Width on Desktop */
@media (min-width: 900px) {
    .wug-gallery {
        max-width: var(--wug-gallery-width);
    }
}

/* Thumbnails Left Layout (Desktop) */
@media (min-width: 900px) {
    .wug-gallery.wug-thumbnails-left {
        flex-direction: row;
        gap: 16px;
    }

    .wug-gallery.wug-thumbnails-left .wug-thumbnails {
        order: -1;
        flex-shrink: 0;
        width: var(--wug-thumbnail-size);
    }

    .wug-gallery.wug-thumbnails-left .wug-main {
        flex: 1;
        max-width: calc(100% - var(--wug-thumbnail-size) - 16px);
    }
}

/* Thumbnails Bottom Layout */
.wug-gallery.wug-thumbnails-bottom {
    flex-direction: column;
}

.wug-gallery.wug-thumbnails-bottom .wug-thumbnails {
    order: 1;
}

/* Thumbnails */
.wug-thumbnails {
    display: none;
}

@media (min-width: 900px) {
    .wug-thumbnails {
        display: block;
    }
}

/* Hide thumbnails completely when using thumbnails="none" */
.wug-gallery.wug-thumbnails-hidden .wug-thumbnails {
    display: none !important;
}

.wug-thumbnails-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--wug-thumbnail-gap);
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wug-thumbnails-list::-webkit-scrollbar {
    display: none;
}

.wug-gallery.wug-thumbnails-bottom .wug-thumbnails-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
}

.wug-thumbnail-item {
    flex-shrink: 0;
}

.wug-thumbnail-button {
    position: relative;
    display: block;
    width: var(--wug-thumbnail-size);
    height: var(--wug-thumbnail-size);
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--wug-border-radius);
}

.wug-thumbnail-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--wug-border-radius);
    box-shadow: inset 0 0 0 2px transparent;
    transition: box-shadow var(--wug-transition);
    pointer-events: none;
}

.wug-thumbnail-button.is-active::after,
.wug-thumbnail-button:hover::after {
    box-shadow: inset 0 0 0 2px currentColor;
}

.wug-thumbnail-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Thumbnail Viewport (scrollable container) */
.wug-thumbnails-viewport {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.wug-thumbnails-viewport .wug-thumbnails-list {
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wug-thumbnails-viewport .wug-thumbnails-list::-webkit-scrollbar {
    display: none;
}

/* Thumbnail Navigation Arrows (Desktop Only) */
.wug-thumb-nav {
    display: none;
}

@media (min-width: 900px) {
    /* Make thumbnails container a flex column with arrows */
    .wug-gallery.wug-thumbnails-left .wug-thumbnails {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .wug-thumb-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 32px;
        padding: 0;
        border: none;
        border-radius: calc(var(--wug-border-radius) / 2);
        background-color: #f5f5f5;
        cursor: pointer;
        opacity: 1;
        transition: opacity var(--wug-transition), background-color var(--wug-transition);
        flex-shrink: 0;
    }

    .wug-thumb-nav:hover {
        background-color: #e5e5e5;
    }

    .wug-thumb-nav:active {
        background-color: #d5d5d5;
    }

    .wug-thumb-nav svg {
        width: 20px;
        height: 20px;
        stroke: #333;
    }

    /* Hide arrows when at scroll boundary or no overflow */
    .wug-thumb-nav.is-hidden {
        opacity: 0;
        pointer-events: none;
    }
}

/* Elementor compatibility for thumbnail nav */
.wug-gallery .wug-thumb-nav,
.elementor-widget .wug-gallery .wug-thumb-nav,
body .wug-gallery .wug-thumb-nav {
    background-color: #f5f5f5 !important;
    border: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Main Carousel */
.wug-main {
    position: relative;
    width: 100%;
}

.wug-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--wug-border-radius);
    background-color: #f5f5f5;
}

.embla__container {
    display: flex;
    touch-action: pan-y pinch-zoom;
}

.embla__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.wug-slide-inner {
    position: relative;
    aspect-ratio: var(--wug-aspect-ratio);
    overflow: hidden;
    border-radius: var(--wug-border-radius);
}

.wug-image-link,
.wug-image-wrapper {
    display: block;
    width: 100%;
    height: 100%;
}

.wug-image-link {
    cursor: zoom-in;
}

/* No cursor change for wrapper (lightbox disabled) */
.wug-image-wrapper {
    cursor: default;
}

.wug-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--wug-border-radius);
}

/* Navigation Arrows */
.wug-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: var(--wug-nav-size);
    height: var(--wug-nav-size);
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--wug-transition), background-color var(--wug-transition);
    display: none;
    align-items: center;
    justify-content: center;
}

@media (min-width: 900px) {
    .wug-nav {
        display: flex;
    }

    .wug-carousel:hover .wug-nav {
        opacity: 1;
    }
}

.wug-nav:hover {
    background-color: #f5f5f5;
}

.wug-nav:disabled,
.wug-nav.is-hidden {
    opacity: 0 !important;
    pointer-events: none;
    cursor: default;
}

.wug-nav svg {
    width: 24px;
    height: 24px;
}

.wug-nav-prev {
    left: 24px;
}

.wug-nav-next {
    right: 24px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wug-nav {
        background-color: #333;
        color: #fff;
    }

    .wug-nav:hover {
        background-color: #444;
    }

    .wug-nav svg {
        stroke: #fff;
    }
}

/* Progress Counter (1/3 badge) */
.wug-progress {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    position: absolute;
    bottom: 24px;
    left: 20px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    z-index: 10;
    color: #000;
}

/* Show counter on mobile when enabled */
.wug-gallery.wug-counter-mobile .wug-progress {
    display: flex;
}

@media (min-width: 900px) {
    .wug-gallery.wug-counter-mobile .wug-progress {
        display: none;
    }

    /* Show counter on desktop when enabled */
    .wug-gallery.wug-counter-desktop .wug-progress {
        display: flex;
    }
}

/* Progress Bar */
.wug-progress-bar {
    display: none;
    position: relative;
    height: 3px;
    margin-top: 8px;
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
}

/* Show progress bar on mobile when enabled */
.wug-gallery.wug-bar-mobile .wug-progress-bar {
    display: block;
}

@media (min-width: 900px) {
    .wug-gallery.wug-bar-mobile .wug-progress-bar {
        display: none;
    }

    /* Show progress bar on desktop when enabled */
    .wug-gallery.wug-bar-desktop .wug-progress-bar {
        display: block;
    }
}

.wug-progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #333;
    border-radius: 10px;
    transition: transform 300ms ease;
}

/* Placeholder */
.wug-gallery-placeholder .wug-main {
    aspect-ratio: var(--wug-aspect-ratio);
    border-radius: var(--wug-border-radius);
    overflow: hidden;
}

.wug-gallery-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Error message */
.wug-error {
    padding: 16px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* Sticky thumbnail sidebar sync with main content height */
@media (min-width: 900px) {
    .wug-gallery.wug-thumbnails-left .wug-thumbnails-list {
        position: sticky;
        top: 32px;
    }
}

/* ==========================================================================
   Theme Compatibility: Blocksy
   ========================================================================== */

/* Ensure our gallery fills the Blocksy product gallery container */
.ct-product-gallery-container .wug-gallery,
.entry-summary-items .wug-gallery {
    width: 100%;
}

/* Override Blocksy's flexy container styles when our gallery is present */
.wug-gallery ~ .flexy-container,
.wug-gallery ~ .ct-product-gallery-container {
    display: none !important;
}

/* Match Blocksy's sticky behavior */
@media (min-width: 1000px) {
    .ct-sticked .wug-gallery {
        position: sticky;
        top: var(--header-height, 100px);
    }
}

/* ==========================================================================
   PhotoSwipe Customizations
   ========================================================================== */

/*
 * PhotoSwipe v5 background customization:
 * - Use --pswp-bg CSS variable for color (hex, not rgba)
 * - Use bgOpacity JS option for transparency (0-1)
 * - Per PhotoSwipe docs: do not use rgba or opacity CSS, it affects performance
 * - We add mainClass: 'wug-pswp' to scope our styles
 */

/* Background color - scoped to our instance */
.wug-pswp {
    --pswp-bg: #fff;  /* Default, overridden by JS */
}

/* PhotoSwipe icons - adapt to background color */
.wug-pswp .pswp__button {
    color: var(--wug-pswp-icon-color, #333);
}

.wug-pswp .pswp__button--close,
.wug-pswp .pswp__button--zoom,
.wug-pswp .pswp__button--arrow--prev,
.wug-pswp .pswp__button--arrow--next {
    color: var(--wug-pswp-icon-color, #333);
}

/* Counter text color */
.wug-pswp .pswp__counter {
    color: var(--wug-pswp-icon-color, #333);
}

/* Remove slide padding in PhotoSwipe */
.wug-pswp .pswp__img {
    object-fit: contain;
}

/* ==========================================================================
   PhotoSwipe Button Reset for Elementor/Theme Compatibility
   ========================================================================== */

/*
 * Elementor and themes can override PhotoSwipe button styles.
 * These rules ensure lightbox controls work correctly.
 */

/* Reset all PhotoSwipe buttons - DO NOT use all:revert as it breaks flex layout */
.wug-pswp .pswp__button,
.wug-pswp button.pswp__button,
body .wug-pswp .pswp__button {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: 44px !important;
    height: 44px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.85 !important;
    transition: opacity 0.2s ease !important;
    color: var(--wug-pswp-icon-color, #333) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Reset Elementor button styles explicitly */
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: normal !important;
    line-height: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.wug-pswp .pswp__button:hover,
body .wug-pswp .pswp__button:hover {
    opacity: 1 !important;
    background: transparent !important;
    background-color: transparent !important;
    transform: none !important;
}

/* Arrow buttons specific styling */
.wug-pswp .pswp__button--arrow,
.wug-pswp .pswp__button--arrow--prev,
.wug-pswp .pswp__button--arrow--next,
body .wug-pswp .pswp__button--arrow,
body .wug-pswp .pswp__button--arrow--prev,
body .wug-pswp .pswp__button--arrow--next {
    background: transparent !important;
    background-color: transparent !important;
    width: 50px !important;
    height: 100px !important;
    margin-top: -50px !important;
}

/* Close and zoom buttons */
.wug-pswp .pswp__button--close,
.wug-pswp .pswp__button--zoom,
body .wug-pswp .pswp__button--close,
body .wug-pswp .pswp__button--zoom {
    width: 44px !important;
    height: 44px !important;
}

/* Ensure SVG icons in PhotoSwipe are visible */
.wug-pswp .pswp__button svg,
body .wug-pswp .pswp__button svg {
    width: 24px !important;
    height: 24px !important;
    fill: var(--wug-pswp-icon-color, #333) !important;
    stroke: var(--wug-pswp-icon-color, #333) !important;
}

/*
 * PhotoSwipe Top Bar Layout - Using ABSOLUTE positioning (not flexbox)
 * Flexbox doesn't work reliably in Elementor due to aggressive style overrides.
 * This uses display:block + absolute positioning for each element.
 */

/* Top bar container - block display, acts as positioning context */
html body .wug-pswp .pswp__top-bar,
html body .elementor .wug-pswp .pswp__top-bar,
html body .elementor-page .wug-pswp .pswp__top-bar,
html body.elementor-page .wug-pswp .pswp__top-bar {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 64px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
}

/* Counter - absolute positioned LEFT */
html body .wug-pswp .pswp__top-bar .pswp__counter,
html body .elementor .wug-pswp .pswp__top-bar .pswp__counter,
html body .elementor-page .wug-pswp .pswp__top-bar .pswp__counter,
html body.elementor-page .wug-pswp .pswp__top-bar .pswp__counter {
    position: absolute !important;
    top: 50% !important;
    left: 16px !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--wug-pswp-icon-color, #333) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    height: auto !important;
    width: auto !important;
}

/* Preloader - hidden */
html body .wug-pswp .pswp__preloader {
    display: none !important;
    visibility: hidden !important;
}

/* Zoom button - absolute positioned RIGHT (next to close) */
html body .wug-pswp .pswp__top-bar .pswp__button--zoom,
html body .elementor .wug-pswp .pswp__top-bar .pswp__button--zoom,
html body .elementor-page .wug-pswp .pswp__top-bar .pswp__button--zoom,
html body.elementor-page .wug-pswp .pswp__top-bar .pswp__button--zoom {
    position: absolute !important;
    top: 50% !important;
    right: 54px !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

/* Close button - absolute positioned RIGHT */
html body .wug-pswp .pswp__top-bar .pswp__button--close,
html body .elementor .wug-pswp .pswp__top-bar .pswp__button--close,
html body .elementor-page .wug-pswp .pswp__top-bar .pswp__button--close,
html body.elementor-page .wug-pswp .pswp__top-bar .pswp__button--close {
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

/* ==========================================================================
   Video Support
   ========================================================================== */

/* Video Wrapper */
.wug-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    border-radius: var(--wug-border-radius);
    overflow: hidden;
}

/* Video Element */
.wug-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--wug-border-radius);
}

/* Video Play Button Overlay */
.wug-video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 80px;
    height: 80px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all var(--wug-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wug-video-play-button:hover {
    background-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.wug-video-play-button.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.wug-video-play-button svg {
    width: 32px;
    height: 32px;
    color: #333;
    margin-left: 4px; /* Visual center for play icon */
}

/* Video Indicator on Thumbnails */
.wug-thumbnail-video {
    position: relative;
}

.wug-video-indicator {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 5;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    color: #fff;
}

.wug-video-indicator svg {
    width: 12px;
    height: 12px;
    margin-left: 2px; /* Visual center for play icon */
}

/* Animated WebP Indicator on Thumbnails */
.wug-animated-indicator {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 5;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    color: #fff;
}

.wug-animated-indicator svg {
    width: 12px;
    height: 12px;
    margin-left: 2px; /* Visual center for play icon */
}

/* Video slide cursor */
.wug-slide-video .wug-video-wrapper {
    cursor: pointer;
}

/* Autoplay behavior: hover - show play indicator */
.wug-video-wrapper[data-autoplay-behavior="hover"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--wug-transition);
    pointer-events: none;
}

.wug-video-wrapper[data-autoplay-behavior="hover"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #333;
    opacity: 0;
    transition: opacity var(--wug-transition);
    pointer-events: none;
    margin-left: 3px;
}

.wug-video-wrapper[data-autoplay-behavior="hover"]:not(:hover)::before,
.wug-video-wrapper[data-autoplay-behavior="hover"]:not(:hover)::after {
    opacity: 1;
}

/* Responsive video play button */
@media (max-width: 600px) {
    .wug-video-play-button {
        width: 60px;
        height: 60px;
    }

    .wug-video-play-button svg {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   Theme/Builder Compatibility: Elementor
   ========================================================================== */

/*
 * Elementor and some themes apply aggressive global styles that can break
 * our gallery. These defensive styles use high specificity to isolate
 * our components.
 */

/* Reset button styles - Elementor adds backgrounds to buttons */
/* Use all: unset to completely reset inherited/theme styles, then re-apply our values */
.wug-gallery .wug-thumbnail-button,
.elementor-widget .wug-gallery .wug-thumbnail-button,
.elementor-shortcode .wug-gallery .wug-thumbnail-button,
.elementor .wug-gallery .wug-thumbnail-button,
.elementor-element .wug-gallery .wug-thumbnail-button,
body .wug-gallery .wug-thumbnail-button,
body.elementor-page .wug-gallery .wug-thumbnail-button {
    all: unset !important;
    /* Re-apply essential button styles after reset */
    display: block !important;
    position: relative !important;
    width: var(--wug-thumbnail-size) !important;
    height: var(--wug-thumbnail-size) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: var(--wug-border-radius) !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Ensure thumbnail images display correctly */
.wug-gallery .wug-thumbnail-button img,
.elementor-widget .wug-gallery .wug-thumbnail-button img,
.elementor-shortcode .wug-gallery .wug-thumbnail-button img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: var(--wug-border-radius) !important;
}

/* Protect slide inner aspect ratio and overflow */
.wug-gallery .wug-slide-inner,
.elementor-widget .wug-gallery .wug-slide-inner,
.elementor-shortcode .wug-gallery .wug-slide-inner {
    aspect-ratio: var(--wug-aspect-ratio) !important;
    overflow: hidden !important;
    position: relative !important;
    border-radius: var(--wug-border-radius) !important;
}

/* Protect main image sizing */
.wug-gallery .wug-main-image,
.elementor-widget .wug-gallery .wug-main-image,
.elementor-shortcode .wug-gallery .wug-main-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: none !important;
    max-height: none !important;
}

/* Protect image link container */
.wug-gallery .wug-image-link,
.elementor-widget .wug-gallery .wug-image-link,
.elementor-shortcode .wug-gallery .wug-image-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* Protect carousel container */
.wug-gallery .wug-carousel,
.elementor-widget .wug-gallery .wug-carousel,
.elementor-shortcode .wug-gallery .wug-carousel {
    overflow: hidden !important;
    border-radius: var(--wug-border-radius) !important;
}

/* Protect Embla slide structure */
.wug-gallery .embla__slide,
.elementor-widget .wug-gallery .embla__slide,
.elementor-shortcode .wug-gallery .embla__slide {
    flex: 0 0 100% !important;
    min-width: 0 !important;
}

.wug-gallery .embla__container,
.elementor-widget .wug-gallery .embla__container,
.elementor-shortcode .wug-gallery .embla__container {
    display: flex !important;
}

/* Reset navigation button styles */
.wug-gallery .wug-nav,
.elementor-widget .wug-gallery .wug-nav,
.elementor-shortcode .wug-gallery .wug-nav,
body .wug-gallery .wug-nav {
    background-color: #fff !important;
    border: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    color: #333 !important;
}

/* Ensure navigation SVG icons are visible */
.wug-gallery .wug-nav svg,
.elementor-widget .wug-gallery .wug-nav svg,
.elementor-shortcode .wug-gallery .wug-nav svg,
body .wug-gallery .wug-nav svg {
    stroke: #333 !important;
    color: #333 !important;
}

/* Reset list styles for thumbnails */
.wug-gallery .wug-thumbnails-list,
.elementor-widget .wug-gallery .wug-thumbnails-list,
.elementor-shortcode .wug-gallery .wug-thumbnails-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wug-gallery .wug-thumbnail-item,
.elementor-widget .wug-gallery .wug-thumbnail-item,
.elementor-shortcode .wug-gallery .wug-thumbnail-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Prevent Elementor's figure/figcaption styles */
.wug-gallery figure,
.wug-gallery figcaption,
.elementor-widget .wug-gallery figure,
.elementor-widget .wug-gallery figcaption {
    margin: 0 !important;
    padding: 0 !important;
}

/* Prevent theme button hover effects */
.wug-gallery .wug-thumbnail-button:hover,
.wug-gallery .wug-thumbnail-button:focus,
.wug-gallery .wug-thumbnail-button:active,
.elementor-widget .wug-gallery .wug-thumbnail-button:hover,
.elementor-widget .wug-gallery .wug-thumbnail-button:focus,
.elementor-widget .wug-gallery .wug-thumbnail-button:active,
body .wug-gallery .wug-thumbnail-button:hover,
body .wug-gallery .wug-thumbnail-button:focus,
body .wug-gallery .wug-thumbnail-button:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* Re-apply the ::after pseudo-element for active state indicator */
.wug-gallery .wug-thumbnail-button::after,
.elementor-widget .wug-gallery .wug-thumbnail-button::after,
body .wug-gallery .wug-thumbnail-button::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: var(--wug-border-radius) !important;
    box-shadow: inset 0 0 0 2px transparent !important;
    transition: box-shadow 200ms ease !important;
    pointer-events: none !important;
    background: transparent !important;
}

.wug-gallery .wug-thumbnail-button.is-active::after,
.wug-gallery .wug-thumbnail-button:hover::after,
.elementor-widget .wug-gallery .wug-thumbnail-button.is-active::after,
.elementor-widget .wug-gallery .wug-thumbnail-button:hover::after,
body .wug-gallery .wug-thumbnail-button.is-active::after,
body .wug-gallery .wug-thumbnail-button:hover::after {
    box-shadow: inset 0 0 0 2px currentColor !important;
}
