/* โอเคโฮม พร็อพเพอร์ตี้ — หน้าเว็บอสังหา
   โทน: น้ำเงินเข้ม (น่าเชื่อถือ) · ครีม (อบอุ่น) · น้ำตาลทองจากโลโก้ (ปุ่มหลัก) · เขียว LINE เฉพาะปุ่มไลน์
   ฟอนต์เดียวทั้งเว็บ Anuphan 400/600/700 */

:root {
  --accent: #8a5a2b;
  --accent-d: #6f4520;
  --gold: #b8893f;
  --navy: #16233b;
  --navy-2: #1f3152;
  --ink: #16233b;
  --muted: #5b6577;
  --paper: #faf7f1;
  --cream: #f3ece0;
  --line: #e7dfd1;
  --white: #fff;
  --green: #06c755;
  --radius: 14px;
  --font: 'Anuphan', 'Noto Sans Thai', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(22, 35, 59, .06), 0 8px 24px -12px rgba(22, 35, 59, .18);
  --shadow-lg: 0 2px 4px rgba(22, 35, 59, .06), 0 18px 40px -18px rgba(22, 35, 59, .32);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink);
  background: var(--paper); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 .9em; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.75; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 10px; border: 1.5px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s; white-space: nowrap;
}
.btn:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-brown { background: var(--accent); }
.btn-gold { background: var(--accent); box-shadow: 0 8px 20px -10px rgba(138, 90, 43, .7); }
.btn-line { background: var(--green); }
.btn-line:hover { background: #05a647; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline-light { background: rgba(255, 255, 255, .85); color: var(--navy); border-color: var(--navy); }
.btn-outline-light:hover { background: var(--navy); color: #fff; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.link-more {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.link-more:hover { text-decoration: underline; }

/* พื้นที่กดของลิงก์ข้อความอย่างน้อย 44px (นิ้วกดง่ายบนมือถือ) */
.link-more, .pcard h3 a, .contact-list a, .foot a, .crumbs a, .agent a, .foot-contact a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.pcard h3 a { display: flex; }

/* ---------- แถบบน + หัวเว็บ ---------- */
.topbar { background: var(--navy); color: #dfe5ef; font-size: 14px; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 38px; padding-block: 4px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar svg { width: 15px; height: 15px; color: var(--gold); }
.topbar-social { margin-left: auto; gap: 12px !important; }
.topbar-social svg { color: #dfe5ef; width: 17px; height: 17px; }

/* ห้ามใส่ backdrop-filter / transform / filter ที่หัวเว็บ — เมนูมือถือ position:fixed อยู่ข้างใน */
.nav { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo img { width: 56px; height: 56px; object-fit: contain; }
.logo b { display: block; font-size: 19px; color: var(--navy); line-height: 1.45; }
.logo small { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; }
.menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.menu > a {
  position: relative; padding: 10px 12px; text-decoration: none; font-weight: 600; font-size: 16px; color: var(--navy);
}
.menu > a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2.5px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
.menu > a:hover::after, .menu > a[aria-current="page"]::after { transform: scaleX(1); }
.menu > a[aria-current="page"] { color: var(--accent); }
.menu-cta { display: none; }
.nav-cta { display: flex; gap: 8px; }
.nav-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle svg + svg { display: none; }

.menu > a, .logo b { white-space: nowrap; }
.logo { flex: none; }
@media (max-width: 1559px) { .nav-cta { display: none; } }
@media (max-width: 1240px) { .logo small { display: none; } .menu > a { padding-inline: 9px; } }
@media (max-width: 1100px) {
  .nav .wrap { min-height: 66px; }
  .logo img { width: 46px; height: 46px; }
  .nav-toggle { display: inline-flex; }
  .menu {
    position: fixed; inset: 0; top: 0; z-index: 50; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 84px 24px 32px; overflow-y: auto;
    visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s;
  }
  .menu > a { font-size: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
  .menu > a::after { display: none; }
  .menu-cta { display: grid; gap: 10px; margin-top: 24px; }
  .menu-cta .btn { min-height: 52px; font-size: 17px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu { visibility: visible; opacity: 1; }
  body.nav-open .nav-toggle { position: fixed; top: 9px; right: 16px; z-index: 60; }
  body.nav-open .nav-toggle svg:first-child { display: none; }
  body.nav-open .nav-toggle svg + svg { display: block; }
  .hide-sm { display: none !important; }
  .topbar-social { display: none !important; }
}
@media (max-width: 767px) {
  /* มือถือมีปุ่มลอยไลน์/โทรอยู่แล้ว ซ่อนแถบบนให้เห็นเนื้อหาเร็วขึ้น */
  .topbar { display: none; }
  .logo small { display: none; }
}

/* ---------- ส่วนทั่วไป ---------- */
.sec { padding: 72px 0; }
.sec-alt { background: var(--cream); }
.sec-head { max-width: 720px; margin-bottom: 32px; }
.sec-head h2, .sec-head h1 { font-size: clamp(28px, 3.4vw, 40px); color: var(--navy); }
.sec-head p { color: var(--muted); margin-top: 10px; }
.sec-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.sec-row .sec-head { margin-bottom: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent);
  margin-bottom: 6px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow-light { color: var(--accent); }
@media (max-width: 767px) {
  .sec { padding: 52px 0; }
  .sec-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); }
.hero-track { display: flex; }
.hero-slide { position: relative; flex: 0 0 100%; min-height: min(620px, 78vh); display: flex; align-items: center; }
.hero-slide picture, .hero-slide picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slide picture img { object-fit: cover; object-position: 70% 60%; }
.hero-full .hero-slide::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(250, 247, 241, .96) 0%, rgba(250, 247, 241, .86) 34%, rgba(250, 247, 241, 0) 62%);
}
.hero-body { position: relative; z-index: 2; width: min(1200px, 100% - 32px); margin-inline: auto; padding: 64px 0 110px; }
.hero-body > * { max-width: 560px; }
.hero-title { font-size: clamp(36px, 5.6vw, 64px); color: var(--navy); line-height: 1.4; margin-bottom: 14px; }
.hero-body p { font-size: clamp(17px, 1.6vw, 20px); color: #2f3b52; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 84px; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 9px; border: 0; padding: 0; background: rgba(255, 255, 255, .6); cursor: pointer; }
.hero-dots button[aria-current="true"] { width: 26px; background: #fff; }
.hero-split .hero-slide { display: grid; grid-template-columns: 1fr 1fr; }
.hero-split .hero-pic img { width: 100%; height: 100%; object-fit: cover; }
.hero-compact .hero-slide { min-height: 300px; }
.hero-compact .hero-slide::before {
  content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(22, 35, 59, .9), rgba(22, 35, 59, .55));
}
.hero-compact .hero-body { padding: 56px 0; }
/* หัวหน้าย่อยกว้างพอให้หัวข้ออยู่บรรทัดเดียว ไม่ให้คำท้ายตกไปบรรทัดใหม่คำเดียว (แก้ด่วน 445) */
.hero-compact .hero-body > * { max-width: 880px; text-wrap: balance; }
.hero-compact .hero-title { color: #fff; font-size: clamp(32px, 4.4vw, 48px); }
.hero-compact .hero-body p { color: #e4e9f2; }
.hero-compact .hero-cta:empty { display: none; }
@media (max-width: 767px) {
  .hero-slide { min-height: 0; }
  .hero-full .hero-slide { min-height: 68vh; align-items: flex-end; }
  .hero-full .hero-slide::before {
    background: linear-gradient(0deg, rgba(250, 247, 241, .97) 0%, rgba(250, 247, 241, .9) 46%, rgba(250, 247, 241, 0) 74%);
  }
  .hero-body { padding: 160px 0 96px; }
  .hero-home .hero-body { padding-bottom: 92px; }
  .hero-compact .hero-body { padding: 44px 0; }
  .hero-split .hero-slide { grid-template-columns: 1fr; }
}

/* กล่องค้นหาลอยทับขอบแบนเนอร์ */
.finder-wrap { position: relative; z-index: 5; margin-top: -60px; }
.finder, .filters {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr auto; gap: 10px;
  background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.finder-q { position: relative; display: block; }
.finder-q span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.finder-q input { padding-left: 44px; }
.finder input, .finder select, .filters input, .filters select, .lead input, .lead select, .lead textarea {
  width: 100%; min-height: 50px; border: 1px solid #d9d1c2; border-radius: 10px; background: #fff;
  padding: 10px 14px; font-size: 16px;
}
.finder select, .filters select, .lead select {
  appearance: none; padding-right: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.finder input:focus, .finder select:focus, .filters input:focus, .filters select:focus,
.lead input:focus, .lead select:focus, .lead textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 90, 43, .15); }
/* ช่องค้นหา: เว้นซ้ายให้ไอคอนแว่นขยาย ไม่ให้ตัวอักษรทับไอคอน (ต้องชนะ padding รวมด้านบน) */
.finder .finder-q input, .filters .finder-q input { padding-left: 46px; }
.filters { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; margin-bottom: 18px; }
@media (max-width: 900px) {
  .finder { grid-template-columns: 1fr 1fr; }
  .finder .finder-q, .finder .btn { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .finder-q { grid-column: 1 / -1; }
}
@media (max-width: 767px) { .finder-wrap { margin-top: -54px; } }

/* ---------- จุดเด่น / ขั้นตอน / ประเภทบ้าน ---------- */
.features-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--cream); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; color: var(--navy); }
.feature p { font-size: 15px; color: var(--muted); margin: 4px 0 0; line-height: 1.6; }
.feature-no { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.sec-bar { padding: 36px 0 20px; }
.trust .feature { background: transparent; border: 0; padding: 8px 4px; }
.trust .feature:hover { transform: none; box-shadow: none; }
@media (max-width: 1023px) { .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) {
  .features-grid { gap: 10px; }
  .feature { flex-direction: column; gap: 10px; padding: 16px; }
  .trust .feature { flex-direction: row; }
  .trust { grid-template-columns: 1fr; }
}

/* ---------- การ์ดทรัพย์ ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pcard {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pcard-pic { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--cream); overflow: hidden; }
.pcard-pic img:not(.wm-logo) { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard-pic img:not(.wm-logo) { transform: scale(1.03); }
.pcard-pic .code {
  position: absolute; left: 12px; top: 12px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px;
}
.badge { position: absolute; right: 12px; top: 12px; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 6px; color: #fff; }
.badge-reserved { background: #c27a12; }
.badge-sold { background: #8b2f2f; }
.pd-tags .badge { position: static; }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); }
.noimg svg { width: 48px; height: 48px; }
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-loc { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 0; }
.pcard-loc svg { color: var(--accent); width: 16px; height: 16px; }
.pcard h3 { font-size: 19px; }
.pcard h3 a { text-decoration: none; color: var(--navy); }
.pcard h3 a:hover { color: var(--accent); }
.pcard-type { font-size: 14px; color: var(--muted); margin: 0; }
.pcard-price { font-size: 24px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.pcard-spec { list-style: none; margin: auto 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: #3c4658; }
.pcard-spec li { display: inline-flex; align-items: center; gap: 6px; }
.pcard-spec svg { color: var(--accent); width: 17px; height: 17px; }

/* โลโก้ร้านติดมุมรูปทรัพย์อัตโนมัติ */
.wm { position: relative; }
.wm .wm-logo {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 46px !important; height: 46px !important;
  object-fit: contain; background: rgba(255, 255, 255, .88); border-radius: 10px; padding: 3px; opacity: .92;
  pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.result { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--gold); margin: 0 auto 12px; }
@media (max-width: 1023px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 599px) {
  .pgrid { grid-template-columns: 1fr; }
  .pcard-price { font-size: 22px; }
}

/* ---------- เกี่ยวกับ / ฝากขาย ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about.pic-right .about-pic { order: 2; }
.about-pic img { width: 100%; height: auto; border-radius: 18px; }
.about-text h2 { font-size: clamp(28px, 3.4vw, 40px); color: var(--navy); margin-bottom: 14px; }
.about-text p { color: #3c4658; }
.about-text .btn { margin-top: 10px; }
.sec-navy { background: var(--navy); color: #fff; }
.sec-navy .about-text h2 { color: #fff; }
.sec-navy .about-text p { color: #d5dcea; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about.pic-right .about-pic { order: 0; }
}

/* ---------- ลูกค้าที่ซื้อกับเรา ---------- */
.buyers { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 22px; }
.buyer { margin: 0; }
.buyer-pic { display: block; }
.buyer-pic img { width: 100%; height: auto; border-radius: var(--radius); }
.buyer figcaption { padding-top: 12px; }
.buyer b { display: block; color: var(--navy); font-size: 17px; }
.buyer p { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
@media (max-width: 1023px) { .buyers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 479px) { .buyers { grid-template-columns: 1fr; } }

/* ---------- รีวิว ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.quote-mark { font-size: 56px; line-height: .6; color: var(--gold); font-weight: 700; display: block; height: 26px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.quote figcaption img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--cream); color: var(--accent); display: grid; place-items: center; flex: none; }
.quote figcaption b { display: block; }
.quote figcaption span span { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq-wrap { max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary {
  cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 600; list-style: none; position: relative; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--accent); font-weight: 400;
}
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 0 20px 18px; margin: 0; color: #3c4658; }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { text-align: center; padding: 60px 0; }
.cta-dark { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.cta-soft { background: var(--cream); }
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); max-width: 980px; margin: 0 auto 22px; text-wrap: balance; }

/* ---------- ติดต่อ + ฟอร์ม ---------- */
.sec-contact { background: var(--navy); color: #fff; }
.sec-contact .sec-head h2 { color: #fff; }
.sec-contact .sec-head p { color: #cfd7e6; }
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-note { color: #d5dcea; }
.contact-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list svg { color: var(--gold); margin-top: 4px; width: 20px; height: 20px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.hours { list-style: none; padding: 14px 0 0; margin: 0 0 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 15px; color: #d5dcea; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 18px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; }
.hours .closed { color: #ffb4a8; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.lead { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; display: grid; gap: 14px; box-shadow: var(--shadow-lg); }
.lead h3 { font-size: 21px; color: var(--navy); }
.lead label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.lead textarea { min-height: 110px; resize: vertical; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead .btn { width: 100%; min-height: 52px; font-size: 17px; }
.msg { margin: 0; font-size: 15px; }
.msg.ok { color: #137a3a; }
.msg.bad { color: #b42318; }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); display: block; background: var(--cream); }
.map-wrap { margin-top: 28px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 26px; } }
@media (max-width: 479px) { .fld-row { grid-template-columns: 1fr; } .lead { padding: 20px; } }

/* ---------- ข้อความอิสระ ---------- */
.prose h2 { font-size: clamp(26px, 3vw, 34px); color: var(--navy); margin-bottom: 14px; }
.prose.narrow { max-width: 760px; }
.prose p { color: #3c4658; }

/* ---------- หน้ารายละเอียดทรัพย์ ---------- */
.pd { padding: 18px 0 56px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 14px; height: 14px; }
.crumbs > span { color: var(--navy); font-weight: 600; }
.share {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 15px; min-height: 44px;
}
.pd-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pg-main { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #e9e2d5; }
.pg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.pg-slide.on { opacity: 1; z-index: 1; }
.pg-slide img { width: 100%; height: 100%; object-fit: contain; }
.pg-main .wm-logo { width: 62px !important; height: 62px !important; right: 14px; bottom: 14px; z-index: 3; }
.pg-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--navy); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
}
.pg-nav.prev { left: 14px; }
.pg-nav.next { right: 14px; }
.pg-count {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(22, 35, 59, .78); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 14px;
}
.pg-empty { display: grid; place-items: center; text-align: center; color: var(--muted); }
.pg-empty svg { width: 54px; height: 54px; color: var(--gold); margin: 0 auto; }
.pg { min-width: 0; }
.pg-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.pg-thumbs button {
  flex: 0 0 auto; width: 118px; aspect-ratio: 4 / 3; padding: 0; border: 2.5px solid transparent; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: #e9e2d5; opacity: .75;
}
.pg-thumbs button[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.pg-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 14px;
  position: sticky; top: 92px;
}
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.code-tag { background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; padding: 3px 12px; border-radius: 6px; }
.pd-panel h1 { font-size: clamp(26px, 2.6vw, 34px); color: var(--navy); }
.pd-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 0; }
.pd-loc svg { color: var(--accent); }
.pd-price { font-size: clamp(30px, 3.2vw, 40px); font-weight: 700; color: var(--accent); line-height: 1.4; }
.pd-month { background: var(--cream); border-radius: 12px; padding: 14px 18px; }
.pd-month span { display: block; font-size: 15px; color: var(--muted); }
.pd-month b { font-size: 28px; color: var(--accent-d); }
.pd-month small { font-size: 17px; }
.pd-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pd-stats li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 4px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--muted); line-height: 1.45;
}
.pd-stats svg { width: 24px; height: 24px; color: var(--navy); margin-bottom: 4px; }
.pd-stats b { font-size: 17px; color: var(--navy); }
.pd-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-cta .btn { padding-inline: 10px; }
.agent { display: flex; gap: 12px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.agent img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.agent small { display: block; color: var(--muted); font-size: 14px; }
.agent b { display: block; color: var(--navy); }
.agent a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pd-info { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 20px; margin-top: 28px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card h2 { font-size: 21px; color: var(--navy); margin-bottom: 14px; padding-bottom: 10px; position: relative; }
.card h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 2px; background: var(--accent); }
.card p { color: #3c4658; }
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 6px 0 0; }
.spec div { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec svg { color: var(--accent); width: 20px; height: 20px; }
.spec dt { font-weight: 600; font-size: 15px; }
.spec dd { margin: 0; text-align: right; color: #3c4658; font-size: 15px; }
.pd-hl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pd-hl li { display: flex; gap: 10px; align-items: flex-start; }
.pd-hl svg { color: var(--accent); width: 22px; height: 22px; margin-top: 2px; }
.pd-map .map { height: 230px; margin-bottom: 12px; }
@media (max-width: 1023px) {
  /* minmax(0) กันแถบรูปย่อยาวๆ (บ้านที่มีรูปหลายรูป) ดันหน้าให้ล้นจอมือถือ */
  .pd-top { grid-template-columns: minmax(0, 1fr); }
  .pd-panel { position: static; }
  .pd-info { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .pd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec { grid-template-columns: 1fr; }
  .pg-thumbs button { width: 92px; }
  .pg-nav { width: 44px; height: 44px; }
  .pd-cta { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}

/* ---------- ท้ายเว็บ ---------- */
.foot { background: #0f1a2e; color: #c9d1df; padding: 56px 0 96px; font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; }
.foot h3 { color: #fff; font-size: 17px; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.logo-foot { margin-bottom: 14px; }
.logo-foot img { background: #fff; border-radius: 12px; padding: 4px; width: 64px; height: 64px; }
.logo-foot b { color: #fff; font-size: 20px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact svg { color: var(--gold); margin-top: 4px; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); display: grid; place-items: center; }
.social a:hover { background: rgba(255, 255, 255, .1); }
.copy { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); color: #9aa6ba; }
@media (max-width: 900px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 479px) { .foot .wrap { grid-template-columns: 1fr; } }

/* ปุ่มลอยมือถือ: ไลน์ + โทร */
.float-contact { display: none; }
@media (max-width: 767px) {
  .float-contact {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px -10px rgba(22, 35, 59, .3);
  }
  .float-contact .btn { min-height: 46px; }
  body.nav-open .float-contact { display: none; }
}

/* รูปขยาย */
dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.light::backdrop { background: rgba(10, 16, 28, .88); }
dialog.light img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
dialog.light .light-pic { position: relative; display: inline-block; vertical-align: top; }
dialog.light .light-pic > img:first-child { display: block; }
/* โลโก้วางทับระหว่างรอประทับลงรูป — ประทับเสร็จ (baked) ซ่อน ไม่ให้ซ้อนสองอัน */
dialog.light .light-wm {
  display: none; position: absolute; right: 14px; bottom: 14px; width: 64px; height: 64px;
  object-fit: contain; background: rgba(255, 255, 255, .9); border-radius: 12px; padding: 4px;
  pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
dialog.light.marked:not(.baked) .light-wm { display: block; }
.pg-main.baked .wm-logo { display: none; }
dialog.light button {
  position: fixed; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}

/* บทความ (ถ้าซื้อระบบบทความภายหลัง) */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; }
.card-pic img { width: 100%; height: auto; border-radius: 12px; }
.a-wrap { max-width: 780px; }
.a-meta { color: var(--muted); font-size: 15px; }

/* เนื้อหาปรากฏตอนเลื่อนถึง */
@keyframes rise { from { opacity: 0; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .pcard, .feature, .buyer, .quote {
      /* forwards (ไม่ใช่ both): ก่อนเข้าจอยังแสดงปกติ ภาพหน้าจอเต็มหน้า/เครื่องมือตรวจจะไม่เห็นช่องว่าง */
      animation: rise linear forwards; animation-timeline: view(); animation-range: entry 0% entry 40%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
