/* Philippine Property — editorial real-estate design system
   Palette: warm paper, deep green, bronze. No gradients, no emoji chrome. */

:root {
  --paper: #f6f3ee;
  --surface: #ffffff;
  --ink: #17140f;
  --ink-soft: #3c372f;
  --muted: #7b746a;
  --line: #e3ddd3;
  --line-soft: #efeae2;
  --brand: #14453a;
  --brand-deep: #0d3029;
  --brand-tint: #e8f0ed;
  --gold: #a8794f;
  --danger: #8f2f22;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(23, 20, 15, 0.05);
  --shadow-md: 0 12px 28px -14px rgba(23, 20, 15, 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { border: 0; display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

.micro {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- masthead ---------- */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 80;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.wordmark { display: flex; align-items: baseline; gap: 10px; }
.wordmark b {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wordmark b span { color: var(--brand); }
.wordmark em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.mastnav { display: flex; align-items: center; gap: 26px; }
.mastnav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.mastnav a:hover { border-bottom-color: var(--brand); color: var(--brand); }
.mastnav .quiet { color: var(--muted); font-size: 12.5px; }

.btn {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 20px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { background: var(--brand-deep); }
.btn.outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.outline:hover { background: var(--brand); color: #fff; }
.btn.quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- hero ---------- */
.hero {
  background: var(--brand-deep);
  color: #f3efe8;
  padding: 52px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .micro { color: #9db8b0; }
.hero h1 {
  font-size: 42px;
  line-height: 1.08;
  margin: 12px 0 0;
  max-width: 780px;
  letter-spacing: -0.025em;
}
.hero .lede {
  margin: 14px 0 0;
  max-width: 660px;
  color: #cfdcd7;
  font-size: 15px;
}
.hero .lede b { color: #fff; font-weight: 600; }

.console {
  margin-top: 30px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  box-shadow: var(--shadow-md);
}
.console .field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 150px; }
.console .field.wide { flex: 2 1 260px; }
.console label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.console input, .console select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 11px;
  font-size: 14px;
  background: #fdfcfa;
  color: var(--ink);
  font-family: inherit;
  width: 100%;
}
.console input:focus, .console select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.console .go { flex: 0 0 auto; height: 42px; }

.factbar {
  margin-top: 26px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
}
.factbar div { min-width: 120px; }
.factbar b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.factbar span {
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9db8b0;
  font-weight: 700;
}
.scrapestat { margin-top: 14px; font-size: 12px; color: #8fa9a1; }
.scrapestat a { color: #cfe0da; border-bottom: 1px solid #48675f; }

/* ---------- layout ---------- */
.main {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0 72px;
  align-items: start;
}

.rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.rail-head h3 { margin: 0; font-size: 17px; }
.rail-head a {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}
.rail-head a:hover { text-decoration: underline; }
.rail-body { padding: 0 18px 18px; }

.fset { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.fset:last-of-type { border-bottom: 0; }
.fset > h4 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
}
.fset .pair { display: flex; gap: 8px; }
.fset .pair > * { flex: 1 1 0; min-width: 0; }
.fset input[type="number"], .fset input[type="text"], .fset select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fdfcfa;
  color: var(--ink);
}
.fset select + select { margin-top: 8px; }
.fset input:focus, .fset select:focus { outline: none; border-color: var(--brand); background: #fff; }
.fset .hint { font-size: 11.5px; color: var(--muted); margin-top: 7px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.chip:hover { border-color: var(--ink-soft); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.mini { font-size: 11.5px; padding: 4px 10px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
  cursor: pointer;
  color: var(--ink-soft);
}
.check input { width: 14px; height: 14px; accent-color: var(--brand); }

.scroll-list {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fdfcfa;
}
.scroll-list .check { font-size: 12.5px; }

details.fset > summary {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
  margin-bottom: 4px;
}
details.fset > summary::-webkit-details-marker { display: none; }
details.fset > summary:before { content: "+ "; }
details.fset[open] > summary:before { content: "– "; }
details.fset > summary:hover { color: var(--brand-deep); }

/* ---------- results ---------- */
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.results-head .count { font-family: var(--serif); font-size: 26px; letter-spacing: -0.02em; }
.results-head .count span { color: var(--brand); }
.results-head .count small {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.results-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.results-tools select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fdfcfa;
  color: var(--ink);
}
.results-tools .sep { width: 1px; height: 22px; background: var(--line); }

.applied {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
}
.applied .chip { background: var(--brand-tint); border-color: #cfe0da; color: var(--brand-deep); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 22px;
  margin-top: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.card:hover {
  border-color: #cfc6b8;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card .thumb { position: relative; aspect-ratio: 4 / 3; background: #eee8de; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .thumb img { transform: scale(1.035); }
.card .thumb .noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #a79d8e; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  background: #efe9df;
}
.tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
}
.tag.sale { background: var(--brand); color: #fff; }
.tag.fc { background: var(--danger); color: #fff; }
.tag.ps { background: #2f5d7c; color: #fff; }
.tag.p { background: var(--gold); color: #fff; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.price {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price small {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 7px;
  font-weight: 700;
}
.price .rent { color: var(--brand); }
.card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .loc { font-size: 12.5px; color: var(--muted); }
.specs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
  padding-top: 9px;
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
}
.specs b { font-weight: 600; }
.card .foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 8px;
}
.card .foot .code { font-family: var(--mono); letter-spacing: 0.02em; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  grid-column: 1 / -1;
}

.skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skel .s-img { aspect-ratio: 4 / 3; background: linear-gradient(100deg, #efe9df 30%, #f7f3ec 50%, #efe9df 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite linear; }
.skel .s-line { height: 11px; margin: 13px 15px; background: #eee8de; border-radius: 2px; }
.skel .s-line.short { width: 42%; }
.skel .s-line.mid { width: 66%; }
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -40% 0; } }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pager span {
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.pager span:hover { border-color: var(--ink-soft); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .off { color: #b9b2a6; border-color: var(--line-soft); }

/* ---------- map ---------- */
.map-wrap {
  position: relative;
  height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 18px;
}
#map { width: 100%; height: 460px; }
.map-note {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
}
.map-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }

/* ---------- statistics band ---------- */
.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}
.band h2 { font-size: 26px; margin: 0 0 6px; }
.band .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 28px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px; }
.statgrid .cell { border-left: 1px solid var(--line); padding-left: 18px; }
.statgrid .cell:first-child { border-left: 0; padding-left: 0; }
.statgrid b {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.statgrid span { font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hist { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-top: 30px; }
.hist .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.hist .bar { width: 100%; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; }
.hist .lab { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); text-align: center; }
.citylist { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 7px; }
.citylist span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--ink-soft);
  background: #fbfaf8;
}
.citylist span b { display: inline; font-family: var(--sans); font-size: 11px; color: var(--brand); }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 32px; padding: 28px 0 72px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel > h3 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--muted);
}
.gallery .main-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eee8de;
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img {
  width: 82px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  border: 2px solid transparent;
  filter: saturate(0.92);
}
.thumbs img.on { border-color: var(--brand); }
.kv { display: grid; grid-template-columns: 1fr 1fr; }
.kv .k { font-size: 12.5px; padding: 9px 0; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.kv .v { font-size: 13px; font-weight: 600; padding: 9px 0; border-bottom: 1px solid var(--line-soft); text-align: right; }
.desc { white-space: pre-wrap; font-size: 14px; color: var(--ink-soft); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badges span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--ink-soft);
  background: #fbfaf8;
}
.source {
  font-size: 12px;
  color: var(--muted);
  background: #fbf7ef;
  border: 1px solid #ecdfc6;
  border-radius: var(--radius);
  padding: 13px 15px;
}
.source a { color: var(--brand); border-bottom: 1px solid #c9dcd6; }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.linkrow a {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  border: 1px solid #cfe0da;
  background: var(--brand-tint);
  padding: 5px 11px;
  border-radius: 999px;
}
.detail-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.detail-head h1 { font-size: 30px; margin: 0 0 6px; line-height: 1.2; }
.detail-head .where { color: var(--muted); font-size: 13.5px; }
.detail-price { text-align: right; }
.detail-price b {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
  font-variant-numeric: tabular-nums;
}
.detail-price .rent { font-size: 14px; color: var(--brand); font-weight: 600; }
.detail-price .cur { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.similar .card .thumb { aspect-ratio: 3 / 2; }

/* ---------- footer ---------- */
.foot { background: var(--brand-deep); color: #b9cbc5; padding: 34px 0; font-size: 13px; }
.foot .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot b { color: #fff; font-family: var(--serif); font-size: 16px; }
.foot a { color: #e4efe9; border-bottom: 1px solid #3d6158; }

@media (max-width: 1040px) {
  .main { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; }
  .detail { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .wrap { padding: 0 18px; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .wrap { padding: 0 16px; }

  .masthead-inner {
    padding: 10px 0;
    gap: 8px 14px;
  }
  .wordmark b { font-size: 18px; }
  .wordmark em { display: none; }
  .mastnav {
    gap: 14px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }
  .mastnav a { font-size: 12.5px; white-space: nowrap; }
  .mastnav a.quiet { display: none; }
  .mastnav .btn.sm { padding: 6px 11px; font-size: 12px; }

  .hero { padding: 30px 0 34px; }
  .hero h1 { font-size: 26px; }
  .hero .lede { font-size: 14px; }
  .console { padding: 12px; gap: 10px; }
  .console .field, .console .field.wide { flex: 1 1 100%; }
  .console .go { width: 100%; }

  /* 16px mencegah zoom otomatis iOS */
  .console input, .console select,
  .fset input[type="number"], .fset input[type="text"], .fset select,
  .results-tools select {
    font-size: 16px;
    height: 44px;
  }
  .chip, .chip.mini { font-size: 12.5px; padding: 6px 12px; }

  .main { padding: 18px 0 48px; gap: 18px; }
  .rail { width: 100%; }
  .results-head { align-items: flex-start; gap: 12px; }
  .results-head .count { font-size: 22px; }
  .results-tools { width: 100%; gap: 8px; }
  .results-tools select { flex: 1 1 140px; }
  .results-tools .sep { display: none; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .factbar { gap: 18px 26px; }
  .factbar b { font-size: 22px; }
  .band { padding: 34px 0; }
  .statgrid { gap: 18px; }
  .statgrid .cell { border-left: 0; padding-left: 0; }
  .hist { overflow-x: auto; }
  .detail { padding: 18px 0 48px; gap: 16px; }
  .detail-head h1 { font-size: 23px; }
  .detail-price { text-align: left; }
  .detail-price b { font-size: 27px; }
  .kv .k, .kv .v { font-size: 12px; }
  .similar { grid-template-columns: 1fr; }
  .foot .row { font-size: 12.5px; }
}

@media (max-width: 380px) {
  .mastnav a { font-size: 12px; }
  .hero h1 { font-size: 23px; }
}
