/**
 * Gallery Slider Thumbnail Pagination Styles
 * Thumbnails with 140px minimum width, auto-fit to container
 */

/* Thumbnail container */
.ah-gallery-thumbs {
    margin-top: 20px;
    padding: 0 40px;
    position: relative;
    width: 100%;
}

.ah-thumbs-swiper {
    overflow: hidden;
    width: 100%;
}

.ah-thumbs-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Individual thumbnail - minimum width enforced */
.ah-thumb-slide {
    min-width: 140px !important; /* Minimum width */
    width: auto; /* Let JavaScript calculate optimal width */
    height: 80px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.ah-thumb-slide:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.ah-thumb-slide.active {
    opacity: 1;
    border-color: var(--swiper-navigation-color,var(--swiper-theme-color)); /* Adjust color to match your design */
    transform: scale(1.1);
}

.ah-thumb-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows full image without cropping */
    display: block;
}

/* Ensure main slider images are clickable for lightbox */
.ah-gallery-slider-wrapper .ee-gallery-swiper .swiper-slide a {
    display: block;
    cursor: pointer;
}

.ah-gallery-slider-wrapper .ee-gallery-swiper .swiper-slide img {
    transition: transform 0.3s ease;
}

.ah-gallery-slider-wrapper .ee-gallery-swiper .swiper-slide:hover img {
    transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ah-gallery-thumbs {
        padding: 0 20px;
    }
    
    .ah-thumb-slide {
        min-width: 100px !important; /* Smaller minimum on tablet */
        height: 60px;
    }
}

@media (max-width: 480px) {
    .ah-gallery-thumbs {
        padding: 0 15px;
    }
    
    .ah-thumb-slide {
        min-width: 80px !important; /* Smaller minimum on mobile */
        height: 50px;
    }
}