/* Фильтры */
.category-link {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-container ul {
    display: flex;
    gap: 20px;
    list-style-type: none;
    flex-wrap: wrap;
}
.category-container a {
    text-decoration: none;
}
.filters-section {
    background: var(--background);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}

.filters-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    display: flex;
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px; 
    box-sizing: border-box;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    min-width: 0; 
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Запрещаем перенос текста в кнопке */
}

.search-btn:hover {
    background: var(--primary-dark);
}
.filters-row {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    flex-direction: row-reverse;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-select {
    padding: 0.25rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

/* Адаптив для планшетов */
@media (max-width: 768px) {
    .search-box {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .search-box input {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
    
    .search-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Адаптив для мобильных телефонов */
@media (max-width: 480px) {
    .search-box {
        padding: 0 5px;
        width: 100%; 
        margin: 0 auto;
    }
    
    .search-box input {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
        flex: 1;
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    
    .search-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
        white-space: nowrap;
        border: 1px solid var(--primary-color);
        border-radius: 8px;
    }
}
