/* Стили для модального окна галереи (как в карточке товара) */

/* Кнопки навигации - копируем стили из карточки */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1060;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn:disabled {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.modal-nav-prev {
    left: 20px;
}

.modal-nav-next {
    right: 20px;
}

/* Счетчик слайдов - копируем стили из карточки */
.modal-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    z-index: 1060;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

/* Кнопка закрытия - копируем стили из карточки */
#productGalleryModal .custom-close-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1060;
    font-size: 20px;
    line-height: 1;
}

#productGalleryModal .custom-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Стили для зума */
#modalContent {
    overflow: hidden;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#modalContent img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    pointer-events: auto;
}

/* Индикатор зума */
.zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1061;
    pointer-events: none;
}

.zoom-indicator.show {
    opacity: 1;
}

/* Мобильные стили */
@media (max-width: 768px) {
    /* Модальное окно на весь экран */
    #productGalleryModal .modal-dialog {
        max-width: 100vw !important;
        margin: 0 !important;
        height: 100vh;
    }
    
    #productGalleryModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    #productGalleryModal .modal-body {
        height: 100vh;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #modalContent {
        max-width: 100vw;
        max-height: 100vh;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #modalContent img {
        max-width: 100vw;
        max-height: 100vh;
        width: auto;
        height: auto;
    }
    
    /* Кнопки навигации */
    .modal-nav-btn {
        width: 40px;
        height: 40px;
    }

    .modal-nav-prev {
        left: 10px;
    }

    .modal-nav-next {
        right: 10px;
    }

    /* Счетчик слайдов */
    .modal-counter {
        top: 15px;
        left: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }

    /* Кнопка закрытия */
    #productGalleryModal .custom-close-btn {
        top: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}
