/* ==========================================================================
   NivaasMart — property search cards (listings.php only)
   Loaded last via $nm_page_css, so it wins over home-v2 / nm-type.
   Brand stays the same: Poppins titles in navy, Inter body, royal-blue price.
   What changed:
     • 3-part card: photo | details | price column
     • every badge the listing has earned, in one row above the title
     • "posted by" strip: role (Owner / Broker / Developer), photo with plan
       ring, name, blue tick, company and the member's own badges
   Desktop rules are scoped to body:not(.capacitor-app) — the Android app
   keeps its own card layout from app-pages.css; only the new parts
   (badges, poster strip, price column) get app styles at the bottom.
   ========================================================================== */

.lst-pro {
    --lp-ink: #0F1B3D;
    --lp-body: #3F4A63;
    --lp-muted: #6B7489;
    --lp-line: #E4E8F1;
    --lp-soft: #F5F7FB;
    --lp-blue: #2563EB;
    --lp-blue-deep: #1747C9;
    --lp-tick: #1D8CF0;
    gap: 18px;
}

/* ---------- card frame ---------- */
body:not(.capacitor-app) .lst-pro .lst-pcard {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 190px;
    gap: 0;
    padding: 0;
    border: 1px solid var(--lp-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 27, 61, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
body:not(.capacitor-app) .lst-pro .lst-pcard:hover {
    transform: none;
    border-color: #C9D5EE;
    box-shadow: 0 8px 24px -12px rgba(15, 27, 61, .22);
}
body:not(.capacitor-app) .lst-pro .lst-pcard:focus-within { border-color: var(--lp-blue); }
.lst-pro .lst-card-stretch:focus-visible { outline: 3px solid var(--lp-blue); outline-offset: -3px; border-radius: 14px; }

/* paid tiers: a tinted frame instead of a glow */
body:not(.capacitor-app) .lst-pro .lst-card-premium,
body:not(.capacitor-app) .lst-pro .lst-card-toppick { border-color: #E6D19C; }
body:not(.capacitor-app) .lst-pro .lst-card-featured { border-color: #C3D4F8; }

/* ---------- photo ---------- */
body:not(.capacitor-app) .lst-pro .lst-card-media {
    width: auto;
    height: 100%;
    min-height: 236px;
    aspect-ratio: auto;
    border-radius: 0;
    background: var(--lp-soft);
}
.lst-pro .lst-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lst-pro .lst-media-ph { display: none; }
.lst-pro .lst-media-empty .lst-media-ph {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: #8A96B3;
    background:
        repeating-linear-gradient(135deg, rgba(37, 99, 235, .035) 0 12px, transparent 12px 24px),
        linear-gradient(160deg, #F3F6FC, #E8EDF7);
    font: 600 13px/1.2 var(--nm-font-body, Inter, system-ui, sans-serif);
}
.lst-pro .lst-photo-count {
    position: absolute; left: 10px; bottom: 10px; z-index: 3;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 9px; border-radius: 6px;
    background: rgba(15, 27, 61, .72); color: #fff;
    font: 600 12px/1 var(--nm-font-body, Inter, system-ui, sans-serif);
    backdrop-filter: blur(2px);
}
.lst-pro .lst-card-heart {
    top: 10px; right: 10px; width: 34px; height: 34px;
    color: #0F1B3D; background: rgba(255, 255, 255, .95);
    box-shadow: 0 2px 8px rgba(15, 27, 61, .18);
    pointer-events: auto; z-index: 3;
}
.lst-pro .lst-card-heart.is-saved { color: #E11D48; }
.lst-pro .lst-card-heart:focus-visible { outline: 3px solid var(--lp-blue); outline-offset: 2px; }

/* ---------- details column ---------- */
body:not(.capacitor-app) .lst-pro .lst-card-body { padding: 18px 22px 16px; }

.lst-pro .lst-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.lst-pro .lst-card-badges .nm-bstack-inline { gap: 6px; }
.lst-pro .lst-card-badges .nm-bdg { box-shadow: none; padding: 5px 9px; border-radius: 6px; font-size: 10.5px; }
.lst-pro .lst-card-badges .nm-rera { padding: 4px 9px 4px 6px; border-radius: 6px; }

html body .lst-pro .lst-card h3 { font-size: 18px; line-height: 1.32; margin: 0 0 6px; letter-spacing: -.25px; }
html body .lst-pro .lst-card-loc { display: flex; align-items: center; gap: 5px; margin: 0 0 14px; font-size: 14px; color: var(--lp-muted); }
.lst-pro .lst-card-loc svg { flex: none; color: #94A0BB; }

/* key facts — label under value, divided by hairlines */
.lst-pro .lst-facts { display: flex; flex-wrap: wrap; margin: 0 0 12px; padding: 0; }
.lst-pro .lst-facts > div { padding: 0 18px; border-left: 1px solid var(--lp-line); min-width: 0; }
.lst-pro .lst-facts > div:first-child { padding-left: 0; border-left: 0; }
.lst-pro .lst-facts dt { order: 2; margin: 3px 0 0; font: 500 12px/1.2 var(--nm-font-body, Inter, system-ui, sans-serif); color: var(--lp-muted); }
.lst-pro .lst-facts dd { margin: 0; font: 700 15px/1.2 var(--nm-font-head, Poppins, Inter, sans-serif); color: var(--lp-ink); white-space: nowrap; }
.lst-pro .lst-facts > div { display: flex; flex-direction: column; }

.lst-pro .lst-card-toprow { margin: 0 0 10px; gap: 6px; }
html body .lst-pro .lst-tag { background: var(--lp-soft); color: var(--lp-body); border: 1px solid var(--lp-line); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
html body .lst-pro .lst-tag-zero { background: #ECFDF5; color: #047857; border-color: #BBF0D6; }

html body .lst-pro .lst-card-desc {
    margin: 0 0 14px; color: var(--lp-body); font-size: 14px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 0 0 auto;
}

/* ---------- posted-by strip ---------- */
.lst-pro .lst-poster {
    margin-top: auto;
    display: flex; align-items: flex-start; gap: 11px;
    padding: 12px 0 0;
    border-top: 1px solid var(--lp-line);
}
.lst-pro .lst-poster-av {
    position: relative; flex: none;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; overflow: hidden;
    background: #E8EEFB; color: var(--lp-blue-deep);
    font: 700 15px/1 var(--nm-font-head, Poppins, Inter, sans-serif);
}
.lst-pro .lst-poster-developer .lst-poster-av { border-radius: 10px; background: #EEF0FF; color: #4338CA; }
.lst-pro .lst-poster-owner .lst-poster-av { background: #E9F8F1; color: #047857; }
.lst-pro .lst-poster-av i { font-style: normal; }
.lst-pro .lst-poster-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; z-index: 1; background: #fff; }
.lst-pro .lst-poster-av.nm-ring { overflow: visible; }

.lst-pro .lst-poster-txt { min-width: 0; flex: 1; }
.lst-pro .lst-poster-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.lst-pro .lst-role {
    flex: none; font: 700 11px/1 var(--nm-font-body, Inter, system-ui, sans-serif);
    padding: 4px 8px; border-radius: 5px; letter-spacing: .2px;
}
.lst-pro .lst-role-broker { background: #EAF1FF; color: #1D4ED8; }
.lst-pro .lst-role-developer { background: #EEEDFE; color: #4338CA; }
.lst-pro .lst-role-owner { background: #E6F7EF; color: #047857; }
.lst-pro .lst-poster-name {
    min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font: 700 14.5px/1.3 var(--nm-font-head, Poppins, Inter, sans-serif); color: var(--lp-ink);
    pointer-events: auto; position: relative; z-index: 3;
}
.lst-pro a.lst-poster-name:hover { color: var(--lp-blue); text-decoration: underline; text-underline-offset: 3px; }
.lst-pro a.lst-poster-name:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 2px; border-radius: 3px; }
.lst-pro .lst-tick { flex: none; width: 18px; height: 18px; color: var(--lp-tick); margin-left: -2px; }

.lst-pro .lst-poster-sub {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0;
    margin-top: 4px; font: 500 12.5px/1.4 var(--nm-font-body, Inter, system-ui, sans-serif); color: var(--lp-muted);
}
.lst-pro .lst-sep { width: 1px; height: 11px; background: #CBD3E3; margin: 0 9px; }
.lst-pro .lst-v-yes { display: inline-flex; align-items: center; gap: 4px; color: #047857; font-weight: 600; }
.lst-pro .lst-v-yes svg { color: #059669; flex: none; }
.lst-pro .lst-v-no { color: #8A93A7; }
.lst-pro .lst-poster-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.lst-pro .lst-poster-badges .nm-bdg { box-shadow: none; padding: 4px 8px; border-radius: 6px; font-size: 10px; }

/* ---------- price column ---------- */
.lst-pro .lst-card-side { position: relative; z-index: 2; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
body:not(.capacitor-app) .lst-pro .lst-card-side { padding: 18px 20px; border-left: 1px solid var(--lp-line); background: #FBFCFE; }
.lst-pro .lst-card-pricebox { display: flex; flex-direction: column; gap: 4px; }
html body .lst-pro .lst-card-price { font-size: 22px; line-height: 1.15; letter-spacing: -.4px; }
.lst-pro .lst-card-perunit { font: 500 12.5px/1.3 var(--nm-font-body, Inter, system-ui, sans-serif); color: var(--lp-muted); }
html body .lst-pro .lst-card-cta {
    display: block; text-align: center;
    background: var(--lp-blue); color: #fff;
    padding: 11px 14px; border-radius: 9px;
    font: 600 14px/1 var(--nm-font-body, Inter, system-ui, sans-serif);
    transition: background .15s ease;
}
.lst-pro .lst-pcard:hover .lst-card-cta { background: var(--lp-blue-deep); color: #fff; }

/* ---------- tablet: price column becomes a row under the details ---------- */
@media (max-width: 1024px) {
    body:not(.capacitor-app) .lst-pro .lst-pcard { grid-template-columns: 260px minmax(0, 1fr); }
    body:not(.capacitor-app) .lst-pro .lst-card-side {
        grid-column: 1 / -1; flex-direction: row; align-items: center;
        border-left: 0; border-top: 1px solid var(--lp-line); padding: 14px 20px;
    }
    .lst-pro .lst-card-cta { min-width: 160px; }
}

/* ---------- phone: photo on top ---------- */
@media (max-width: 640px) {
    body:not(.capacitor-app) .lst-pro .lst-pcard { grid-template-columns: 1fr; }
    body:not(.capacitor-app) .lst-pro .lst-card-media { width: 100%; min-height: 0; height: 210px; }
    body:not(.capacitor-app) .lst-pro .lst-card-body { padding: 14px 16px 12px; }
    body:not(.capacitor-app) .lst-pro .lst-card-side { padding: 12px 16px; }
    html body .lst-pro .lst-card h3 { font-size: 16.5px; }
    .lst-pro .lst-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
    .lst-pro .lst-facts > div, .lst-pro .lst-facts > div:first-child { padding: 0; border-left: 0; }
    .lst-pro .lst-facts dd { font-size: 14px; white-space: normal; }
    html body .lst-pro .lst-card-price { font-size: 19px; }
    .lst-pro .lst-card-cta { min-width: 0; }
    .lst-pro .lst-poster-sub { gap: 2px 12px; }
    .lst-pro .lst-sep { display: none; }
}

/* ---------- Android app: keep its stacked card, style only the new parts ---------- */
body.capacitor-app .lst-pro .lst-card-side { flex-direction: row; align-items: center; padding: 0 14px 14px; }
body.capacitor-app .lst-pro .lst-card-media.lst-media-empty { background: #EEF2F9; }
body.capacitor-app .lst-pro .lst-poster { padding-top: 10px; }
body.capacitor-app .lst-pro .lst-poster-sub { gap: 2px 12px; }
body.capacitor-app .lst-pro .lst-sep { display: none; }
body.capacitor-app .lst-pro .lst-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
body.capacitor-app .lst-pro .lst-facts > div { padding: 0; border-left: 0; }
body.capacitor-app .lst-pro .lst-facts dd { font-size: 13.5px; white-space: normal; }

@media (prefers-reduced-motion: reduce) {
    .lst-pro .lst-pcard, .lst-pro .lst-card-cta { transition: none; }
}

/* ---------- Card photo gallery (swipe / arrows / dots) ---------- */
.lst-pro .lst-card-media { z-index: 2; }                 /* above the card's stretched link, so swipes and arrows work */
.lst-pro .lst-gal { position: absolute; inset: 0; }
.lst-pro .lst-gal-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.lst-pro .lst-gal-track::-webkit-scrollbar { display: none; }
.lst-pro .lst-gal-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: block; }
.lst-pro .lst-gal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lst-pro .lst-gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.94); color: #0F1B3D; box-shadow: 0 2px 8px rgba(15,27,61,.25); cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.lst-pro .lst-gal-nav[hidden] { display: none; }
.lst-pro .lst-gal-nav.prev { left: 8px; } .lst-pro .lst-gal-nav.next { right: 8px; }
.lst-pro .lst-pcard:hover .lst-gal-nav, .lst-pro .lst-gal-nav:focus-visible { opacity: 1; }
.lst-pro .lst-gal-nav:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
@media (hover: none) { .lst-pro .lst-gal-nav { display: none; } }  /* phones/app: swipe instead */
.lst-pro .lst-gal-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.lst-pro .lst-gal-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.35); transition: width .2s ease, background .2s ease; }
.lst-pro .lst-gal-dots i.on { width: 16px; border-radius: 3px; background: #fff; }
.lst-pro .lst-photo-count { bottom: auto; top: 10px; left: 10px; }   /* dots own the bottom edge now */
@media (prefers-reduced-motion: reduce) { .lst-pro .lst-gal-track { scroll-behavior: auto; } }

/* ---------- Card photos: never cut or zoomed ----------
   The whole photo is shown (contain). The space around it is filled with a
   soft blurred copy of the same photo, so tall cards don't show a cropped,
   zoomed-in picture and there are no empty bars. */
.lst-pro .lst-gal-slide { position: relative; overflow: hidden; background: #E9EEF6; }
.lst-pro .lst-gal-slide::before { content: ""; position: absolute; inset: -20px; background: var(--bg) center / cover no-repeat; filter: blur(18px) saturate(1.1); opacity: .9; transform: scale(1.1); }
.lst-pro .lst-gal-slide img { position: relative; z-index: 1; object-fit: contain !important; }

/* #92 developer project cards in the property feed */
.lst-card-project .lst-proj-flag{position:absolute;left:12px;top:12px;z-index:3;background:#0A1F44;color:#F3D77A;font:700 12.5px/1 Inter,system-ui,sans-serif;padding:7px 10px;border-radius:999px;box-shadow:0 4px 12px rgba(10,31,68,.25);pointer-events:none}
.lst-card-project .lst-card-media{position:relative}
/* plan badge on the small poster avatar: smaller and on the corner, so it never hides the photo / logo */
.lst-pro .lst-poster-av.nm-ring::before { width: 16px; height: 16px; font-size: 9px; right: -5px; bottom: -5px; border-width: 1.5px; }
/* project card: NivaasMart Choice tab in the photo's top-left corner (replaces the old "New project" flag) */
.lst-card-project .lst-proj-choice{position:absolute;left:12px;top:12px;z-index:3;display:inline-flex;line-height:0;pointer-events:none}

/* (#286) NivaasMart Choice on the property photo, top-left — same place as every card on the site */
.lst-card-media .lst-choice-tl { position: absolute; left: 12px; top: 12px; z-index: 4; display: inline-flex; line-height: 0; pointer-events: none; }
body.capacitor-app .lst-card-media .lst-choice-tl { left: 10px; top: 10px; }
