/* Product Gallery Styles */

.product-gallery {
    display: grid;
    gap: 16px;
}

.gallery-main {
    position: relative;
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: zoom-in;
}

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

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

.gallery-zoom-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-zoom-btn:hover {
    background: white;
    transform: scale(1.1);
}

.gallery-zoom-btn svg {
    color: var(--text-primary);
}

/* Thumbnails */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 1;
    background: var(--gray-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.gallery-thumb.active {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(197, 157, 95, 0.3);
}

.gallery-thumb.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
}

.gallery-thumb.placeholder-img span {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

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

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-counter {
    margin-top: 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close svg {
    color: white;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

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

.lightbox-nav svg {
    color: white;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .gallery-zoom-btn {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }

    .gallery-zoom-btn svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
    }

    .lightbox-prev {
        left: 16px;
    }

    .lightbox-next {
        right: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}
