/* ===== ГАЛЕРЕЯ ИЗОБРАЖЕНИЙ ТОВАРА ===== */

/* Основной контейнер галереи */
.product-gallery__main {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #1d1c1c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: zoom-in;
}

.product-gallery__main img {
    width: 100%;
    height: 580px;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Кнопки навигации */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.product-gallery__main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: rgba(230, 126, 34, 0.8);
    border-color: #e67e22;
    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);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

/* Миниатюры */
.product-gallery__thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.product-gallery__thumbnails::-webkit-scrollbar {
    height: 6px;
}

.product-gallery__thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.product-gallery__thumbnails::-webkit-scrollbar-thumb {
    background: rgba(230, 126, 34, 0.3);
    border-radius: 3px;
}

.product-gallery__thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 126, 34, 0.5);
}

.thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 0.9;
    border-color: rgba(230, 126, 34, 0.5);
}

.thumbnail.active {
    border-color: #e67e22;
    opacity: 1;
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Анимация смены изображений */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.product-gallery__main img.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Режим увеличения (опционально) */
.product-gallery__main.zoomed {
    cursor: zoom-out;
}

.product-gallery__main.zoomed img {
    transform: scale(1.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    .product-gallery__main img {
        height: 350px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .gallery-nav--prev {
        left: 10px;
    }
    
    .gallery-nav--next {
        right: 10px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .product-gallery__main img {
        height: 250px;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .gallery-counter {
        font-size: 12px;
        padding: 4px 12px;
        bottom: 10px;
        right: 10px;
    }
}