/* Filter Bar Styles */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group,
.sort-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 400;
}

.filter-dropdown {
  position: relative;
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.filter-button:hover {
  border-bottom-color: #d1d5db;
}

.filter-button.active {
  border-bottom-color: #1b2a41;
}

.filter-button svg {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.filter-menu.active + .filter-button svg,
.filter-button.active svg {
  transform: rotate(180deg);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: none;
}

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

.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 2px;
}

.filter-option:hover {
  background-color: #f9fafb;
}

.filter-option input[type="radio"] {
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.filter-option span {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 400;
}

/* Price Range Input Styles */
.price-range-inputs {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
}

.price-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input-wrapper {
  position: relative;
  flex: 1;
}

.price-input-wrapper span {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 0.875rem;
}

.price-input {
  width: 100%;
  padding: 8px 10px 8px 26px;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.price-input:focus {
  outline: none;
  border-color: #1b2a41;
}

.price-separator {
  color: #9ca3af;
  font-size: 0.875rem;
}

.price-apply-btn {
  width: 100%;
  padding: 7px;
  background: #1b2a41;
  color: white;
  border: none;
  border-radius: 2px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.price-apply-btn:hover {
  background: #0f1d2f;
}

.product-count {
  font-size: 0.875rem;
  color: #6b7280;
  margin-left: auto;
}

/* Reset Filters Button */
.reset-filters-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 400;
}

.reset-filters-btn:hover {
  color: #374151;
  border-color: #d1d5db;
  background: #f9fafb;
}

.reset-filters-btn svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  padding: 20px 0;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: transparent;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 400;
}

.pagination-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #1b2a41;
  color: white;
  border-color: #1b2a41;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

.pagination-ellipsis {
  color: #9ca3af;
  padding: 0 4px;
  font-size: 0.875rem;
}

/* Loading State */
.loading-overlay {
  position: relative;
}

.loading-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
}

.loading-overlay.loading::after {
  display: flex;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-group,
  .sort-group {
    width: 100%;
    justify-content: flex-start;
  }

  .product-count {
    margin-left: 0;
    text-align: right;
    order: -1;
  }

  .filter-menu {
    right: 0;
    left: auto;
    min-width: 160px;
  }
}
