/* ===========================
   SEUN PROPERTY — listings.css
   =========================== */

/* === PAGE HEADER === */
.page-header {
  background: #0f0d08;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 0.5px solid var(--border);
}

.page-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 500px;
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 1.2rem 2rem;
  background: var(--dark-2);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 90;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark-3);
  border: 0.5px solid var(--border);
  border-radius: 2px;
  padding: 0 12px;
  flex: 1;
  min-width: 200px;
}

.filter-search i {
  color: var(--text-dim);
  font-size: 16px;
  flex-shrink: 0;
}

.filter-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  padding: 10px 0;
  width: 100%;
}

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

.filter-bar select {
  background: var(--dark-3);
  border: 0.5px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 10px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6658' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color 0.2s;
}

.filter-bar select:hover { border-color: var(--gold); }
.filter-bar select:focus { border-color: var(--gold); color: var(--text-primary); }
.filter-bar select option { background: #1a1a1a; color: var(--text-primary); }

.btn-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 2px;
  color: var(--text-dim);
  font-size: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-clear:hover {
  border-color: #c0392b;
  color: #e74c3c;
}

/* === RESULTS BAR === */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  background: var(--dark-bg);
  border-bottom: 0.5px solid var(--border);
}

#resultsCount {
  font-size: 13px;
  color: var(--text-dim);
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 2px;
  color: var(--text-dim);
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active, .view-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* === LISTINGS CONTAINER === */
.listings-container {
  padding: 2rem;
  background: var(--dark-bg);
  min-height: 400px;
}

/* Override grid for listings page — bigger cards */
.listings-container .properties-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  border: none;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

/* === LIST VIEW === */
.properties-grid.list-view {
  grid-template-columns: 1fr !important;
}

.properties-grid.list-view .prop-card {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.properties-grid.list-view .prop-img {
  height: 100%;
  min-height: 180px;
}

/* === NO RESULTS === */
.no-results {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-dim);
}

.no-results i {
  font-size: 52px;
  color: var(--border);
  display: block;
  margin-bottom: 1rem;
}

.no-results h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.no-results p { font-size: 14px; }

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .filter-bar {
    top: 60px;
    gap: 8px;
  }

  .filter-search { min-width: 100%; }

  .filter-bar select {
    flex: 1;
    min-width: calc(50% - 5px);
  }

  .properties-grid.list-view .prop-card {
    grid-template-columns: 1fr;
  }

  .properties-grid.list-view .prop-img {
    height: 200px;
  }

  .listings-container {
    padding: 1rem;
  }
}