/* Product Gallery Styles */
.product-gallery {
    position: relative;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

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

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

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnail.active {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
}

.gallery-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;
    font-size: 18px;
    color: #495057;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: #28a745;
    transform: translateY(-50%) scale(1.1);
}

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

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

.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.gallery-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(249, 115, 22, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.gallery-zoom:hover {
    background: rgba(249, 115, 22, 1);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Modal Gallery */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

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

.gallery-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-modal-close:hover {
    color: #28a745;
    transform: scale(1.1);
}

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

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

.gallery-modal-nav.prev {
    left: 30px;
}

.gallery-modal-nav.next {
    right: 30px;
}

/* Loading animation */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
    
    .gallery-thumbnails {
        padding: 10px;
        gap: 8px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .gallery-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .gallery-modal-nav.prev {
        left: 15px;
    }
    
    .gallery-modal-nav.next {
        right: 15px;
    }
}

/* No images state */
.gallery-no-images {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 16px;
    text-align: center;
}

.gallery-no-images i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
} 