/* Custom Product Gallery Styles */
.cpg-product-gallery {
    width: 100%;
    max-width: 100%;
}

.cpg-main-image-container {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.cpg-main-image {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Navigation Arrows */
.cpg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    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 8px rgba(0,0,0,0.15);
}

.cpg-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.cpg-nav-prev {
    left: 15px;
}

.cpg-nav-next {
    right: 15px;
}

.cpg-nav svg {
    color: #333;
}

.cpg-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Thumbnails */
.cpg-thumbnail-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 5px 0;
}

.cpg-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.cpg-thumbnail:hover {
    border-color: #666;
    transform: scale(1.05);
}

.cpg-thumbnail.active {
    border-color: #333;
    box-shadow: 0 0 0 1px #333;
}

.cpg-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cpg-nav {
        width: 35px;
        height: 35px;
    }
    
    .cpg-nav-prev {
        left: 10px;
    }
    
    .cpg-nav-next {
        right: 10px;
    }
    
    .cpg-thumbnail {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .cpg-thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* Loading State */
.cpg-main-image.loading {
    opacity: 0.5;
}

/* Scrollbar for thumbnails */
.cpg-thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.cpg-thumbnail-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cpg-thumbnail-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cpg-thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}