/* Product Gallery Slider Styles */

.product-gallery-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.product-gallery-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.gallery-slides {
    display: flex;
    transition: transform 0.3s ease-in-out;
    width: 100%;
}

.gallery-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    /* Active slide styling if needed */
}

.slide-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-nav svg {
    color: #333;
    width: 20px;
    height: 20px;
}

/* Hide arrows when there's only one image */
.gallery-slider-single .gallery-nav {
    display: none;
}

/* Slide Indicators */
.gallery-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: #007cba;
    transform: scale(1.2);
}

/* Hide indicators when there's only one image */
.gallery-slider-single .gallery-indicators {
    display: none;
}

/* Thumbnail Navigation */
.gallery-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    padding: 0;
}

.gallery-thumb:hover {
    border-color: #007cba;
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

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

/* Touch/Swipe Support */
.gallery-slides {
    touch-action: pan-y;
    user-select: none;
}

.gallery-slide {
    pointer-events: none;
}

.gallery-slide.active {
    pointer-events: auto;
}

/* Loading State */
.gallery-slide.loading {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.gallery-slide.loading::before {
    content: "Loading...";
    color: #666;
    font-family: "Archivo Variable", sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-nav {
        width: 36px;
        height: 36px;
    }
    
    .gallery-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-indicators {
        bottom: 10px;
        gap: 6px;
    }
    
    .gallery-indicator {
        width: 8px;
        height: 8px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
    
    .gallery-thumbnails {
        gap: 6px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-nav {
        width: 32px;
        height: 32px;
    }
    
    .gallery-nav svg {
        width: 14px;
        height: 14px;
    }
    
    .gallery-thumb {
        width: 50px;
        height: 50px;
    }
    
    .slide-image {
        max-height: 400px;
    }
}

/* Animation for slide transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-slide.active .slide-image {
    animation: slideIn 0.3s ease-out;
}

/* Zoom on hover for desktop */
@media (min-width: 769px) {
    .slide-image {
        transition: transform 0.3s ease;
        cursor: zoom-in;
    }
    
    .slide-image:hover {
        transform: scale(1.02);
    }
}
