.uextras-product-images-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Main Image Container */
.uextras-gallery-main {
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.uextras-gallery-main-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.uextras-gallery-main-inner img {
    display: block;
    width: 100%;
    height: auto;
    object-position: center;
}

/* Thumbnails Container */
.uextras-gallery-thumbnails-inner {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.uextras-gallery-thumb {
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.uextras-gallery-thumb img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.uextras-gallery-thumb.active img,
.uextras-gallery-thumb:hover img {
    opacity: 1;
}

/* Hover Zoom Support */
.uextras-has-zoom .uextras-gallery-main-inner {
    cursor: zoom-in;
}

.uextras-has-zoom .uextras-gallery-main-inner:hover img {
    /* Fast transition for scale, but no transition for origin to follow mouse instantly */
    transition: transform 0.2s ease-out;
}

.uextras-gallery-thumbnails-inner {
    display: flex;
    flex-wrap: wrap;
}

.uextras-gallery-thumb {
    flex: 1;
    min-width: 15%;
    max-width: 20%;
}

/* Lightbox Styles */
.uextras-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.uextras-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.uextras-lightbox-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.uextras-lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    user-select: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    transform: scale(0.9);
}

.uextras-lightbox.active img {
    transform: scale(1);
}

body.uextras-lightbox-open {
    overflow: hidden !important;
}

.uextras-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 1000000;
}

.uextras-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 1000000;
    transition: opacity 0.3s ease;
}

.uextras-lightbox-nav:hover {
    opacity: 0.7;
}

.uextras-lightbox-prev {
    left: 10px;
}

.uextras-lightbox-next {
    right: 10px;
}