/* MahaEstate marketplace cards v1 — clickable cards, save (shortlist) and share.
   Display-only layer: no database or URL changes. Loaded once by includes/property_card.php. */
.me-pcard{--pc-navy:var(--mx-navy-900,#0b1f3a);--pc-gold:var(--mx-gold,#c8962f);--pc-ink:var(--mx-ink,#0f1b2d);--pc-muted:var(--mx-muted,#64748b);--pc-line:var(--mx-line,#e5e7eb);--pc-primary:var(--mx-primary,#173f73);position:relative;display:flex;flex-direction:column;border:1px solid var(--pc-line)!important;border-radius:18px!important;background:#fff;cursor:pointer;isolation:isolate}
.me-pcard:focus-within{border-color:var(--pc-gold)!important;box-shadow:0 0 0 3px rgba(200,150,47,.25)!important}

/* Whole-card link sits under the interactive controls */
.me-pcard-link{position:absolute;inset:0;z-index:1;border-radius:inherit}
.me-pcard-link:focus{outline:none}
.me-pcard .property-card-top,.me-pcard .property-card-type,.me-pcard-verified{pointer-events:none}
.me-pcard-actions,.me-pcard-actions *,.me-pcard-cta,.me-pcard-cta *{pointer-events:auto}
.me-pcard-actions,.me-pcard-cta{position:relative;z-index:3}

/* Media */
.me-pcard .property-card-media{position:relative;height:auto;aspect-ratio:16/11;background:#eceae4;overflow:hidden}
.me-pcard .property-card-media .property-img{width:100%;height:100%!important;object-fit:cover;transition:transform .45s ease}
.me-pcard:hover .property-card-media .property-img{transform:scale(1.045)}
.me-pcard .property-card-top{position:absolute;top:12px;left:12px;right:12px;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.me-pcard-badges{display:flex;flex-wrap:wrap;gap:6px}
.me-pcard .property-card-top .badge{display:inline-flex;align-items:center;gap:4px;font-size:10.5px!important;font-weight:750;letter-spacing:.04em;text-transform:uppercase;padding:6px 10px!important;border-radius:999px!important;box-shadow:0 4px 12px rgba(7,21,40,.14)}
.me-pcard .property-card-top .badge.bg-warning{background:var(--pc-gold)!important;color:#fff!important}
.me-pcard .property-card-top .me-pcard-deal{background:rgba(255,255,255,.95)!important;color:var(--pc-navy)!important}
.me-pcard-actions{display:flex;gap:7px}
.me-pcard-actions button{width:38px;height:38px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.95);color:var(--pc-navy);font-size:15px;box-shadow:0 4px 14px rgba(7,21,40,.18);cursor:pointer;transition:transform .18s ease,background .18s ease,color .18s ease}
.me-pcard-actions button:hover{transform:scale(1.08);background:#fff;color:var(--pc-primary)}
.me-pcard-actions button:focus-visible{outline:3px solid rgba(200,150,47,.6);outline-offset:2px}
body .me-pcard .me-pcard-save.is-saved{background:#fff;color:#e0245e!important}
.me-pcard-save.me-pop{animation:mePcardPop .38s ease}
@keyframes mePcardPop{0%{transform:scale(1)}40%{transform:scale(1.25)}100%{transform:scale(1)}}
.me-pcard .property-card-type{position:absolute;left:12px;bottom:12px;z-index:2;padding:5px 11px!important;border:1px solid rgba(255,255,255,.3);border-radius:999px!important;background:rgba(11,31,58,.55)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;font-size:11px!important;font-weight:700}
.me-pcard-verified{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.95);color:var(--mx-success,#0f8a5f);font-size:10.5px;font-weight:800;box-shadow:0 4px 12px rgba(7,21,40,.14)}

/* Body */
.me-pcard .card-body{padding:16px 18px 18px!important;gap:0}
.me-pcard-location{display:flex;align-items:center;gap:6px;min-width:0;color:var(--pc-muted);font-size:12.5px;font-weight:600}
.me-pcard-location i{flex:0 0 auto;color:var(--pc-gold)}
.me-pcard-location span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.me-pcard-distance{margin-top:4px;color:var(--mx-success,#0f8a5f);font-size:12px;font-weight:750}
.me-pcard .property-card-title{margin:7px 0 10px;color:var(--pc-ink)!important;font-size:17px!important;line-height:1.35;font-weight:750!important;letter-spacing:-.01em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em;transition:color .18s ease}
.me-pcard:hover .property-card-title{color:var(--pc-primary)!important}
.me-pcard .property-card-meta{display:flex;flex-wrap:wrap;gap:6px!important;color:#475569!important;font-size:12px!important;font-weight:600}
.me-pcard .property-card-meta span{display:inline-flex;align-items:center;gap:5px;padding:4px 10px!important;border:1px solid var(--pc-line)!important;border-radius:999px;background:#fafafa}
.me-pcard .property-card-meta i{color:var(--mx-gold-600,#a97a1c)}
.me-pcard-price-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 0}
.me-pcard .property-card-price{margin:0!important;font-family:var(--mx-display,Georgia,serif);font-size:24px!important;font-weight:600!important;color:var(--pc-navy)!important;letter-spacing:-.01em;line-height:1.1}
.me-pcard .property-card-period{font-family:var(--mx-font,inherit);font-size:12px;font-weight:600;color:var(--pc-muted)}
.me-pcard-nego{flex:0 0 auto;padding:4px 9px;border-radius:999px;background:var(--mx-gold-50,#fbf6ea);color:#7a5714;font-size:10.5px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.me-pcard-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px!important;padding-top:14px;border-top:1px solid #eef0f3}
.me-pcard-partner{display:flex;align-items:center;gap:9px;min-width:0}
.me-pcard-avatar{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;background:var(--pc-navy);color:var(--pc-gold);font-size:13px;font-weight:850}
.me-pcard-partner-copy{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.me-pcard-partner-copy strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--pc-ink);font-size:12.5px;font-weight:750}
.me-pcard-partner-copy small{color:var(--pc-muted);font-size:11px}
.me-pcard-cta{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.me-pcard .property-chat-btn{width:40px;height:40px;display:grid;place-items:center;padding:0;border-radius:11px!important;border-color:var(--mx-line-strong,#d6dae1)!important;color:var(--pc-primary)}
.me-pcard .me-pcard-view{height:40px;display:inline-flex;align-items:center;gap:6px;padding:0 14px;border-radius:11px;font-size:12.5px;font-weight:750;white-space:nowrap}
.me-pcard .me-pcard-view i{transition:transform .18s ease}
.me-pcard:hover .me-pcard-view i{transform:translateX(3px)}
@media(max-width:575.98px){.me-pcard .property-card-title{min-height:0}}
@media(max-width:420px){.me-pcard-view-more{display:none}.me-pcard .me-pcard-view{padding:0 13px}}

/* List view (properties page toggle) */
@media(min-width:992px){
  .me-list-view>.me-pcard-col{width:100%!important;flex:0 0 100%!important;max-width:100%!important}
  .me-list-view .me-pcard{flex-direction:row}
  .me-list-view .me-pcard .property-card-media{flex:0 0 380px;aspect-ratio:auto;min-height:250px}
  .me-list-view .me-pcard .card-body{padding:22px 24px!important}
  .me-list-view .me-pcard .property-card-title{font-size:20px!important;min-height:0}
}

/* Shortlist + share overlays */
.me-sheet-backdrop{position:fixed;inset:0;z-index:2147482000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(7,21,40,.5);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);opacity:0;transition:opacity .2s ease}
.me-sheet-backdrop.is-open{opacity:1}
.me-sheet{width:100%;max-width:440px;max-height:min(640px,calc(100vh - 32px));display:flex;flex-direction:column;overflow:hidden;border-radius:20px;background:#fff;box-shadow:0 30px 70px -20px rgba(7,21,40,.5);transform:translateY(12px);transition:transform .22s ease;font-family:var(--mx-font,inherit)}
.me-sheet-backdrop.is-open .me-sheet{transform:none}
.me-sheet-head{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid #eef0f3}
.me-sheet-head h2{margin:0;color:var(--mx-ink,#0f1b2d);font-size:17px;font-weight:800}
.me-sheet-head p{margin:2px 0 0;color:var(--mx-muted,#64748b);font-size:12px}
.me-sheet-close{margin-left:auto;width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border:0;border-radius:10px;background:#f3f4f6;color:#334155;font-size:15px;cursor:pointer}
.me-sheet-close:hover{background:#e5e7eb}
.me-sheet-body{padding:18px 20px 20px;overflow:auto}
.me-share-preview{display:flex;gap:12px;align-items:center;padding:10px;border:1px solid #eef0f3;border-radius:14px;background:#fafafa}
.me-share-preview img{width:64px;height:52px;flex:0 0 64px;border-radius:10px;object-fit:cover;background:#eceae4}
.me-share-preview strong{display:block;color:var(--mx-ink,#0f1b2d);font-size:13.5px;line-height:1.3}
.me-share-preview span{display:block;margin-top:3px;color:var(--mx-muted,#64748b);font-size:12px}
.me-share-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}
.me-share-opt{display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 4px;border:1px solid #eef0f3;border-radius:14px;background:#fff;color:#334155;font-size:11.5px;font-weight:700;text-decoration:none;cursor:pointer;transition:border-color .18s ease,transform .18s ease}
.me-share-opt:hover{border-color:var(--mx-gold-200,#efdcb2);transform:translateY(-2px);color:#0f1b2d}
.me-share-opt i{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;color:#fff;font-size:18px}
.me-share-opt .wa{background:#25d366}.me-share-opt .fb{background:#1877f2}.me-share-opt .x{background:#0f1419}.me-share-opt .mail{background:var(--mx-navy-900,#0b1f3a)}
.me-share-copy{display:flex;gap:8px;margin-top:16px}
.me-share-copy input{flex:1;min-width:0;height:44px;padding:0 12px;border:1px solid #e5e7eb;border-radius:11px;background:#fafafa;color:#475569;font-size:12.5px}
.me-share-copy button{height:44px;padding:0 16px;border:0;border-radius:11px;background:var(--mx-navy-900,#0b1f3a);color:#fff;font-size:12.5px;font-weight:750;cursor:pointer;white-space:nowrap}
.me-share-copy button.is-done{background:var(--mx-success,#0f8a5f)}
.me-shortlist-empty{padding:30px 10px;text-align:center;color:var(--mx-muted,#64748b);font-size:13px}
.me-shortlist-empty i{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:15px;background:#fdf0f4;color:#e0245e;font-size:22px}
.me-shortlist-item{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #f1f2f4}
.me-shortlist-item:last-child{border-bottom:0}
.me-shortlist-item img{width:76px;height:60px;flex:0 0 76px;border-radius:11px;object-fit:cover;background:#eceae4}
.me-shortlist-item a.me-sl-title{display:block;color:var(--mx-ink,#0f1b2d);font-size:13.5px;font-weight:750;line-height:1.3;text-decoration:none}
.me-shortlist-item a.me-sl-title:hover{color:var(--mx-primary,#173f73)}
.me-shortlist-item small{display:block;margin-top:2px;color:var(--mx-muted,#64748b);font-size:11.5px}
.me-shortlist-item b{display:block;margin-top:3px;color:var(--mx-navy-900,#0b1f3a);font-size:13px}
.me-shortlist-item .me-sl-remove{margin-left:auto;width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border:0;border-radius:10px;background:#f6f7f9;color:#94a3b8;cursor:pointer}
.me-shortlist-item .me-sl-remove:hover{background:#fdf0f4;color:#e0245e}
.me-sheet-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 20px;border-top:1px solid #eef0f3;background:#fafafa;font-size:12px;color:var(--mx-muted,#64748b)}
.me-sheet-foot button{border:0;background:none;color:#b42318;font-size:12px;font-weight:750;cursor:pointer}
@media(max-width:575.98px){.me-sheet-backdrop{align-items:flex-end;padding:0}.me-sheet{max-width:none;border-radius:20px 20px 0 0;max-height:85vh;padding-bottom:env(safe-area-inset-bottom,0px)}.me-share-grid{gap:8px}}

/* Toast */
.me-toast{position:fixed;left:50%;bottom:28px;z-index:2147482500;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 32px);padding:12px 14px 12px 16px;border-radius:14px;background:var(--mx-navy-900,#0b1f3a);color:#fff;font-size:13px;font-weight:600;box-shadow:0 18px 40px -12px rgba(7,21,40,.55);transform:translate(-50%,20px);opacity:0;transition:opacity .2s ease,transform .2s ease;pointer-events:none}
.me-toast.is-show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.me-toast i{color:var(--mx-gold,#c8962f);font-size:16px}
.me-toast button{border:0;background:none;color:var(--mx-gold,#c8962f);font-size:12.5px;font-weight:800;cursor:pointer;white-space:nowrap}
@media(max-width:800px){.me-toast{bottom:calc(var(--me-mobile-nav-height,72px) + env(safe-area-inset-bottom,0px) + 14px)}}
body.me-has-sticky-cta .me-toast{bottom:calc(var(--me-mobile-nav-height,72px) + env(safe-area-inset-bottom,0px) + 84px)}
@media(min-width:801px){body.me-has-sticky-cta .me-toast{bottom:28px}}

@media(prefers-reduced-motion:reduce){.me-pcard,.me-pcard *,.me-sheet,.me-sheet-backdrop,.me-toast{transition:none!important;animation:none!important}}
