    /* ==================== СТИЛИ ФИЛЬТРОВ ==================== */
    .filters-container {
        position: relative;
        width: 100%;
        max-width: 100%;
        margin: 20px 0 40px;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        overflow: hidden;
    }

    .filters-wrapper {
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding: 0 45px;
    }

    .filters-scroll {
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 5px;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        max-width: 100%;
    }

    .filters-scroll::-webkit-scrollbar {
        display: none;
    }

    /* КРИТИЧЕСКОЕ: Ограничение кнопок фильтров */
    .filter-btn {
        padding: 8px 16px !important;
        background: transparent;
        border: none;
        font-size: 13px;
        font-weight: 400;
        color: #666;
        cursor: pointer;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-family: 'Arial', sans-serif;
        flex-shrink: 0;
        transition: all 0.3s ease;
        max-width: 160px !important;
        min-width: 60px;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: inline-block !important;
        border-radius: 4px;
        line-height: 1.3;
    }

    /* Активная кнопка */
    .filter-btn.active {
        color: #ffffff;
        background: #e72254;
        font-weight: 600;
    }

    /* Неактивные кнопки при наведении */
    .filter-btn:not(.active):hover {
        color: #000000;
        background: #f5f5f5;
    }

    /* Стрелки для прокрутки */
    .filter-scroll-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: #ffffff;
        border: 2px solid #e72254;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        box-shadow: 0 4px 12px rgba(231, 34, 84, 0.2);
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .filter-scroll-arrow.visible {
        opacity: 1;
        visibility: visible;
    }

    .filter-scroll-arrow:hover {
        background: #e72254;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(231, 34, 84, 0.3);
    }

    .filter-scroll-arrow i {
        color: #e72254;
        font-size: 14px;
        transition: color 0.3s ease;
    }

    .filter-scroll-arrow:hover i {
        color: #ffffff;
    }

    .filter-scroll-arrow-left {
        left: 5px;
    }

    .filter-scroll-arrow-right {
        right: 5px;
    }

    /* ==================== ВЫПАДАЮЩИЙ СПИСОК ДЛЯ МОБИЛЬНЫХ ==================== */
    .mobile-filters-wrapper {
        display: none;
        width: 100%;
        margin: 20px 0 30px;
        max-width: 100%;
        overflow: hidden;
    }

    .mobile-filters-select {
        width: 100%;
        max-width: 100%;
        padding: 12px 15px;
        border: 2px solid #e72254;
        border-radius: 8px;
        font-size: 14px;
        background: white;
        color: #333;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e72254' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 16px;
        padding-right: 40px;
        cursor: pointer;
        overflow: hidden;
    }

    /* ==================== МОДАЛЬНОЕ ОКНО ==================== */
    #galleryModal .modal-content {
        border-radius: 12px;
        overflow: hidden;
        max-width: 100%;
        border: none;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    #galleryModal .modal-dialog {
        max-width: 90% !important;
        margin: 1.75rem auto !important;
        width: auto !important;
    }

    #galleryModal .modal-header {
        background: #f8f9fa;
        color: #333;
        border-bottom: 1px solid #dee2e6;
        padding: 15px 20px;
        max-width: 100%;
        overflow: hidden;
    }

    /* КАСТОМНЫЙ КРЕСТ ДЛЯ МОДАЛЬНОГО ОКНА */
    .btn-close-custom {
        background: transparent !important;
        border: none !important;
        padding: 0.5rem !important;
        margin: -0.5rem -0.5rem -0.5rem auto !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        border-radius: 0.375rem !important;
        transition: all 0.3s ease !important;
        opacity: 1 !important;
    }

    .btn-close-custom svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        transition: all 0.3s ease !important;
    }

    .btn-close-custom:hover {
        background-color: rgba(231, 34, 84, 0.1) !important;
        transform: scale(1.1) !important;
    }

    .btn-close-custom:hover svg {
        stroke: #c01c46 !important;
        transform: scale(1.1) !important;
    }

    .btn-close-custom:focus {
        outline: none !important;
        box-shadow: 0 0 0 0.25rem rgba(231, 34, 84, 0.25) !important;
    }

    #galleryModal .modal-title {
        color: #333;
        font-weight: 600;
        font-size: 1.25rem;
    }

    /* КОНТЕЙНЕР ДЛЯ ИЗОБРАЖЕНИЯ СО СКРОЛЛОМ */
    #galleryModal .image-container {
        min-height: 300px;
        max-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        padding: 20px;
        overflow: auto !important; /* Добавляем скролл */
        position: relative;
    }

    /* ИЗОБРАЖЕНИЕ В МОДАЛЬНОМ ОКНЕ */
   #galleryModal .gallery-modal-img {
    max-width: 60% !important;
    max-height: 100% !important;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
}
#galleryModal .gallery-modal-img.large-image {
    max-width: none !important;
    max-height: none !important;
}
  /* Для плавного перехода при изменении зума */
#galleryModal .gallery-modal-img.zooming {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
    /* Состояние зума */
    #galleryModal .gallery-modal-img.zoomed {
        cursor: grab;
    }

    #galleryModal .gallery-modal-img.zoomed:active {
        cursor: grabbing;
    }

    /* ИНДИКАТОР СКРОЛЛА */
    #galleryModal .image-container::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    #galleryModal .image-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 5px;
    }

    #galleryModal .image-container::-webkit-scrollbar-thumb {
        background: #e72254;
        border-radius: 5px;
    }

    #galleryModal .image-container::-webkit-scrollbar-thumb:hover {
        background: #c01c46;
    }

    /* Для Firefox */
   #galleryModal .image-container {
    min-height: 300px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
    overflow: auto !important;
    position: relative;
}

    /* КНОПКИ НАВИГАЦИИ */
    #galleryModal #prevImageBtn,
    #galleryModal #nextImageBtn {
        background: rgba(231, 34, 84, 0.9);
        backdrop-filter: blur(5px);
        opacity: 0.9;
        transition: all 0.3s ease;
        width: 50px;
        height: 50px;
        padding: 0;
        border: none;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(231, 34, 84, 0.3);
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

    #galleryModal #prevImageBtn {
        left: 30px !important;
    }

    #galleryModal #nextImageBtn {
        right: 30px !important;
    }

    #galleryModal #prevImageBtn:hover,
    #galleryModal #nextImageBtn:hover {
        opacity: 1;
        background: #e72254;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(231, 34, 84, 0.4);
    }

    #galleryModal #prevImageBtn i,
    #galleryModal #nextImageBtn i {
        font-size: 1.2rem;
    }

    #galleryModal .modal-footer {
        background: #f8f9fa;
        border-top: 1px solid #dee2e6;
        padding: 15px 20px;
        max-width: 100%;
        overflow: hidden;
    }

    #galleryModal .modal-footer h5 {
        color: #333;
        font-weight: 600;
        margin-bottom: 0;
        word-wrap: break-word;
        max-width: 100%;
    }

    #galleryModal .modal-footer span {
        color: #666;
        font-size: 0.9rem;
        word-wrap: break-word;
        max-width: 100%;
    }

    #galleryModal .modal-footer .btn-outline-secondary {
        border-color: #e72254;
        color: #e72254;
        padding: 8px 12px;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    #galleryModal .modal-footer .btn-outline-secondary:hover {
        background-color: #e72254;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(231, 34, 84, 0.2);
    }

    #galleryModal .modal-footer .btn-outline-secondary i {
        font-size: 1rem;
    }

    /* ==================== АДАПТИВНОСТЬ ==================== */
    @media (max-width: 1200px) {
        .container {
            max-width: 1140px !important;
        }
        
        .filter-btn {
            max-width: 140px !important;
            font-size: 12px;
            padding: 7px 14px !important;
        }
    }

    @media (max-width: 992px) {
        .container {
            max-width: 960px !important;
        }
        
        .filter-btn {
            max-width: 120px !important;
            font-size: 11px;
            padding: 6px 12px !important;
        }
        
        .filters-wrapper {
            padding: 0 40px;
        }
    }

    @media (max-width: 768px) {
        .container {
            max-width: 720px !important;
        }
        
        /* Переключаем на выпадающий список на мобильных */
        .desktop-filters {
            display: none !important;
        }
        
        .mobile-filters-wrapper {
            display: block !important;
        }
        
        .filter-btn {
            white-space: normal;
            line-height: 1.2;
            min-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            max-width: 100% !important;
        }
        
        #galleryModal .modal-dialog {
            max-width: 95% !important;
            margin: 10px auto !important;
        }
        
        #galleryModal .image-container {
            min-height: 250px;
            max-height: 60vh;
            padding: 15px;
        }
        
        #galleryModal #prevImageBtn,
        #galleryModal #nextImageBtn {
            width: 40px;
            height: 40px;
        }
        
        #galleryModal #prevImageBtn i,
        #galleryModal #nextImageBtn i {
            font-size: 1rem;
        }
        
        #galleryModal #prevImageBtn {
            left: 15px !important;
        }
        
        #galleryModal #nextImageBtn {
            right: 15px !important;
        }
    }

    @media (max-width: 576px) {
        .container {
            max-width: 540px !important;
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
        
        .row {
            margin-left: -10px !important;
            margin-right: -10px !important;
            width: calc(100% + 20px) !important;
        }
        
        .col-lg-4, .col-md-6, .col-12, .col-xl-5, .col-xl-7, .col-md-5, .col-md-7 {
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
        
        .mobile-filters-select {
            font-size: 13px;
            padding: 10px 15px;
            padding-right: 40px;
        }
        
        #galleryModal .modal-footer {
            flex-direction: column;
            gap: 10px;
            padding: 10px 15px;
        }
        
        #galleryModal .modal-footer > div {
            width: 100%;
            text-align: center;
        }
        
        #galleryModal #prevImageBtn,
        #galleryModal #nextImageBtn {
            display: none;
        }
        
        #galleryModal .modal-footer .btn-outline-secondary {
            width: 100%;
            margin-bottom: 5px;
        }
        
        #galleryModal .image-container {
            max-height: 50vh;
        }
    }

    @media (max-width: 400px) {
        .container {
            max-width: 100% !important;
            padding-left: 8px !important;
            padding-right: 8px !important;
        }
        
        .mobile-filters-select {
            font-size: 12px;
        }
        
        #galleryModal .image-container {
            max-height: 40vh;
            padding: 10px;
        }
    }