/* ═══════════════════════════════════════════════════════════════════════════
   PRIMELINK PROPERTY – LISTING DETAIL v2
   listing_detail_v2.css
   Append this file to listing.css (or @import at the bottom of listing.css)

   Design tokens inherited from app.css / style.css:
     --gold, --gold-dark, --gold-light, --gold-pale
     --dark, --dark-2
     --text, --text-muted, --text-light
     --bg-light, --bg-card
     --border
     --radius, --radius-sm, --radius-xs
     --shadow-sm, --shadow-md, --shadow-gold
     --transition
═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   PAGE SHELL
───────────────────────────────────────────── */
.dp-page {
  background: var(--bg-light);
  padding: 24px 0 72px;
  min-height: 60vh;
  margin-top: 68px;
}

/* ─────────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────────── */
.dp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.dp-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.dp-breadcrumb a:hover { color: var(--gold-dark); }
.dp-breadcrumb i { font-size: 0.65rem; color: var(--text-light); }
.dp-breadcrumb span {
  color: var(--text);
  font-weight: 500;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────
   LAYOUT: 2-column grid
───────────────────────────────────────────── */
.dp-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.dp-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dp-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY
═══════════════════════════════════════════════════════════════════════════ */
.dp-gallery {
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* ── Main slider wrap ── */
.dpg-main-wrap {
  position: relative;
  background: var(--bg-light);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.dpg-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 560px;
  overflow: hidden;
}

/* ── Individual slides ── */
.dpg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpg-slide.active {
  opacity: 1;
  visibility: visible;
}

/* Photo */
.dpg-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

/* Uploaded video */
.dpg-video {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
  background: var(--dark);
}

/* ── YouTube embed slide ── */
.dpg-yt-wrap {
  position: absolute;
  inset: 0;
  background: var(--dark);
}
.dpg-yt-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Social preview slides (TikTok / Facebook / Instagram / YouTube fallback) ── */
.dpg-social-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px;
  text-align: center;
}

.dpg-social-card--yt { background: linear-gradient(160deg, #fff5f5 0%, #ffe3e3 100%); }
.dpg-social-card--tk { background: linear-gradient(160deg, #f2fdfd 0%, #e0f7f7 100%); }
.dpg-social-card--fb { background: linear-gradient(160deg, #f0f6ff 0%, #e0edff 100%); }
.dpg-social-card--ig { background: linear-gradient(160deg, #fdf2ff 0%, #fbe6f5 50%, #fff0f0 100%); }

.dpg-social-icon {
  font-size: 3.5rem;
  line-height: 1;
  opacity: 0.95;
}
.dpg-social-card--yt .dpg-social-icon { color: #ff4444; }
.dpg-social-card--tk .dpg-social-icon { color: #14b8b8; }
.dpg-social-card--fb .dpg-social-icon { color: #1877f2; }
.dpg-social-card--ig .dpg-social-icon { color: #c2266d; }

.dpg-social-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}

.dpg-social-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}
.dpg-social-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  color: white;
}

.dpg-social-cta--yt { background: #ff0000; }
.dpg-social-cta--tk { background: #14b8b8; }
.dpg-social-cta--fb { background: #1877f2; }
.dpg-social-cta--ig { background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af); }

/* ── No photo fallback ── */
.dpg-no-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 0.88rem;
}
.dpg-no-photo i { font-size: 2.5rem; }

/* ── Navigation arrows ── */
.dpg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: var(--transition);
  z-index: 5;
  font-size: 1.05rem;
}
.dpg-arrow:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-50%) scale(1.06);
}
.dpg-arrow--prev { left: 14px; }
.dpg-arrow--next { right: 14px; }

/* ── Counter pill ── */
.dpg-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.dpg-counter .ti { font-size: 0.8rem; color: var(--gold-dark); }

/* ── Type badges ── */
.dpg-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 4;
}
.dpg-badge {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.dpg-badge--sale { background: var(--gold-dark); }
.dpg-badge--rent { background: var(--gold); }

/* ── Favourite button ── */
.dpg-fav {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  transition: var(--transition);
  z-index: 4;
  font-size: 1.1rem;
}
.dpg-fav:hover { transform: scale(1.1); background: white; }
.dpg-fav.active { color: #ef4444; }


/* ── Thumbnail strip ── */
.dpg-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.dpg-strip::-webkit-scrollbar { height: 4px; }
.dpg-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.dpg-thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.18s, opacity 0.18s;
  background: var(--bg-light);
  padding: 0;
}
.dpg-thumb img,
.dpg-thumb-video {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.dpg-thumb:hover { border-color: rgba(215,166,92,.5); opacity: 0.9; }
.dpg-thumb.active { border-color: var(--gold); }

/* Overlay icon on video/social thumbs */
.dpg-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.38);
  color: white;
  font-size: 1rem;
  pointer-events: none;
}
.dpg-thumb-overlay--yt { background: rgba(220,0,0,.5); }

/* Social media thumbnail icons */
.dpg-thumb-social {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.dpg-thumb-social--yt  { background: #ffe3e3; color: #ff4444; }
.dpg-thumb-social--tk  { background: #e0f7f7; color: #14b8b8; }
.dpg-thumb-social--fb  { background: #e0edff; color: #1877f2; }
.dpg-thumb-social--ig  { background: #fbe6f5; color: #c2266d; }

/* Floor plan divider */
.dpg-strip-divider {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-light);
  padding: 0 8px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  margin-left: 4px;
  align-self: center;
}

/* Floor plan thumb */
.dpg-thumb-plan {
  text-decoration: none;
  border-style: dashed;
  border-color: var(--border);
}
.dpg-thumb-plan:hover { border-color: var(--gold-light); }


/* ═══════════════════════════════════════════════════════════════════════════
   INFO CARD (price + title)
═══════════════════════════════════════════════════════════════════════════ */
.dp-info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 26px 28px 22px;
  box-shadow: var(--shadow-sm);
}

/* Meta row badges */
.dp-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.dp-prop-badge {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: var(--gold-pale);
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.02em;
}
.dp-project-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dp-hold-badge {
  font-size: 0.73rem;
  color: var(--text-muted);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 50px;
}
.dp-owner-badge {
  font-size: 0.73rem;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 4px 10px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Title */
.dp-title {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 12px;
}

/* Location */
.dp-location-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dp-location-row > i {
  color: var(--gold);
  margin-top: 3px;
  flex-shrink: 0;
}
.dp-address { color: var(--text-light); }

/* Transit pill */
.dp-transit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 16px;
}
.dp-transit-pill > i { color: var(--gold-dark); }
.dp-transit-dot { opacity: 0.4; }
.dp-transit-dist {
  font-size: 0.76rem;
  background: var(--gold-pale);
  color: var(--gold-dark);
  padding: 1px 8px;
  border-radius: 50px;
  font-weight: 600;
}

/* ── Price block ── */
.dp-price-block {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 18px 0 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4px 0 20px;
}
.dp-price-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dp-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.dp-price-value {
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 800;
  font-family: 'Prompt', sans-serif;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dp-price-value--sale { color: var(--gold-dark); }
.dp-price-value--rent { color: var(--dark); }
.dp-price-value small {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}
.dp-price-orig {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}
.dp-discount-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 6px;
  vertical-align: middle;
}
.dp-nego-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: var(--gold-pale);
  padding: 3px 9px;
  border-radius: 50px;
  align-self: center;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.dp-price-psqm {
  font-size: 0.76rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* ── Stats chips row ── */
.dp-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dp-stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  transition: border-color 0.18s;
  min-width: 0;
}
.dp-stat-chip:hover { border-color: var(--gold-light); }
.dp-stat-chip > i {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.dp-stat-chip div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dp-stat-chip strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dp-stat-chip span {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS (description / table / amenities / social / map)
═══════════════════════════════════════════════════════════════════════════ */
.dp-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.dp-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dp-section-title > i {
  font-size: 1.1rem;
  color: var(--gold);
  background: var(--gold-pale);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Description ── */
.dp-description-wrap {
  position: relative;
}
.dp-description {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Fade-out gradient hint shown while description is collapsed */
.dp-description-wrap.is-clamped::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--bg-card) 85%);
  pointer-events: none;
}
.dp-readmore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 8px 16px;
  background: var(--gold-pale);
  border: none;
  border-radius: 50px;
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.dp-readmore:hover { background: var(--gold); color: white; }

/* ── Details grid ── */
.dp-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.dp-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.87rem;
}
.dp-detail-key { color: var(--text-muted); flex-shrink: 0; }
.dp-detail-val {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

/* ── Amenities ── */
.dp-amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}
.dp-amenity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-xs);
  font-size: 0.83rem;
  color: var(--text);
  border: 1px solid transparent;
  transition: border-color 0.18s;
}
.dp-amenity:hover { border-color: var(--gold-light); }
.dp-amenity i {
  color: var(--gold-dark);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.dp-amenity-svg {
  width: 18px;
  height: 18px;
  color: var(--gold-dark);
  flex-shrink: 0;
}

/* ── Social hint ── */
.dp-social-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-light);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dp-social-hint i { color: var(--gold); flex-shrink: 0; }

/* ── Social button row ── */
.dp-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dp-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  transition: transform 0.18s, box-shadow 0.18s;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}
.dp-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  color: white;
}
.dp-social-ext { font-size: 0.75rem; opacity: 0.7; }

.dp-social-btn--yt { background: #ff0000; }
.dp-social-btn--tk { background: linear-gradient(135deg,#14b8b8,#0891b2); }
.dp-social-btn--fb { background: #1877f2; }
.dp-social-btn--ig { background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af); }

/* ── Map ── */
.dp-map-transit-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  margin-bottom: 14px;
}
.dp-map-transit-note i { color: var(--gold-dark); }

.dp-map-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.dp-map {
  width: 100%;
  height: 340px;
  border: none;
  display: block;
}
.dp-map-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 50px;
  background: var(--gold-pale);
  color: var(--gold-dark);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.dp-map-open-btn:hover { background: var(--gold); color: white; }


/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */

/* ── Contact / Agent card ── */
.dp-contact-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Agent strip */
.dpc-agent {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.dpc-agent-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}
.dpc-agent-link:hover { color: inherit; }
.dpc-agent-link:hover .dpc-agent-name { color: var(--gold-dark); }
.dpc-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(215,166,92,.35);
}
.dpc-avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
.dpc-verified-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2e7d32;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  border: 2px solid var(--bg-card);
}
.dpc-agent-info { min-width: 0; }
.dpc-agent-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dpc-agent-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s;
}
.dpc-verified-tag {
  color: #2e7d32;
  font-size: 0.95rem;
  flex-shrink: 0;
  display: inline-flex;
}
.dpc-agent-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dpc-agent-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.dpc-plan-tag,
.dpc-collab-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: var(--gold-pale);
  padding: 2px 9px;
  border-radius: 50px;
}
.dpc-agent-arrow {
  color: var(--text-light);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Tagline / location strip */
.dpc-agent-extra {
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.dpc-agent-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 6px;
}
.dpc-agent-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--text-light);
}
.dpc-agent-location i { color: var(--gold); }

/* Agent quick facts */
.dpc-agent-facts {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.dpc-fact {
  flex: 1;
  text-align: center;
  background: var(--bg-light);
  border-radius: var(--radius-xs);
  padding: 10px 6px;
}
.dpc-fact-val {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dpc-fact-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* CTA buttons */
.dpc-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dpc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'IBM Plex Sans Thai', sans-serif;
  white-space: nowrap;
}
.dpc-btn--phone {
  background: var(--gold);
  color: white;
  box-shadow: 0 2px 12px rgba(215,166,92,.3);
}
.dpc-btn--phone:hover {
  background: var(--gold-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}
.dpc-btn--line {
  background: #06c755;
  color: white;
}
.dpc-btn--line:hover { background: #05a648; color: white; transform: translateY(-1px); }

/* Meta stats */
.dpc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--text-light);
}
.dpc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Share card ── */
.dp-share-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dp-share-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
}
.dp-share-btns {
  display: flex;
  gap: 7px;
}
.dp-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.dp-share-btn:hover { transform: translateY(-2px) scale(1.08); }
.dp-share-btn--copy {
  background: var(--gold-pale);
  color: var(--gold-dark);
}
.dp-share-btn--copy:hover { background: var(--gold); color: white; }
.dp-share-btn--fb   { background: #1877f2; color: white; }
.dp-share-btn--fb:hover   { color: white; }
.dp-share-btn--line { background: #06c755; color: white; }
.dp-share-btn--line:hover { color: white; }

/* ── Sidebar widgets (price/sqm + collab) ── */
.dp-sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dpw-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gold-dark);
  flex-shrink: 0;
}
.dpw-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dpw-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dp-widget-collab {
  background: var(--gold-pale);
  border: 1px solid rgba(215,166,92,.25);
}
.dp-widget-collab .dpw-icon { background: rgba(215,166,92,.2); }


/* ═══════════════════════════════════════════════════════════════════════════
   RELATED LISTINGS
═══════════════════════════════════════════════════════════════════════════ */
.dp-related {
  margin-top: 52px;
}
.dp-related-header {
  margin-bottom: 20px;
}
.dp-related-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.dp-related-grid { margin-top: 0; }


/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════════════════════════════════════ */
.dp-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: white;
  color: var(--text);
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 0.84rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  font-family: 'IBM Plex Sans Thai', sans-serif;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.dp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .dp-layout { grid-template-columns: 1fr 320px; }
}

@media (max-width: 991px) {
  .dp-layout { grid-template-columns: 1fr; }

  /* หมายเหตุ: agent/contact card ไม่ต้องดันขึ้นบนสุดอีกต่อไป (ตัด order:-1 ออก)
     เพราะตอนนี้มี dp-mobile-agentbar แบบ fixed ด้านล่าง (เหนือ bottom nav)
     ทำหน้าที่โชว์ข้อมูล agent + ปุ่มติดต่อด่วนแทนแล้ว ส่วน contact card
     เต็มรูปแบบจะไหลตามลำดับปกติของ sidebar (ต่อจากเนื้อหาหลัก) */
  .dp-sidebar {
    position: static;
  }

  .dpg-slider {
    aspect-ratio: 4 / 3;
    max-height: 420px;
  }

  .dp-details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  /* เพิ่ม padding-bottom พิเศษเพื่อให้เนื้อหาไม่ถูก mobile-agentbar + bottom-nav บัง
     ค่าจาก JS (adjustMobileSpacing) จะ override ค่านี้อัตโนมัติหลัง DOM โหลด */
  .dp-page { padding: 16px 0 160px; }

  .dp-info-card,
  .dp-section {
    padding: 18px;
  }

  .dp-title { font-size: 1.22rem; }
  .dp-price-value { font-size: 1.45rem; }

  .dpg-slider {
    aspect-ratio: 1 / 1;
    max-height: 340px;
  }

  .dpg-arrow { width: 36px; height: 36px; font-size: 0.9rem; }

  .dpc-ctas { grid-template-columns: 1fr 1fr; }

  .dp-map { height: 260px; }
}

@media (max-width: 575px) {
  .dp-stats-row { gap: 7px; }
  .dp-stat-chip { padding: 8px 12px; }
  .dp-stat-chip strong { font-size: 0.92rem; }

  .dp-price-block { gap: 16px; }

  .dp-amenities-grid { grid-template-columns: repeat(2, 1fr); }

  .dpg-thumb { flex: 0 0 62px; width: 62px; height: 47px; }

  .dp-share-card { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .dpg-slide { transition: none; }
  .dp-toast  { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE AGENT BAR (fixed, sits directly above mobile-bottom-nav)
   ── ตามตัวอย่าง LivingInsider: แถบ agent เล็ก ๆ ลอยอยู่เหนือ bottom nav
═══════════════════════════════════════════════════════════════════════════ */
.dp-mobile-agentbar {
  display: none;
}

@media (max-width: 991px) {
  .dp-mobile-agentbar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 70px; /* ความสูงของ .mobile-bottom-nav */
    z-index: 850;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px rgba(0,0,0,.09);
    padding: 9px 14px;
    min-height: 66px;
  }
}

.dpmab-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.dpmab-link:hover { color: inherit; }

.dpmab-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  overflow: hidden;
}
.dpmab-avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
.dpmab-verified {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  border: 2px solid #fff;
}

.dpmab-info { min-width: 0; }
.dpmab-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dpmab-name i { color: #2e7d32; font-size: 0.85rem; flex-shrink: 0; }
.dpmab-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dpmab-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  box-shadow: 0 2px 10px rgba(215,166,92,.35);
  transition: var(--transition);
}
.dpmab-cta:hover { background: var(--gold-dark); }
.dpmab-cta i { font-size: 1rem; }


/* ── Quick-contact bottom sheet (เปิดจากปุ่ม "ติดต่อ" บน mobile agent bar) ── */
.dp-quickcontact-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
}
.dp-quickcontact-sheet.open { display: block; }

.dpqc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .25s ease;
}
.dp-quickcontact-sheet.open .dpqc-backdrop { opacity: 1; }

.dpqc-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .28s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,.2);
}
.dp-quickcontact-sheet.open .dpqc-panel {
  transform: translateY(0);
}
.dpqc-handle {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  margin: 6px auto 14px;
}
.dpqc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-xs);
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}
.dpqc-btn--phone { background: var(--gold); color: #fff; }
.dpqc-btn--line  { background: #06c755; color: #fff; }
.dpqc-btn--cancel { background: var(--bg-light); color: var(--text-muted); margin-bottom: 0; }


/* ═══════════════════════════════════════════════════════════════════════════
   ZOOM BUTTON (เปิด lightbox) บน main slider
═══════════════════════════════════════════════════════════════════════════ */
.dpg-zoom {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 1rem;
  transition: var(--transition);
}
.dpg-zoom:hover { background: var(--gold); }


/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX (ดูภาพ/วิดีโอขยายเต็มจอ พร้อมเลื่อนซ้าย-ขวา — pc / tablet / mobile)
═══════════════════════════════════════════════════════════════════════════ */
.dp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity .22s ease;
}
.dp-lightbox.open {
  display: block;
  opacity: 1;
}
.dpl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,.94);
}

.dpl-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 70px;
  box-sizing: border-box;
}
.dpl-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
  box-sizing: border-box;
  touch-action: pan-y;
}
.dpl-slide.active { display: flex; }

.dpl-img {
  max-width: 100%;
  max-height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  -webkit-user-drag: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
}
.dpl-video {
  max-width: 100%;
  max-height: 100%;
  background: #000;
}
.dpl-embed-wrap {
  width: min(100%, 960px);
  aspect-ratio: 16/9;
  background: #000;
}
.dpl-embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.dpl-slide .dpg-social-card {
  position: static;
  width: min(100%, 520px);
  border-radius: var(--radius);
}

.dpl-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.dpl-close:hover { background: rgba(255,255,255,.24); }

.dpl-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  padding: 6px 14px;
  border-radius: 50px;
  z-index: 10;
}

.dpl-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.dpl-arrow:hover { background: rgba(255,255,255,.28); }
.dpl-arrow--prev { left: 16px; }
.dpl-arrow--next { right: 16px; }

.dpl-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  overflow-x: auto;
  z-index: 10;
}
.dpl-thumb {
  flex: 0 0 58px;
  width: 58px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .55;
  cursor: pointer;
  padding: 0;
  background: #111;
  transition: var(--transition);
}
.dpl-thumb img,
.dpl-thumb .dpg-thumb-social {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.dpl-thumb.active,
.dpl-thumb:hover { opacity: 1; border-color: var(--gold); }

@media (max-width: 767px) {
  .dpl-track, .dpl-slide { padding: 40px 16px 96px; }
  .dpl-arrow { width: 40px; height: 40px; font-size: 1rem; }
  .dpl-arrow--prev { left: 6px; }
  .dpl-arrow--next { right: 6px; }
  .dpl-close { top: 10px; right: 10px; }
  .dpl-counter { top: 14px; left: 14px; }
  .dpl-strip { bottom: 46px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ป้องกันคลิกขวา / คัดลอก / Save As บน Description และรูปภาพ Gallery
   (มาตรการระดับ UX ทั่วไป ไม่สามารถบล็อกได้ 100% เช่นการดูซอร์สโค้ด
   หรือเบราว์เซอร์บางตัวบน Android ที่ยังอนุญาต long-press เมนูของระบบเอง)
═══════════════════════════════════════════════════════════════════════════ */
.dp-description,
.dp-description * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
}

.dpg-img,
.dpg-video,
.dpg-thumb img,
.dpg-thumb-video,
.dpl-img,
.dpl-video,
.dpl-thumb img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

