/* หน้ารายละเอียดโครงการ ดีไซน์ใหม่ (SEO โครงการ B1/B2/B6 · 2026-11-03 · rh_project_detail.php rpd_info/rpd_rows/rpd_near_row)
   โหลดเฉพาะหน้าที่มีบทความหรือสถานที่ใกล้เคียง (rpd_head_css) · ภาพจำลองเจ้าของเคาะ v6 https://claude.ai/artifact/33vunY6dB2HuiWzF2VYULk
   ไม่มีอีโมจิ (ไอคอนเส้นของเว็บ rh_zone_icon) · สีจาก rh_tokens.css */

/* ---------- กล่องแท็บ ---------- */
.rpd-info { margin: 22px 0 0; background: #fff; border: 1px solid var(--color-border, #E3E6EE); border-radius: 16px; padding: 6px 22px 20px; color: var(--color-navy, #0E1E3D); }
.rpd-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--color-border, #E3E6EE); margin: 0 -6px 16px; padding: 0 6px; scrollbar-width: none; }
.rpd-tabs::-webkit-scrollbar { display: none; }
.rpd-tabs button { flex: none; font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; background: none; border: 0; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--color-text-muted, #4A5470); padding: 12px 12px 10px; min-height: 46px; cursor: pointer; }
.rpd-tabs button:hover { color: var(--color-navy, #0E1E3D); }
.rpd-tabs button[aria-selected="true"] { color: var(--color-navy, #0E1E3D); font-weight: 700; border-bottom-color: var(--color-navy, #0E1E3D); }   /* เจ้าของ 11-03: เส้นแดงโค้งดูแปลก → เส้นตรงสีกรม */
.rpd-tabs button:focus-visible, .rpd-stabs button:focus-visible, .rpd-more:focus-visible, .rpd-dots button:focus-visible, .rpd-allsm:focus-visible, .rpd-ncp:focus-visible, .rpd-ncl:focus-visible, .rpd-go:focus-visible { outline: 2px solid var(--color-navy, #0E1E3D); outline-offset: 2px; }
.rpd-ip { padding-top: 14px; scroll-margin-top: 90px; }   /* ลิงก์ #rpd-ip-ov ไม่ให้หัวโดนเมนูบน (fixed 64–68) บัง */
.rpd-tabs + .rpd-ip, .rpd-tabs ~ .rpd-ip { padding-top: 0; }
.rpd-ip[hidden] { display: none; }
.rpd-ip h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--color-navy, #0E1E3D); text-wrap: balance; }
.rpd-ip h3 { margin: 16px 0 4px; font-size: 16px; font-weight: 700; color: var(--color-navy, #0E1E3D); }
.rpd-ip p, .rpd-ip ul { margin: 0 0 8px; font-size: 15px; line-height: 1.7; max-width: 75ch; }
.rpd-ip ul { padding-left: 20px; }
.rpd-ip li { margin: 0 0 4px; }

/* ภาพรวม: พับเหลือไม่กี่บรรทัด + ไล่จาง (JS ใส่ rpd-fold · ปิด JS = เห็นเต็ม) */
.rpd-sum { font-size: 16px !important; }
.rpd-rvx.rpd-fold { max-height: 9.6em; overflow: hidden; position: relative; }
.rpd-rvx.rpd-fold::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.4em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.rpd-more { font: inherit; font-size: 14px; font-weight: 700; color: var(--color-navy, #0E1E3D); background: var(--color-surface-alt, #F4F5F8); border: 0; border-radius: 999px; padding: 8px 18px; min-height: 40px; margin-top: 10px; cursor: pointer; }
.rpd-more:hover { background: var(--color-tag-bg, #EEF0F5); }

/* หน้าต่าง "อ่านข้อมูลเพิ่มเติม" (เจ้าของ 11-03) · JS สร้างตอนกด · มือถือ = แผ่นจากล่าง */
html.rpd-noscroll { overflow: hidden; }
.rpd-dlg { width: min(760px, calc(100vw - 32px)); max-width: none; max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--color-navy, #0E1E3D); box-shadow: 0 20px 60px rgba(14, 30, 61, .3); }
.rpd-dlg[open] { display: flex; flex-direction: column; }
.rpd-dlg::backdrop { background: rgba(10, 15, 40, .45); }
.rpd-dlg-h { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 22px; border-bottom: 1px solid var(--color-border, #E3E6EE); }
.rpd-dlg-h b { flex: 1; min-width: 0; font-size: 17px; line-height: 1.4; }
.rpd-dlg-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--color-surface-alt, #F4F5F8); color: var(--color-navy, #0E1E3D); cursor: pointer; }
.rpd-dlg-x svg { width: 20px; height: 20px; }
.rpd-dlg-x:hover { background: var(--color-tag-bg, #EEF0F5); }
.rpd-dlg-x:focus-visible { outline: 2px solid var(--color-navy, #0E1E3D); outline-offset: 2px; }
.rpd-dlg-b { overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px 22px !important; }

/* ปุ่มใหญ่ 2 อัน แทนกล่องตัวเลข + ปุ่ม (เจ้าของ 11-03 "ดูซ้ำๆ") · ทั้งกล่องกดได้ */
.rpd-hd .rpd-cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 2px; }
.rpd-hd .rpd-ct { display: grid; gap: 0; min-width: 0; padding: 10px 14px; border: 1.5px solid var(--color-navy, #0E1E3D); border-radius: 14px; background: #fff; color: var(--color-navy, #0E1E3D) !important; text-decoration: none !important; transition: transform .18s ease, box-shadow .18s ease, background .15s; }
.rpd-hd .rpd-ct--p { background: var(--color-navy, #0E1E3D); color: #fff !important; }
.rpd-ctg svg { transition: transform .18s ease; }
/* เจ้าของ 11-03: ชี้เมาส์แล้วปุ่มตอบสนอง = ลอยขึ้นนิด + เงา + ลูกศรขยับขวา · กด = ยุบลง (มือถือได้แค่ตอนกด) */
@media (hover: hover) {
  .rpd-hd .rpd-ct:hover { transform: translateY(-2px); background: var(--color-surface-alt, #F4F5F8); box-shadow: 0 8px 18px rgba(14, 30, 61, .14); }
  .rpd-hd .rpd-ct--p:hover { background: var(--color-navy-deep, #0A1630); box-shadow: 0 8px 18px rgba(14, 30, 61, .28); }
  .rpd-hd .rpd-ct:hover .rpd-ctg svg { transform: translateX(3px); }
}
.rpd-hd .rpd-ct:active { transform: translateY(0) scale(.985); box-shadow: none; }
.rpd-hd .rpd-ct:focus-visible { outline: 2px solid var(--color-navy, #0E1E3D); outline-offset: 2px; }
.rpd-hd .rpd-ct .rpd-k { font-size: 13px; color: inherit; opacity: .85; }
.rpd-hd .rpd-ct .rpd-v { font-size: 21px; color: inherit; }
.rpd-hd .rpd-ct .rpd-s { font-size: 12.5px; color: inherit; opacity: .85; }
.rpd-ctg { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13.5px; font-weight: 700; }
.rpd-ctg svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .rpd-hd .rpd-ct, .rpd-ctg svg { transition: none; } .rpd-hd .rpd-ct:hover, .rpd-hd .rpd-ct:active, .rpd-hd .rpd-ct:hover .rpd-ctg svg { transform: none !important; } }

/* ข้อมูลโครงการ */
.rpd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.rpd-facts > div { background: var(--color-surface-alt, #F4F5F8); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.rpd-facts dt { font-size: 13px; font-weight: 500; color: var(--color-text-muted, #4A5470); }
.rpd-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.rpd-src { font-size: 12.5px !important; color: var(--color-text-muted, #4A5470); margin-top: 6px !important; }
.rpd-src a { color: var(--color-text-muted, #4A5470); text-decoration: underline; }

/* ที่ตั้งและสถานที่ใกล้เคียง: แผนที่เดิมซ้าย · แท็บย่อย + รายการขวา */
.rpd-loc { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; align-items: start; }   /* เจ้าของ 11-03: แผนที่เล็กลง (เดิม 1.1 : 1) */
.rpd-loc--nomap { grid-template-columns: minmax(0, 1fr); }
.rpd-lmap iframe { display: block; width: 100% !important; height: 290px !important; min-height: 0; border: 0; border-radius: 12px; }
.rpd-lp { min-width: 0; }
.rpd-stabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin: 0 0 10px; scrollbar-width: none; }
.rpd-stabs::-webkit-scrollbar { display: none; }
.rpd-stabs button { flex: none; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid var(--color-border, #E3E6EE); background: #fff; color: var(--color-navy, #0E1E3D); border-radius: 999px; padding: 4px 14px; min-height: 38px; cursor: pointer; }
.rpd-stabs button[aria-selected="true"] { background: var(--color-navy, #0E1E3D); border-color: var(--color-navy, #0E1E3D); color: #fff; }
.rpd-pl[hidden] { display: none; }
.rpd-pl h3 { margin: 0 0 6px; font-size: 15px; }
.rpd-stabs ~ .rpd-pl h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* มีแท็บย่อยแล้ว = หัวรายการซ่อนจากตา (ยังอ่านได้) */
.rpd-pl ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border, #E3E6EE); border-radius: 12px; max-width: none; }
.rpd-pl li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; margin: 0; border-top: 1px solid var(--color-border, #E3E6EE); font-size: 14.5px; line-height: 1.45; }
.rpd-pl li:first-child { border-top: 0; }
.rpd-pn { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rpd-pn a { color: var(--color-navy, #0E1E3D); font-weight: 600; }
.rpd-pn small { color: var(--color-text-muted, #4A5470); font-size: 12.5px; }
.rpd-pl li b { flex: none; font-variant-numeric: tabular-nums; font-size: 14px; }
.rpd-d { flex: none; display: grid; justify-items: end; line-height: 1.3; }
.rpd-d small { font-size: 12px; color: var(--color-text-muted, #4A5470); white-space: nowrap; }
.rpd-pin { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--color-border-strong, #C9CFDC); }
.rpd-note { font-size: 12.5px !important; color: var(--color-text-muted, #4A5470); margin: 8px 0 0 !important; }
.rpd-note a { color: var(--color-text-muted, #4A5470); text-decoration: underline; }
.rpd-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--color-navy, #0E1E3D); }
.rpd-go svg { width: 14px; height: 14px; }

/* ---------- แถวเลื่อนดู (ห้องเช่า · ห้องขาย · โครงการใกล้เคียง) ---------- */
.rpd-rowsec .rpd-sh { display: flex; align-items: center; }
.rpd-rowsec .rpd-sh h2 { min-width: 0; }
.rpd-rowsec .rpd-sh a.rpd-allsm { display: inline-flex; flex: none; align-items: center; min-height: 38px; padding: 4px 14px; border: 1px solid var(--color-navy, #0E1E3D); border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--color-navy, #0E1E3D); text-decoration: none; }
.rpd-rowsec .rpd-sh a.rpd-allsm:hover { background: var(--color-surface-alt, #F4F5F8); }
.rpd-row { display: grid !important; grid-auto-flow: column; grid-auto-columns: calc((100% - 42px) / 4); grid-template-columns: none !important; gap: 14px !important; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: none; }
.rpd-row::-webkit-scrollbar { display: none; }   /* เจ้าของ 11-03: แถบเลื่อนไม่สวย → เลื่อนด้วยลูกศร/จุด/ปัดนิ้ว */
.rpd-row > * { scroll-snap-align: start; min-width: 0; }
@media (prefers-reduced-motion: no-preference) { .rpd-row { scroll-behavior: smooth; } }
/* ปุ่มลูกศรซ้าย/ขวาบนขอบแถว (เจ้าของขอ 11-03) · วงกลมขาว + เงา · โผล่เฉพาะเมื่อเลื่อนได้ทางนั้น · มือถือ/จอสัมผัสซ่อน (ปัดนิ้ว) */
.rpd-rw { position: relative; }
.rpd-arr { position: absolute; top: 42%; z-index: 3; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--color-border, #E3E6EE); background: #fff; color: var(--color-navy, #0E1E3D); box-shadow: 0 4px 14px rgba(14, 30, 61, .18); cursor: pointer; }
.rpd-arr svg { width: 20px; height: 20px; }
.rpd-arr:hover { background: var(--color-surface-alt, #F4F5F8); }
.rpd-arr:focus-visible { outline: 2px solid var(--color-navy, #0E1E3D); outline-offset: 2px; }
.rpd-arr--l { left: 4px; }
.rpd-arr--r { right: 4px; }
.rpd-arr[hidden] { display: none; }
@media (hover: none), (max-width: 640px) { .rpd-arr { display: none !important; } }
.rpd-dots { display: flex; justify-content: center; gap: 6px; min-height: 8px; margin-top: 4px; }
.rpd-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--color-border-strong, #C9CFDC); cursor: pointer; transition: width .25s ease, background .25s ease; }
.rpd-dots button[aria-current="true"] { width: 28px; background: var(--color-navy, #0E1E3D); }
@media (prefers-reduced-motion: reduce) { .rpd-dots button { transition: none; } }

/* การ์ดโครงการใกล้เคียง */
.rpd-nc { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border, #E3E6EE); border-radius: 14px; overflow: hidden; }
.rpd-ncp { display: grid; gap: 2px; color: var(--color-navy, #0E1E3D) !important; text-decoration: none !important; padding-bottom: 8px; }
.rpd-ncp img, .rpd-nc .rpd-noimg { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--color-border, #E3E6EE); margin-bottom: 6px; }
.rpd-ncp b { padding: 0 12px; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rpd-ncp span { padding: 0 12px; font-size: 13px; color: var(--color-text-muted, #4A5470); }
.rpd-ncl { display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 48px; border-top: 1px solid var(--color-border, #E3E6EE); color: var(--color-navy, #0E1E3D) !important; text-decoration: none !important; }
.rpd-ncl:hover { background: var(--color-surface-alt, #F4F5F8); }
.rpd-ncl span { flex: 1; min-width: 0; display: grid; }
.rpd-ncl b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpd-ncl small { font-size: 12.5px; color: var(--color-text-muted, #4A5470); }
.rpd-ncl svg { width: 14px; height: 14px; flex: none; }

@media (max-width: 991px) {
  .rpd-loc { grid-template-columns: minmax(0, 1fr); }
  .rpd-lmap iframe { height: 260px !important; }
  .rpd-row { grid-auto-columns: calc((100% - 28px) / 3); }
}
@media (max-width: 640px) {
  .rpd-info { padding: 2px 14px 16px; border-radius: 14px; }
  .rpd-tabs { margin: 0 -2px 12px; padding: 0 2px; }
  .rpd-tabs button { font-size: 14px; padding: 10px 10px 8px; }
  .rpd-tl { display: none; }
  .rpd-ip h2 { font-size: 18px; }
  .rpd-ip p, .rpd-ip ul { font-size: 14.5px; }
  .rpd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rpd-lp { order: -1; }
  .rpd-lmap iframe { height: 220px !important; }
  .rpd-dlg { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .rpd-dlg-h { position: relative; padding: 14px 10px 10px 16px; }
  .rpd-dlg-h::before { content: ""; position: absolute; left: 50%; top: 5px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--color-border-strong, #C9CFDC); }   /* ขีดบอกว่าปัดลงได้ */
  .rpd-dlg-b { padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px)) !important; }
  .rpd-hd .rpd-ct { padding: 9px 12px; }
  .rpd-hd .rpd-ct .rpd-v { font-size: 19px; }
  .rpd-rowsec .rpd-sh { display: flex; gap: 10px; }
  .rpd-rowsec .rpd-sh h2 { font-size: 17px; }
  .rpd-rowsec .rpd-sh a.rpd-allsm { min-height: 36px; padding: 3px 10px; font-size: 13px; }
  .rpd-row { grid-auto-columns: 74%; gap: 10px !important; }
  .rpd-ncp img, .rpd-nc .rpd-noimg { height: 120px; }
}
