/* =====================================================================
   ORANGE SPACES – property-detail.css   (/property/<district>/<city>/<project>/)
   Also load components.css (similar property cards).
   Section numbers match property_detail.html.

   SECTIONS
     0. Layout (main column + sticky sidebar)
     1. Breadcrumb + gallery
     2. Title + key facts
     3. Sidebar (price, buttons, enquiry form → /enquiry/)
     4. Overview
     5. Unit table
     6. Payment plan
     7. Amenities
     8. Location
     9. Developer
    10. FAQ
    11. Similar properties
    12. Lightbox
   ===================================================================== */


/* ── 0. LAYOUT ──────────────────────────────────────────────────── */
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; padding-bottom: 80px; }
.pd-section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--color-border); }
.pd-h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--color-navy); margin-bottom: 18px; }
.pd-section p { font-size: 15px; line-height: 1.85; color: var(--color-navy); }
.pd-section a { color: var(--color-emerald); }
.pd-note { margin-top: 12px; font-size: 13px !important; color: rgba(14,31,59,.65) !important; }
@media (max-width: 1100px) { .pd-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; } }
@media (max-width: 991px)  {
  .pd-layout { grid-template-columns: 1fr; gap: 0; }
  .pd-side { order: 2; margin-top: 40px; }   /* form after the facts, before the long sections */
  .pd-main { display: contents; }            /* lets the sidebar sit between the head and the sections */
  .pd-head { order: 1; }
  .pd-section { order: 3; }
}


/* ── 1. BREADCRUMB + GALLERY ────────────────────────────────────── */
.pd-top { padding: 26px 0 0; background: #fff; }
.pd-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: 12px; color: rgba(14,31,59,.55); margin-bottom: 18px; }
.pd-breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--color-gold); }
.pd-breadcrumb a { color: var(--color-navy); text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--color-emerald); }

/* Desktop: 1 large + 4 small photos, the rest open in the lightbox */
.pd-gallery {
  position: relative; display: grid; gap: 10px; border-radius: 20px; overflow: hidden;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 230px 230px;
}
.pd-shot { position: relative; padding: 0; border: none; background: #e9e4da; cursor: zoom-in; overflow: hidden; }
.pd-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.pd-shot:hover img { transform: scale(1.04); }
.pd-shot--main { grid-row: 1 / span 2; }
.pd-shot:nth-child(n+6) { display: none; }
/* 2–4 photos: let the main photo use the space */
.pd-gallery:has(.pd-shot:nth-child(2):last-of-type) { grid-template-columns: 1fr 1fr; }
.pd-gallery:not(:has(.pd-shot:nth-child(2))) { grid-template-columns: 1fr; grid-template-rows: 470px; }

.pd-badges { position: absolute; top: 16px; left: 16px; z-index: 3; display: flex; gap: 8px; }
.pd-badge { padding: 7px 14px; border-radius: 999px; background: #fff; color: #111; font-size: 12px; font-weight: 700; box-shadow: 0 5px 20px rgba(0,0,0,.15); }
.pd-badge--dark { background: var(--color-navy); color: var(--color-gold); }
.pd-badge--sold { background: #b42318; color: #fff; }
.pd-gallery-all {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.95); color: var(--color-navy); font-size: 13px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.pd-gallery-all svg { width: 16px; height: 16px; }

/* Mobile: swipe through every photo */
@media (max-width: 768px) {
  .pd-top { padding-top: 16px; }
  .pd-gallery {
    display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .pd-gallery::-webkit-scrollbar { display: none; }
  .pd-shot, .pd-shot:nth-child(n+6) { display: block; flex: 0 0 100%; height: 280px; scroll-snap-align: start; }
}


/* ── 2. TITLE + KEY FACTS ───────────────────────────────────────── */
.pd-head { padding-top: 32px; }
.pd-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; color: var(--color-navy); }
.pd-location { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 15px; color: rgba(14,31,59,.8); }
.pd-location svg { width: 16px; height: 16px; color: var(--color-gold); }
.pd-location a { color: var(--color-navy); text-decoration: underline; text-decoration-color: rgba(201,168,76,.6); text-underline-offset: 3px; }
.pd-location a:hover { color: var(--color-emerald); }
.pd-dot { color: var(--color-gold); }

.pd-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; margin-top: 26px;
  border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; background: var(--color-border);
}
.pd-facts > div { padding: 16px 18px; background: #fff; }
.pd-facts dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-gold); }
.pd-facts dd { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--color-navy); }


/* ── 3. SIDEBAR ─────────────────────────────────────────────────── */
.pd-side { position: sticky; top: calc(var(--nav-height) + 20px); padding-top: 32px; }
.pd-card {
  padding: 26px; border-radius: 20px; background: #fff; border: 1px solid var(--color-border);
  box-shadow: 0 20px 50px rgba(4,29,40,.08);
}
.pd-price-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-gold); }
.pd-price { margin-top: 6px; font-size: 30px; font-weight: 700; color: var(--color-navy); line-height: 1.1; }
.pd-side-facts { list-style: none; margin-top: 18px; border-top: 1px solid var(--color-border); }
.pd-side-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.pd-side-facts span { color: rgba(14,31,59,.65); }
.pd-side-facts strong { color: var(--color-navy); text-align: right; }

.pd-side-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pd-btn {
  height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 700; transition: transform .2s, box-shadow .2s;
}
.pd-btn svg { width: 16px; height: 16px; }
.pd-btn--call { background: var(--color-navy); color: #fff; }
.pd-btn--wa { background: #25D366; color: #fff; }
.pd-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }

.pd-form { display: grid; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--color-border); }
.pd-form-title { font-family: var(--font-display); font-size: 20px; color: var(--color-navy); }
.pd-form input, .pd-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--color-border);
  font-family: var(--font-body); font-size: 14px; color: var(--color-navy); background: #fff; resize: vertical;
}
.pd-form input:focus, .pd-form textarea:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.pd-submit {
  height: 48px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--grad-gold); color: #111; font-family: var(--font-ui); font-size: 14px; font-weight: 700; transition: transform .2s;
}
.pd-submit:hover { transform: translateY(-2px); }
.pd-secure { font-size: 12px; color: rgba(14,31,59,.6); text-align: center; }
/* phone with country code (.os-phone-row from base.css) inside the sidebar form */
.pd-form { scroll-margin-top: calc(var(--nav-height) + 20px); }
.pd-phone { height: 46px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; }
.pd-phone:focus-within { border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.pd-form .pd-phone .os-phone-number { flex: 1; height: 100%; padding: 0 12px; border: none; border-radius: 0; box-shadow: none; }
/* error messages: .lead-error / .lead-err in base.css (shared with the popups) */
.pd-submit[disabled] { opacity: .65; cursor: wait; transform: none; }
@media (max-width: 991px) { .pd-side { position: static; padding-top: 0; } }


/* ── 4. OVERVIEW ────────────────────────────────────────────────── */
.pd-lead { font-size: 17px !important; font-weight: 600; }
.pd-desc p + p { margin-top: 14px; }
.pd-desc { margin-top: 14px; }
/* property-detail.js adds .is-clamped only when the text is long */
.pd-desc.is-clamped { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); }
.pd-more {
  margin-top: 14px; padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(6,26,43,.3); background: #fff; cursor: pointer;
  color: var(--color-navy); font-size: 13px; font-weight: 700; letter-spacing: .04em;
}
.pd-more:hover { border-color: var(--color-gold); }


/* ── 5. UNIT TABLE ──────────────────────────────────────────────── */
.pd-table-wrap { border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--color-navy); }
.pd-table th { padding: 14px 18px; text-align: left; background: var(--color-ivory-soft); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(14,31,59,.7); }
.pd-table td { padding: 14px 18px; border-top: 1px solid var(--color-border); }
.pd-table td:last-child { font-weight: 700; }
@media (max-width: 640px) {
  .pd-table thead { display: none; }
  .pd-table tr { display: block; padding: 12px 16px; border-top: 1px solid var(--color-border); }
  .pd-table tr:first-child { border-top: none; }
  .pd-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: none; }
  .pd-table td::before { content: attr(data-label); color: rgba(14,31,59,.6); font-weight: 400; }
}


/* ── 6. PAYMENT PLAN ────────────────────────────────────────────── */
.pd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pd-tab {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; cursor: pointer;
  color: var(--color-navy); font-size: 13px; font-weight: 600;
}
.pd-tab[aria-selected="true"] { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.pd-plan-name { font-weight: 700; margin-bottom: 14px; }
.pd-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; counter-reset: step; }
.pd-step {
  position: relative; padding: 20px 18px; border-radius: 16px; background: var(--color-ivory-soft); border: 1px solid var(--color-border);
}
.pd-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 14px; right: 16px; font-size: 11px; font-weight: 700; color: rgba(201,168,76,.9);
}
.pd-step-value { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--color-navy); }
.pd-step-name { display: block; margin-top: 8px; font-size: 13px; color: rgba(14,31,59,.75); }


/* ── 7. AMENITIES ───────────────────────────────────────────────── */
.pd-amenities { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pd-amenities li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--color-border); background: #fff; font-size: 14px; color: var(--color-navy);
}
.pd-amenities svg, .pd-amenities i { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-emerald); }


/* ── 8. LOCATION ────────────────────────────────────────────────── */
.pd-map {
  position: relative; height: 340px; margin-top: 18px; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background:
    radial-gradient(circle at 30% 40%, rgba(26,127,90,.12), transparent 50%),
    repeating-linear-gradient(0deg, rgba(6,26,43,.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(6,26,43,.05) 0 1px, transparent 1px 40px),
    var(--color-ivory-soft);
  border: 1px solid var(--color-border);
}
.pd-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pd-map-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--color-navy); color: #fff; font-size: 14px; font-weight: 700;
}
.pd-map-btn svg { width: 16px; height: 16px; color: var(--color-gold); }
.pd-map-link { font-size: 13px; }
.pd-area-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pd-chip {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff;
  color: var(--color-navy) !important; text-decoration: none; font-size: 13px; font-weight: 600; transition: border-color .2s;
}
.pd-chip:hover { border-color: var(--color-gold); }


/* ── 9. DEVELOPER ───────────────────────────────────────────────── */
.pd-dev { display: flex; gap: 24px; align-items: flex-start; padding: 24px; border-radius: 16px; border: 1px solid var(--color-border); background: #fff; }
.pd-dev-logo { width: 120px; height: 60px; object-fit: contain; flex-shrink: 0; }
.pd-dev-name { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--color-navy); }
.pd-dev p { margin-top: 8px; font-size: 14px !important; }
.pd-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; text-decoration: none; }
@media (max-width: 560px) { .pd-dev { flex-direction: column; } }


/* ── 10. FAQ ────────────────────────────────────────────────────── */
.pd-faq { border-top: 1px solid var(--color-border); }
.pd-faq-item { border-bottom: 1px solid var(--color-border); }
.pd-faq-item summary {
  position: relative; list-style: none; cursor: pointer; padding: 18px 46px 18px 0;
  font-family: var(--font-display); font-size: 18px; color: var(--color-navy);
}
.pd-faq-item summary::-webkit-details-marker { display: none; }
.pd-faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(201,168,76,.6);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-size: 17px; color: var(--color-gold);
  transition: transform .3s;
}
.pd-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pd-faq-item p { padding: 0 46px 18px 0; }


/* ── 11. SIMILAR PROPERTIES ─────────────────────────────────────── */
.pd-similar { padding: 80px 0; }
.pd-similar .sec-head { margin-bottom: 32px; }
@media (max-width: 768px) { .pd-similar { padding: 60px 0; } }


/* ── 12. LIGHTBOX ───────────────────────────────────────────────── */
.pd-lightbox {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  background: rgba(3,8,15,.94);
}
.pd-lightbox[hidden] { display: none; }
.pd-lb-img { max-width: min(1200px, 92vw); max-height: 84vh; object-fit: contain; border-radius: 8px; user-select: none; }
.pd-lb-close, .pd-lb-prev, .pd-lb-next {
  position: absolute; border: none; cursor: pointer; color: #fff; background: rgba(255,255,255,.1);
  width: 52px; height: 52px; border-radius: 50%; font-size: 32px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.pd-lb-close:hover, .pd-lb-prev:hover, .pd-lb-next:hover { background: rgba(255,255,255,.22); }
.pd-lb-close { top: 20px; right: 20px; }
.pd-lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.pd-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.pd-lb-count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }
@media (max-width: 768px) {
  .pd-lb-prev, .pd-lb-next { top: auto; bottom: 14px; transform: none; width: 46px; height: 46px; }
  .pd-lb-prev { left: 16px; } .pd-lb-next { right: 16px; }
}