/* For Rent / For Sale listing pages */

.nn-listing {
  /* Top gap aligned with App Features (.af-section / hero title spacing) */
  padding: 2.35rem 0 3.5rem;
  background:
    linear-gradient(180deg, #eef4fb 0%, #f7fafc 28%, #ffffff 100%);
}

.nn-listing__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.nn-listing__eyebrow {
  margin: 0 0 .35rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #2563eb;
}

.nn-listing__head h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  color: #16325c;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.nn-listing__sub {
  margin: 0;
  max-width: 36rem;
  color: #64748b;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.5;
}

.nn-listing__switch {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  color: #2563eb;
  font-weight: 700;
  font-size: .94rem;
  padding-bottom: .2rem;
}

.nn-listing__switch:hover { color: #1d4ed8; }

/* Filter bar — single strip above grid */
.nn-filter {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(7.5rem, 1fr)) auto;
  gap: .75rem .85rem;
  align-items: end;
  padding: 1rem 1.05rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 36, 68, .06);
  margin-bottom: 1rem;
}

.nn-filter__field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}

.nn-filter__field > span:first-child {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.nn-filter__box {
  position: relative;
  display: block;
}

.nn-filter__box i {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: .85rem;
  pointer-events: none;
}

.nn-filter input,
.nn-filter select {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #16325c;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: 0 .85rem;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

.nn-filter__box input {
  padding-left: 2.35rem;
}

.nn-filter input:focus,
.nn-filter select:focus {
  border-color: #93c5fd;
  background: #fff;
}

.nn-filter__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nn-filter__actions .nn-btn {
  height: 44px;
  padding: 0 1.05rem;
  white-space: nowrap;
}

.nn-listing__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
}

.nn-listing__meta p {
  margin: 0;
  color: #64748b;
  font-size: .92rem;
  font-weight: 600;
}

.nn-listing__meta strong {
  color: #16325c;
  font-weight: 800;
}

.nn-props--listing {
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem;
}

/* Compact listing cards — less body height */
.nn-props--listing .nn-card__media {
  aspect-ratio: 16 / 9;
  display: block;
}

.nn-props--listing .nn-card__title-link {
  color: inherit;
  text-decoration: none;
}

.nn-props--listing .nn-card__title-link:hover {
  color: #2563eb;
}

.nn-props--listing .nn-badge {
  top: .5rem;
  right: .5rem;
  padding: .22rem .55rem;
  font-size: .7rem;
  max-width: calc(100% - 5.5rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nn-props--listing .nn-badge--left {
  right: auto;
  left: .5rem;
  max-width: 45%;
}

.nn-props--listing .nn-badge--price {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.nn-props--listing .nn-badge--premium { background: #d97706; }
.nn-props--listing .nn-badge--featured { background: #0f766e; }
.nn-props--listing .nn-badge--promoted { background: #db2777; }

.nn-props--listing .nn-card__body {
  padding: .65rem .75rem .7rem;
  gap: .28rem;
}

.nn-props--listing .nn-card__body h3 {
  font-size: .95rem;
  line-height: 1.25;
}

.nn-props--listing .nn-card__society {
  margin: 0;
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nn-props--listing .nn-card__loc {
  font-size: .78rem;
  gap: .25rem;
}

.nn-props--listing .nn-card__meta {
  gap: .35rem .55rem;
  font-size: .74rem;
}

.nn-props--listing .nn-card__go {
  width: 28px;
  height: 28px;
  font-size: .75rem;
}

.nn-card__society {
  margin: -.15rem 0 0;
  color: #475569;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.3;
}

.nn-listing__empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.nn-listing__empty i {
  font-size: 1.75rem;
  color: #94a3b8;
  margin-bottom: .75rem;
}

.nn-listing__empty h2 {
  margin: 0 0 .4rem;
  font-size: 1.2rem;
  color: #16325c;
}

.nn-listing__empty p {
  margin: 0 0 1.1rem;
  color: #64748b;
  font-weight: 500;
}

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

  .nn-filter__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .nn-props--listing {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .nn-props--listing {
    grid-template-columns: repeat(2, 1fr);
  }

  .nn-listing__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nn-listing {
    padding: 1.5rem 0 2.5rem;
  }

  .nn-filter {
    grid-template-columns: 1fr 1fr;
    padding: .85rem;
  }

  .nn-filter__field--grow {
    grid-column: 1 / -1;
  }

  .nn-filter__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nn-filter__actions .nn-btn {
    width: 100%;
    justify-content: center;
  }

  .nn-props--listing {
    grid-template-columns: 1fr;
  }
}
