/* Clean Air · หน้าตัวอย่างร้านบริการถึงบ้าน (perdna) */
:root {
  --navy: #15285E;
  --ink: #1E2A44;
  --muted: #5B6884;
  --blue: #2F6BD8;
  --blue-d: #2358BB;
  --sky: #E7EFFD;
  --sky-2: #F3F7FE;
  --border: #E1E8F4;
  --line: #00873C;   /* เขียว LINE เข้มขึ้นให้ตัวหนังสือขาวอ่านชัด (4.6:1) */
  --line-d: #00722F;
  --ok: #138A4B;
  --warn: #B4531A;
  --note: #FFF5CF;
  --note-b: #F1D77A;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(21, 40, 94, .07);
  --dock-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
svg { flex: none; }
a { color: inherit; }
h1, h2, h3 { font-family: "Prompt", "IBM Plex Sans Thai", sans-serif; color: var(--navy); line-height: 1.3; margin: 0; font-weight: 600; }
h1 { font-size: clamp(28px, 7.6vw, 46px); letter-spacing: -.01em; }
h2 { font-size: clamp(22px, 5.6vw, 30px); }
h2::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--blue); margin-top: 10px; }
h3 { font-size: 18px; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.nw { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sub { color: var(--muted); margin-top: 12px; }
.link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--blue); letter-spacing: .02em; margin-bottom: 8px; }

.ic-line { width: 22px; height: 22px; fill: currentColor; --li: var(--line); flex: none; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { background: var(--line-d); }
.btn-soft { background: var(--sky); color: var(--blue-d); }
.btn-ghost { background: #fff; color: var(--blue-d); border-color: #C9D8F4; }
.btn-ghost:hover { background: var(--sky-2); }
:focus-visible { outline: 3px solid #9DBCF5; outline-offset: 2px; }

/* แถบหน้าตัวอย่าง */
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--navy); color: #fff; font-size: 13px; padding: 8px 16px;
}
.demo-explain {
  background: #FFD95A; color: #3A2A00; border: 0; border-radius: 999px;
  min-height: 36px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.demo-bar .demo-sub { display: none; }
@media (min-width: 420px) { .demo-bar .demo-sub { display: inline; } }
.note {
  display: none;
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: var(--note); border: 1px dashed var(--note-b); color: #5A4300; font-size: 14px;
}
.note::before { content: "แก้ปัญหา: "; font-weight: 600; }
body.explain .note { display: block; }

/* หัวเว็บ */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 34px; height: 34px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-family: "Prompt", sans-serif; font-weight: 600; font-size: 19px; color: var(--navy); letter-spacing: .03em; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--navy); letter-spacing: .12em; margin-top: 2px; }

/* รูปสำรองตอนยังไม่มีรูป */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, #DCE7FB, #F4F8FF); margin: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.ph-label { position: absolute; inset: 0; display: grid; place-items: center; color: #7C8DB0; font-size: 14px; }

/* ฮีโร่ */
.hero { position: relative; }
.hero-media .ph-hero { aspect-ratio: 16 / 10; max-height: 460px; width: 100%; }
.hero-media .ph-hero img { object-position: 60% 20%; }
.hero-media .ph-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 60%; z-index: 2;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.88) 55%, #fff 80%);
}
.hero-in { position: relative; z-index: 3; margin-top: -56px; padding-bottom: 8px; }
.hero h1 { text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.lead { font-size: 17px; margin-top: 10px; color: var(--ink); }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 18px; }
.hero-actions .btn { padding: 0 8px; }

.quick {
  list-style: none; margin: 18px 0 0; padding: 4px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
}
.quick li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.quick li:last-child { border-bottom: 0; }
.quick .ic { color: var(--blue); }
.q-k { color: var(--muted); min-width: 64px; }
.q-v { font-weight: 600; margin-left: auto; text-align: right; }
.q-v .link { display: inline-block; padding: 10px 0; margin: -10px 0; }
.q-v.is-open { color: var(--ok); }
.q-v.is-closed { color: var(--warn); }

.trust {
  list-style: none; margin: 14px 0 0; padding: 14px 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: var(--sky-2); border-radius: var(--radius);
}
.trust li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.trust .ic { width: 26px; height: 26px; color: var(--blue); }
.trust strong { display: block; color: var(--navy); font-size: 14px; }

/* ส่วนทั่วไป */
.section { padding: 44px 0; }
.section-tint { background: var(--sky-2); }
.two-col { display: grid; gap: 28px; }
.two-col > .note { grid-column: 1 / -1; margin-top: 0; }

/* บริการ */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.svc {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 12px 14px; box-shadow: var(--shadow);
}
.svc-ic { width: 44px; height: 44px; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: 16px; margin-top: 10px; }
.svc h3 span { display: block; font-family: "IBM Plex Sans Thai", sans-serif; font-weight: 500; font-size: 14px; color: var(--muted); }
.svc-price { font-weight: 600; color: var(--blue-d); margin-top: 8px; }
.svc-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.svc .btn { margin-top: auto; width: 100%; }

/* ตัวคำนวณราคา */
.calc { margin-top: 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.calc fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.calc legend, .calc-label { font-weight: 600; color: var(--navy); font-size: 15px; padding: 0; margin-bottom: 8px; display: block; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; height: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border);
  font-weight: 600; font-size: 15px; line-height: 1.35; background: #fff;
}
.seg small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.seg input:checked + span { border-color: var(--blue); background: var(--sky); color: var(--blue-d); box-shadow: inset 0 0 0 1px var(--blue); }
.seg input:focus-visible + span { outline: 3px solid #9DBCF5; outline-offset: 2px; }
.calc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.calc-row .calc-label { margin: 0; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: 0; background: var(--sky-2); color: var(--blue-d); cursor: pointer; display: grid; place-items: center; }
.stepper button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.stepper button:disabled { color: #B6C3DD; cursor: default; }
.stepper output { min-width: 48px; text-align: center; font-weight: 600; font-size: 18px; }
.calc-total { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--sky); margin-bottom: 12px; }
.calc-total .calc-label { margin: 0; font-weight: 500; color: var(--muted); }
#calc-sum { display: block; font-family: "Prompt", sans-serif; font-size: 30px; color: var(--navy); line-height: 1.2; }
.calc-note { display: block; font-size: 13.5px; color: var(--muted); }
.calc-note.is-deal { color: var(--ok); font-weight: 600; }
.calc-total .btn { width: 100%; }

.price-table { margin-top: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; }
.price-table summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--blue-d); }
.price-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 10px; }
.price-table th, .price-table td { padding: 9px 4px; border-bottom: 1px solid var(--border); text-align: right; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table thead th { color: var(--muted); font-weight: 500; }
.price-table p { padding-bottom: 14px; }

/* อาการ */
.sym-grid { display: grid; gap: 10px; margin-top: 20px; }
.sym {
  display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.sym .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--sky); color: var(--blue-d); box-sizing: border-box; }
.sym strong { display: block; color: var(--navy); }
.sym small { display: block; color: var(--muted); font-size: 13.5px; }
.sym::after { content: "›"; margin-left: auto; font-size: 24px; color: #A7B6D4; }

/* พื้นที่ */
.area-box { margin-top: 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.area-h { font-size: 15px; margin-bottom: 8px; }
.area-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip { font-size: 14px; padding: 5px 12px; border-radius: 999px; }
.chip-free { background: #E4F6EC; color: #0B6B3A; }
.chip-near { background: var(--sky); color: var(--blue-d); }
.area-box > .small { margin-bottom: 12px; }
.area-box > .btn { width: 100%; }

/* ก่อน-หลัง */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 10px; }
.ph-ba { aspect-ratio: 1; border-radius: var(--radius); }
.ba-tag { position: absolute; z-index: 2; left: 8px; top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; }
.ba-before { background: rgba(120, 72, 36, .85); }
.ba-after { background: rgba(35, 88, 187, .9); }

.checks { list-style: none; margin: 12px 0 0; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 7px 0; }
.checks .ic { color: var(--ok); margin-top: 3px; stroke-width: 2.4; }

/* ทีม */
.ph-team { aspect-ratio: 4 / 3; border-radius: 18px; }
#team .checks { margin-top: 18px; }

/* รีวิว */
.rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; color: var(--muted); }
.rating strong { color: var(--navy); font-size: 18px; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #F5B50A; stroke: none; }
.reviews { display: grid; gap: 12px; margin-top: 16px; }
.reviews blockquote { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.reviews footer { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* เวลา + แชร์ */
.hours { width: 100%; border-collapse: collapse; margin: 18px 0 12px; }
.hours th, .hours td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 500; }
.hours td { text-align: right; font-weight: 600; }
.hours tr.today { background: var(--sky); }
.hours tr.today th::after { content: " · วันนี้"; color: var(--blue-d); font-size: 13px; }
.share-box { background: var(--sky-2); border-radius: 18px; padding: 18px; align-self: start; }
.share-box .muted { margin: 6px 0 14px; }
.share-box .btn { width: 100%; }
.share-box .small { margin: 10px 0 0; }

/* FAQ */
.faq { margin-top: 18px; display: grid; gap: 8px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 24px 14px 0; font-weight: 600; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 20px; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 14px; color: var(--muted); }

/* perdna */
.perdna-cta { background: var(--navy); color: #fff; text-align: center; }
.perdna-cta h2 { color: #fff; }
.perdna-cta h2::after { margin: 10px auto 0; background: #FFD95A; }
.perdna-cta .eyebrow { color: #FFD95A; }
.perdna-cta p:not(.eyebrow) { margin: 12px auto 20px; max-width: 520px; color: #D5DEF2; }
.perdna-link { display: block; margin-top: 6px; padding: 10px 0; color: #fff; }

.footer { padding: 28px 0 24px; border-top: 1px solid var(--border); }
.footer p { margin-bottom: 4px; }

/* แถบปุ่มล่าง */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(21,40,94,.08);
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--blue-d); background: var(--sky);
}
.dock .dock-main { background: var(--line); color: #fff; }
.dock a:hover { filter: brightness(.96); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 18px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--navy); color: #fff; font-size: 14.5px; text-align: center; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* จอใหญ่ */
@media (min-width: 720px) {
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .sym-grid { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .seg { grid-template-columns: repeat(4, 1fr); }
  .seg-2 { grid-template-columns: 1fr 1fr; }
  .calc-total { grid-template-columns: 1fr auto; align-items: center; }
  .calc-total .btn { width: auto; }
}
@media (min-width: 900px) {
  .section { padding: 64px 0; }
  .hero { display: grid; grid-template-columns: 1fr; }
  .hero-media { position: absolute; inset: 0 0 auto 45%; height: 560px; }
  .hero-media .ph-hero { aspect-ratio: auto; max-height: none; height: 100%; }
  .hero-media .ph-hero::after { inset: 0; height: auto; background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 35%), linear-gradient(to bottom, rgba(255,255,255,0) 70%, #fff); }
  .hero-in { margin-top: 0; padding-top: 72px; min-height: 560px; }
  .hero-in > * { max-width: 520px; }
  .hero-actions { max-width: 460px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .dock { left: auto; right: 20px; bottom: 20px; width: 420px; border-radius: 18px; border: 1px solid var(--border); padding: 8px; }
  body { padding-bottom: 0; }
  .toast { bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ขั้นตอนใน FAQ */
.faq .flow-mini { margin: 0; padding: 0 0 14px 22px; color: var(--muted); }
.faq .flow-mini li { padding: 3px 0; }
.faq .checks { margin: 0; padding-bottom: 10px; }
.faq .checks li { color: var(--muted); }
