/* =============================================
   Güenumil Inmobiliaria — listings.css
   Estilos para ventas.html y alquileres.html
   ============================================= */

/* --- Nav sólido (sin hero debajo) --- */
.nav--solid {
  position: sticky;
  top: 0;
  background: var(--c-navy);
  z-index: 100;
}

.nav--solid.scrolled {
  position: fixed;
  top: 0;
}

/* --- Page header --- */
.page-header {
  background: var(--c-navy);
  padding: 2.5rem 0 2rem;
}

.page-header h1 {
  color: var(--c-white);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0.375rem;
}

.page-header__sub {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  margin: 0;
}

/* --- Filters bar --- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  margin-top: -1.5rem;
  position: relative;
  z-index: 5;
}

.filters__group {
  flex: 1;
  min-width: 180px;
}

.filters__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-slate);
  margin-bottom: 0.375rem;
}

.filters__select {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

.filters__actions {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.filters__actions .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .filters {
    flex-direction: column;
    margin-top: -1rem;
  }

  .filters__group {
    min-width: 100%;
  }

  .filters__actions {
    width: 100%;
    justify-content: stretch;
  }

  .filters__actions .btn {
    flex: 1;
  }
}

/* --- Results count --- */
.listings__count {
  font-size: 0.875rem;
  color: var(--c-slate);
  margin-bottom: 1rem;
}

.listings__count strong {
  color: var(--c-dark);
  font-weight: 600;
}

/* --- Grilla de resultados --- */
.cards-grid {
  /* La base está en home.css, aquí la ampliamos */
}

@media (min-width: 1400px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Load more --- */
.listings__load-more {
  text-align: center;
  padding-top: 2rem;
}

/* --- Loading spinner --- */
.listings__loading {
  text-align: center;
  padding: 3rem 0;
  color: var(--c-slate);
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(27,58,75,0.1);
  border-top-color: var(--c-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Disabled select --- */
.filters__select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--c-cream);
}
