/**
 * Filter Component Styles - Dropdown Interface
 */

.filters-container {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e9ecef;
  gap: 20px;
}

.filters-left,
.filters-right {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  flex-shrink: 0;
}

/* Filter Dropdown Container */
.filter-dropdown {
  position: relative;
  display: inline-block;
}

/* Filter Button Styles */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e1e1d7;
  border-radius: 30px;
  color: #7d7e78;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  min-height: 36px;
  position: relative;
}

.filter-btn:hover {
  border-color: #007cba;
  color: #007cba;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}

.filter-btn.highlight {
  background: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

.filter-btn.highlight:hover {
  background: #f1e7da;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

.filter-btn .highlight {
  color: inherit;
  font-weight: 600;
}

/* Dropdown Arrow */
.dropdown-arrow::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.filter-btn:hover .dropdown-arrow::after {
  transform: translateY(2px);
}

/* Dropdown Content */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid #e1e1d7;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  margin-top: 8px;
  max-height: 400px;
  overflow: hidden;
}

.dropdown-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Header */
.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.dropdown-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.close-dropdown {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-dropdown:hover {
  background: #e9ecef;
  color: #495057;
}

/* Price Filter Specific Styles */
.price-slider-container {
  padding: 16px;
}

.price-inputs {
  margin-bottom: 16px;
}

.price-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.price-input {
  width: 100%;
  min-width: 140px;
  padding: 12px 16px;
  border: 2px solid #e1e1d7;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: Inter, sans-serif;
  transition: all 0.3s ease;
  background: #fff;
  color: #4e4e43;
  box-sizing: border-box;
}

.price-input:focus {
  outline: none;
  border-color: #d5b588;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(213, 181, 136, 0.1);
}

.price-input::placeholder {
  color: #7d7e78;
  font-weight: 400;
}

.price-slider {
  margin: 16px 0;
  height: 8px;
  position: relative;
}

/* jQuery UI Slider Customization */
.ui-slider {
  position: relative;
  text-align: left;
  background: #e9ecef;
  border-radius: 4px;
  border: none;
  height: 8px;
}

.ui-slider .ui-slider-range {
  position: absolute;
  z-index: 1;
  font-size: 0.7em;
  display: block;
  border: 0;
  background: #d5b588;
  border-radius: 4px;
  height: 8px;
}

.ui-slider .ui-slider-handle {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  cursor: pointer;
  background: #fff;
  border-radius: 50%;
  border: 3px solid #d5b588;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
  transition: all 0.2s ease;
  top: -6px;
  margin-left: -10px;
}

.ui-slider .ui-slider-handle:hover,
.ui-slider .ui-slider-handle:active {
  background: #007cba;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

/* Attribute Filter Styles */
.attribute-options {
  max-height: 240px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f1f5f9;
}

.attribute-options::-webkit-scrollbar {
  width: 6px;
}

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

.attribute-options::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.attribute-options::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.attribute-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 16px;
  height: 48px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: #ffffff;
  margin: 0;
}

.attribute-option:hover {
  background-color: #f7f7f1;
  border-color: #f7f7f1;
}

.attribute-option input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #7d7e78;
  border-radius: 4px;
  margin-right: 12px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: #fff;
}

.attribute-option input[type="checkbox"]:checked + .checkmark {
  background-color: #d5b588;
  border-color: #d5b588;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(213, 181, 136, 0.3);
}

.attribute-option input[type="checkbox"]:checked + .checkmark:after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.option-label {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  font-family: Inter, sans-serif;
  color: #4e4e43;
  line-height: 24px;
  letter-spacing: -0.2px;
}

.option-count {
  font-size: 12px;
  color: #6c757d;
  margin-left: 8px;
  font-weight: 400;
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Sort Options */
.sort-options {
  padding: 0;
}

.sort-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 16px;
  height: 48px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: #ffffff;
  margin: 0;
}

.sort-option:hover {
  background-color: #f7f7f1;
  border-color: #f7f7f1;
}

.sort-option input[type="radio"] {
  display: none;
}

.radio-mark {
  width: 20px;
  height: 20px;
  border: 2px solid #7d7e78;
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: #fff;
}

.sort-option input[type="radio"]:checked + .radio-mark {
  border-color: #d5b588;
  box-shadow: 0 2px 4px rgba(213, 181, 136, 0.3);
}

.sort-option input[type="radio"]:checked + .radio-mark:after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 8px;
  height: 8px;
  background: #d5b588;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(213, 181, 136, 0.3);
}

/* Dropdown Actions */
.dropdown-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 36px;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #007cba, #005a87);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #005a87, #004085);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border: 2px solid #e9ecef;
}

.btn-secondary:hover {
  background: #e9ecef;
  color: #2c3e50;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Clear All Filters */
.clear-all-filters {
  color: #4e4e43;
  font-size: 14px;
  font-weight: 600;
  font-family: Inter, sans-serif;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 30px;
  transition: all 0.2s ease;
  text-decoration: none;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
  line-height: 22px;
  text-align: center;
}

.clear-all-filters:hover {
  color: #2c3e50;
  border-color: #cbd5e0;
  transform: translateY(-1px);
}

/* Sort By Section */
.sort-by {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-by .filter-dropdown {
  margin-left: 12px;
}

.sort-by .result-count {
  font-size: 14px;
  color: #4e4e43;
  font-weight: 400;
  font-family: Inter, sans-serif;
  margin-right: 12px;
}

/* Sort By Button Specific Styles */
.sort-by .filter-btn {
  background: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
  border-radius: 24px;
  height: 32px;
  padding: 0 16px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.2px;
  line-height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: auto;
  white-space: nowrap;
}

.sort-by .filter-btn:hover {
  background: #f1e7da;
  border-color: #f1e7da;
  color: #a67a14;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(184, 137, 23, 0.15);
}

.sort-by .filter-btn .dropdown-arrow::after {
  border-top-color: #b88917;
}

.sort-by .filter-btn:hover .dropdown-arrow::after {
  border-top-color: #a67a14;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Category Filter Styles */
.category-filter-container {
  margin-bottom: 24px;
}

.category-filter-container .cat-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid #e9ecef;
}

.category-filter-container .filters-cat-button:hover {
  border-color: #b88917;
  color: #b88917;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(184, 137, 23, 0.15);
}

.category-filter-container .filters-cat-button.active {
  background: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
}

.category-filter-container .filters-cat-button.active:hover {
  background: #f1e7da;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

.category-filter-container .filters-cat-button.btn-all {
  background-color: #f8f3ed;
  color: #b88917;
  border-color: #f1e7da;
}

.category-filter-container .filters-cat-button.btn-all:hover {
  background-color: #f1e7da;
  color: #a67a14;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(184, 137, 23, 0.15);
}

.category-filter-container .filters-cat-button.btn-all.active {
  background-color: #f8f3ed;
  color: #b88917;
  border-color: #f1e7da;
}

/* Icon styling for category buttons */
.category-filter-container .filters-cat-button .icon-cat {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: transparent;
  min-width: 24px;
  flex-shrink: 0;
}

.category-filter-container .filters-cat-button .icon-cat img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.category-filter-container .filters-cat-button span {
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.2px;
  font-family: Inter, sans-serif;
}

.category-filter-container .filters-cat-button input[type="checkbox"] {
  display: none;
}

.category-filter-container .filters-cat-button label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.category-filter-container .filters-cat-button .icon-cat img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.category-filter-container .filters-cat-button span {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

/* General Filter Button Styles */
.filters-cat-button {
  border-radius: 30px !important;
  border: 1px solid #e1e1d7;
  color: #7d7e78;
  margin: 0;
  background-color: #ffffff;
  font-size: 14px !important;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-cat-button:hover {
  border-color: #007cba;
  color: #007cba;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}

.filters-cat-button.active {
  background-color: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
}

.filters-cat-button.active:hover {
  background-color: #f1e7da;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

.filters-cat-button input[type="checkbox"] + label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.filters-cat-button input[type="checkbox"] {
  display: none;
}

.filters-cat-button input[type="checkbox"] + label:before {
  display: none;
  width: 1em;
  height: 1em;
  padding-left: 0.1em;
  padding-bottom: 0.1em;
  margin-right: 0.5em;
  vertical-align: bottom;
  color: transparent;
  transition: 0.2s;
  border-radius: 100%;
  background-color: #8e8e93;
}

.filters-cat-button input[type="checkbox"] + label:active:before {
  transform: scale(0);
  color: #b88917;
}

/* Enhanced active and highlight filter styles */
.filters-cat-button.highlight,
.filter-btn.highlight {
  background-color: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

.filters-cat-button.highlight:hover,
.filter-btn.highlight:hover {
  background-color: #f1e7da;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

/* Special styling for "All" button */
.btn-all {
  background-color: #f8f3ed;
  color: #b88917;
  border-color: #f1e7da;
}

.btn-all:hover {
  background-color: #f1e7da;
  color: #a67a14;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(184, 137, 23, 0.15);
}

.filters-cat-button.btn-all.highlight,
.filter-btn.btn-all.highlight {
  background-color: #f8f3ed;
  border-color: #f1e7da;
  color: #b88917;
}

.filters-cat-button.btn-all.highlight:hover,
.filter-btn.btn-all.highlight:hover {
  background-color: #f1e7da;
  border-color: #f1e7da;
  color: #b88917;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .dropdown-content {
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    gap: 16px;
  }
  .filter-dropdown {
    width: 100%;
  }

  .filter-btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
  }

  .dropdown-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 320px;
    max-height: 80vh;
    margin-top: 0;
  }

  .dropdown-content.active {
    transform: translate(-50%, -50%);
  }

  .sort-by {
    margin-left: 0;
    width: 100%;
  }

  .sort-by .filter-dropdown {
    margin-left: 0;
  }

  .clear-all-filters {
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 10px 14px;
    font-size: 12px;
    min-height: 36px;
  }

  .dropdown-content {
    width: 95%;
    max-width: 280px;
  }

  .dropdown-header {
    padding: 12px 16px;
  }

  .dropdown-header h4 {
    font-size: 14px;
  }

  .price-slider-container,
  .attribute-options,
  .sort-options {
    padding: 12px 16px;
  }

  .dropdown-actions {
    padding: 12px 16px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .filter-btn,
  .dropdown-content,
  .attribute-option,
  .sort-option,
  .checkmark,
  .radio-mark,
  .loading-spinner {
    transition: none;
    animation: none;
  }
}

/* Focus styles for better accessibility */
.filter-btn:focus,
.price-input:focus,
.attribute-option:focus,
.sort-option:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .filter-btn {
    border: 2px solid #000;
  }

  .filter-btn.highlight,
  .filters-cat-button.highlight {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
  }

  .dropdown-content {
    border: 2px solid #000;
  }
}

/* ========================================
   NO RESULTS FOUND STYLES
   ======================================== */

.no-results-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
  padding: 40px 20px;
  background: #fff;
}

.no-results-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  font-family: "Inter";
}

.no-results-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #666;
  margin: 0;
  line-height: 1.4;
}
