/* Buriram FarmLink — สไตล์หลัก: ทันสมัย มีชีวิตชีวา
   สีหลักเขียวมรกต · สีเน้นเหลืองทานตะวัน · แยกสีตามประเภทผู้ให้บริการ
   แก้โทนสีทั้งเว็บได้ที่ตัวแปรใน :root */
:root {
  --bg: #F3F7F0;
  --surface: #FFFFFF;
  --soft: #F4F7F2;
  --ink: #10221A;
  --ink-2: #33463B;
  --muted: #5A6B61;
  --line: #E0E8DF;

  --brand: #0E8A4A;
  --brand-2: #16B364;
  --brand-ink: #0A5C32;
  --brand-soft: #DCF3E4;

  --sun: #F6B819;
  --sun-ink: #6B4E00;
  --sun-soft: #FFF3CC;

  --accent: #E8692D;      /* งานที่ต้องการจ้าง / ขาดแคลน */
  --accent-ink: #9A3A0C;
  --accent-soft: #FDE8DC;

  --blue: #1F6FEB;        /* ผู้รับซื้อ */
  --blue-ink: #1450B8;
  --blue-soft: #E1EDFF;

  --violet: #7C5CE0;      /* ปัจจัยการผลิต */
  --violet-ink: #5236B5;
  --violet-soft: #EEE8FF;

  --danger: #C4321C;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 1px 2px rgba(16, 34, 26, .05), 0 6px 20px -12px rgba(16, 34, 26, .18);
  --shadow-lg: 0 18px 40px -18px rgba(14, 138, 74, .35);
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  --font-head: 'Prompt', 'IBM Plex Sans Thai', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; font-family: var(--font-head); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #5B9BFF; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

/* ---------- แถบประกาศ / หัวเว็บ ---------- */
.announce { background: linear-gradient(90deg, var(--brand-ink), var(--brand)); color: #fff; font-size: 14px; text-align: center; padding: 8px 16px; }
.announce b { color: var(--sun); }
.demo-banner { background: var(--sun-soft); color: var(--sun-ink); font-size: 14px; text-align: center; padding: 6px 16px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(243, 247, 240, .9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(224, 232, 223, .6); }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(140deg, var(--brand-2), var(--brand-ink)); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-lg); position: relative; }
.logo-mark::after { content: ''; position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); border: 2px solid var(--bg); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.logo-text b em { font-style: normal; color: var(--brand); }
.logo-text span { font-size: 12.5px; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a { padding: 9px 15px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .site-header { position: static; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1E3A2C; color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--soft); color: var(--ink); }
.btn-brand { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: var(--shadow-lg); }
.btn-brand:hover { color: #fff; filter: brightness(1.05); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #FFC93D; color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #D45A20; color: #fff; }
.btn-sm { min-height: 40px; padding: 0 15px; font-size: 15px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--brand-soft); }

/* ---------- การ์ด / ป้าย ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-sm { border-radius: var(--radius-sm); padding: 14px 16px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-blue { background: var(--blue-soft); color: var(--blue-ink); }
.pill-sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill-violet { background: var(--violet-soft); color: var(--violet-ink); }
.pill-gray { background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); }
.muted { color: var(--muted); }
.sm { font-size: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* สีตามประเภท — ใช้กับไอคอนและป้าย */
.t-machine { --c: var(--brand); --cs: var(--brand-soft); --ci: var(--brand-ink); }
.t-labor { --c: #C98A00; --cs: var(--sun-soft); --ci: var(--sun-ink); }
.t-supply { --c: var(--violet); --cs: var(--violet-soft); --ci: var(--violet-ink); }
.t-buyer { --c: var(--blue); --cs: var(--blue-soft); --ci: var(--blue-ink); }
.t-demand { --c: var(--accent); --cs: var(--accent-soft); --ci: var(--accent-ink); }
.t-sell { --c: #C98A00; --cs: var(--sun-soft); --ci: var(--sun-ink); }
.ico-tile { width: 46px; height: 46px; border-radius: 14px; background: var(--cs, var(--brand-soft)); color: var(--c, var(--brand)); display: grid; place-items: center; flex: none; }
.ico-tile svg { width: 24px; height: 24px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--cs); color: var(--ci); white-space: nowrap; }

/* ---------- หน้าแรก: ส่วนหัวมีภาพประกอบ ---------- */
.hero { margin-top: 10px; border-radius: 32px; padding: 30px 22px 24px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #13A35A 0%, #0E8A4A 40%, #0A5C32 100%); }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(246, 184, 25, .55) 0%, rgba(246, 184, 25, 0) 65%); z-index: -1; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.hero-art { flex: 1 1 320px; max-width: 460px; margin: -10px 0 -24px auto; }
.hero-art svg { width: 100%; height: auto; display: block; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; font-weight: 500; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(246, 184, 25, .3); }
.hero h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 600; line-height: 1.2; margin-top: 14px; letter-spacing: -.01em; }
.hero h1 mark { background: none; color: var(--sun); }
.hero p.lead { color: #DDF5E6; margin-top: 10px; font-size: 17px; max-width: 560px; }
@media (min-width: 720px) { .hero { padding: 42px 44px 34px; } }
@media (max-width: 760px) { .hero-art { display: none; } }

.searchbar { margin-top: 24px; background: var(--surface); color: var(--ink); border-radius: 22px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .35); }
.searchbar label { flex: 1 1 220px; display: flex; flex-direction: column; padding: 6px 14px; border-radius: 16px; }
.searchbar label:focus-within { background: var(--soft); }
.searchbar label + label { border-left: 1px solid var(--line); }
.searchbar label span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.searchbar input, .searchbar select { border: 0; background: transparent; font-size: 17px; padding: 4px 0; outline: none; min-height: 32px; }
.searchbar .btn { align-self: center; }
@media (max-width: 640px) { .searchbar label + label { border-left: 0; border-top: 1px solid var(--line); } .searchbar .btn { width: 100%; } }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-stats div { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); border-radius: 18px; padding: 10px 16px; min-width: 130px; }
.hero-stats b { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 600; line-height: 1.15; }
.hero-stats span { font-size: 13.5px; color: #DDF5E6; }

/* ไทล์ทางลัด */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.quick button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; border: 2px solid transparent; }
.quick button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(16, 34, 26, .4); }
.quick button:focus-visible { outline: 3px solid #5B9BFF; outline-offset: 2px; }
.quick button[aria-pressed="true"] { border-color: var(--c); background: linear-gradient(0deg, var(--cs), var(--cs)), #fff; }
.quick b { display: block; font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.quick span.s { font-size: 13.5px; color: var(--muted); }
.quick .ico-tile { width: 52px; height: 52px; border-radius: 16px; }
@media (max-width: 560px) {
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick button { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .quick b { font-size: 16px; }
}

/* ---------- แท็บ / ตัวกรอง ---------- */
.section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-top: 28px; }
.section-head h2 { font-size: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { min-height: 48px; padding: 0 18px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s; }
.tab:hover { background: var(--soft); }
.tab .ti { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.tab .ti svg { width: 20px; height: 20px; }
.tab .count { font-size: 12.5px; background: var(--soft); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.tab[aria-selected="true"], .tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab[aria-selected="true"] .ti { background: var(--sun); color: var(--ink); }
.tab[aria-selected="true"] .count { background: rgba(255, 255, 255, .18); color: #fff; }
.tabs.plain .tab { padding: 0 18px 0 8px; }
.tab:has(input:focus-visible) { outline: 3px solid #5B9BFF; outline-offset: 2px; }

.segment { display: inline-flex; flex-wrap: wrap; background: var(--surface); border-radius: 999px; padding: 4px; gap: 2px; box-shadow: var(--shadow); }
.segment button, .segment a { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.segment button:hover, .segment a:hover { color: var(--ink); background: var(--soft); }
.segment [aria-pressed="true"], .segment [aria-current="page"] { background: var(--brand); color: #fff; }
.segment [aria-pressed="true"]:hover, .segment [aria-current="page"]:hover { background: var(--brand); color: #fff; }
@media (max-width: 560px) {
  .segment { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .segment::-webkit-scrollbar { display: none; }
  .segment button, .segment a { white-space: nowrap; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
}

.layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 18px; }
.sidebar { flex: 1 1 250px; }
.content { flex: 999 1 560px; min-width: 0; }
@media (min-width: 900px) { .sidebar { position: sticky; top: 92px; max-width: 290px; } }

.filters > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; min-height: 32px; font-size: 18px; font-family: var(--font-head); }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .15s; }
.filters[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
@media (min-width: 900px) { .filters > summary { pointer-events: none; } .filters > summary::after { display: none; } }
.filter-group { border: 0; margin: 0; padding: 0 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.filter-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-group legend, .filter-title { font-weight: 600; margin-bottom: 6px; padding: 0; font-size: 15px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 38px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }

/* ---------- ฟอร์ม ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field-label { font-weight: 600; font-size: 15px; }
.field small { color: var(--muted); font-size: 13px; }
.input, .select, .textarea { width: 100%; min-height: 50px; border: 1.5px solid #D3DDD3; border-radius: 14px; padding: 10px 14px; background: var(--surface); font-size: 16px; transition: border-color .15s; }
.textarea { min-height: 110px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #B8C8B9; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: 4px solid rgba(14, 138, 74, .15); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 2px solid var(--line); border-radius: 20px; cursor: pointer; background: var(--surface); transition: border-color .15s, transform .15s; }
.choice:hover { border-color: #C6D5C7; transform: translateY(-1px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ico-tile { margin-bottom: 6px; }
.choice b { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.choice span.s { font-size: 13.5px; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--c, var(--brand)); background: linear-gradient(0deg, var(--cs, var(--brand-soft)), var(--cs, var(--brand-soft))); }
.choice:has(input:checked)::after { content: ''; position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--c, var(--brand)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat; }
.choice:has(input:focus-visible) { outline: 3px solid #5B9BFF; outline-offset: 2px; }
.choice:has(input:checked) .ico-tile { background: var(--c, var(--brand)); color: #fff; }
@media (max-width: 560px) {
  .choice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .choice { padding: 14px; }
  .choice b { font-size: 15.5px; }
}

.form-wrap { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; align-items: flex-start; }
.form-card { flex: 999 1 560px; min-width: 0; max-width: 880px; }
.form-aside { flex: 1 1 280px; border-radius: var(--radius); padding: 24px; color: #fff; background: linear-gradient(160deg, #13A35A, #0A5C32); position: relative; overflow: hidden; }
.form-aside::before { content: ''; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(246, 184, 25, .5), rgba(246, 184, 25, 0) 65%); }
.form-aside h2 { font-size: 20px; position: relative; }
.form-aside ol { position: relative; margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.form-aside li { display: flex; gap: 12px; counter-increment: s; color: #E3F6EA; }
.form-aside li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 700; display: grid; place-items: center; flex: none; }
.form-aside li b { color: #fff; display: block; }
@media (min-width: 900px) { .form-aside { position: sticky; top: 92px; } }
.form-section { display: flex; flex-direction: column; gap: 16px; padding: 24px 0; border-top: 1px dashed var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 6px; }
.form-section h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.form-section h2 .n { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 15px; display: grid; place-items: center; }
.alert { border-radius: 16px; padding: 12px 16px; font-size: 15px; }
.alert-error { background: #FDECEA; color: #7A1D14; }
.alert-ok { background: var(--brand-soft); color: var(--brand-ink); }
.success { text-align: center; padding: 20px 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.success .big-ico { width: 84px; height: 84px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.success .big-ico svg { width: 44px; height: 44px; }
.success h2 { font-size: 24px; }

/* ---------- การ์ดประกาศ ---------- */
.results-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.results-head h2 { font-size: 22px; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 16px; }
.listing { display: flex; flex-direction: column; gap: 12px; position: relative; transition: transform .15s, box-shadow .15s; border: 1px solid transparent; }
.listing:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(16, 34, 26, .45); border-color: var(--line); }
.listing .head { display: flex; gap: 12px; align-items: center; }
.listing .head .meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.listing .head .meta .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing .hot { position: absolute; top: 16px; right: 16px; }
.listing h3 { font-size: 18px; font-weight: 600; }
.listing h3 a { color: var(--ink); text-decoration: none; }
.listing h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.listing .provider { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 500; color: var(--ink-2); }
.listing .card-foot a, .listing .provider .pill { position: relative; z-index: 1; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { flex: none; color: var(--brand); }
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price b { font-family: var(--font-head); font-size: 24px; font-weight: 600; color: var(--ink); }
.price span { font-size: 13px; color: var(--muted); margin-left: 4px; }
.price .ask { font-family: var(--font-head); font-size: 17px; font-weight: 600; color: var(--ink-2); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); border: 2px dashed #CFDCCF; border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 120px; height: auto; }
.cta-band { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border-radius: var(--radius); padding: 24px 26px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--sun) 0%, #FFD45C 60%, #FFE38F 100%); color: var(--ink); }
.cta-band::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h3 { font-size: 21px; }
.cta-band p { color: #4D3B00; }
.skeleton { background: linear-gradient(90deg, #E9F0E7 25%, #F4F8F2 50%, #E9F0E7 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 240px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .listing:hover, .quick button:hover, .choice:hover { transform: none; } }

/* ---------- หน้ารายละเอียด ---------- */
.detail-hero { margin-top: 14px; border-radius: 28px; padding: 26px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--cs, var(--brand-soft)) 0%, #fff 75%); box-shadow: var(--shadow); }
.detail-hero .top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.detail-hero h1 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 14px; }
.detail-hero .ico-tile { width: 60px; height: 60px; border-radius: 18px; background: var(--c); color: #fff; }
.detail-hero .ico-tile svg { width: 30px; height: 30px; }
.detail-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; align-items: flex-start; }
.detail-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .detail-side { position: sticky; top: 92px; } }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kv div { background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.kv dt { font-size: 13px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.reveal { background: linear-gradient(135deg, var(--brand-soft), #fff); border: 1.5px solid #BFE6CD; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.reveal a.tel { font-family: var(--font-head); font-size: 28px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.match-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.match-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }

/* ---------- แผนที่ ---------- */
.map-wrap { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; align-items: stretch; }
.map-card { flex: 999 1 560px; min-width: 0; padding: 0; overflow: hidden; position: relative; }
#map { height: 660px; width: 100%; background: #E3ECDD; }
@media (max-width: 720px) { #map { height: 460px; } }
.map-side { flex: 1 1 330px; display: flex; flex-direction: column; gap: 14px; }
.legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: var(--surface); border-radius: 16px; padding: 12px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 4px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.dmark { background: none; border: 0; }
.dmark .b { transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; transition: transform .15s; }
.dmark .b:hover { transform: translate(-50%, -50%) scale(1.08); }
.dmark .c { min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: 15px; box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(0, 0, 0, .22); font-family: var(--font-head); }
.dmark .n { font-size: 12px; font-weight: 600; background: #fff; color: var(--ink); padding: 0 7px; border-radius: 8px; white-space: nowrap; font-family: var(--font); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.dmark.sel .c { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--sun), 0 4px 12px rgba(0, 0, 0, .25); }
.dmark.sel .n { background: var(--ink); color: #fff; }
.lv-hi { background: var(--accent); color: #fff; }
.lv-mid { background: #FFB98F; color: var(--ink); }
.lv-ok { background: #fff; color: var(--brand-ink); border: 2.5px solid var(--brand); }
.lv-zero { background: #fff; color: var(--muted); border: 2px solid #CBD6CB; }
.lv-sup { background: var(--brand); color: #fff; }
.lv-buy { background: var(--blue); color: #fff; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-tiles div { border-radius: 16px; padding: 10px 12px; }
.stat-tiles b { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat-tiles span { font-size: 12.5px; }
.mini-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mini-list > * { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.mini-list > *:last-child { border-bottom: 0; }
.mini-list a:hover, .mini-list button:hover { background: var(--soft); }
.mini-list .grow { flex: 1 1 auto; min-width: 0; }
.mini-list .t { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .ico-tile { width: 36px; height: 36px; border-radius: 11px; }
.mini-list .ico-tile svg { width: 19px; height: 19px; }

/* ---------- ท้ายเว็บ ---------- */
.site-footer { margin-top: 56px; padding: 36px 0 44px; color: #C9DDD0; font-size: 14.5px; background: var(--ink); }
.site-footer a { color: #fff; }
.site-footer .brand-line { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.site-footer .row { flex-wrap: wrap; gap: 8px 20px; }
.page-title { margin-top: 20px; }
.page-title h1 { font-size: clamp(26px, 3.2vw, 34px); }
.page-title p { color: var(--muted); margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; text-decoration: none; font-weight: 600; }
