/* ChanSpace listing detail page — extends tokens in styles.css, layout from home.css */
/* Elderly-friendly: 17-18px+ body text, 48px+ targets, contact block is the dominant element. */

.detail-main { padding: 28px 0 72px; }

/* Accessibility floor: nothing under 15px, even in the shared nav/footer from home.css */
.detail-page .nav-links a,
.detail-page .saved-link,
.detail-page .btn-post,
.detail-page .footer-links a,
.detail-page .footer-tagline,
.detail-page .footer-bottom { font-size: 0.95rem; }

.back-listings {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 20px;
}
.back-listings:hover { color: var(--forest-ink); text-decoration: underline; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

/* ===== Gallery ===== */
.gallery-main {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: linear-gradient(135deg, #E7EFDD, #A9C4B6);
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 2px solid transparent;
}
.gallery-thumb-a { background: linear-gradient(135deg, #F1EFE6, #D8CFB8); }
.gallery-thumb-b { background: linear-gradient(135deg, #E4EEE9, #A9C4B6); }
.gallery-thumb-c { background: linear-gradient(135deg, #ECEEDA, #C7CE9C); }
.gallery-thumb-d { background: linear-gradient(135deg, #E7EFDD, #B9CFA1); }

/* ===== Heading ===== */
.detail-heading { margin-top: 28px; }
.category-pill-static {
  position: static;
  display: inline-block;
  background: var(--forest);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.detail-heading .agent-badge,
.detail-heading .verified-badge,
.detail-heading .phone-verified-badge {
  margin-left: 8px;
  margin-bottom: 12px;
  vertical-align: middle;
}
.detail-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--ink);
}
.detail-loc {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0;
}
.detail-posted-date {
  font-size: 0.95rem;
  color: var(--ink-mute);
  margin: 6px 0 0;
}

.detail-price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--gold);
  margin: 18px 0 0;
}

/* ===== Contact box (shared styling; two placements) ===== */
.contact-box {
  background: var(--forest);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(22, 76, 59, 0.25);
}
.contact-panel-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.contact-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lime);
  margin: 0;
}
.btn-call {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  min-height: 60px;
  border-radius: 12px;
  text-align: center;
}
.btn-call:hover { filter: brightness(1.08); }
.btn-line {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--forest);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 52px;
  border-radius: 12px;
  border: 2px solid var(--lime);
  text-align: center;
}
.btn-line:hover { background: var(--surface-2); }
.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 52px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  text-align: center;
  cursor: pointer;
  width: 100%;
}
.btn-share:hover { border-color: var(--lime); background: rgba(255, 255, 255, 0.08); }
.contact-hint {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Desktop sticky panel, mobile inline block */
.contact-box-desktop {
  position: sticky;
  top: 96px;
}
.contact-box-mobile { display: none; }

/* ===== Facts ===== */
.detail-subhead {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 16px;
}
.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 20px;
}
.fact-item { display: flex; flex-direction: column; gap: 4px; }
.fact-label { font-size: 0.95rem; color: var(--ink-soft); font-weight: 500; }
.fact-value { font-size: 1.15rem; color: var(--ink); font-weight: 700; }

.trust-badge-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
  background: var(--surface-2);
  padding: 10px 16px;
  border-radius: 10px;
}

.detail-desc {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0;
}

/* ===== Map embed (Longdo Map) ===== */
.map-embed {
  height: 260px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
}
.map-canvas {
  width: 100%;
  height: 100%;
}
.map-fallback-note {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--ink-mute);
}

.report-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.95rem;
  color: var(--ink-mute);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}
.report-link:hover { color: var(--ink-soft); }

.report-form[hidden] {
  display: none;
}
.report-form {
  margin-top: 16px;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 20px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.report-field select,
.report-field textarea {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
}
.report-field select { min-height: 52px; }
.report-field select:focus,
.report-field textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; }

.btn-report-submit {
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 24px;
  min-height: 52px;
  cursor: pointer;
  align-self: flex-start;
}
.btn-report-submit:hover { filter: brightness(1.08); }
.btn-report-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.report-confirm {
  font-size: 0.95rem;
  color: var(--forest);
  font-weight: 600;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; gap: 0; }
  .contact-box-desktop { display: none; }
  .contact-box-mobile { display: flex; margin: 18px 0 8px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .detail-title { font-size: 1.55rem; }
  .detail-price { font-size: 2rem; }
  .fact-grid { grid-template-columns: 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(2, 1fr); }
  .btn-call { min-height: 56px; font-size: 1.05rem; }
}
