/* ── SEARCH RESULT PAGE STYLES ── */

nav { position: sticky; top: 0; }

/* ── SEARCH DOCK ── */
.search-dock {
  background: var(--dark);
  padding: 20px 48px;
  position: sticky; top: 64px; z-index: 100;
}
.search-card {
  display: flex; align-items: center;
  background: var(--white); border-radius: 14px;
  padding: 6px; gap: 0; flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(13,27,75,0.20);
  max-width: 900px;
}
.search-field {
  display: flex; flex-direction: column;
  flex: 1; min-width: 140px;
  padding: 7px 16px;
  border-right: 1px solid #EEE;
}
.search-field:last-of-type { border-right: none; }
.search-field--wide { flex: 3; }
.search-field label {
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px;
}
.search-field select,
.search-field input {
  border: none; outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; color: var(--dark);
  background: transparent; cursor: pointer; appearance: none; width: 100%;
}
.search-field input::placeholder { color: #bbb; }

/* ── PROPERTY TYPE TRIGGER ── */
.property-type-trigger {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.95rem; color: var(--dark);
  cursor: pointer; user-select: none;
}
.trigger-arrow { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }

/* ── AUTOSUGGEST DROPDOWN ── */
.search-suggest {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(13,27,75,0.13);
  z-index: 200;
}
.search-suggest.open { display: block; }
.suggest-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer;
  background: var(--white);
  transition: background .15s;
}
.suggest-item:first-child { border-radius: 12px 12px 0 0; }
.suggest-item:last-child  { border-radius: 0 0 12px 12px; }
.suggest-item:only-child  { border-radius: 12px; }
.suggest-item:hover { background: var(--sky); }
.suggest-name { font-size: 0.9rem; color: var(--dark); }

.search-btn {
  background: var(--sage-dk); color: var(--white);
  border: none; border-radius: 10px; padding: 10px 24px;
  font-family: 'DM Sans', sans-serif; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
  transition: background .2s; flex-shrink: 0;
}
.search-btn:hover { background: #0D1B4B; }
.search-btn svg { width: 15px; height: 15px; }

/* ── RESULTS HEADER ── */
.results-header {
  padding: 28px 48px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.results-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; color: var(--dark);
}
.results-title span {
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 400; margin-left: 10px;
}
.results-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#search-filter li { cursor: pointer; }

.sort-select {
  padding: 8px 28px 8px 14px; border-radius: 100px;
  border: 1.5px solid rgba(197,213,245,0.5);
  background: var(--white);
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  color: var(--dark); cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235A6A8A'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

.view-toggle { display: flex; gap: 4px; }
.vbtn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid rgba(197,213,245,0.5);
  background: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: background .15s, color .15s;
}
.vbtn.active, .vbtn:hover { background: var(--sage); color: var(--sage-dk); border-color: var(--sage); }
.vbtn svg { width: 15px; height: 15px; }

/* ── FILTER CHIPS ── */
.filter-row {
  padding: 14px 48px 0;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-label { font-size: 0.78rem; color: var(--muted); margin-right: 4px; }
.chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  border: 1.5px solid rgba(197,213,245,0.5);
  background: var(--white); font-size: 0.8rem; cursor: pointer;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.chip:hover { background: var(--sage); border-color: var(--sage); }
.chip.active { background: var(--sage); border-color: var(--sage-dk); color: var(--sage-dk); font-weight: 500; }
.chip .cx { font-size: 0.75rem; color: var(--muted); margin-left: 2px; line-height: 1; }
.chip.active .cx { color: var(--sage-dk); }
.clear-all {
  font-size: 0.78rem; color: var(--sage-dk);
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; text-decoration: underline; padding: 6px 4px;
}

/* ── RESULTS BODY ── */
.results-body { padding: 24px 48px 60px; }
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── SPACE CARD ── */
.space-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  border: 1px solid rgba(197,213,245,0.35);
  box-shadow: 0 2px 12px rgba(13,27,75,0.06);
  transition: transform .25s, box-shadow .25s;
  animation: cardIn .4s ease both; position: relative;
}
.space-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(13,27,75,0.11); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.space-card:nth-child(1) { animation-delay: .05s }
.space-card:nth-child(2) { animation-delay: .10s }
.space-card:nth-child(3) { animation-delay: .15s }
.space-card:nth-child(4) { animation-delay: .20s }
.space-card:nth-child(5) { animation-delay: .25s }
.space-card:nth-child(6) { animation-delay: .30s }

.card-img {
  height: 190px; display: flex; align-items: center;
  justify-content: center; font-size: 2.8rem; position: relative;
}
.card-img.sage-bg  { background: var(--sage); }
.card-img.blush-bg { background: var(--blush); }
.card-img.sky-bg   { background: var(--sky); }
.card-img.sand-bg  { background: var(--sand); }
.card-img.mint-bg  { background: #C5E8D8; }
.card-img.lilac-bg { background: #D8D5F0; }

.card-save {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(4px);
  transition: background .15s; font-size: 0.85rem;
}
.card-save:hover { background: var(--white); }
.card-save.saved { color: #E05555; }

.card-tag {
  position: absolute; top: 12px; left: 12px;
  font-size: 0.68rem; font-weight: 600;
  padding: 4px 10px; border-radius: 100px; letter-spacing: 0.04em;
}
.tag-featured { background: var(--dark); color: var(--white); }
.tag-new      { background: #D6F0E8; color: #1A7A5A; }
.tag-deal     { background: var(--blush); color: #1B3FA0; }

.card-body { padding: 18px 20px 20px; }
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.card-type {
  font-size: 0.7rem; font-weight: 500;
  color: var(--sage-dk); background: var(--sage);
  padding: 3px 10px; border-radius: 100px;
}
.card-rating { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.card-rating em { color: #F5A623; font-style: normal; }
.card-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem; color: var(--dark);
  margin-bottom: 4px; line-height: 1.2;
}
.card-loc { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.card-short-desc { font-size: 0.78rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-amenities { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.am-pill { font-size: 0.7rem; color: var(--muted); background: var(--cream); border-radius: 6px; padding: 3px 8px; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.06); padding-top: 14px;
}
.card-price { font-family: 'DM Serif Display', serif; font-size: 1.15rem; color: var(--dark); }
.card-price span { font-family: 'DM Sans', sans-serif; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.card-btn {
  font-size: 0.78rem; color: var(--sage-dk);
  background: none; border: 1.5px solid var(--sage);
  padding: 6px 14px; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: background .15s, color .15s;
}
.card-btn:hover { background: var(--sage); color: var(--dark); }

/* ── NO RESULTS ── */
.no-results { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); }
.no-results .nr-icon { font-size: 2.5rem; margin-bottom: 12px; }
.no-results p { font-size: 0.9rem; }

/* ── LOAD MORE ── */
.load-more-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px; padding: 12px 0 20px;
}
.progress-bar { width: 240px; height: 4px; background: rgba(197,213,245,0.4); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--sage-dk); border-radius: 2px; transition: width .4s ease; }
.progress-label { font-size: 0.78rem; color: var(--muted); }
.load-btn {
  background: var(--white); color: var(--dark);
  border: 1.5px solid rgba(197,213,245,0.8);
  padding: 13px 40px; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background .2s, border-color .2s, transform .15s;
  box-shadow: 0 2px 10px rgba(13,27,75,0.07);
}
.load-btn:hover { background: var(--sage); border-color: var(--sage-dk); transform: translateY(-1px); }
.load-btn.loading { pointer-events: none; opacity: .7; }
.spinner {
  width: 14px; height: 14px; border: 2px solid var(--sage);
  border-top-color: var(--sage-dk); border-radius: 50%;
  animation: spin .6s linear infinite; display: none;
}
.load-btn.loading .spinner { display: block; }
.load-btn.loading .load-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER (minimal) ── */
.prolease-footer { padding: 32px 48px 24px; }
.footer-logo { font-size: 1.3rem; display: block; margin-bottom: 12px; }
.footer-bottom { padding-top: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  nav, .search-dock, .results-header, .filter-row, .results-body { padding-left: 20px; padding-right: 20px; }
  .search-card { flex-wrap: wrap; }
  .search-field { min-width: 40%; border-bottom: 1px solid rgba(197,213,245,0.5); border-right: none; }
  .search-btn { width: 100%; justify-content: center; padding: 14px; }
  .prolease-footer { padding: 28px 20px 20px; }
}
@media (max-width: 580px) {
  .results-grid { grid-template-columns: 1fr; }
}
