/* Category Filter System - Enhanced UI/UX */

/* Layout Structure */
.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin-top: 30px;
}

/* Filter Sidebar */
.filter-sidebar {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 100px;
  height: fit-content;
  overflow: visible;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.filter-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-header h3 i {
  color: #2563eb;
}

.btn-reset-filters {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-reset-filters:hover {
  background: #f1f5f9;
  color: #2563eb;
}

/* Filter Sections */
.filter-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-title i {
  font-size: 14px;
  color: #2563eb;
}

/* Filter Options */
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-option {
  position: relative;
}

.filter-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8fafc;
  border: 2px solid transparent;
}

.filter-option label:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.filter-option input[type="radio"]:checked + label {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #2563eb;
  color: #1e40af;
}

.filter-option label i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #64748b;
}

.filter-option input[type="radio"]:checked + label i {
  color: #2563eb;
}

.option-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.option-count {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 12px;
}

.filter-option input[type="radio"]:checked + label .option-count {
  background: #2563eb;
  color: #ffffff;
}

/* Price Range Filter */
.price-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.price-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.price-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #eff6ff;
}

.price-separator {
  color: #94a3b8;
  font-weight: 600;
}

.btn-apply-price {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-apply-price:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Products Content Area */
.products-content {
  min-width: 0;
}

/* Active Filters */
.active-filters {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filters-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  background: #2563eb;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tag i {
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.filter-tag i:hover {
  opacity: 1;
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.results-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-header h2 i {
  color: #f59e0b;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.results-count {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

.btn-toggle-filters {
  display: none;
  padding: 10px 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  gap: 8px;
  align-items: center;
  transition: all 0.3s ease;
}

.btn-toggle-filters:hover {
  background: #e2e8f0;
  color: #2563eb;
}

/* Subcategories Quick Links */
.subcategories-quick {
  margin-bottom: 24px;
}

.subcategories-quick h3 {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subcategories-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.subcategories-slider::-webkit-scrollbar {
  height: 6px;
}

.subcategories-slider::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.subcategories-slider::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.subcategory-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.subcategory-chip:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-2px);
}

.subcategory-chip.active {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.subcategory-chip i {
  font-size: 16px;
}

.chip-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.subcategory-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .category-layout {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }
  
  .filter-sidebar {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .category-layout {
    grid-template-columns: 1fr;
  }
  
  .filter-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    z-index: 1000;
    transition: right 0.3s ease;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .filter-sidebar.active {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .btn-toggle-filters {
    display: flex;
  }
  
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .results-info {
    width: 100%;
    justify-content: space-between;
  }
}

/* Filter Sidebar Overlay */
.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.filter-overlay.active {
  display: block;
}
