/* === Catalog Page Layout === */
.catalog-page { padding: 40px 0; min-height: 60vh; }
.catalog-title { font-size: 2rem; margin-bottom: 10px; }
.catalog-desc { color: #666; margin-bottom: 30px; max-width: 800px; }

/* === Controls Layout === */
.catalog-controls {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

/* === Filters Sidebar === */
.filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.filters__header h3 { margin: 0; font-size: 1.2rem; }
.filters__toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
}
.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group h4 { margin-bottom: 12px; font-size: 1rem; }
.filter-list { list-style: none; }
.filter-list li { margin-bottom: 8px; }
.filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}
.filter-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Price Range */
.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.price-range input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.btn--small { padding: 6px 12px; font-size: 0.85rem; }
.btn--full { width: 100%; }

/* === Sort & Results === */
.catalog-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}
.results-count { font-size: 0.95rem; color: #555; }
.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sort-wrapper select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* === Mobile Filters === */
.filters__mobile-btn {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    cursor: pointer;
}
.filters--hidden { display: none; }

/* === Products Grid (наследуется из style.css) === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* === Pagination === */
.catalog-pagination { text-align: center; padding: 20px 0; }

/* === Responsive === */
@media (max-width: 900px) {
    .catalog-controls {
        grid-template-columns: 1fr;
    }
    .filters {
        display: none; /* Скрыто по умолчанию на мобильных */
    }
    .filters--active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        z-index: 10;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    .filters__mobile-btn { display: block; }
    .catalog-sort { flex-direction: column; gap: 15px; align-items: flex-start; }
}

/* === Product Card Enhancements for Catalog === */
.product-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}
.product-card__rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    font-size: 0.9rem;
}
.product-card__rating .stars { color: #f39c12; }