/* Product Filter Sidebar Styles */
.filter-sidebar {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-sidebar h3 {
  color: #004080;
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
  transition: color 0.3s ease;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section h4 {
  color: #333;
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* Price Range Slider */
.price-range-container {
  padding: 10px 0;
}

.price-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.price-input-group {
  flex: 1;
}

.price-input-group label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.price-input-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.price-slider {
  margin: 15px 0;
}

.price-slider input[type="range"] {
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #0066cc 0%, #0066cc 50%, #ddd 50%, #ddd 100%);
  border-radius: 3px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #0066cc;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #0066cc;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-display {
  text-align: center;
  color: #0066cc;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
}

/* Brand Checkboxes */
.brand-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  border: 1px solid transparent;
}

.brand-checkbox:hover {
  background-color: #f2f6ff;
}

.brand-checkbox input[type="checkbox"]:checked + label {
  color: #0066cc;
  font-weight: 600;
}

.brand-checkbox:has(input[type="checkbox"]:checked) {
  background-color: #e6f0ff;
  border-color: #0066cc;
}

.brand-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #0066cc;
}

.brand-checkbox label {
  flex: 1;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s;
}

.brand-count {
  color: #999;
  font-size: 12px;
}

/* Dropdown-style filters replacing checkbox lists */
.filter-dropdown {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  cursor: pointer;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

/* Visually highlight sections when filters are active */
.filter-section.active {
  background-color: #f5f8ff;
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid #c5d8ff;
}

/* Filter Actions */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.filter-actions button {
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.btn-apply-filters {
  background-color: #0066cc;
  color: white;
}

.btn-apply-filters:hover {
  background-color: #004080;
}

.btn-clear-filters {
  background-color: #f0f0f0;
  color: #333;
}

.btn-clear-filters:hover {
  background-color: #e0e0e0;
}

/* Filter Toggle (Mobile) */
.filter-toggle {
  display: none;
  background-color: #0066cc;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 15px;
  width: 100%;
}

.filter-toggle:hover {
  background-color: #004080;
}

/* Products Layout with Filters */
.products-with-filters {
  display: flex;
  gap: 25px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
}

.filters-column {
  flex: 0 0 280px;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.products-column {
  flex: 1;
  min-width: 0;
}

/* Product card transitions for filtering */
.product-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card[style*="display: none"] {
  opacity: 0;
  transform: scale(0.95);
}

.filter-results-info {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  padding: 12px 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  border-left: 4px solid #0066cc;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.brand-results-banner {
  max-width: 1400px;
  margin: 18px auto 0;
  padding: 12px 20px;
  background-color: #e6f0ff;
  color: #004080;
  border-left: 4px solid #0066cc;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.brand-results-banner .brand-results-link {
  margin-left: 10px;
  color: #0066cc;
  font-weight: 700;
  text-decoration: none;
}

.brand-results-banner .brand-results-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-with-filters {
    flex-direction: column;
  }

  .filters-column {
    position: static;
    flex: 1;
    max-height: none;
  }

  .filter-toggle {
    display: block;
  }

  .filter-sidebar {
    display: none;
  }

  .filter-sidebar.active {
    display: block;
  }
}
