/* JaipurEst — housing.com-inspired light portal theme */

:root {
  --acc: #f45b24;            /* portal orange */
  --acc-dark: #d94a17;
  --ink: #1a1d21;
  --ink-2: #4a5158;
  --ink-3: #86909a;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #e4e8ec;
  --ok: #1e8e3e;
  --hot: #e53935;
  --shadow: 0 1px 3px rgba(20, 30, 40, .08), 0 4px 14px rgba(20, 30, 40, .05);
  --shadow-h: 0 6px 22px rgba(20, 30, 40, .14);
  --r: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(20,30,40,.05);
}
.topbar-in {
  max-width: 1240px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 20px; white-space: nowrap; color: var(--ink);
}
.brand span:last-child, .brand > span:not(.logo) { color: var(--acc); }
.brand .logo {
  background: var(--acc); color: #fff; font-size: 13px; font-weight: 700;
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand.small { font-size: 17px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; color: var(--ink-3);
  max-width: 560px;
}
.search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: 14px; color: var(--ink);
}
.updated {
  font-size: 12px; color: var(--ink-3); white-space: nowrap;
  background: var(--bg); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}

/* ---------- category bar ---------- */
.cats { background: var(--card); border-bottom: 1px solid var(--line); }
.cats-in {
  max-width: 1240px; margin: 0 auto; padding: 8px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.tabs { display: flex; gap: 4px; }
.tab {
  border: 0; background: transparent; padding: 8px 18px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  border-radius: 8px 8px 0 0; border-bottom: 3px solid transparent;
}
.tab.active { color: var(--acc); border-bottom-color: var(--acc); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; }
.pill {
  border: 1px solid var(--line); background: var(--card);
  padding: 6px 15px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--ink-2); transition: .15s;
}
.pill:hover { border-color: var(--acc); color: var(--acc); }
.pill.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ---------- layout ---------- */
.layout {
  max-width: 1240px; margin: 18px auto 40px; padding: 0 20px;
  display: grid; grid-template-columns: 258px 1fr; gap: 20px;
  align-items: start;
}
.filter-toggle {
  display: none; width: 100%; padding: 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: 14px; margin-bottom: 12px;
}
.filter-toggle span { color: var(--acc); margin-left: 6px; }

/* ---------- filter sidebar ---------- */
.filters {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; box-shadow: var(--shadow);
  position: sticky; top: 118px;
}
.fbox { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fbox:last-of-type { border-bottom: 0; }
.fbox-h { font-weight: 600; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.fhint { font-size: 11px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
select, input[type=number] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); font-size: 13px;
  color: var(--ink); outline: none; font-family: inherit;
}
select:focus, input:focus { border-color: var(--acc); }
.range2 { display: flex; align-items: center; gap: 6px; }
.range2 select, .range2 input { min-width: 0; }
.dash { color: var(--ink-3); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  min-width: 34px; padding: 6px 10px; border-radius: 8px; font-size: 13px;
}
.chip:hover { border-color: var(--acc); }
.chip.active { background: var(--acc); border-color: var(--acc); color: #fff; }

.chk {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 13px; cursor: pointer; color: var(--ink-2);
}
.chk input { accent-color: var(--acc); }

.reset {
  width: 100%; margin-top: 12px; padding: 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.reset:hover { border-color: var(--acc); color: var(--acc); }

/* ---------- feed ---------- */
.feedhead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 12px;
}
.count { font-size: 15px; font-weight: 600; }
.count b { color: var(--acc); }
.feedhead select { width: auto; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

/* card */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: .18s; position: relative;
}
.card:hover { box-shadow: var(--shadow-h); transform: translateY(-3px); }
.card-img { position: relative; height: 172px; background: #e9edf1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(26,29,33,.025) 0 9px, transparent 9px 18px),
    linear-gradient(135deg, #fdece4, #f6f1ee);
  color: var(--acc-dark); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; font-size: 12px;
}
.card-img .ph::before {
  content: ""; width: 30px; height: 30px; margin-right: 9px; opacity: .8;
  background: no-repeat center/contain url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23d94a17" d="M12 3 2 12h3v8h6v-6h2v6h6v-8h3z"/></svg>');
}
.card-img .src {
  position: absolute; left: 10px; top: 10px;
  background: rgba(255,255,255,.94); color: var(--ink-2);
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
}
.badges {
  position: absolute; right: 10px; top: 10px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.bg {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 5px; color: #fff;
}
.bg-hot   { background: var(--hot); }
.bg-dem   { background: #8e24aa; }
.bg-prem  { background: #b8860b; }
.bg-ver   { background: #00897b; }
.bg-new   { background: var(--ok); }
.bg-drop  { background: #1565c0; }
.bg-cross { background: #6d4c41; }
.bg-sold  { background: #455a64; }
.bg-urgent{
  background: linear-gradient(135deg, #e11d48, #ff5470);
  animation: urgFlash 1.3s ease-in-out infinite;
}
/* branded corner stamp — our identity on every photo */
.card-img::after{
  content: "JaipurEst";
  position: absolute; left: 8px; bottom: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  color: rgba(255,255,255,.95);
  background: rgba(15,23,42,.55);
  padding: 2px 8px; border-radius: 999px;
  pointer-events: none; z-index: 2;
}
@keyframes urgFlash{
  0%,100%{ box-shadow: 0 0 0 0 rgba(225,29,72,.6); transform: translateY(0); }
  50%    { box-shadow: 0 0 12px 3px rgba(225,29,72,.5); transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce){ .bg-urgent{ animation: none; } }

.card-body { padding: 13px 14px 15px; }
.price { font-size: 19px; font-weight: 700; color: var(--ink); }
.price small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.ptype {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--acc);
  background: #fff1eb; border-radius: 5px; padding: 3px 8px; margin: 7px 0 6px;
  text-transform: uppercase; letter-spacing: .03em;
}
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.4; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em;
}
.card-loc {
  font-size: 12.5px; color: var(--ink-2); display: flex; gap: 5px;
  align-items: flex-start; line-height: 1.4;
}
.card-loc svg { flex: none; margin-top: 2px; color: var(--acc); }
.specs {
  display: flex; gap: 14px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2);
}
.specs:empty { display: none; }
.specs b { color: var(--ink); font-weight: 600; }
.specs .none { color: var(--ink-3); }
.pr-na { color: var(--ink-3); font-weight: 600; font-size: 14.5px; }
.card-time {
  position: absolute; left: 14px; bottom: 10px; font-size: 11px;
  color: var(--ink-3);
}
.card-body { padding-bottom: 30px; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty-t { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.empty-s { margin-top: 6px; font-size: 13px; }
.more {
  display: block; margin: 22px auto 0; padding: 11px 28px;
  border-radius: 10px; border: 1px solid var(--acc);
  background: var(--card); color: var(--acc); font-weight: 600; font-size: 14px;
}
.more:hover { background: var(--acc); color: #fff; }

/* ---------- footer ---------- */
.foot { background: #171b20; color: #b7c0c9; margin-top: 30px; }
.foot-in {
  max-width: 1240px; margin: 0 auto; padding: 34px 20px;
  display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 34px;
}
.foot h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.foot p, .foot li { font-size: 13px; line-height: 1.6; }
.foot .brand { color: #fff; margin-bottom: 8px; }
.foot ul { margin: 0; padding-left: 16px; }
.foot .fine { color: #97a3ad; font-size: 11.5px; line-height: 1.6; }

/* ---------- modal ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 20, 25, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--card); border-radius: 16px; max-width: 780px;
  width: 100%; max-height: 88vh; overflow: auto; position: relative;
}
.modal-x {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); font-size: 15px; color: var(--ink);
  box-shadow: var(--shadow);
}
.m-hero { height: 300px; background: #e9edf1; }
.m-hero img { width: 100%; height: 100%; object-fit: cover; }
.m-hero .ph {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(26,29,33,.025) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #fdece4, #f6f1ee);
  color: var(--acc-dark); font-weight: 600; text-transform: uppercase;
}
.m-body { padding: 22px 26px 26px; }
.m-price { font-size: 27px; font-weight: 700; }
.m-price small { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.m-title { font-size: 18px; font-weight: 600; margin: 8px 0 4px; line-height: 1.4; }
.m-loc { color: var(--ink-2); font-size: 14px; }
.m-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 18px 0;
}
.m-cell {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px;
}
.m-cell span { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.m-cell b { font-size: 14.5px; font-weight: 600; }
.m-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.m-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; white-space: pre-line; }
.m-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 10px; font-weight: 600;
  font-size: 14px; border: 1px solid transparent;
}
.btn-primary { background: var(--acc); color: #fff; }
.btn-primary:hover { background: var(--acc-dark); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.m-seen { font-size: 12px; color: var(--ink-3); margin-top: 14px; }

/* ---- book a meeting / site visit ---- */
.m-book { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); }
.bk-h { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.bk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-form input, .bk-form select {
  font: inherit; font-size: 13.5px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.bk-form input:focus, .bk-form select:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: var(--acc); }
.bk-form #bkMode, .bk-form .bk-go, .bk-note { grid-column: 1 / -1; }
.bk-go { justify-content: center; }
.bk-note { font-size: 12px; color: var(--ink-3); margin: 2px 0 0; line-height: 1.5; }
.bk-ok { grid-column: 1 / -1; font-size: 13.5px; color: var(--ok, #15803d); background: rgba(21, 128, 61, .08); border: 1px solid rgba(21, 128, 61, .3); border-radius: 8px; padding: 10px 12px; margin-top: 4px; }
@media (max-width: 560px) { .bk-form { grid-template-columns: 1fr; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .filter-toggle { display: block; }
  .filters { display: none; position: static; }
  .filters.open { display: block; }
  .topbar-in { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .updated { font-size: 11px; padding: 5px 10px; }
  .foot-in { grid-template-columns: 1fr; gap: 22px; }
  .m-hero { height: 210px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .card-img { height: 130px; }
  .price { font-size: 16px; }
  .card-title { font-size: 12.5px; min-height: 0; }
  .specs { gap: 9px; font-size: 11.5px; }
  .card-body { padding: 10px 10px 26px; }
  .tab { padding: 7px 12px; font-size: 14px; }
}

/* ---------- photo gallery: card pill + modal thumbs + lightbox ---------- */
.npx {
  position: absolute; left: 9px; bottom: 9px; z-index: 3;
  background: rgba(12, 12, 16, .74); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 9px;
  border-radius: 20px; backdrop-filter: blur(4px);
}
.m-hero .gal { height: 100%; display: flex; flex-direction: column; }
.gal-main { position: relative; flex: 1; min-height: 0; cursor: zoom-in; overflow: hidden; }
.gal-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(10, 10, 14, .6); color: #fff; font-size: 19px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background .15s; z-index: 4;
}
.gal-nav:hover { background: var(--acc); }
.g-prev { left: 8px; } .g-next { right: 8px; }
.gal-count {
  position: absolute; right: 9px; bottom: 9px; z-index: 4;
  background: rgba(10, 10, 14, .7); color: #fff;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px;
}
.gal-thumbs {
  display: flex; gap: 6px; overflow-x: auto; padding: 7px 2px 1px; flex: 0 0 auto;
  scrollbar-width: thin;
}
.gal-thumbs img {
  width: 58px; height: 44px; object-fit: cover; border-radius: 6px;
  cursor: pointer; opacity: .5; border: 2px solid transparent; flex: 0 0 auto;
  transition: opacity .15s;
}
.gal-thumbs img.on, .gal-thumbs img:hover { opacity: 1; border-color: var(--acc); }
#lbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 8, 12, .97); display: grid; place-items: center; cursor: zoom-out;
}
#lbox[hidden] { display: none; }
#lbox > img {
  max-width: 90vw; max-height: 82vh; object-fit: contain;
  border-radius: 8px; cursor: default; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
#lbox .l-prev { left: 4vw; } #lbox .l-next { right: 4vw; }
#lbox .lb-count { left: 50%; right: auto; transform: translateX(-50%); bottom: 5vh; }
.lb-x {
  position: absolute; top: 16px; right: 22px;
  background: none; border: 0; color: #fff; font-size: 34px; line-height: 1;
  cursor: pointer; opacity: .8;
}
.lb-x:hover { opacity: 1; color: var(--acc); }
.lb-cap {
  position: absolute; bottom: 5vh; left: 50%;
  transform: translateX(-50%) translateY(34px);
  max-width: 80vw; color: #d4d7dd; font-size: 13px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
