/* Frontend Stilleri */
#wvg-variation-gallery-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#wvg-variation-gallery-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.wvg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.wvg-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wvg-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.wvg-gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.wvg-gallery-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wvg-gallery-link:hover::after {
    opacity: 1;
}

.wvg-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Lightbox Stilleri */
#wvg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wvg-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    cursor: pointer;
}

.wvg-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.wvg-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.wvg-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.wvg-lightbox-close:hover {
    background: rgba(0,0,0,0.9);
}

/* Salient Teması ile Uyumluluk */
.single-product #wvg-variation-gallery-container {
    margin: 30px 0;
}

/* Sticky product info ile uyumluluk */
.product-summary-sticky #wvg-variation-gallery-container {
    margin-top: 25px;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .wvg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .wvg-gallery-item img {
        height: 100px;
    }
    
    #wvg-variation-gallery-container {
        padding: 15px;
    }
    
    .wvg-lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .wvg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .wvg-gallery-item img {
        height: 80px;
    }
    
    #wvg-variation-gallery-container {
        padding: 10px;
    }
    
    #wvg-variation-gallery-container h3 {
        font-size: 1.1em;
    }
}

/* Yükleme animasyonu */
.wvg-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.wvg-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: wvg-spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Galeri boş durumu */
.wvg-no-gallery {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Salient tema özel stilleri */
.nectar-shop-header-2 #wvg-variation-gallery-container {
    margin-top: 20px;
}

/* WooCommerce variations form ile uyumluluk */
.variations_form #wvg-variation-gallery-container {
    clear: both;
}

/* Variation swatches eklentisi uyumluluğu */
.variations .variation-selector #wvg-variation-gallery-container {
    margin-top: 20px;
}
