/* Vinci Gallery Slider - Frontend Styles */

.vgs-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* Main Image */
.vgs-main-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.vgs-main-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

/* Image Counter Badge */
.vgs-image-counter {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.vgs-image-counter span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #d4af37;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
}

/* Thumbnail Navigation */
.vgs-thumbnail-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.vgs-nav-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: #333;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.vgs-nav-btn:hover {
    background: #d4af37;
    transform: scale(1.1);
}

.vgs-nav-btn:active {
    transform: scale(0.95);
}

.vgs-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Thumbnails Wrapper */
.vgs-thumbnails-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.vgs-thumbnails {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
    padding: 5px 0;
}

.vgs-thumb-item {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.vgs-thumb-item:hover {
    opacity: 1;
    border-color: #999;
}

.vgs-thumb-item.active {
    opacity: 1;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.vgs-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .vgs-gallery-container {
        padding: 10px;
    }

    .vgs-main-image-wrapper img {
        max-height: 400px;
    }

    .vgs-thumb-item {
        width: 70px;
        height: 50px;
    }

    .vgs-nav-btn {
        width: 35px;
        height: 35px;
    }

    .vgs-image-counter span {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vgs-thumb-item {
        width: 60px;
        height: 45px;
    }

    .vgs-thumbnails {
        gap: 5px;
    }
}

/* Loading state */
.vgs-main-image-wrapper.loading img {
    opacity: 0.5;
}

/* Fade animation */
@keyframes vgsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vgs-main-image-wrapper img.fade-in {
    animation: vgsFadeIn 0.3s ease;
}

/* ------------------------------------------------------------------
   Swipe / drag support
   ------------------------------------------------------------------ */
.vgs-main-image-wrapper {
    touch-action: pan-y;          /* vertical scroll stays native, horizontal is ours */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.vgs-main-image-wrapper.vgs-dragging {
    cursor: grabbing;
}

.vgs-main-image-wrapper img {
    -webkit-user-drag: none;
    user-select: none;
    will-change: transform;
}

/* Neighbouring image that slides in while dragging */
.vgs-main-image-wrapper img.vgs-ghost-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    pointer-events: none;
    transition: none;
}

.vgs-gallery-container:focus {
    outline: none;
}

.vgs-gallery-container:focus-visible .vgs-main-image-wrapper {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .vgs-main-image-wrapper img.fade-in {
        animation: none;
    }
}
