/* ENTEBHOOMI — Real Estate page redesign (mockup EnteBhoomi_Real_Estate_Listings).
   Spacing / sizing follows the Account page: 520px column, 18px side padding, 22px radius, 48px round buttons.
   Colours come from the admin theme tokens (--tk-*), so the Appearance settings still recolour the page.
   Loaded LAST on realestate.html. */

body[data-page="realestate"]{
  --re-pri:var(--tk-primary,var(--eb57-token-16834a,#16834A)); --re-deep:var(--tk-deep,var(--eb57-token-126b3d,#126B3D)); --re-dark:var(--tk-dark,var(--eb57-token-0b3b25,#0b3b25));
  --re-tint:var(--leaf-pale,var(--eb57-token-eef2ff,#eef2ff)); --re-line:var(--tk-line,var(--eb57-token-e5e9ef,#e5e9ef)); --re-ink:var(--tk-ink,var(--eb57-token-0a0e1a,#0a0e1a));
  --re-soft:var(--eb57-token-64748b,#64748b); --re-lime:var(--eb57-token-b6e36b,#b6e36b); --re-r:22px;
  background:var(--eb57-surface-ffffff,#fff)!important;
}
body[data-page="realestate"] .layout{max-width:560px!important;margin:0 auto!important;padding:0 0 24px!important}

/* ---------- top bar (account-style: round 44px buttons) ---------- */
body[data-page="realestate"] .topbar{padding:10px 18px!important;gap:12px!important;max-width:100%}
body[data-page="realestate"] .topbar .back-link{width:44px!important;height:44px!important}
body[data-page="realestate"] .topbar .brand-mark{width:44px!important;height:44px!important;border-radius:50%!important}
body[data-page="realestate"] .topbar .topbar-title{display:none!important}

/* ---------- hero ---------- */
.re-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;overflow:hidden;
  margin:0;padding:26px 18px 46px;min-height:176px;color:var(--eb57-text-ffffff,#fff);
  background:linear-gradient(115deg,var(--re-dark,var(--eb57-surface-0b3b25,#0b3b25)) 0%,var(--re-deep,var(--eb57-surface-126b3d,#126B3D)) 70%,var(--re-pri,var(--eb57-surface-16834a,#16834A)) 130%)}
.re-hero::after{content:"";position:absolute;right:-30px;bottom:-34px;width:210px;height:90px;border-radius:50%;background:var(--re-lime);opacity:.5;filter:blur(2px)}
.re-hero-txt{position:relative;z-index:1;min-width:0;flex:1 1 auto}
.re-hero h1{margin:0 0 10px;font-size:clamp(32px,9.4vw,44px)!important;line-height:1;font-weight:800;letter-spacing:-1.2px;color:var(--eb57-text-ffffff,#fff)!important}
.re-hero h1 span{color:var(--re-lime)}
.re-hero-mode{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 8px;font-size:15px;font-weight:600;color:var(--eb57-text-ffffff-920000,rgba(255,255,255,.92))}
.re-hero-mode i{width:1px;height:14px;background:var(--eb57-surface-ffffff-400000,rgba(255,255,255,.4))}
.re-hero-types{margin:0;font-size:12px;line-height:1.5;font-weight:500;color:var(--eb57-text-ffffff-820000,rgba(255,255,255,.82))}
.re-hero-art{position:relative;z-index:1;flex:0 0 auto;width:min(40%,168px);height:auto;margin-right:-6px;align-self:flex-end}

/* ---------- white sheet rising over the hero ---------- */
.re-sheet{position:relative;z-index:2;margin-top:-26px;padding:18px 18px 0;background:var(--eb57-surface-ffffff,#fff);border-radius:26px 26px 0 0}
.re-actions{display:grid;grid-template-columns:1fr 1.18fr;gap:12px;margin:0 0 14px}
.re-actions .re-btn-out:not([style*="display: none"]):not([style*="display:none"]) ~ .re-btn-fill{grid-column:auto}
.re-btn-out,.re-btn-fill{height:50px;border-radius:999px;font:800 15px 'Inter',sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;white-space:nowrap}
.re-btn-out{background:var(--eb57-surface-ffffff,#fff)!important;color:var(--re-ink)!important;border:1.4px solid var(--re-line)!important;box-shadow:0 2px 8px var(--eb57-shadow-0a0e1a-60000,rgba(10,14,26,.06))}
.re-btn-fill{background:linear-gradient(135deg,var(--re-pri),var(--re-deep))!important;color:var(--eb57-text-ffffff,#fff)!important;border:0!important;box-shadow:0 8px 20px var(--eb57-shadow-0a0e1a-160000,rgba(10,14,26,.16))}
.re-btn-fill svg{width:18px;height:18px}
.re-actions:has(#myBtn[style*="none"]){grid-template-columns:1fr}

/* ---------- search ---------- */
.re-search{display:flex;gap:10px;margin:0 0 14px}
.re-search-box{flex:1 1 auto;display:flex;align-items:center;gap:10px;height:50px;padding:0 16px;background:var(--eb57-surface-f4f6f8,#f4f6f8);border:1.4px solid var(--re-line);border-radius:999px;margin:0}
.re-search-box svg{width:20px;height:20px;flex:0 0 auto;color:var(--re-ink)}
.re-search-box input{flex:1;min-width:0;height:100%;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;font-size:14px;color:var(--re-ink)}
.re-search-box input::placeholder{color:var(--eb57-text-7b8794,#7b8794)}
.re-filter-btn{flex:0 0 50px;width:50px;height:50px;border-radius:50%;border:1.4px solid var(--re-line);background:var(--eb57-surface-f4f6f8,#f4f6f8);color:var(--re-ink);display:grid;place-items:center;padding:0}
.re-filter-btn svg{width:22px;height:22px}
.re-filter-btn.on{background:var(--re-tint);border-color:var(--re-pri);color:var(--re-deep)}
body[data-page="realestate"] .filter-row{margin:0 0 14px;padding:0}
body[data-page="realestate"] .filter-row[hidden]{display:none}
body[data-page="realestate"] .filter-row select{height:48px;border-radius:999px!important;padding:0 18px!important;font-size:14px;min-width:0;width:100%}
body[data-page="realestate"] .loc-bar{margin:0 0 14px;border-radius:16px}

/* ---------- pills ---------- */
body[data-page="realestate"] .chips{display:flex;gap:10px;overflow-x:auto;margin:0 -18px 12px;padding:2px 18px 4px;scrollbar-width:none}
body[data-page="realestate"] .chips::-webkit-scrollbar{display:none}
body[data-page="realestate"] .chip{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;
  background:var(--eb57-surface-ffffff,#fff)!important;color:var(--re-ink)!important;border:1.4px solid var(--re-line)!important;border-radius:999px!important;box-shadow:0 2px 8px var(--eb57-shadow-0a0e1a-50000,rgba(10,14,26,.05))}
body[data-page="realestate"] .chip svg{width:20px;height:20px;flex:0 0 auto;color:var(--re-deep)}
body[data-page="realestate"] .chip .chip-emo{font-style:normal;font-size:16px;line-height:1}
body[data-page="realestate"] .chip-type{height:48px;padding:0 18px;font-size:15px;font-weight:700;min-width:64px}
body[data-page="realestate"] .chip-cat{height:42px;padding:0 14px;font-size:13px;font-weight:700;box-shadow:none}
body[data-page="realestate"] .chip-cat svg{width:18px;height:18px}
body[data-page="realestate"] .chip.active{background:linear-gradient(135deg,var(--re-pri),var(--re-deep))!important;color:var(--eb57-text-ffffff,#fff)!important;border-color:transparent!important}
body[data-page="realestate"] .chip.active svg{color:var(--eb57-text-ffffff,#fff)}
body[data-page="realestate"] .chip-cat.active{background:var(--re-tint)!important;color:var(--re-deep)!important;border-color:transparent!important;box-shadow:none}
body[data-page="realestate"] .chip-cat.active svg{color:var(--re-deep)}

/* ---------- listing cards (horizontal, like the mockup) ---------- */
body[data-page="realestate"] .grid{display:flex!important;flex-direction:column;gap:14px;margin-top:6px}
body[data-page="realestate"] .re-card{display:grid!important;grid-template-columns:minmax(0,46%) minmax(0,1fr);gap:14px;align-items:stretch;padding:12px;
  background:var(--eb57-surface-ffffff,#fff)!important;border:1.4px solid var(--re-line)!important;border-radius:var(--re-r)!important;box-shadow:0 6px 20px var(--eb57-shadow-0a0e1a-70000,rgba(10,14,26,.07))!important;text-align:left;cursor:pointer;transform:none!important}
body[data-page="realestate"] .re-card:active{transform:scale(.99)!important}
body[data-page="realestate"] .re-card .card-img{position:relative;aspect-ratio:auto;min-height:200px;height:100%;border-radius:18px;overflow:hidden;background:var(--eb57-surface-eef1f4,#eef1f4)}
body[data-page="realestate"] .re-card .card-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body[data-page="realestate"] .re-card .badge{font-size:12px;font-weight:800;padding:6px 12px;border-radius:999px!important;letter-spacing:0;background:linear-gradient(135deg,var(--re-pri),var(--re-deep));color:var(--eb57-text-ffffff,#fff);box-shadow:0 2px 8px var(--eb57-shadow-000000-180000,rgba(0,0,0,.18))}
body[data-page="realestate"] .re-card .badge.tl{top:10px;left:10px}
body[data-page="realestate"] .re-card .badge.tr{top:auto;bottom:10px;left:10px;right:auto;background:var(--eb57-surface-0a0e1a-720000,rgba(10,14,26,.72))}
body[data-page="realestate"] .re-card .badge.sold{background:var(--eb57-surface-e11d48,#e11d48)}
.re-heart{position:absolute;top:8px;right:8px;width:34px;height:34px;border-radius:50%;background:var(--eb57-surface-ffffff-940000,rgba(255,255,255,.94));display:grid;place-items:center;color:var(--re-ink);box-shadow:0 2px 8px var(--eb57-shadow-000000-140000,rgba(0,0,0,.14))}
.re-heart svg{width:18px;height:18px}
.re-count{position:absolute;right:8px;bottom:8px;display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:999px;background:var(--eb57-surface-0a0e1a-620000,rgba(10,14,26,.62));color:var(--eb57-text-ffffff,#fff);font-size:12px;font-weight:700}
.re-count svg{width:15px;height:15px}
body[data-page="realestate"] .re-card .card-body{padding:2px 0!important;display:flex;flex-direction:column;gap:8px;min-width:0}
body[data-page="realestate"] .re-card .card-title{margin:0;font:800 19px/1.2 'Inter',sans-serif!important;letter-spacing:-.4px;color:var(--re-ink);-webkit-line-clamp:2}
.re-facts{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.re-facts li{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.3;color:var(--eb57-text-475569,#475569);min-width:0}
.re-facts li svg{width:16px;height:16px;flex:0 0 auto;color:var(--re-deep)}
.re-facts li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body[data-page="realestate"] .re-card .re-price{margin-top:auto;padding:9px 12px;border-radius:12px;background:var(--re-tint);color:var(--re-ink)!important;font:800 21px/1.1 'Inter',sans-serif!important;letter-spacing:-.6px;white-space:nowrap}
body[data-page="realestate"] .re-card .re-price small{font:600 13px 'Inter',sans-serif;color:var(--eb57-text-475569,#475569);letter-spacing:0}
body[data-page="realestate"] .re-card .re-price.muted{font:700 14px 'Inter',sans-serif!important;color:var(--eb57-text-475569,#475569)!important}
.re-view{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:44px;border-radius:999px;border:1.6px solid var(--re-deep);color:var(--re-deep);font:800 14px 'Inter',sans-serif;background:var(--eb57-surface-ffffff,#fff)}
.re-view svg{width:15px;height:15px}
body[data-page="realestate"] .re-card.is-sold .card-img img{filter:grayscale(.7);opacity:.75}
body[data-page="realestate"] .state-card{margin:8px 0;border-radius:var(--re-r)!important;padding:34px 20px}
body[data-page="realestate"] .more-row{margin:18px 0 0;text-align:center}
body[data-page="realestate"] .more-row .btn{height:48px;padding:0 28px;border-radius:999px!important}

@media (max-width:380px){
  body[data-page="realestate"] .re-card{grid-template-columns:minmax(0,42%) minmax(0,1fr);gap:12px;padding:10px}
  body[data-page="realestate"] .re-card .card-title{font-size:17px!important}
  body[data-page="realestate"] .re-card .re-price{font-size:18px!important}
  .re-hero{padding:22px 14px 44px}
}
@media (min-width:900px){ body[data-page="realestate"] .layout{max-width:640px!important} }

/* ---------- detail popup (full view of one property): same sizing as the Account sheets ---------- */
body[data-page="realestate"] .overlay{padding:0!important;align-items:flex-end!important;background:var(--eb57-surface-0a0e1a-500000,rgba(10,14,26,.5))!important}
body[data-page="realestate"] .sheet{width:100%!important;max-width:520px!important;max-height:92vh!important;margin:0 auto!important;border-radius:24px 24px 0 0!important;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 -16px 40px var(--eb57-shadow-0a0e1a-160000,rgba(10,14,26,.16))!important}
@media (min-width:641px){ body[data-page="realestate"] .overlay{align-items:center!important;padding:24px!important} body[data-page="realestate"] .sheet{border-radius:24px!important;margin:auto!important} }
body[data-page="realestate"] .sheet-head{position:sticky;top:0;z-index:5;background:var(--eb57-surface-ffffff,#fff);padding:14px 18px!important;border-bottom:1px solid var(--re-line)}
body[data-page="realestate"] .sheet-head h2{font-size:17px!important;font-weight:800}
body[data-page="realestate"] .x-btn{width:40px!important;height:40px!important;border-radius:50%!important;background:var(--eb57-surface-f4f6f8,#f4f6f8)!important;border:1.4px solid var(--re-line)!important;color:var(--re-ink);font-size:16px}
body[data-page="realestate"] .gallery{margin:14px 18px 0;border-radius:18px;background:var(--eb57-surface-0b1218,#0b1218);gap:0}
body[data-page="realestate"] .gallery>*{max-height:320px}
body[data-page="realestate"] .gallery img{aspect-ratio:4/3;object-fit:cover}
body[data-page="realestate"] .sheet-body{padding:16px 18px 22px!important}
body[data-page="realestate"] .gal-count{font-size:12px;margin:0 0 4px;text-align:center}
body[data-page="realestate"] .d-price{margin:6px 0 4px!important;padding:10px 14px;border-radius:14px;background:var(--re-tint);font:800 26px/1.1 'Inter',sans-serif!important;letter-spacing:-.8px;color:var(--re-ink)!important;display:block}
body[data-page="realestate"] .d-price small{font-size:14px!important;font-weight:600;color:var(--eb57-text-475569,#475569)}
body[data-page="realestate"] .d-title{margin:10px 0 8px!important;font:800 21px/1.22 'Inter',sans-serif!important;letter-spacing:-.5px}
body[data-page="realestate"] .tags{gap:8px;margin:8px 0 14px}
body[data-page="realestate"] .tag{font-size:12.5px;font-weight:700;padding:6px 12px;border-radius:999px!important;background:var(--re-tint);color:var(--re-deep)}
body[data-page="realestate"] .tag.sold{background:var(--eb57-surface-e11d48,#e11d48);color:var(--eb57-text-ffffff,#fff)}
body[data-page="realestate"] .d-desc{font-size:14.5px;line-height:1.6;margin:12px 0 16px;color:var(--eb57-text-334155,#334155)}
body[data-page="realestate"] .contact-box{padding:16px!important;border-radius:18px!important}
body[data-page="realestate"] .contact-box .who{font-size:16px}
body[data-page="realestate"] .contact-box .sub{font-size:13px;margin-bottom:12px}
body[data-page="realestate"] .contact-actions{gap:10px}
body[data-page="realestate"] .contact-actions a,body[data-page="realestate"] .contact-actions button{height:48px;min-width:0;display:inline-flex;align-items:center;justify-content:center;border-radius:14px!important;font-size:14px;padding:0 12px}
body[data-page="realestate"] .staff-box{margin:14px 0!important;padding:14px 16px!important;border-radius:18px!important}
body[data-page="realestate"] .staff-box .srow{font-size:14px;padding:7px 0}
body[data-page="realestate"] .safety{font-size:12.5px;line-height:1.55;margin-top:14px}

/* ---- round 2: beat the older !important card rules (aspect-ratio, serif titles, white badges) ---- */
html body #grid .re-card .card-img{aspect-ratio:auto!important;width:100%!important;height:100%!important;min-height:200px!important;border-bottom:0!important;border-radius:18px!important;background:var(--eb57-surface-eef1f4,#eef1f4)!important}
html body #grid .re-card .card-img img{position:absolute!important;inset:0;width:100%!important;height:100%!important;transform:none!important}
html body #grid .re-card .card-body{min-width:0!important;padding:2px 0!important}
html body #grid .re-card .card-title{font-family:'Inter',-apple-system,'Segoe UI',sans-serif!important;font-size:19px!important;font-weight:800!important;line-height:1.2!important;color:var(--re-ink)!important}
html body #grid .re-card .card-price.re-price{font-family:'Inter',-apple-system,'Segoe UI',sans-serif!important;font-size:21px!important;font-weight:800!important;color:var(--re-ink)!important;background:var(--re-tint)!important}
html body #grid .re-card .card-price.re-price.muted{font-size:14px!important;font-weight:700!important;color:var(--eb57-text-475569,#475569)!important}
html body #grid .re-card .badge{background:linear-gradient(135deg,var(--re-pri),var(--re-deep))!important;color:var(--eb57-text-ffffff,#fff)!important;font-size:12px!important;font-weight:800!important;padding:6px 12px!important;border-radius:999px!important;box-shadow:0 2px 8px var(--eb57-shadow-000000-180000,rgba(0,0,0,.18))!important}
html body #grid .re-card .badge.tr{background:var(--eb57-surface-0a0e1a-720000,rgba(10,14,26,.72))!important}
html body #grid .re-card .badge.sold{background:var(--eb57-surface-e11d48,#e11d48)!important}
html body #grid .re-card{border-radius:22px!important;box-shadow:0 6px 20px var(--eb57-shadow-0a0e1a-70000,rgba(10,14,26,.07))!important}
@media (max-width:380px){html body #grid .re-card .card-title{font-size:17px!important}html body #grid .re-card .card-price.re-price{font-size:18px!important}}

/* search: one border only (the label), input is bare */
body[data-page="realestate"] .re-search-box input[type=search]{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;height:100%!important}
body[data-page="realestate"] .re-search-box:focus-within{border-color:var(--re-pri)}
/* pills: first one lines up with the 18px column */
body[data-page="realestate"] #typeChips,body[data-page="realestate"] #chips{padding:2px 18px 4px!important;margin-left:-18px!important;margin-right:-18px!important;width:calc(100% + 36px)}
body[data-page="realestate"] .re-actions .re-btn-fill{min-width:0}
html body .grid>.re-card .card-body::after,html body .grid>.re-card .card-body::before{content:none!important;display:none!important}
html body #grid .re-card .card-title{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal!important;overflow:hidden}
html body #grid .re-card .card-img .badge.tl,html body #grid .re-card .card-img .badge[class*="t-"]{background:linear-gradient(135deg,var(--re-pri),var(--re-deep))!important;background-color:var(--re-pri)!important;color:var(--eb57-text-ffffff,#fff)!important}
html body #grid .re-card .card-img .badge.tl.sold{background:var(--eb57-surface-e11d48,#e11d48)!important}
.re-hero::after{display:none}
html body #grid .re-card .card-title{-webkit-line-clamp:2!important;line-clamp:2!important;max-height:none!important}
html body #grid .re-card .re-facts li{font-size:12.5px}
html body #grid .re-card .re-facts li svg{width:15px;height:15px}
html body[data-page="realestate"] .contact-actions .btn.wa{background:var(--eb57-surface-1fa855,#1FA855)!important;color:var(--eb57-text-ffffff,#fff)!important;box-shadow:none!important}

/* ---- horizontal-scroll guard ---- */
body[data-page="realestate"] .layout,body[data-page="realestate"] .re-sheet,body[data-page="realestate"] .re-hero{max-width:100%;overflow-x:clip}
body[data-page="realestate"] .re-sheet{overflow-x:clip}
body[data-page="realestate"] .re-card,body[data-page="realestate"] .re-card *{min-width:0}
body[data-page="realestate"] .re-search-box{min-width:0}
body[data-page="realestate"] .chips{overscroll-behavior-x:contain}
body[data-page="realestate"] .re-price{max-width:100%;overflow:hidden;text-overflow:ellipsis}
body[data-page="realestate"] .d-desc,body[data-page="realestate"] .d-title,body[data-page="realestate"] .tag{overflow-wrap:anywhere}
body[data-page="realestate"] .sheet{overflow-x:hidden!important}
