/* Image Gallery Styles */

.image-gallery-wrapper {
    width: 100%;
    gap: 15px;
    margin-bottom: 30px;
}

/* Thumbnails Section */
.gallery-thumbnails {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    height: auto;
    gap: 15px;
    position: relative;
}

.thumbnails-scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 500px;
    padding: 0px 15px;
}

/* Custom scrollbar for thumbnails */
.thumbnails-scroll::-webkit-scrollbar {
    width: 2px;
}

.thumbnails-scroll::-webkit-scrollbar-track {
    background: #ffffff00;
}

.thumbnails-scroll::-webkit-scrollbar-thumb {
    background: #FFB300;
    border-radius: 10px;
}

.thumbnails-scroll::-webkit-scrollbar-thumb:hover {
    background: #ff9500;
}

/* Thumbnail Item */
.thumbnail-item {
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background-color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: 5px;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 5px;
}

.thumbnail-item:hover:not(.active) img {
     border: 1px solid #bdbdbd;
}

.thumbnail-item.active {
    
    border: 1px solid #FFB300;
}

/* Thumbnail Navigation Buttons */
.thumbnail-nav {
    display: none;
}


/* Main Gallery Container */
.gallery-main-container {
    flex: 1;
    min-width: 500px;
}

/* Main Image */
.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

/* Gallery Controls */
.gallery-controls {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
}

.gallery-prev-btn,
.gallery-next-btn {
    display: none;
}

.gallery-prev-btn:hover,
.gallery-next-btn:hover {
    background-color: rgba(255, 179, 0, 0.7);
    transform: scale(1.1);
}

.gallery-prev-btn:active,
.gallery-next-btn:active {
    transform: scale(0.95);
}

/* Gallery Info */
.gallery-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-top: -30px;
    z-index: 1;
}

.image-counter {
    font-size: 0.9rem;
    color: #666;
    font-family: monospace;
    font-weight: 600;
}

/* Dot Navigation */
.gallery-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #d0d0d0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background-color: #FFB300;
    transform: scale(1.2);
}

.dot.active {
    background-color: #FFB300;
    box-shadow: 0 0 5px rgba(255, 179, 0, 0.5);
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-gallery-wrapper {
        flex-direction: column;
    }

    .gallery-thumbnails {
        width: 100%;
        max-width: 100%;
        height: 120px;
    }

    .thumbnails-scroll {
        flex-direction: row;
        max-height: none;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 5px 10px;
    }

    .thumbnail-item {
        width: 100px;
        min-width: 100px;
        flex-shrink: 0;
    }

    .thumbnail-nav {
        flex-direction: row;
        gap: 8px;
    }

    .thumb-nav-btn {
        width: auto;
        flex: 1;
        height: 25px;
        font-size: 0.8rem;
    }

    .gallery-main-container {
        min-width: auto;
    }

    .gallery-main {
        aspect-ratio: auto;
        min-height: 300px;
    }

    .gallery-prev-btn,
    .gallery-next-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .gallery-main {
        min-height: 250px;
    }

    .thumbnails-scroll {
        max-height: 80px;
    }

    .thumbnail-item {
        width: 70px;
        min-width: 70px;
    }

    .gallery-prev-btn,
    .gallery-next-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        padding: 5px;
    }

    .image-counter {
        font-size: 0.8rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }
}