
.wcvg-gallery-wrapper {
    margin: 20px 0;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.wcvg-gallery-wrapper[style*="block"] {
    opacity: 1;
}

/* Main Image Container */
.wcvg-main-image-container {
    position: relative;
    margin-bottom: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.wcvg-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.wcvg-main-image:hover {
    opacity: 0.95;
}

/* Navigation Buttons */
.wcvg-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.wcvg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 2;
}

.wcvg-main-image-container:hover .wcvg-nav-btn {
    opacity: 1;
}

.wcvg-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.wcvg-nav-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.wcvg-prev {
    left: 15px;
}

.wcvg-next {
    right: 15px;
}

.wcvg-arrow {
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.wcvg-arrow-left {
    border-right: 12px solid #fff;
    margin-right: 2px;
}

.wcvg-arrow-right {
    border-left: 12px solid #fff;
    margin-left: 2px;
}

/* Zoom Overlay */
.wcvg-zoom-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-in;
    z-index: 2;
}

.wcvg-main-image-container:hover .wcvg-zoom-overlay {
    opacity: 1;
}

.wcvg-zoom-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
}

.wcvg-zoom-icon {
    font-size: 16px;
    color: #fff;
}

/* Thumbnails Container */
.wcvg-thumbnails-container {
    position: relative;
}

.wcvg-thumbnails-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.wcvg-thumbnails-scroll::-webkit-scrollbar {
    display: none;
}

.wcvg-thumbnails {
    display: flex;
    gap: 10px;
    padding: 5px 0;
}

.wcvg-thumbnail {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.wcvg-thumbnail:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcvg-thumbnail.active {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
}

.wcvg-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.wcvg-thumbnail:hover img {
    opacity: 0.9;
}

/* Thumbnail Navigation */
.wcvg-thumbnails-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.wcvg-thumb-nav {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcvg-thumb-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.wcvg-thumb-prev {
    left: -10px;
}

.wcvg-thumb-next {
    right: -10px;
}

/* Loading Spinner */
.wcvg-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.wcvg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: wcvgSpin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes wcvgSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Zoom Modal */
.wcvg-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wcvg-zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.wcvg-zoom-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease;
}

.wcvg-zoom-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

#wcvg-zoom-image {
    width: 100%;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* Body class when zoom is open */
.wcvg-zoom-open {
    overflow: hidden;
}

/* No Images Message */
.wcvg-no-images {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wcvg-main-image-container {
        aspect-ratio: 1;
        margin-bottom: 10px;
    }
    
    .wcvg-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .wcvg-prev {
        left: 10px;
    }
    
    .wcvg-next {
        right: 10px;
    }
    
    .wcvg-arrow {
        border: 6px solid transparent;
    }
    
    .wcvg-arrow-left {
        border-right: 10px solid #fff;
    }
    
    .wcvg-arrow-right {
        border-left: 10px solid #fff;
    }
    
    .wcvg-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .wcvg-thumbnails {
        gap: 8px;
    }
    
    .wcvg-zoom-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .wcvg-zoom-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .wcvg-gallery-wrapper {
        margin: 15px 0;
    }
    
    .wcvg-nav-btn {
        width: 35px;
        height: 35px;
        opacity: 1; /* Always visible on small screens */
    }
    
    .wcvg-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .wcvg-thumbnails {
        gap: 6px;
    }
    
    .wcvg-zoom-overlay {
        opacity: 1; /* Always visible on mobile */
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .wcvg-nav-btn,
    .wcvg-zoom-overlay {
        opacity: 1;
    }
    
    .wcvg-thumbnail:hover {
        transform: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .wcvg-main-image,
    .wcvg-thumbnail img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus styles for accessibility */
.wcvg-thumbnail:focus,
.wcvg-nav-btn:focus,
.wcvg-thumb-nav:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .wcvg-main-image,
    .wcvg-thumbnail,
    .wcvg-nav-btn,
    .wcvg-gallery-wrapper {
        transition: none;
    }
    
    .wcvg-spinner {
        animation: none;
        border: 4px solid #2271b1;
    }
}

/* Print styles */
@media print {
    .wcvg-gallery-wrapper {
        display: none !important;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .wcvg-main-image-container {
        background: #2c2c2c;
    }
    
    .wcvg-loading-spinner {
        color: #ccc;
    }
    
    .wcvg-spinner {
        border-color: #555;
        border-top-color: #4a9eff;
    }
    
    .wcvg-no-images {
        color: #ccc;
    }
}

/* Animation for gallery appearance */
@keyframes wcvgFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcvg-gallery-wrapper[style*="block"] {
    animation: wcvgFadeIn 0.4s ease-out;
}