/* Modern Webshop Product Image Slider */

.webshop-slider-container {
    margin: 0;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.webshop-product-gallery {
    display: flex;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Thumbnail column (links) */
.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

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

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

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

.thumbnail-item {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.thumbnail-item:hover {
    border-color: #003360;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #003360;
    box-shadow: 0 0 10px rgba(0, 51, 96, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: white;
}

/* Main image area (rechts) */
.gallery-main {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container {
    width: 100%;
    height: 500px;
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.main-image:hover {
    transform: scale(1.05);
}

/* Zoom overlay hint */
.zoom-hint {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 51, 96, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-image-container:hover .zoom-hint {
    opacity: 1;
}

.zoom-hint::before {
    content: "🔍";
    font-size: 14px;
}

/* Navigation arrows voor main image */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-nav i {
    color: #003360;
    font-size: 16px;
}

/* Lightbox/Modal voor zoom */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ccc;
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 30px;
}

.lightbox-nav.next {
    right: 30px;
}

.lightbox-nav i {
    font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .webshop-product-gallery {
        flex-direction: column;
        gap: 15px;
    }
    
    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        gap: 8px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .gallery-main {
        min-height: 350px;
    }
    
    .main-image-container {
        height: 350px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
    }
    
    .gallery-nav i {
        font-size: 14px;
    }
    
    .zoom-hint {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .gallery-main {
        min-height: 300px;
    }
    
    .main-image-container {
        height: 300px;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .gallery-nav {
        display: none; /* Hide arrows op zeer kleine schermen */
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
    }
    
    .lightbox-nav.prev {
        left: 15px;
    }
    
    .lightbox-nav.next {
        right: 15px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading state */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    background: #f8f9fa;
    color: #666;
    font-size: 14px;
}

.gallery-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e3e3e3;
    border-top: 2px solid #003360;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Lazy loading animations - Same as product catalog */
.webshop-slider-container .lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.webshop-slider-container .image-loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading overlay for individual images */
.main-image-container .lazy-load {
    position: relative;
}

.main-image-container .lazy-load::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    z-index: 1;
}

.main-image-container .image-loaded::before {
    display: none;
}