/* Desktop-only central listing card family. Mobile intentionally untouched. */
@media (min-width: 901px){
  .fe-family-card{background:#fff;border:1px solid #dce6f2;border-radius:16px;overflow:hidden;box-shadow:0 5px 18px rgba(15,52,91,.06);display:flex;flex-direction:column;min-width:0;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
  .fe-family-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(15,52,91,.11);border-color:#c7d8ea}
  .fe-family-media{position:relative;display:block;aspect-ratio:1.52/1;overflow:hidden;background:#eef3f8}
  .fe-family-media>img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .3s ease}
  .fe-family-card:hover .fe-family-media>img{transform:scale(1.018)}
  .fe-family-badges{position:absolute;left:12px;top:12px;display:flex;gap:7px;align-items:center;max-width:calc(100% - 72px);z-index:2}
  .fe-family-badge{display:inline-flex;align-items:center;min-height:27px;padding:0 10px;border-radius:9px;font-size:11px;font-weight:800;line-height:1;white-space:nowrap;box-shadow:0 2px 8px rgba(11,38,70,.08)}
  .fe-family-badge.transaction{background:#1677ff;color:#fff}
  .fe-family-badge.transaction.is-rent{background:#0fa968}.fe-family-badge.transaction.is-project{background:#7357e8}.fe-family-badge.transaction.is-daily_rent{background:#0f8eb7}
  .fe-family-badge.property{background:rgba(255,255,255,.94);color:#173a5e}
  .fe-family-badge.extra{background:#16b979;color:#fff}
  .fe-family-heart{position:absolute;right:12px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.96);display:grid;place-items:center;color:#183b5b;cursor:pointer;z-index:3;box-shadow:0 3px 12px rgba(15,52,91,.12)}
  .fe-family-heart .fe-icon{width:19px;height:19px}
  .fe-family-state{position:absolute;right:12px;bottom:11px;padding:6px 9px;border-radius:8px;font-size:10px;font-weight:800;background:#fff;color:#19653d;box-shadow:0 2px 9px rgba(0,0,0,.1)}
  .fe-family-state.urgent{background:#fff0ed;color:#d93b21}.fe-family-state.new{color:#1765c5}
  .fe-family-body{padding:13px 14px 12px;display:flex;flex-direction:column;min-height:152px}
  .fe-family-location{display:flex;align-items:center;gap:7px;color:#1677ff;font-size:11px;font-weight:700;min-height:17px;overflow:hidden}
  .fe-family-location .fe-icon{flex:0 0 auto;width:14px;height:14px}
  .fe-family-location a,.fe-family-location span{color:#1677ff;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .fe-family-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:8px;color:#0d2b4b;text-decoration:none;font-size:15px;line-height:1.28;font-weight:800;min-height:38px}
  .fe-family-price{margin-top:auto;padding-top:8px;text-align:right;color:#066ef0;font-size:17px;line-height:1;font-weight:750;letter-spacing:-.25px;white-space:nowrap}
  .fe-family-price small{font-size:10px;font-weight:700;color:#6f8297;letter-spacing:0}
  .fe-family-meta{margin-top:10px;padding-top:9px;border-top:1px solid #e2e9f1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center}
  .fe-family-meta span{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;color:#173a5e;font-size:10.5px;white-space:nowrap}
  .fe-family-meta span+span{border-left:1px solid #e3eaf2}
  .fe-family-meta .fe-icon{width:14px;height:14px;flex:0 0 auto}.fe-family-meta b{font-weight:800;overflow:hidden;text-overflow:ellipsis}
  .fe-featured-track>.fe-family-card{flex:0 0 calc((100% - 42px)/4);width:auto}
  .fe-opportunity-grid>.fe-family-card{min-width:0}
  .fe-listing-card-grid>.fe-family-card{min-width:0}
  /* v296: desktop night-mode contrast. Covers the site's current data-fe-theme attribute
     plus legacy theme hooks. Mobile remains untouched by this media query. */
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card{
    background:#143a5d!important;border-color:#315a82!important;box-shadow:0 8px 24px rgba(0,0,0,.20)!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-body{
    background:#143a5d!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-title{
    color:#f6f9fd!important;text-shadow:0 1px 0 rgba(0,0,0,.08)
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-location,
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-location a,
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-location span{
    color:#79b9ff!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-price{
    color:#46a3ff!important;font-weight:800!important;text-shadow:0 0 14px rgba(70,163,255,.10)
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-price small{
    color:#b8cbe0!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-meta{
    border-top-color:#365f86!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-meta span{
    color:#d8e5f2!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-meta span+span{
    border-left-color:#365f86!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-badge.property{
    background:rgba(235,244,255,.14)!important;color:#f0f6fc!important;border:1px solid rgba(255,255,255,.10)
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-heart{
    background:#1b466e!important;color:#edf6ff!important;box-shadow:0 3px 12px rgba(0,0,0,.22)!important
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card:hover{
    border-color:#44739f!important;box-shadow:0 12px 30px rgba(0,0,0,.28)!important
  }
}

/* v297 — one real desktop card renderer across Home Featured, Home Opportunities and Listings.
   Legacy class names remain only as JS hooks; they no longer define card geometry. */
@media (min-width:901px){
  .fe-family-card.fe-premium-card,
  .fe-family-card.fe-opportunity-card,
  .fe-family-card.fe-result-card{
    display:flex!important;
    flex-direction:column!important;
    grid-template-columns:none!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    background:#fff!important;
    border:1px solid #dce6f2!important;
    border-radius:16px!important;
    overflow:hidden!important;
    box-shadow:0 5px 18px rgba(15,52,91,.06)!important;
  }
  .fe-family-card.fe-premium-card:hover,
  .fe-family-card.fe-opportunity-card:hover,
  .fe-family-card.fe-result-card:hover{
    transform:translateY(-2px)!important;
    box-shadow:0 10px 28px rgba(15,52,91,.11)!important;
    border-color:#c7d8ea!important;
  }
  .fe-family-card .fe-family-media{aspect-ratio:1.52/1!important;height:auto!important;min-height:0!important}
  .fe-family-card .fe-family-body{padding:13px 14px 12px!important;min-height:152px!important;height:auto!important;background:#fff!important}
  .fe-family-card .fe-family-title{font-size:15px!important;line-height:1.28!important;min-height:38px!important;margin-top:8px!important}
  .fe-family-card .fe-family-price{font-size:17px!important;margin-top:auto!important;padding-top:8px!important}
  .fe-family-card .fe-family-meta{margin-top:10px!important;padding-top:9px!important}

  /* Keep carousel mechanics, but not legacy visual styling. */
  .fe-featured-track>.fe-family-card.fe-premium-card{
    flex:0 0 calc((100% - 42px)/4)!important;
    width:auto!important;
  }

  /* Opportunity card mode uses the exact same card geometry. */
  .fe-opportunity-grid[data-view="card"]>.fe-family-card.fe-opportunity-card{
    min-width:0!important;
  }

  /* Results use the same renderer; only the grid column width differs by page container. */
  .fe-listing-card-grid>.fe-family-card.fe-result-card{
    min-width:0!important;
  }

  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card.fe-premium-card,
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card.fe-opportunity-card,
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card.fe-result-card{
    background:#143a5d!important;
    border-color:#315a82!important;
    box-shadow:0 8px 24px rgba(0,0,0,.20)!important;
  }
  :is(html[data-fe-theme="dark"],html[data-theme="dark"],body.fe-theme-dark,body.dark-mode) .fe-family-card .fe-family-body{
    background:#143a5d!important;
  }
}
