/* Галерея изображений товара */
.product-gallery {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.main-image-container {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
		transform: scale(1.03);
}

.main-image:hover {
    transform: scale(1.09);
    filter: brightness(1.05) saturate(1.1);
    -webkit-transform: scale(1.09);
    -moz-transform: scale(1.09);
    -ms-transform: scale(1.09);
    -o-transform: scale(1.09);
}

.image-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-navigation:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.image-navigation.prev {
    left: 24px;
}

.image-navigation.next {
    right: 24px;
}

/* Современный слайдер миниатюр */
.thumbnail-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.thumbnail {
    width: 75px;
    height: 75px;
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thumbnail:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
}

.thumbnail.main {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.25);
}

.thumbnail.main::after {
    content: '★';
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    z-index: 2;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbnail:hover img {
    transform: scale(1.15);
    filter: brightness(1.1) saturate(1.2);
}

/* Навигационные кнопки слайдера */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.slider-nav.prev {
    left: -16px;
}

.slider-nav.next {
    right: -16px;
}

.slider-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Индикаторы слайдера */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

/* Модальное окно для увеличенного изображения */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.image-modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-navigation.prev {
    left: -70px;
}

.modal-navigation.next {
    right: -70px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-image {
        height: 300px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .image-navigation {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .modal-navigation {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .modal-navigation.prev {
        left: -50px;
    }

    .modal-navigation.next {
        right: -50px;
    }
}