
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
}
.large-preview-section {
    background: transparent;
    width: 100%;
    overflow: hidden;
}
.large-preview-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 8px;
    touch-action: pan-y;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}
.large-preview-container.loading {
    background: linear-gradient(90deg, #f5f5f5 0%, #e8e8e8 50%, #f5f5f5 100%);
    background-size: 400% 100%;
    animation: loading 2s ease-in-out infinite;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.large-images-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    width: 100%;
    margin: 0;
    padding: 0;
}
.large-image-item {
    flex: 0 0 100%;
    aspect-ratio: 12 / 6;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.large-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}
.large-image-item img.loaded {
    opacity: 1;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    bottom: 0;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    opacity: 0;
    visibility: hidden;
}
.scroll-btn.visible {
    opacity: 0.8;
    visibility: visible;
}
.scroll-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}
.scroll-btn.left {
    left: 15px;
}
.scroll-btn.right {
    right: 15px;
}
.thumbnails-section {
    background: transparent;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    margin: 0 auto;
    width: 100%;
}
.thumbnails-section.visible {
    opacity: 1;
    visibility: visible;

}
.thumbnails-container {
    display: flex;
    overflow-x: auto;
    width: 100%;
    touch-action: pan-x;
    box-sizing: border-box;
    scrollbar-width: none;
    padding: 0 10px;
}
.thumbnails-wrapper {
    display: flex;
    gap: 8px;
    min-width: min-content;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 8px 0;
}
.thumbnail-item {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    opacity: 0;
    transform: scale(0.8);
}
.thumbnail-item.loaded {
    opacity: 1;
    transform: scale(1);
}
.thumbnail-item.active {
    border: 1px solid white;
    outline: 1px solid #abd123;
    outline-offset: 2px;
    transform: scale(1.15);
    box-shadow: 0 0 8px rgb(171 209 35);
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
    display: block;
}
.large-images-track {
    -webkit-overflow-scrolling: touch;
}
.large-preview-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@media (max-width: 768px) {

    .image-caption {
        padding: 15px 40px;
        font-size: 14px;
    }
    .scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 0.6rem;
    }
    .thumbnail-item.active {
        transform: scale(1.12);
    }
}
@media (max-width: 576px) {

    .large-image-item {
        flex: 0 0 100%;
        aspect-ratio: 4 / 5;
    }

    .gallery-container {
        padding: 0;
        gap: 15px;
    }

    .image-caption {
        padding: 12px 30px;
        font-size: 13px;
    }
    .scroll-btn.left {
        left: 10px;
    }
    .scroll-btn.right {
        right: 10px;
    }
    .thumbnail-item.active {
        transform: scale(1.1);
    }
}
@media (max-width: 400px) {
    .gallery-container {
        gap: 10px;
    }

    .image-caption {
        padding: 10px 20px;
        font-size: 12px;
    }
}
