/* ================================
   Property Detail — property.css
   ================================ */

/* Header always solid on this page */
.header { background: var(--bg); border-bottom: 1px solid var(--border); }
.header::before { opacity: 0 !important; }

/* ================================
   Breadcrumb
   ================================ */
.prop-breadcrumb {
  padding-top: max(72px, 6vw);
  padding-bottom: 1rem;
  background: var(--bg);
}
.prop-breadcrumb .holder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  font-size: var(--fs-2xs);
  color: var(--muted);
  letter-spacing: .06em;
}
.prop-breadcrumb a { color: var(--cream-dim); transition: color var(--fast); }
.prop-breadcrumb a:hover { color: var(--gold); }
.prop-breadcrumb span:last-child { color: var(--cream-dim); }

/* ================================
   Gallery Mosaic
   ================================ */
.pg-section {
  background: var(--bg);
  padding-bottom: 0;
}

.pg-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  background: var(--bg-2);
}

.pg-hero {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
}
.pg-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .35s ease;
}

/* 2×2 grid — hidden on mobile */
.pg-grid-side {
  display: none;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.pg-cell {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.pg-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--slow) var(--ease), opacity var(--fast);
}
.pg-cell:hover img { transform: scale(1.04); opacity: .9; }

/* "View all" overlay on last cell */
.pg-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,48,82,.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream);
  backdrop-filter: blur(2px);
  transition: background var(--fast);
}
.pg-cell--last:hover .pg-more-overlay { background: rgba(13,48,82,.55); }

/* ================================
   Property Header
   ================================ */
.ph-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
  scroll-margin-top: 80px;
}

.ph-top {
  margin-bottom: 2rem;
}

.ph-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}
.ph-badge {
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .7rem;
  border: 1px solid var(--border);
  color: var(--cream-dim);
}
.ph-badge--sale { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.ph-badge--type { border-color: rgba(240,235,224,.2); }
.ph-badge--new  { border-color: var(--gold-dim); color: var(--gold); }

.ph-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 52px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.08vw;
  color: var(--cream);
  margin-bottom: .75rem;
}

.ph-location {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-xs);
  color: var(--cream-dim);
  letter-spacing: .06em;
}

/* Specs row — price lives here */
.ph-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.ph-price-block {
  margin-right: auto;
}
.ph-price {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 44px);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .2rem;
}
.ph-ref {
  font-size: var(--fs-2xs);
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ph-specs-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
  flex-shrink: 0;
}

.ph-spec {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--cream-dim);
}
.ph-spec svg { flex-shrink: 0; opacity: .6; }
.ph-spec-text { display: flex; flex-direction: column; }
.ph-spec-val {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.2;
}
.ph-spec-key {
  font-size: var(--fs-2xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .1rem;
}

/* ================================
   Body Layout
   ================================ */
.prop-body {
  background: var(--bg);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.prop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

/* ================================
   Main content
   ================================ */
.prop-main { display: flex; flex-direction: column; }

.prop-section {
  padding-top: clamp(2rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border);
}
.prop-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.prop-section-h {
  font-family: var(--serif);
  font-size: max(18px, 1.6vw);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -.03vw;
  margin-bottom: 1.5rem;
}

/* Description */
.prop-desc p {
  font-size: var(--fs-sm);
  color: var(--cream-dim);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.prop-desc p:last-child { margin-bottom: 0; }

/* Details table */
.prop-details {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}

.pd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.pd-key {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: .06em;
  flex-shrink: 0;
}
.pd-val {
  font-size: var(--fs-xs);
  color: var(--cream);
  font-weight: 500;
  text-align: right;
}

/* Features tags */
.prop-tags-group {
  margin-bottom: 1.5rem;
}
.prop-tags-group:last-child { margin-bottom: 0; }

.feat-group {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .85rem;
}

.prop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.prop-tag-pill {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--cream-dim);
  padding: .35rem .85rem;
  border: 1px solid var(--border);
  letter-spacing: .04em;
  transition: border-color var(--fast), color var(--fast);
}
.prop-tag-pill:hover { border-color: rgba(240,235,224,.25); color: var(--cream); }

/* Map placeholder */
.prop-map {
  width: 100%;
  height: 280px;
  margin-bottom: .75rem;
  border: 1px solid var(--border);
  background: #18180f;
}
.prop-map-note {
  font-size: var(--fs-2xs);
  color: var(--muted);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* Nearby */
.prop-nearby { border-top: 1px solid var(--border); }
.nearby-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.nearby-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  color: var(--cream-dim);
  flex-shrink: 0;
}
.nearby-name {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--cream-dim);
}
.nearby-dist {
  font-size: var(--fs-xs);
  color: var(--gold);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================
   Sidebar Card
   ================================ */
.prop-card {
  background: var(--bg-2);
  padding: 1.75rem;
}

/* Agent-only block above the sticky form card */
.pc-info-block {
  background: var(--bg-2);
  padding: 1.75rem 1.75rem 0;
}
.pc-info-block .pc-agent {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 0;
}

/* Sticky block starts with price, no extra top padding */
.pc-form-block { padding-top: 1.5rem; }


/* Agent block at top */
.pc-agent {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.pc-agent-img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.pc-agent-logo {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  padding: 10px;
}
.pc-agent-logo img { width: 100%; height: auto; filter: brightness(0) invert(1); opacity: .8; }
.pc-agent-name { font-size: var(--fs-sm); font-weight: 500; color: var(--cream); }
.pc-agent-role { font-size: var(--fs-xs); color: var(--muted); margin-top: 1px; }
.pc-agent-agency { font-size: var(--fs-xs); color: var(--gold); margin-top: 3px; }

/* Price block */
.pc-price-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.pc-price {
  font-family: var(--serif);
  font-size: max(22px, 2vw);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .25rem;
}
.pc-loc {
  font-size: var(--fs-xs);
  color: var(--cream-dim);
  letter-spacing: .06em;
}

/* Form */
.pc-form { display: flex; flex-direction: column; }

.pc-submit {
  width: 100%;
  justify-content: center;
  margin-top: .25rem;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}
.pc-submit:hover {
  background: var(--gold2);
  border-color: var(--gold2);
  color: var(--bg);
}

/* WhatsApp */
.pc-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-top: .65rem;
  padding: .8rem;
  background: #25d366;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .06em;
  transition: opacity var(--fast);
}
.pc-whatsapp:hover { opacity: .88; }

/* Phone link */
.pc-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  margin-top: .65rem;
  padding: .7rem;
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--cream-dim);
  letter-spacing: .08em;
  transition: border-color var(--fast), color var(--fast);
}
.pc-tel:hover { border-color: rgba(240,235,224,.3); color: var(--cream); }

/* ── Visit sheet tool ── */
.pc-visit {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.pc-visit-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}

.pc-visit-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}

.pc-visit-input {
  flex: 1;
  background: rgba(240,235,224,.04);
  border: 1px solid var(--border);
  color: rgba(240,235,224,.45);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .02em;
  padding: .4rem .6rem;
  border-radius: 2px;
  outline: none;
  min-width: 0;
  cursor: default;
}

.pc-visit-copy {
  flex-shrink: 0;
  background: rgba(240,235,224,.06);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: .4rem .55rem;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color var(--fast), color var(--fast);
}
.pc-visit-copy:hover,
.pc-visit-copy--ok { border-color: var(--gold); color: var(--gold); }

.pc-visit-wa {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-2xs);
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--fast);
}
.pc-visit-wa:hover { color: #4caf72; }

/* ================================
   Similar Properties
   ================================ */
.prop-similar {
  background: var(--bg-2);
  padding-block: clamp(4rem, 9vw, 7rem);
}

.prop-similar-head { margin-bottom: 3rem; }

.prop-similar-h {
  font-family: var(--serif);
  font-size: clamp(32px, 4.992vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.15vw;
  color: var(--cream);
  margin-top: .5rem;
}

/* Reuse main site's prop-card for similar grid */
.prop-card-grid {
  display: block;
  cursor: pointer;
}
.prop-card-grid .prop-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: .85rem;
}
.prop-card-grid .prop-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}
.prop-card-grid:hover .prop-img { transform: scale(1.04); }
.prop-card-info {}

/* ================================
   Mobile sticky CTA
   ================================ */
.prop-sticky-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 1rem max(16px, 2.08vw);
}
.psc-price {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 300;
  color: var(--gold);
}

/* ================================
   Breakpoints
   ================================ */
@media (min-width: 640px) {
  .prop-details { grid-template-columns: 1fr 1fr; }
  .pd-row:nth-child(odd)  { border-right: 1px solid var(--border); padding-right: 2rem; }
  .pd-row:nth-child(even) { padding-left: 2rem; }
  .props-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}

@media (min-width: 768px) {
  .prop-sticky-cta { display: none; }
}

@media (min-width: 1024px) {
  /* Full mosaic — capped so it never dominates the viewport */
  .pg-mosaic {
    grid-template-columns: 62fr 38fr;
    height: clamp(420px, 44vw, 600px);
  }
  .pg-hero { aspect-ratio: unset; height: 100%; }
  .pg-grid-side { display: grid; height: 100%; }

  .prop-layout {
    grid-template-columns: 1fr 340px;
    gap: 4rem;
  }
  .prop-aside {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: stretch;
  }
  .pc-form-block {
    position: sticky;
    top: calc(72px + 1.5rem);
  }
  .props-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .prop-layout { grid-template-columns: 1fr 380px; }
  .pg-mosaic { height: clamp(460px, 42vw, 620px); }
}

/* ================================
   Gallery hero — clickable
   ================================ */
.pg-hero { cursor: pointer; }
.pg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13,48,82,0);
  transition: background var(--fast);
}
.pg-hero:hover::after { background: rgba(13,48,82,.12); }

/* ================================
   Lightbox
   ================================ */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 28, 48, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lb-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 4rem 5rem;
  box-sizing: border-box;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .18s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-img.is-loading { opacity: 0; }

/* Close button */
.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  border: 1px solid rgba(240,235,224,.2);
  background: rgba(13,48,82,.4);
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
  z-index: 10;
}
.lb-close:hover {
  color: var(--cream);
  border-color: rgba(240,235,224,.5);
  background: rgba(13,48,82,.7);
}

/* Arrows */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  border: 1px solid rgba(240,235,224,.2);
  background: rgba(13,48,82,.4);
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
  z-index: 10;
  flex-shrink: 0;
}
.lb-arrow:hover {
  color: var(--cream);
  border-color: rgba(240,235,224,.5);
  background: rgba(13,48,82,.7);
}
.lb-arrow--prev { left: 1rem; }
.lb-arrow--next { right: 1rem; }

/* Counter */
.lb-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-2xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  pointer-events: none;
}

@media (min-width: 768px) {
  .lb-arrow--prev { left: 2rem; }
  .lb-arrow--next { right: 2rem; }
  .lb-stage { padding: 5rem 7rem; }
}

/* ── Dossier download button ── */
.pc-dossier {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-top: .65rem;
  padding: .82rem;
  background: transparent;
  border: 1px solid var(--gold, #c8a96e);
  color: var(--gold, #c8a96e);
  font-family: inherit;
  font-size: var(--fs-xs, .72rem);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.pc-dossier:hover { background: var(--gold, #c8a96e); color: #091f38; }

/* ── Dossier lead modal ── */
.dossier-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(9,31,56,.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.dossier-overlay.is-open { opacity: 1; pointer-events: auto; }

.dossier-modal {
  background: #0d2440;
  border: 1px solid rgba(200,169,110,.2);
  max-width: 400px; width: 100%;
  padding: 2.5rem 2rem 2rem;
  position: relative;
  transform: translateY(16px);
  transition: transform .28s;
}
.dossier-overlay.is-open .dossier-modal { transform: translateY(0); }

.dossier-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); padding: 4px;
  transition: color .15s;
}
.dossier-close:hover { color: rgba(255,255,255,.85); }

.dossier-eyebrow {
  font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold, #c8a96e); margin-bottom: .75rem;
}
.dossier-title {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 1.5rem; font-weight: 400; color: #fff;
  line-height: 1.2; margin-bottom: .5rem;
}
.dossier-sub {
  font-size: .78rem; color: rgba(255,255,255,.5);
  line-height: 1.6; margin-bottom: 1.5rem;
}

.dossier-fg { margin-bottom: .75rem; }
.dossier-input {
  width: 100%; padding: .75rem .9rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff; font-family: inherit; font-size: .82rem;
  outline: none; transition: border-color .15s;
}
.dossier-input::placeholder { color: rgba(255,255,255,.3); }
.dossier-input:focus { border-color: var(--gold, #c8a96e); }

.dossier-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; margin-top: .25rem;
  padding: .9rem; background: var(--gold, #c8a96e);
  border: none; color: #091f38; font-family: inherit;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer;
  transition: opacity .15s;
}
.dossier-btn:hover { opacity: .88; }
.dossier-btn:disabled { opacity: .5; cursor: default; }

.dossier-legal {
  font-size: .62rem; color: rgba(255,255,255,.28);
  margin-top: 1rem; line-height: 1.5; text-align: center;
}

/* ================================
   Mobile optimisations — ≤ 767px
   ================================ */
@media (max-width: 767px) {
  /* Raise WAFab above the fixed sticky-CTA bar (~64px) */
  .wa-fab { bottom: 5.5rem; }

  /* Spec dividers look broken when flex items wrap to new rows */
  .ph-specs-divider { display: none; }
  .ph-specs { gap: .75rem 1.5rem; }

  /* Lightbox: side padding was 5rem leaving only 215px for the photo */
  .lb-stage       { padding: 4.5rem 1rem 3.5rem; }
  .lb-arrow--prev { left: .25rem; }
  .lb-arrow--next { right: .25rem; }
}
