/* ==========================================================================
   Listings index — layers on top of styles.css
   ========================================================================== */

/* --- Header --------------------------------------------------------------- */
.listings-header {
  position: relative;
  padding-block: clamp(48px, 8vw, 104px) clamp(36px, 5vw, 64px);
  overflow: clip;
}
.listings-header h1 { margin: 0.4rem 0 1.5rem; }
.listings-header .lead { position: relative; z-index: 2; }

/* --- Grid ----------------------------------------------------------------- */
.listings-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (min-width: 1100px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Card ----------------------------------------------------------------- */
.listing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 26px -22px rgba(52, 33, 61, 0.45);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--mauve);
}

.listing-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
}
.listing-card__media img { transition: transform 0.6s var(--ease); }
.listing-card:hover .listing-card__media img { transform: scale(1.04); }

.status-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aubergine);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 0.45em 0.9em;
  border-radius: 999px;
  box-shadow: 0 4px 14px -8px rgba(52, 33, 61, 0.5);
}

.listing-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: clamp(20px, 2.4vw, 28px);
  flex: 1;
}
.listing-card__title { margin-bottom: 0.1rem; }
.listing-card__loc {
  font-style: italic;
  color: var(--slate);
  margin: 0;
}
.listing-card__stats {
  font-size: 0.92rem;
  color: var(--slate);
  margin: 0.5rem 0 0;
}
.listing-card__foot {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.listing-card__price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--aubergine);
}
/* The whole card is the link, so the arrow shouldn't be a nested anchor —
   it's a span styled like one and animates on card hover. */
.listing-card:hover .link-arrow span { transform: translateX(4px); }

/* --- Note block ----------------------------------------------------------- */
.note-block {
  margin-top: clamp(36px, 5vw, 56px);
  padding: clamp(26px, 3vw, 40px);
  background: var(--lavender);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  text-align: center;
}
.note-block p {
  max-width: 60ch;
  margin-inline: auto;
  color: var(--slate);
}
.note-block .link-arrow { color: var(--aubergine); white-space: nowrap; }
.note-block .link-arrow:hover span { transform: translateX(4px); }
