:root {
  --brand-green: #4f632b;
  --bg-gray: #f8f9fa;
  --border-color: #eee;
  --text-muted: #888;
  --tajawal: "Tajawal", sans-serif;
}

/* Search Page Main Layout */
.search-page {
  padding-top: 0;
  min-height: 80vh;
}

/* Filter Toggle Bar */
.filter-toggle-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 0;
}

.filter-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tajawal);
  font-weight: 500;
  color: #333;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.filter-btn:hover {
  background: #f5f5f5;
}

.filter-icon {
  width: 20px;
  height: 20px;
}

/* Search Options Pills */
.search-options-scroll {
  overflow-x: auto;
  white-space: nowrap;
  padding: 15px 0;
  scrollbar-width: none;
}

.search-options-scroll::-webkit-scrollbar {
  display: none;
}

.search-pill {
  display: inline-block;
  background: #f1f3f0;
  color: #333;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-family: var(--tajawal);
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}

.search-pill:hover,
.search-pill.active {
  background: #fff;
  border-color: var(--brand-green);
  color: var(--brand-green);
}

/* Map Section */
#search-map {
  width: 100%;
  height: 600px;
  border-radius: 0;
  margin-top: 10px;
  z-index: 1;
}

.map-placeholder {
  width: 100%;
  height: 600px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

.map-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Advanced Filters Section */
.advanced-filters-section {
  background: #fff;
  padding: 40px 0;
  display: block; /* Show for editing, will toggle via JS */
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

.filter-card {
  background: #fff;
  border: 1px solid #f8f8f8;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.filter-card-title {
  font-family: var(--tajawal);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 20px;
  color: #333;
  text-align: right;
}

.custom-select-wrap {
  position: relative;
  width: 100%;
}

.custom-select-wrap select {
  background-color: #f2f2f2 !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 12px 20px !important;
  font-size: 14px;
  color: #888;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: right;
  font-family: var(--tajawal);
}

.custom-select-wrap::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Range Slider Styling */
.range-value-label {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

input[type="range"].green-range {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(
    to left,
    #5b7136 0%,
    #5b7136 var(--fill),
    #f0f0f0 var(--fill),
    #f0f0f0 100%
  );
}

[dir="ltr"] input[type="range"].green-range {
  background: linear-gradient(
    to right,
    #5b7136 0%,
    #5b7136 var(--fill),
    #f0f0f0 var(--fill),
    #f0f0f0 100%
  );
}

input[type="range"].green-range:focus {
  outline: none;
}

input[type="range"].green-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: transparent;
  border-radius: 3px;
}

input[type="range"].green-range::-webkit-slider-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #5b7136; /* Using the brand green from the image */
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* For Firefox */
input[type="range"].green-range::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #f0f0f0;
  border-radius: 3px;
}
input[type="range"].green-range::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #5b7136;
  cursor: pointer;
}

.btn-search-apply {
  background-color: #5b7136;
  color: #fff;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-family: var(--tajawal);
  font-size: 16px;
  margin-top: 30px;
  transition: opacity 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
  #search-map {
    height: 400px;
  }
}
