/* Стили слайдера в объявлении */
 .gallery-slider {
     position: relative;
     margin: 0 auto;
     max-width: 800px;
 }

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    aspect-ratio: 16/9;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.slider-image:hover {
    transform: scale(1.02);
}

.slide-number {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Кнопки навигации */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

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

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Миниатюры */
.slider-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.thumbnail-item {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    opacity: 1;
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Модальное окно полноэкранного просмотра */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

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

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: zoomIn 0.5s ease;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1rem;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .slider-container {
        aspect-ratio: 4/3;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }

    .thumbnail-item {
        width: 60px;
        height: 45px;
    }

    .modal-prev,
    .modal-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .slider-container {
        aspect-ratio: 1/1;
    }

    .thumbnail-item {
        width: 50px;
        height: 40px;
    }

    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    .modal-close { top: 10px; right: 10px; }
}
