/* ==================================================================

   HOME LISTINGS  —  page-specific styles only

   Shared components live in components.css (.mb-*).

   The listing card itself is defined here because no other page

   uses it; if a second page ever does, promote it to components.css.

   ================================================================== */



.hl-community { background: var(--surface); }

.hl-kinds     { background: var(--surface-sand); }

.hl-browse    { background: var(--surface-alt); }

.hl-buying    { /* background comes from .mb-feature--deep */ }

.hl-life      { background: var(--surface); }

.hl-ask       { background: var(--surface-sand); }



.hl-kinds .section-intro,

.hl-browse .section-intro,

.hl-submit .section-intro,

.hl-life .section-intro,

.hl-ask .section-intro { margin-bottom: 52px; }



.hl-ask-actions { margin-top: 54px; }



/* --- listing count line -------------------------------------------- */

.mb-listings-count {

  font-size: 13px;

  font-weight: 700;

  letter-spacing: .8px;

  text-transform: uppercase;

  color: var(--text-muted);

  margin: 0 0 24px;

  padding-bottom: 20px;

  border-bottom: 1px solid var(--line);

}

.mb-listings-count-value { color: var(--brand-primary); }



/* --- the grid ------------------------------------------------------ */

.mb-listing-grid {

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 30px;

}

.mb-listing {

  min-width: 0;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 16px;

  overflow: hidden;

  display: flex;

  flex-direction: column;

  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);

}

.mb-listing:hover {

  transform: translateY(-5px);

  box-shadow: rgba(0, 0, 0, .14) 0 20px 42px;

}



.mb-listing-media {

  position: relative;

  aspect-ratio: 3 / 2;

  overflow: hidden;

  background: var(--brand-deep);

}

.mb-listing-media > a { display: block; width: 100%; height: 100%; cursor: zoom-in; }

.mb-listing-media img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: transform .6s var(--ease-out);

}

/* Photos 2+ join the gallery without occupying the card. The [hidden]

   attribute plus these rules keep them out of layout even if a theme

   rule tries to give anchors a display value. */

.mb-listing-gallery,

.mb-listing-gallery[hidden] {

  display: none !important;

}



/* Fancybox v3 hides the originating thumbnail while the viewer is open

   and restores it afterwards. If that restore is ever missed, this keeps

   the card's photo visible rather than leaving a blank panel. */

.mb-listing-media > a,

.mb-listing-media > a > img {

  visibility: visible !important;

}

.mb-listing:hover .mb-listing-media img { transform: scale(1.05); }



.mb-listing-status {

  position: absolute;

  left: 14px;

  top: 14px;

  background: var(--brand-primary);

  color: #fff;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1px;

  text-transform: uppercase;

  padding: 6px 12px;

  border-radius: 999px;

}

.mb-listing-status--available    { background: #1d7a4c; }

.mb-listing-status--under-offer  { background: var(--brand-accent); }

.mb-listing-status--sold         { background: #7a2020; }



/* A sold home stays on the page but reads as closed. */

.mb-listing.is-sold .mb-listing-media img { filter: grayscale(.72); opacity: .82; }

.mb-listing.is-sold .mb-listing-price { color: var(--text-muted); text-decoration: line-through; }

.mb-listing-media > a:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: -3px; }

.mb-listing-count {

  position: absolute;

  right: 12px;

  bottom: 12px;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  background: rgba(10, 32, 40, .85);

  color: #fff;

  font-size: 12px;

  font-weight: 700;

  padding: 5px 10px;

  border-radius: 6px;

}



.mb-listing-body {

  padding: 24px 24px 26px;

  display: flex;

  flex-direction: column;

  flex: 1;

}

.mb-listing-price {

  font-size: 24px;

  line-height: 30px;

  font-weight: 800;

  color: var(--brand-accent);

  margin: 0 0 6px;

}

.mb-listing-title {

  font-size: 20px;

  line-height: 29px;

  font-weight: 700;

  color: var(--brand-primary);

  margin: 0 0 8px;

}

.mb-listing-address {

  display: flex;

  align-items: flex-start;

  gap: 8px;

  font-size: 14px;

  line-height: 22px;

  color: var(--text-muted);

  margin: 0 0 16px;

}

.mb-listing-address i { color: var(--brand-accent); margin-top: 4px; flex-shrink: 0; }



/* --- beds / baths / cars ------------------------------------------- */

.mb-listing-specs {

  list-style: none;

  margin: 0 0 16px;

  padding: 14px 0;

  border-top: 1px solid var(--line);

  border-bottom: 1px solid var(--line);

  display: flex;

  flex-wrap: wrap;

  gap: 10px 22px;

}

.mb-listing-specs li {

  display: flex;

  align-items: center;

  gap: 7px;

  font-size: 14px;

  color: var(--text-body);

}

.mb-listing-specs i { color: var(--brand-teal); font-size: 15px; }

.mb-listing-spec-value { font-weight: 800; color: var(--brand-primary); }

.mb-listing-spec-label { color: var(--text-muted); }



.mb-listing-meta {

  font-size: 12px;

  font-weight: 800;

  letter-spacing: .9px;

  text-transform: uppercase;

  color: var(--text-muted);

  margin: 0 0 12px;

}

.mb-listing-copy p {

  font-size: 18px;

  line-height: 28px;

  color: var(--text-body);

  margin: 0 0 12px;

}



.mb-listing-contact {

  margin-top: auto;

  padding-top: 18px;

  border-top: 1px solid var(--line);

  display: flex;

  flex-wrap: wrap;

  gap: 4px 14px;

  align-items: baseline;

}

.mb-listing-contact-name {

  font-size: 14px;

  font-weight: 600;

  letter-spacing: .6px;

  text-transform: uppercase;

  color: var(--text-muted);

  width: 100%;

}

.mb-listing-contact a {

  font-size: 15px;

  font-weight: 700;

  color: var(--brand-accent);

  text-decoration: none;

}

.mb-listing-contact a:hover { color: var(--brand-primary); text-decoration: underline; }



/* --- empty state (wording comes from the deck) ---------------------- */

.mb-listings-empty {

  text-align: center;

  max-width: 620px;

  margin: 0 auto;

  padding: 62px 34px;

  background: var(--surface);

  border: 1px dashed var(--line);

  border-radius: 18px;

}

.mb-listings-empty i {

  font-size: 34px;

  color: var(--brand-accent);

  margin-bottom: 20px;

  display: block;

}

.mb-listings-empty p {

  margin: 0;

  font-size: 17px;

  line-height: 29px;

  color: var(--text-muted);

}



/* --- responsive ----------------------------------------------------- */

@media (max-width: 1199px) {

  .mb-listing-grid { gap: 24px; }

  .mb-listing-body { padding: 20px 20px 22px; }

  .mb-listing-title { font-size: 19px; line-height: 27px; }

}



@media (max-width: 991px) {

  .mb-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hl-kinds .section-intro,

  .hl-browse .section-intro,

  .hl-submit .section-intro,

  .hl-life .section-intro,

  .hl-ask .section-intro { margin-bottom: 40px; }

}



@media (max-width: 567px) {

  .mb-listing-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }

  .mb-listing-specs { gap: 8px 16px; }

  .mb-listings-empty { padding: 44px 22px; }

  .mb-listings-empty p { font-size: 16px; line-height: 27px; }

  .hl-ask-actions { margin-top: 40px; }

}



@media (prefers-reduced-motion: reduce) {

  .mb-listing, .mb-listing-media img { transition: none; }

  .mb-listing:hover { transform: none; }

  .mb-listing:hover .mb-listing-media img { transform: none; }

}