/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 16px;
    transition: all var(--transition-speed);
    font-family: var(--font-main);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.filter-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
    transition: all 0.1s ease-out;
}

/* Mobile Filter Carousel (Swiper) */
.mobile-filter-container {
    display: block;
    margin-bottom: 8px;
    width: 100%;
    overflow: hidden;
}

.swiper {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 16px; /* Space for pagination (8px gap + 8px bullets) */
}

.mobile-filter-container .swiper-pagination {
    bottom: 0 !important;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    /* Width is handled by slidesPerView: 1.2 in JS, but flex properties help centering content */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    
    font-size: 16px;
    font-weight: 400;
    opacity: 0.5;
    color: #666;
    
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Text overflow handling */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 16px; /* Total 32px horizontal padding */
    max-width: 100%;
}

.swiper-slide:active {
    opacity: 0.8;
    transform: scale(0.98);
    transition: all 0.1s ease-out;
}

.swiper-slide-active {
    opacity: 1;
    font-size: 20px;
    font-weight: 600;
    color: #000;
    transform: scale(1.05);
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 0.6;
    margin: 0 4px !important;
}

.swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}

@media (max-width: 768px) {
    /* Расширение области свайпа */
    .mobile-filter-container {
        /* Захват области до хедера (компенсация отступа main) */
        margin-top: -40px;
        /* Отступ до сетки (было 8px) */
        margin-bottom: 4px;
        /* На всю ширину экрана (компенсация padding родителя main: 20px) */
        margin-left: -20px;
        width: calc(100% + 40px);
    }

    .swiper {
        /* Компенсация margin-top (10 + 30) */
        padding-top: 30px;
        /* Увеличение области снизу (16 + 4) */
        padding-bottom: 20px;
    }
    
    .mobile-filter-container .swiper-pagination {
        bottom: 4px !important;
    }
}
