/* การ์ดห้องหน้ารายการ (รีดีไซน์ 2026-10-07 · rh_cards_lib.php) · แบบตารางทุกจอ ไม่มีปุ่มสลับ (เจ้าของเคาะ 2026-10-08 · 3i + มือถือ = ตาราง 3l):
   .rhv--a ตาราง มือถือ 2 · แท็บเล็ต 3 · คอม 4 (.rhv--narrow หน้าค้นตามโครงการ = 3) · .rhv--side = กล่องข้าง (ตาราง 2 คอลัมน์ตายตัว)
   ไอคอน = CSS mask (ไม่ฝัง SVG ในการ์ด 100 ใบ = HTML เบา) · ทุก class ขึ้นต้น rhc-/rhv- (กันชน Bootstrap) */
.rhv { --rhc-ink: #17213A; --rhc-muted: #5B6578; --rhc-line: #E3E8F0; --rhc-price: #1F4FB5; --rhc-soft: #F4F6FA;
  display: grid; gap: 12px; margin: 0 15px; font-size: 14px; line-height: 1.45; color: var(--rhc-ink); }
.rhv * { box-sizing: border-box; }
.rhc { position: relative; display: grid; min-width: 0; background: #fff; border: 1px solid var(--rhc-line); border-radius: 14px; overflow: hidden;
  color: var(--rhc-ink); text-decoration: none; transition: box-shadow .15s, border-color .15s, transform .2s ease; }
.rhc:hover, .rhc:focus { color: var(--rhc-ink); text-decoration: none; border-color: #C9D3E6; box-shadow: 0 6px 18px rgba(20, 30, 80, .10); }
.rhc:focus-visible { outline: 3px solid rgba(31, 79, 181, .45); outline-offset: 2px; }
.rhc > span { min-width: 0; }
/* แสดง/ซ่อนต่อชิ้นแบบเจาะจง (ห้ามใช้ .rhc > span { display } = ชนะกติกาซ่อน → ชิ้นที่ไม่มีช่องในมุมมองนั้นสร้างคอลัมน์เกินแย่งที่) */
.rhc-img, .rhc-price, .rhc-title, .rhc-proj, .rhc-loc, .rhc-st, .rhc-code { display: block; }
.rhc-img { grid-area: img; background: #DDE3EC; overflow: hidden; }
.rhc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ป้ายบนรูป: แนะนำ (plot_name) ซ้ายบน · ใหม่/อัปเดต ขวาบน (เจ้าของ 2026-10-09 "แนะนำอยู่ซ้ายเหมือนเดิม") · กล่องเดียวกางเต็มความกว้างรูป = ไม่ทับกัน (แคบ = ใหม่/อัปเดตตกบรรทัดชิดขวา) */
.rhc-flags { grid-area: img; justify-self: stretch; align-self: start; z-index: 1; margin: 8px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.rhc-flags .rhc-rec { margin-right: auto; }
.rhc-rec, .rhc-tag { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.45; white-space: nowrap; }
.rhc-rec { background: #FFB020; color: #2B1D00; }
.rhc-rec::before { content: "★ "; }
.rhc-tag { background: #C62F22; color: #fff; }
.rhc-tag-upd { background: #1F4FB5; } /* อัปเดต = น้ำเงิน คนละสีกับ ใหม่ (เจ้าของ 3d) */
/* ใหม่/อัปเดต กระพริบตลอดแบบเว็บเดิม (เจ้าของเลือก 2026-10-09 · เดิม .in-new/.in-update: opacity 1→0.2 ทุก 1 วิ) · ตั้งมือถือ "ลดการเคลื่อนไหว" = นิ่ง */
.rhc-tag { animation: rhc-blink 1s cubic-bezier(.5, 0, 1, 1) infinite; }
@keyframes rhc-blink { from { opacity: 1; } to { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .rhc-tag { animation: none; } }
.rhc-price { grid-area: price; white-space: nowrap; }
.rhc-price b { font-size: 18px; font-weight: 700; color: var(--rhc-price); }
.rhc-price small { font-size: 12px; color: var(--rhc-muted); margin-left: 2px; }
/* หัวข้อประกาศเดิม 1 บรรทัด (ขึ้นต้นด้วยรหัสห้อง = แคปการ์ดแล้วเห็นรหัส) · ชื่อเต็มอยู่ใน title ของลิงก์ */
.rhc-title { grid-area: title; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhc-proj { grid-area: proj; position: relative; padding-left: 18px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--rhc-price); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhc-loc, .rhc-st { position: relative; padding-left: 17px; font-size: 12.5px; color: var(--rhc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhc-loc { grid-area: loc; }
.rhc-st { grid-area: st; }
.rhc-facts { grid-area: facts; display: flex; flex-wrap: wrap; align-content: flex-start; align-self: start; gap: 2px 10px; font-size: 12.5px; color: #36405A; }
.rhc-f { display: inline-flex; align-items: center; gap: 3px; }
.rhc-status { grid-area: status; justify-self: start; align-self: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rhc-s-free { background: #DFF3E7; color: #11603A; }
.rhc-s-soon, .rhc-s-booked { background: #FFEFD2; color: #7A4300; }
.rhc-s-done { background: #E9ECF2; color: #3F4A60; }
.rhc-code { grid-area: code; justify-self: end; align-self: center; font-size: 11.5px; color: var(--rhc-muted); white-space: nowrap; }
/* อัปเดตล่าสุด <วันที่> ทุกมุมมอง (การ์ดเดิมมีทุกใบ · ลูกค้าดูความสด · เจ้าของ 3d) · กล่องข้างซ่อน (แคบ) */
.rhc-upd { grid-area: upd; display: block; font-size: 11.5px; color: var(--rhc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ไอคอน */
.rhc-proj::before, .rhc-loc::before, .rhc-st::before, .rhc-f::before { content: ""; flex: none; background: currentColor;
  -webkit-mask: var(--rhi) no-repeat center / contain; mask: var(--rhi) no-repeat center / contain; }
.rhc-proj::before, .rhc-loc::before, .rhc-st::before { position: absolute; left: 0; top: 50%; width: 13px; height: 13px; margin-top: -7px; }
.rhc-proj::before { width: 14px; height: 14px; }
.rhc-f::before { width: 13px; height: 13px; }
.rhc-proj { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M2.5 14.5V3.2L9 1.5v13M9 6.5l4.5 1.5v6.5M1 14.5h14'/%3E%3Cpath d='M5 5h1.5M5 7.8h1.5M5 10.6h1.5M11 10h.5M11 12.3h.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.rhc-loc { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M8 14.5s4.5-4.2 4.5-7.8A4.5 4.5 0 0 0 3.5 6.7C3.5 10.3 8 14.5 8 14.5z'/%3E%3Ccircle cx='8' cy='6.7' r='1.6'/%3E%3C/svg%3E"); }
.rhc-st { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='4' y='1.8' width='8' height='9.5' rx='2.2'/%3E%3Cpath d='M4 7h8M6 14.2l1-2.9M10 14.2l-1-2.9'/%3E%3C/svg%3E"); }
.rhc-f-area, .rhc-f-land { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='2.5' y='2.5' width='11' height='11' rx='1.5'/%3E%3Cpath d='M5.5 10.5l5-5M8 5.5h2.5V8'/%3E%3C/svg%3E"); }
.rhc-f-room { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M1.5 12.5v-8M1.5 10h13v2.5M14.5 10V8.2a2 2 0 0 0-2-2H7V10'/%3E%3Ccircle cx='4.3' cy='7.7' r='1.3'/%3E%3C/svg%3E"); }
.rhc-f-bath { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2 8h12v1.5a3.5 3.5 0 0 1-3.5 3.5h-5A3.5 3.5 0 0 1 2 9.5V8zM4 8V3.8a1.8 1.8 0 0 1 3.2-1.2'/%3E%3C/svg%3E"); }
.rhc-f-floor, .rhc-f-bld { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M8 2l6 3-6 3-6-3 6-3zM2 8l6 3 6-3M2 11l6 3 6-3'/%3E%3C/svg%3E"); }

/* A ตาราง · มือถือ 2 · แท็บเล็ต 3 · จอคอม 4 คอลัมน์ */
.rhv--a { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rhv--a .rhc { grid-template-columns: minmax(0, 1fr) auto; align-content: start;
  grid-template-areas: "img img" "price price" "title title" "proj proj" "loc loc" "facts facts" "upd upd" "status code"; grid-template-rows: auto auto auto auto auto 1fr auto auto; }
.rhv--a .rhc-img { aspect-ratio: 4 / 3; }
.rhv--a .rhc-price { margin: 9px 10px 4px; }
.rhv--a .rhc-title { margin: 0 10px 3px; font-size: 13.5px; }
.rhv--a .rhc-proj { margin: 0 10px 4px; font-size: 12.5px; }
.rhv--a .rhc-loc { margin: 0 10px 5px; }
.rhv--a .rhc-facts { margin: 0 10px 6px; }
.rhv--a .rhc-upd { margin: 0 10px 6px; }
.rhv--a .rhc-status { margin: 0 0 10px 10px; }
.rhv--a .rhc-code { margin: 0 10px 10px 6px; }
.rhv--a .rhc-st, .rhv--a .rhc-f-bath, .rhv--a .rhc-f-bld { display: none; }
@media (min-width: 768px) { .rhv--a { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1200px) { .rhv--a { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rhv--a.rhv--narrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* narrow = ช่อง 9/12 หน้าค้นตามโครงการ (ข้อ ก) */

/* กล่องข้าง "โครงการใกล้เคียง" (หน้าค้นตามโครงการ · คอลัมน์ขวาแคบ) = ตาราง 2 คอลัมน์ตายตัว ไม่มีปุ่มสลับ */
.rhv.rhv--side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.rhv--side .rhc-price b { font-size: 15px; }
.rhv--side .rhc-title { font-size: 13px; }
.rhv--side .rhc-proj { font-size: 12px; }
.rhv--side .rhc-facts, .rhv--side .rhc-loc { font-size: 11.5px; }
.rhv--side .rhc-f-floor, .rhv--side .rhc-upd { display: none; }

/* กล่องประเภท (index_panel_catalog.php) แบบย่อ · คำอธิบายพับ 2 บรรทัด + อ่านต่อ (สคริปต์สั้นในกล่อง ใส่ก่อนวาด · ไม่มี JS = เห็นเต็ม) */
.rhcat { background: #fff; border: 1px solid #E3E8F0; border-radius: 14px; padding: 12px 14px; color: #17213A; }
.rhcat-name { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.rhcat-name a { color: #1F4FB5; }
.rhcat-detail { font-size: 14px; line-height: 1.6; color: #36405A; }
.rhcat-detail p { margin: 0; }
.rhcat--js .rhcat-detail { max-height: 3.2em; overflow: hidden; }
.rhcat--js.rhcat--open .rhcat-detail { max-height: none; }
.rhcat-more { border: 0; background: none; padding: 4px 0; color: #1F4FB5; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rhcat-links { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rhcat-links a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px; background: #EEF2FB; color: #1F4FB5; font-size: 14px; font-weight: 600; text-decoration: none; }
.rhcat-links a:hover, .rhcat-links a:focus { background: #DDE5F7; text-decoration: none; }

/* เลขหน้าแบบย่อ (index_pagenum_short.php) · ทับสไตล์ .pagination ของ Bootstrap 3 · มือถือซ่อนหน้า ±2 */
.pagination.rhpg { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 24px 0; padding: 0; }
.pagination.rhpg > li { display: block; }
.pagination.rhpg > li > a, .pagination.rhpg > li > span { float: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; margin: 0;
  border: 1px solid #CFD6E4; border-radius: 12px; background: #fff; color: #17213A; font-size: 15px; line-height: 1; }
.pagination.rhpg > li > a:hover { background: #EEF2FB; border-color: #9FB1DF; }
.pagination.rhpg > .active > a, .pagination.rhpg > .active > a:hover { background: #1F4FB5; border-color: #1F4FB5; color: #fff; font-weight: 700; }
.pagination.rhpg > .disabled > a { color: #9AA3B5; background: #fff; }
.pagination.rhpg > .rhpg-gap > span { min-width: 16px; padding: 0; border: 0; background: none; color: #5B6578; }
@media (max-width: 479px) {
  .pagination.rhpg { gap: 3px; }
  .pagination.rhpg > li > a, .pagination.rhpg > li > span { min-width: 38px; height: 40px; padding: 0 8px; font-size: 14px; }
  .pagination.rhpg > .rhpg-gap > span { min-width: 12px; }
  .pagination.rhpg > .rhpg-far { display: none; }
}

/* ===== หัวโครงการ หน้าค้นตามโครงการ (รีดีไซน์ ① 3m · แบบ ก "รูปจางซ้าย" · rh_project_head.php) =====
   คอม ≥ 1200: รูปซ้าย 300px จางเข้าข้อความ + กล่อง เช่า|ขาย|รายละเอียดโครงการ แถวเดียว · 768–1199: รูป 240px กล่อง 2+1 · มือถือ < 768: รูปบน 2:1 จางลงล่าง กล่อง 2+1
   ทุก class ขึ้นต้น rhp- (กันชน Bootstrap) · ไอคอน = CSS mask แบบการ์ด */
.rhp { --rhp-ink: #17213A; --rhp-muted: #5B6578; --rhp-line: #E3E8F0; --rhp-blue: #1F4FB5; --rhp-soft: #F4F6FA; --rhp-chip: #EEF2FB;
  position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); background: #fff; border: 1px solid var(--rhp-line); border-radius: 16px;
  overflow: hidden; box-shadow: 0 4px 18px rgba(20, 30, 80, .07); color: var(--rhp-ink); font-size: 14px; line-height: 1.5; }
.rhp * { box-sizing: border-box; }
.rhp a, .rhp a:hover, .rhp a:focus { text-decoration: none; }
.rhp--nophoto { grid-template-columns: minmax(0, 1fr); }
.rhp-photo { position: relative; min-height: 236px; background: #DDE3EC; }
.rhp-cover, .rhp-cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.rhp-cover img { display: block; object-fit: cover; }
.rhp-photo::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; background: linear-gradient(to right, rgba(255, 255, 255, 0) 55%, #fff 99%); }
/* แถบปุ่มเต็มกว้างรูป: ดูแผนที่ ซ้าย · แชร์ ขวา (แบบ ค) · แถบไม่รับคลิก (คลิกช่องว่างระหว่างปุ่ม = ลิงก์รูปเหมือนเดิม) */
.rhp-btns { position: absolute; z-index: 1; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.rhp-btns > * { pointer-events: auto; }
.rhp-btns .rhp-rb { margin-left: auto; }
.rhp-rb { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--rhp-ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 30, 80, .18); }
.rhp-rb:hover, .rhp-rb:focus { color: var(--rhp-blue); }
.rhp-mapbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; background: #fff; color: var(--rhp-blue);
  font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 8px rgba(20, 30, 80, .18); }
.rhp a.rhp-mapbtn:hover, .rhp a.rhp-mapbtn:focus { color: var(--rhp-blue); background: var(--rhp-chip); }
.rhp-body { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 18px 22px 18px 6px; }
.rhp--nophoto .rhp-body { padding: 16px 20px; }
.rhp-name { font-size: 19px; font-weight: 600; line-height: 1.4; color: var(--rhp-ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rhp-name:hover, .rhp-name:focus { color: var(--rhp-blue); }
.rhp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--rhp-muted); }
.rhp-type { padding: 0 8px; border-radius: 6px; background: var(--rhp-chip); color: var(--rhp-blue); font-weight: 600; }
.rhp-loc, .rhp-st { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.rhp-minis { display: inline-flex; gap: 6px; }
.rhp-mini { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 12px; border: 1px solid var(--rhp-line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 12.5px; color: var(--rhp-ink); cursor: pointer; }
.rhp-mini:hover, .rhp-mini:focus { color: var(--rhp-blue); border-color: #9FB1DF; }
.rhp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rhp-tile { display: grid; min-width: 0; padding: 8px 12px; border: 1px solid var(--rhp-line); border-radius: 12px; color: var(--rhp-ink); transition: border-color .15s, box-shadow .15s, transform .2s ease; }
.rhp-tile:hover, .rhp-tile:focus { color: var(--rhp-ink); border-color: #9FB1DF; box-shadow: 0 4px 12px rgba(20, 30, 80, .08); }
.rhp-k { font-size: 12.5px; color: var(--rhp-muted); }
.rhp-v { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--rhp-blue); white-space: nowrap; }
.rhp-s { font-size: 12px; color: var(--rhp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhp-go { align-content: center; border-color: transparent; background: var(--rhp-chip); }
.rhp-go .rhp-v { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.rhp-detail { padding: 10px 14px; border-radius: 12px; background: var(--rhp-soft); font-size: 13.5px; color: #36405A; }
.rhp-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--rhp-blue); }
.rhp-detail p { margin: 0; overflow-wrap: anywhere; }
.rhp-clamp p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rhp-clamp.rhp-open p { display: block; }
.rhp-more { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--rhp-blue); cursor: pointer; }
.rhp-more[hidden] { display: none; }
.rhp-toast { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 999px;
  background: #17213A; color: #fff; font-size: 13px; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(20, 30, 80, .25); }
.rhp-toast[hidden] { display: none; }
.rhp a:focus-visible, .rhp button:focus-visible { outline: 3px solid rgba(31, 79, 181, .45); outline-offset: 2px; }
/* ไอคอน */
.rhp-rb::before, .rhp-mini::before, .rhp-loc::before, .rhp-st::before, .rhp-go .rhp-v::after, .rhp-more::after, .rhp-mapbtn::before, .rhp-mapbtn::after { content: ""; flex: none; background: currentColor;
  -webkit-mask: var(--rhi) no-repeat center / contain; mask: var(--rhi) no-repeat center / contain; }
.rhp-rb::before { width: 18px; height: 18px; }
.rhp-mapbtn::before { width: 16px; height: 16px; }
.rhp-mapbtn::after { width: 12px; height: 12px; --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11 11 5M6.2 5H11v4.8'/%3E%3C/svg%3E"); }
.rhp-mini::before, .rhp-loc::before, .rhp-st::before, .rhp-go .rhp-v::after, .rhp-more::after { width: 14px; height: 14px; }
.rhp-i-map { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M9 4 3.5 6v14L9 18l6 2 5.5-2V4L15 6 9 4zM9 4v14M15 6v14'/%3E%3C/svg%3E"); }
.rhp-i-share { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='18' cy='5.5' r='2.5'/%3E%3Ccircle cx='6' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='18.5' r='2.5'/%3E%3Cpath d='m8.2 10.8 7.6-4M8.2 13.2l7.6 4'/%3E%3C/svg%3E"); }
.rhp-loc { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M8 14.5s4.5-4.2 4.5-7.8A4.5 4.5 0 0 0 3.5 6.7C3.5 10.3 8 14.5 8 14.5z'/%3E%3Ccircle cx='8' cy='6.7' r='1.6'/%3E%3C/svg%3E"); }
.rhp-st { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='4' y='1.8' width='8' height='9.5' rx='2.2'/%3E%3Cpath d='M4 7h8M6 14.2l1-2.9M10 14.2l-1-2.9'/%3E%3C/svg%3E"); }
.rhp-go .rhp-v::after { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
.rhp-more::after { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); transition: transform .15s; }
.rhp-open .rhp-more::after { transform: rotate(180deg); }
/* แท็บเล็ต / คอมจอเล็ก: รูปแคบลง · กล่อง เช่า|ขาย 2 ช่อง + รายละเอียดโครงการเต็มแถว */
@media (max-width: 1199px) {
  .rhp { grid-template-columns: 240px minmax(0, 1fr); }
  .rhp--nophoto { grid-template-columns: minmax(0, 1fr); }
  .rhp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rhp-go { grid-column: 1 / -1; min-height: 40px; padding: 6px 12px; }
  .rhp-go .rhp-k { display: none; }
  .rhp-go .rhp-v { justify-content: space-between; }
}
/* มือถือ: รูปบน 2:1 จางลงล่าง (เดิมรูปจัตุรัสเต็มจอ) · ชื่อ 2 บรรทัด · ซ่อนป้าย "รายละเอียด" */
@media (max-width: 767px) {
  .rhp { grid-template-columns: minmax(0, 1fr); }
  .rhp-photo { min-height: 0; aspect-ratio: 2 / 1; max-width: 100%; }
  .rhp-photo::after { background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 60%, #fff 99%); }
  .rhp-body { padding: 4px 14px 16px; }
  .rhp--nophoto .rhp-body { padding: 14px 14px 16px; }
  .rhp-name { font-size: 16px; }
  .rhp-lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rhp-tile, .rhp-more::after { transition: none; } }
/* ชี้เมาส์ = การ์ดลอยขึ้นนิดหน่อย (เจ้าของขอ 2026-10-09) · เฉพาะเครื่องที่ชี้เมาส์ได้ (มือถือแตะแล้วไม่ค้าง) · ตั้งให้ลดการเคลื่อนไหว = ไม่ลอย · การ์ดแบบเดิมอยู่ใน index_head.php */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .rhc:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(20, 30, 80, .14); }
  .rhp-tile:hover { transform: translateY(-3px); }
}

/* ===== โครงการใกล้เคียง + ทำเลใกล้เคียง คอลัมน์ขวาหน้าค้นตามโครงการ (รีดีไซน์ ① 3k · rh_nearby_projects.php) =====
   รายชื่อแบบเดียวกันทุกจอ (มือถือ = ทาง ข เจ้าของเลือก 2026-10-08): รูป + ชื่อ 2 บรรทัด + ระยะ/ทำเล + ปุ่ม เช่า N / ขาย N
   คอม ≥ 1200 รูป 60 · 992–1199 (คอลัมน์ ~212px) รูป 48 · < 992 (คอลัมน์ขวาไปต่อท้ายรายการ เต็มกว้าง) รูป 64 ปุ่มสูงขึ้นให้นิ้วกด */
.rhn { --rhn-ink: #17213A; --rhn-muted: #5B6578; --rhn-line: #E3E8F0; --rhn-blue: #1F4FB5; --rhn-chip: #EEF2FB;
  margin-top: 30px; color: var(--rhn-ink); font-size: 14px; line-height: 1.45; }
.rhn * { box-sizing: border-box; }
.rhn a, .rhn a:hover, .rhn a:focus { text-decoration: none; }
.rhn-h { margin: 0; font-size: 18px; font-weight: 600; color: var(--rhn-ink); }
.rhn-sub { margin: 0 0 8px; font-size: 12.5px; color: var(--rhn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhn-list { display: grid; }
.rhn-i { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--rhn-line); }
.rhn-i:first-child { border-top: 0; padding-top: 4px; }
.rhn-img { display: block; width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: #DDE3EC no-repeat center / 26px; }
.rhn-img:empty { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A94A8' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l9-2.5V21M13 9l7 2.3V21M2 21h20M7 8h2M7 12h2M7 16h2M16 15h1M16 18h1'/%3E%3C/svg%3E"); }
.rhn-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rhn-body { display: grid; gap: 3px; align-content: start; min-width: 0; }
.rhn-name { font-weight: 600; line-height: 1.35; color: var(--rhn-ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.rhn-name:hover, .rhn-name:focus { color: var(--rhn-blue); }
.rhn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; font-size: 12px; color: var(--rhn-muted); }
.rhn-km { padding: 0 7px; border-radius: 999px; background: var(--rhn-chip); color: var(--rhn-blue); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rhn-loc { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhn-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rhn-pill { display: inline-flex; align-items: center; gap: 2px; padding: 1px 9px; border: 1px solid var(--rhn-line); border-radius: 999px; background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--rhn-blue); white-space: nowrap; }
a.rhn-pill:hover, a.rhn-pill:focus { color: var(--rhn-blue); border-color: #9FB1DF; }
a.rhn-pill::after { content: ""; width: 11px; height: 11px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain; }
.rhn-off { color: #8A94A8; font-weight: 400; border-style: dashed; }
.rhn a:focus-visible { outline: 3px solid rgba(31, 79, 181, .45); outline-offset: 2px; }
/* ทำเลใกล้เคียง (สถานี + อำเภอ · เจ้าของขอเพิ่ม 2026-10-08) */
.rhz { display: grid; gap: 8px; margin-top: 18px; }
.rhz:first-child { margin-top: 0; }
.rhz-i { display: grid; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--rhn-line); border-radius: 12px; background: #fff; }
.rhz-h { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.rhz-h::before { content: ""; flex: none; width: 15px; height: 15px; background: var(--rhn-blue); -webkit-mask: var(--rhi) no-repeat center / contain; mask: var(--rhi) no-repeat center / contain; }
.rhz-st { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='4' y='1.8' width='8' height='9.5' rx='2.2'/%3E%3Cpath d='M4 7h8M6 14.2l1-2.9M10 14.2l-1-2.9'/%3E%3C/svg%3E"); }
.rhz-am { --rhi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M8 14.5s4.5-4.2 4.5-7.8A4.5 4.5 0 0 0 3.5 6.7C3.5 10.3 8 14.5 8 14.5z'/%3E%3Ccircle cx='8' cy='6.7' r='1.6'/%3E%3C/svg%3E"); }
/* คอลัมน์ขวาแคบ (992–1199 กว้าง ~212px): รูปเล็กลง */
@media (min-width: 992px) and (max-width: 1199px) {
  .rhn-i { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  .rhn-img { width: 48px; height: 48px; }
}
/* < 992 = คอลัมน์ขวาไปต่อท้ายรายการ เต็มกว้าง: รูป 64 · ปุ่มสูง 34 ให้นิ้วกด */
@media (max-width: 991px) {
  .rhn-i { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .rhn-img { width: 64px; height: 64px; }
  .rhn-pill { min-height: 34px; padding: 4px 12px; border-radius: 10px; }
}
