/* =====================================================================
   บ้านดี Property — ระบบดีไซน์หลัก
   โทน: เขียวสนเข้ม + งาช้างอุ่น + ทองทองเหลือง
   ฟอนต์: Kanit (หัวข้อ) · IBM Plex Sans Thai (เนื้อหา) · IBM Plex Mono (ตัวเลข)
   ===================================================================== */

:root {
  /* สี */
  --green-900: #14342b;
  --green-800: #1c4537;
  --green-700: #275a48;
  --green-50:  #eef3f0;
  --ivory:     #faf8f3;
  --white:     #ffffff;
  --brass:     #bf9d46;
  --brass-dark:#a3822f;
  --ink:       #20231f;
  --sage:      #5c6b63;
  --sage-light:#8c9a91;
  --border:    #e6e1d6;
  --border-strong: #d6cfbf;

  /* ฟอนต์ */
  --font-display: "Kanit", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Sarabun", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* รัศมีและเงา */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(20, 52, 43, 0.06), 0 1px 2px rgba(20, 52, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 52, 43, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 52, 43, 0.14);

  /* ระยะ */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ---------- รีเซ็ตพื้นฐาน ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- ตัวช่วยจัดวาง ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 8vw, 112px); }
.text-mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--r-sm);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-900); color: var(--ivory); }
.btn-primary:hover { background: var(--green-800); box-shadow: var(--shadow-md); }
.btn-brass { background: var(--brass); color: var(--green-900); }
.btn-brass:hover { background: var(--brass-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--green-900); border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--green-900); background: var(--green-50); }
.btn-light { background: rgba(255,255,255,0.14); color: var(--white); border: 1.5px solid rgba(255,255,255,0.4); }
.btn-light:hover { background: var(--white); color: var(--green-900); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05em 2em; font-size: 1.02rem; }

/* =====================================================================
   ส่วนหัว / เมนู
   ===================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brass); color: var(--green-900);
  font-size: 1.15rem; flex-shrink: 0;
}
.brand-name { font-size: 1.3rem; letter-spacing: 0.01em; line-height: 1; }
.brand-name span { color: var(--brass); }

.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-weight: 500; font-size: 0.95rem; position: relative; padding-block: 0.3rem;
  transition: color 0.18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--brass); transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* สีตัวอักษรเมนูตอนลอยอยู่เหนือ hero (โปร่งใส) */
.site-header[data-variant="transparent"] { color: var(--white); }
.site-header[data-variant="transparent"] .nav-links a:hover { color: var(--white); }
.site-header[data-variant="transparent"] .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.5); }
.site-header[data-variant="transparent"] .btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* สีตอนเลื่อนลงมา (พื้นทึบ) */
.site-header[data-variant="solid"] {
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.site-header[data-variant="solid"] .brand { color: var(--green-900); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: currentColor; transition: 0.25s; border-radius: 2px; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 820px);
  display: flex; align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,52,43,0.55) 0%, rgba(20,52,43,0.25) 35%, rgba(20,52,43,0.78) 100%);
}
.hero-inner { width: 100%; padding-top: 76px; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--brass);
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem;
}
.hero-eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--brass); }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.08;
  letter-spacing: -0.01em; max-width: 16ch; margin-bottom: 1.2rem;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46ch;
  color: rgba(255,255,255,0.92); margin-bottom: 2.6rem; font-weight: 300;
}

/* คอนโซลค้นหาในหน้าแรก — ชิ้นเอกลักษณ์ */
.search-console {
  background: rgba(250, 248, 243, 0.97);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  padding: 0.7rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 0.5rem;
  max-width: 920px;
  border: 1px solid rgba(255,255,255,0.6);
}
.sc-field { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.6rem 0.85rem; border-radius: var(--r-sm); transition: background 0.18s; }
.sc-field:hover { background: var(--green-50); }
.sc-field label {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage); font-weight: 500;
}
.sc-field input, .sc-field select {
  border: none; background: transparent; padding: 0.15rem 0; font-size: 0.98rem;
  font-weight: 500; color: var(--ink); width: 100%; outline: none; cursor: pointer;
}
.sc-field input { cursor: text; }
.sc-field select { appearance: none; }
.search-console .btn { border-radius: var(--r-sm); height: 100%; }

/* =====================================================================
   แถบสถิติ
   ===================================================================== */
.stats {
  background: var(--green-900); color: var(--ivory);
}
.stats .container {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--brass);
}
.stat-num small { font-size: 0.5em; color: var(--ivory); font-weight: 400; }
.stat-label {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(250,248,243,0.7); margin-top: 0.6rem;
}

/* =====================================================================
   หัวข้อเซ็กชัน
   ===================================================================== */
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.8rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass); font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--brass); }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.15;
  letter-spacing: -0.01em; color: var(--green-900);
}
.section-head p { margin-top: 1rem; color: var(--sage); font-size: 1.08rem; }

.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; max-width: none; }
@media (max-width: 640px) { .section-head.row { flex-direction: column; align-items: flex-start; } }

/* =====================================================================
   การ์ดประกาศบ้าน — ชิ้นเอกลักษณ์ (แผ่นป้ายสเปก)
   ===================================================================== */
.grid-properties {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: clamp(1.4rem, 2.5vw, 2rem);
}
.prop-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.prop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.prop-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-50); }
.prop-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.prop-card:hover .prop-media img { transform: scale(1.05); }
.prop-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(20,52,43,0.88); color: var(--ivory);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.prop-badge.featured { background: var(--brass); color: var(--green-900); font-weight: 500; }
.prop-badge.rent {
  left: auto; right: 12px;
  background: var(--green-700); color: var(--ivory); font-weight: 500;
}

.prop-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.prop-loc {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
  color: var(--sage); display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.55rem;
}
.prop-loc svg { width: 13px; height: 13px; color: var(--brass); flex-shrink: 0; }
.prop-title {
  font-family: var(--font-display); font-weight: 500; font-size: 1.18rem;
  line-height: 1.35; color: var(--green-900); margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
/* แผ่นป้ายสเปก */
.spec-plate {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding-block: 0.85rem; margin-bottom: 1.1rem;
}
.spec { text-align: center; border-right: 1px solid var(--border); padding-inline: 0.3rem; }
.spec:last-child { border-right: none; }
.spec-val { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; color: var(--ink); line-height: 1.1; }
.spec-key { font-size: 0.68rem; color: var(--sage-light); margin-top: 0.25rem; letter-spacing: 0.02em; }
.prop-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.prop-price { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; color: var(--brass-dark); line-height: 1; }
.prop-price small { font-size: 0.6em; color: var(--sage); font-weight: 400; margin-left: 0.2em; }
.prop-arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; color: var(--green-900);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.prop-card:hover .prop-arrow { background: var(--green-900); color: var(--ivory); border-color: var(--green-900); }

/* =====================================================================
   จุดเด่นบริการ (value props)
   ===================================================================== */
.values { background: var(--white); border-block: 1px solid var(--border); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.value { padding: 0.5rem; }
.value-num {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--brass);
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
.value-icon {
  width: 52px; height: 52px; border-radius: var(--r-sm);
  background: var(--green-50); color: var(--green-800);
  display: grid; place-items: center; margin-bottom: 1.2rem;
}
.value-icon svg { width: 26px; height: 26px; }
.value h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--green-900); margin-bottom: 0.6rem; }
.value p { color: var(--sage); font-size: 1rem; }

/* =====================================================================
   แถบเชิญชวน (CTA)
   ===================================================================== */
.cta-band { background: var(--green-900); color: var(--ivory); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(191,157,70,0.18), transparent 70%); border-radius: 50%;
}
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 3rem; position: relative; z-index: 1; }
.cta-band h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; max-width: 16ch; }
.cta-band p { color: rgba(250,248,243,0.8); margin-top: 0.9rem; max-width: 44ch; }
.cta-actions { display: flex; gap: 1rem; flex-shrink: 0; }
@media (max-width: 820px) { .cta-band .container { flex-direction: column; align-items: flex-start; } }

/* =====================================================================
   ส่วนท้าย
   ===================================================================== */
.site-footer { background: #102b23; color: rgba(250,248,243,0.72); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand { color: var(--white); margin-bottom: 1rem; }
.footer-brand p { font-size: 0.95rem; max-width: 34ch; }
.footer-col h4 { color: var(--white); font-family: var(--font-display); font-weight: 500; font-size: 1rem; margin-bottom: 1.1rem; letter-spacing: 0.02em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a, .footer-col li { font-size: 0.93rem; transition: color 0.18s; }
.footer-col a:hover { color: var(--brass); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; font-size: 0.85rem; gap: 1rem; flex-wrap: wrap; }
.footer-bottom .text-mono { color: rgba(250,248,243,0.5); letter-spacing: 0.05em; }

/* =====================================================================
   หน้ารายการประกาศ (listings)
   ===================================================================== */
.page-hero { background: var(--green-900); color: var(--ivory); padding-top: 76px; }
.page-hero .container { padding-block: clamp(3rem, 6vw, 4.5rem); }
.page-hero .eyebrow { color: var(--brass); }
.page-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; }
.page-hero p { color: rgba(250,248,243,0.8); margin-top: 0.8rem; font-size: 1.1rem; }
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em; color: rgba(250,248,243,0.6); margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--brass); }

.filter-bar { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; box-shadow: var(--shadow-sm); margin-top: -2.5rem; position: relative; z-index: 5; }
.filter-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr) auto; gap: 0.5rem; align-items: end; }
.filter-field { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.4rem 0.6rem; }
.filter-field label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); }
.filter-field input, .filter-field select {
  border: none; border-bottom: 1.5px solid var(--border); background: transparent;
  padding: 0.35rem 0; font-weight: 500; outline: none; transition: border-color 0.18s;
}
.filter-field input:focus, .filter-field select:focus { border-bottom-color: var(--brass); }
.filter-field select { appearance: none; cursor: pointer; }
.filter-reset-link {
  margin: 0.6rem 0.6rem 0; padding: 0; border: none; background: none;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--sage); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.18s;
}
.filter-reset-link:hover { color: var(--brass-dark); }

.results-bar { display: flex; align-items: center; justify-content: space-between; margin-block: 2.5rem 1.8rem; gap: 1rem; flex-wrap: wrap; }
.results-count { color: var(--sage); }
.results-count strong { color: var(--green-900); font-family: var(--font-display); font-weight: 600; }
.sort-field { display: flex; align-items: center; gap: 0.6rem; }
.sort-field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--sage); }
.sort-field select { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.5rem 2rem 0.5rem 0.8rem; background: var(--white); font-weight: 500; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6b63' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-top: 3.5rem; }
.page-btn {
  min-width: 42px; height: 42px; padding-inline: 0.7rem; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--white); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500;
  display: grid; place-items: center; transition: 0.18s;
}
.page-btn:hover:not(:disabled) { border-color: var(--green-900); }
.page-btn.active { background: var(--green-900); color: var(--ivory); border-color: var(--green-900); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* สถานะว่าง / โหลด */
.empty-state, .loading-state { text-align: center; padding: 5rem 1rem; color: var(--sage); }
.empty-state svg { width: 56px; height: 56px; color: var(--border-strong); margin: 0 auto 1.2rem; }
.empty-state h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--green-900); margin-bottom: 0.5rem; }
.spinner {
  width: 38px; height: 38px; border: 3px solid var(--border); border-top-color: var(--brass);
  border-radius: 50%; margin: 0 auto 1rem; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #efece4 25%, #f6f3ec 50%, #efece4 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { height: 420px; }

/* =====================================================================
   หน้ารายละเอียดประกาศ (property detail)
   ===================================================================== */
.detail-wrap { padding-top: 76px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 0.6rem; height: clamp(360px, 52vh, 560px); }
.gallery-main { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--green-50); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-side { display: grid; grid-template-rows: 1fr 1fr; gap: 0.6rem; }
.gallery-thumb { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--green-50); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-thumb:hover img { transform: scale(1.06); }
.gallery-more {
  position: absolute; inset: 0; background: rgba(20,52,43,0.6); color: var(--white);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500;
}
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; height: auto; } .gallery-side { display: none; } .gallery-main { height: 300px; } }

.detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: clamp(2rem, 5vw, 4rem); margin-top: 3rem; align-items: start; }
@media (max-width: 940px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-status { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-dark); background: var(--green-50); padding: 0.4rem 0.85rem; border-radius: 999px; margin-bottom: 1.2rem; }
.detail-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.5vw, 2.7rem); line-height: 1.15; color: var(--green-900); letter-spacing: -0.01em; }
.detail-loc { display: flex; align-items: center; gap: 0.5rem; color: var(--sage); margin-top: 0.9rem; font-size: 1.05rem; }
.detail-loc svg { width: 18px; height: 18px; color: var(--brass); }

.detail-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin-block: 2.5rem; }
.detail-spec { background: var(--white); padding: 1.4rem 1rem; text-align: center; }
.detail-spec svg { width: 24px; height: 24px; color: var(--green-700); margin: 0 auto 0.7rem; }
.detail-spec .v { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--green-900); line-height: 1; }
.detail-spec .k { font-size: 0.8rem; color: var(--sage); margin-top: 0.4rem; }

.detail-block { margin-bottom: 2.5rem; }
.detail-block h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--green-900); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.7rem; }
.detail-block h3::before { content: ""; width: 4px; height: 1.1em; background: var(--brass); border-radius: 2px; }
.detail-desc { color: #3c443e; font-size: 1.06rem; line-height: 1.85; white-space: pre-line; }

.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
@media (max-width: 520px) { .feature-list { grid-template-columns: 1fr; } }

/* เงื่อนไขการเช่า */
.rent-terms {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.rent-term { background: var(--white); padding: 0.9rem 1rem; }
.rt-k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.3rem; }
.rt-v { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--green-900); line-height: 1.2; }
@media (max-width: 640px) { .rent-terms { grid-template-columns: repeat(2, 1fr); } }
.contact-price-unit { font-size: 0.42em; color: var(--sage); font-weight: 400; margin-left: 0.2em; }
.feature-item { display: flex; align-items: center; gap: 0.7rem; color: #3c443e; }
.feature-item svg { width: 20px; height: 20px; color: var(--green-700); flex-shrink: 0; }

.map-embed { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; color: var(--green-800); font-weight: 600; }
.map-link:hover { color: var(--brass-dark); }

/* การ์ดติดต่อ (sticky sidebar) */
.contact-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem; box-shadow: var(--shadow-md); position: sticky; top: 96px; }
.contact-price-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); }
.contact-price { font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; color: var(--brass-dark); line-height: 1.1; margin-block: 0.3rem 0.4rem; }
.contact-permeter { color: var(--sage); font-size: 0.9rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; }
.contact-card h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--green-900); margin-bottom: 0.35rem; }
.contact-lead { color: var(--sage); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.3rem; }

.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-bottom: 0.4rem; }
.form-field label .req { color: #c0392b; }
.form-control {
  width: 100%; padding: 0.75rem 0.9rem; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); background: var(--ivory); transition: border-color 0.18s, background 0.18s;
}
.form-control:focus { outline: none; border-color: var(--brass); background: var(--white); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.8rem; color: var(--sage); margin-top: 0.8rem; text-align: center; }
.form-msg { padding: 0.8rem 1rem; border-radius: var(--r-sm); font-size: 0.9rem; margin-bottom: 1rem; }
.form-msg.success { background: #e8f3ec; color: #1c6b3f; border: 1px solid #b8ddc6; }
.form-msg.error { background: #fbeae8; color: #a5342a; border: 1px solid #f0c4be; }

.contact-channels { display: flex; flex-direction: column; gap: 0.7rem; }
.channel-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1rem; border: none; border-radius: var(--r-md); width: 100%; cursor: pointer;
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem;
  color: #fff; transition: filter 0.18s, transform 0.15s;
}
.channel-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.channel-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.ch-line { background: #06C755; }
.ch-phone { background: var(--green-700); }
.ch-messenger { background: #0084FF; }
.ch-wa { background: #25D366; }
.ch-wechat { background: #07C160; }
.ch-gmail { background: #EA4335; }

.wechat-panel { margin-top: 0.9rem; padding: 1.1rem; background: var(--ivory); border: 1px solid var(--border); border-radius: var(--r-md); text-align: center; }
.wechat-id-label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); }
.wechat-id { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 500; color: var(--green-900); margin: 0.25rem 0 0.7rem; word-break: break-all; }
.wechat-qr { width: 160px; height: 160px; object-fit: contain; display: block; margin: 0 auto 0.7rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.wechat-hint { font-size: 0.82rem; color: var(--sage); line-height: 1.5; margin-bottom: 0.85rem; }
.wechat-copy { background: var(--green-700); color: #fff; border: none; border-radius: var(--r-sm); padding: 0.55rem 1.2rem; font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: filter 0.18s; }
.wechat-copy:hover { filter: brightness(1.1); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .values-grid { grid-template-columns: 1fr; gap: 2rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid .btn { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav-links, .nav .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--ivory); padding: 1.5rem var(--gutter); gap: 1.2rem;
    box-shadow: var(--shadow-md); border-bottom: 1px solid var(--border);
  }
  .nav.open .nav-links a { color: var(--ink); }
  .nav.open .btn { display: inline-flex; }
  .search-console { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (max-width: 560px) {
  .grid-properties { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid .btn { grid-column: 1; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; }
}

/* ---------- เข้าถึงง่าย ---------- */
:focus-visible { outline: 2.5px solid var(--brass); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- แอนิเมชันเลื่อนเข้า ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== ตัวสลับภาษา (ปุ่มธง) ===== */
.lang-switcher { display: inline-flex; gap: 5px; align-items: center; margin-left: 14px; }
.lang-btn {
  width: 30px; height: 20px; padding: 0; background: none; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15); border-radius: 4px; overflow: hidden;
  display: inline-flex; opacity: 0.55;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.lang-btn svg { width: 100%; height: 100%; display: block; }
.lang-btn:hover { opacity: 1; transform: translateY(-1px); }
.lang-btn.active { opacity: 1; border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
@media (max-width: 560px) {
  .lang-switcher { margin-left: 8px; gap: 4px; }
  .lang-btn { width: 26px; height: 18px; }
}
