.lexani-gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    position: relative;
    --lexani-fade-color: #EFEFEF;
}

.lexani-gallery-wrapper.single-item-gallery {
    max-width: 85%;
}

/* Main Image Area - Takes up more space */
.lexani-main-image {
    flex: 1 1 60%;
    /* Grow, Shrink, Basis */
    position: relative;
}

.lexani-main-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    position: relative;
    z-index: 2;
    /* Optional: match the style of the reference image */
    /* filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.2)); */
}

/* When single item is shown, main image maintains thumbnail width */
.lexani-gallery-wrapper.single-item-gallery .lexani-main-image {
    flex: 1 1 85% !important;
    max-width: 85%;
}

/* Lightbox Modal Styles */
.lexani-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.lexani-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lexani-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.lexani-lightbox-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    gap: 20px;
}

.lexani-lightbox-content {
    flex: 1;
    text-align: center;
}

.lexani-lightbox-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: auto;
}

.lexani-lightbox-label {
    color: white;
    font-size: 30px;
    text-transform: uppercase;
    margin-top: 40px;
    letter-spacing: 1px;
    font-family: "Bebas Neue", sans-serif;
}

.lexani-lightbox-close,
.lexani-lightbox-prev,
.lexani-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 3;
}

.lexani-lightbox-close:hover,
.lexani-lightbox-prev:hover,
.lexani-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.6);
}

.lexani-lightbox-close {
    top: 20px;
    right: 20px;
}

.lexani-lightbox-prev {
    left: -60px;
}

.lexani-lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lexani-lightbox-container {
        width: 95%;
        gap: 10px;
    }

    .lexani-lightbox-prev,
    .lexani-lightbox-next {
        position: static;
        padding: 8px 12px;
        font-size: 20px;
    }
}

.lexani-wheel-shadow {
    width: 90%;
    height: 120px;
    background-image: url("/wp-content/uploads/2025/07/wheel_shadow-2.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
}

.lexani-main-label {
    margin-top: 25px;
    font-size: 30px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    font-family: "Bebas Neue", sans-serif;
}

/* Thumbnails Area */
.lexani-thumbnails-wrapper {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-height: 600px;
}

.lexani-thumbnails-grid {
    width: 100%;
    display: grid;
    /* Create a 2-column grid for thumbnails */
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

/* Bottom fade overlay for smooth cutoff effect - dedicated div */
.lexani-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, var(--lexani-fade-color, #ffffff) 100%);
    pointer-events: none;
    z-index: 5;
}

.lexani-thumb-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* The clickable thumbnail anchor */
.lexani-thumb-link {
    display: block;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 4px;
    background: radial-gradient(circle at center, rgba(40, 40, 40, 0.9) 0%, rgba(15, 15, 15, 0.95) 100%);
}

.lexani-thumb-link img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50%;
    /* Makes thumbnails round if images are square */
}

/* Active state and Hover state */
.lexani-thumb-link.active-thumb,
.lexani-thumb-link:hover {
    border-color: #d32f2f;
    /* Red color from reference image */
}

.lexani-thumb-label {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 200;
    text-transform: uppercase;
    color: #333;
    background: transparent;
    line-height: 1.4;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.5px;
}

/* Load More Button Styles */
.lexani-load-more-btn {
    position: absolute;
    bottom: 15px;
    right: 124px;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #333;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 6;
}

.lexani-load-more-btn:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lexani-load-more-btn.hidden {
    display: none;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
    .lexani-gallery-wrapper {
        flex-direction: column;
    }

    .lexani-main-image,
    .lexani-thumbnails-wrapper {
        flex: 1 1 100%;
        width: 100%;
    }

    .lexani-thumbnails-grid {
        padding-right: 0;
    }
}