/* ==================================================================
   ФИЛЬТРЫ (ОБЩИЕ)
   ================================================================== */
.filters-sidebar {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 80px;
  z-index: 1;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.filter-title {
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-size: 1.1rem;
}

.filter-clear {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.filter-clear:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

.filter-section {
  margin-bottom: 1.8rem;
  animation: slideInLeft 0.3s ease;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section h6 {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
  font-family: "Montserrat", "Roboto", sans-serif;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Категории фильтров */
.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.filter-category:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.filter-category input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-category label {
  flex: 1;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--gray);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-weight: 500;
}

.filter-category-count {
  background: var(--light);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text);
}

/* Фильтр по цене */
.price-filter {
  margin-top: 0.5rem;
}

.price-slider {
  margin-bottom: 1rem;
}

.price-range {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.price-range input {
  width: 48%;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.9rem;
}

.price-filter-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.price-filter-item {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  background: white;
  border: 1px solid #dee2e6;
}

.price-filter-item:hover {
  background-color: #f8f9fa;
  border-color: #0d6efd;
}

.price-filter-item.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

/* Теги фильтров */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 0.8rem;
}

.filter-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}

/* Действия с фильтрами */
.filter-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn.apply {
  background: var(--primary);
  color: white;
}

.filter-btn.apply:hover {
  background: var(--dark-blue);
}

.filter-btn.reset {
  background: #f8f9fa;
  color: var(--text);
  border: 1px solid #dee2e6;
}

.filter-btn.reset:hover {
  background: #e9ecef;
}

/* Активные фильтры */
.active-filters {
  background: #e8f4ff;
  border: 1px solid #b6d4fe;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  background: #0066cc;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 0 5px 5px 0;
}

.active-filter-tag .remove-filter {
  margin-left: 6px;
  cursor: pointer;
  opacity: 0.8;
}

.active-filter-tag .remove-filter:hover {
  opacity: 1;
}

.clear-all-filters {
  color: #dc3545;
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 10px;
}

.clear-all-filters:hover {
  text-decoration: underline;
}

/* Поисковый фильтр */
.search-filter {
  position: relative;
  margin-bottom: 20px;
}

.search-filter input {
  padding-left: 40px;
  border-radius: 20px;
}

.search-filter i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

/* Адаптивность */
@media (max-width: 991.98px) {
  .filters-sidebar {
    position: static;
    margin-bottom: 2rem;
  }
  
  .filter-header {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .filters-sidebar {
    padding: 1rem;
  }
  
  .filter-actions {
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .price-range {
    flex-direction: column;
  }
  
  .price-range input {
    width: 100%;
  }
  
  .filter-tags {
    justify-content: center;
  }
}