


.search-bar-section {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.active-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.875rem;
}

.active-filters-bar span {
  color: #6c757d;
  font-weight: 500;
}

.active-filters-bar .btn-clear {
  background: #dc3545;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.active-filters-bar .btn-clear:hover {
  background: #c82333;
}

.search-bar-form {
  max-width: 800px;
  margin: 0 auto;
}

.search-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-bar-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--secondary);
}

.search-bar-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
}

.search-bar-input::placeholder {
  color: var(--text-muted);
}

.search-bar-submit {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-bar-submit:hover {
  opacity: 0.9;
}


.search-page {
  min-height: 100vh;
  background: var(--bg-secondary);
}

.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}


.search-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 5rem;
}

.filter-form {
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 10;
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-filters {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 0.375rem;
}

.btn-close-filters:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-clear-filters {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
}

.btn-clear-filters:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-apply-filters {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-apply-filters:hover {
  opacity: 0.9;
}


.filter-select {
  width: 100%;
  padding: 0.625rem 2rem 0.625rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  background: var(--bg-secondary);
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}


.sidebar-footer-mobile {
  display: none;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--card-bg);
  position: sticky;
  bottom: 0;
}

.btn-cancel-mobile {
  flex: 1;
  padding: 0.875rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-cancel-mobile:hover {
  background: var(--bg-primary);
  border-color: var(--border-dark);
}

.btn-clear-mobile {
  flex: 1;
  padding: 0.875rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-clear-mobile:hover {
  background: #c82333;
}

.btn-apply-mobile {
  flex: 2;
  padding: 0.875rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-apply-mobile:hover {
  background: var(--primary-hover);
}


.filter-group {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.filter-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
  padding: 0;
}

.filter-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.5rem;
}

.filter-input-wrapper svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.filter-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--text-primary);
  outline: none;
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.btn-detect-location {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 0.25rem;
  transition: color 0.2s ease;
}

.btn-detect-location:hover {
  color: var(--primary);
}

.filter-input-sm {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.filter-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-range-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}


.filter-checkbox,
.filter-radio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.filter-checkbox:hover,
.filter-radio:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-checkbox input,
.filter-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-radius: 0.375rem;
  background: var(--bg-primary);
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 5px;
  border: 2px solid white;
  border-top: none;
  border-right: none;
  transform: translate(-50%, -60%) rotate(-45deg) scale(0);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-checkbox input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-checkbox input:checked + .checkbox-custom::after {
  transform: translate(-50%, -60%) rotate(-45deg) scale(1);
}

.filter-checkbox input:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(94, 142, 62, 0.2);
}


.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-radius: 50%;
  background: var(--bg-primary);
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-radio input:checked + .radio-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-radio input:checked + .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.filter-radio input:focus + .radio-custom {
  box-shadow: 0 0 0 3px rgba(94, 142, 62, 0.2);
}

.rating-option {
  color: var(--warning);
}


.btn-mobile-filters {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
  z-index: 100;
  align-items: center;
  gap: 0.5rem;
}


.search-results {
  min-width: 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.results-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-select {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
}


.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}


.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-ellipsis {
  color: var(--text-muted);
  padding: 0 0.25rem;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 1.5rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}



@media (max-width: 64rem) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48rem) {
  .search-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .search-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    border-radius: 0;
    max-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .search-sidebar .filter-form {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
  }

  .search-sidebar.open {
    transform: translateX(0);
  }

  .btn-close-filters {
    display: flex;
  }

  .sidebar-footer-mobile {
    display: flex;
    flex-shrink: 0;
  }

  .btn-mobile-filters {
    display: flex;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-title {
    font-size: 1.125rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}
