/* Baan Plao · หน้าตัวอย่างร้านอาหาร (perdna) */
:root {
  --green: #2D4A2A;
  --green-2: #3D6236;
  --ink: #23271F;
  --muted: #66665A;
  --cream: #F6F0E6;
  --cream-2: #FBF8F3;
  --sand: #E8DCC8;
  --border: #E9E0D2;
  --gold: #8A5E16;
  --line: #00873C;
  --line-d: #00722F;
  --ok: #2E7D3A;
  --warn: #A5481A;
  --note: #FFF5CF;
  --note-b: #F1D77A;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(45, 74, 42, .08);
  --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(--green); line-height: 1.3; margin: 0; font-weight: 600; }
h1 { font-size: clamp(30px, 8.4vw, 50px); color: #fff; }
h2 { font-size: clamp(22px, 5.8vw, 30px); }
h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: var(--green-2); margin-top: 10px; }
h3 { font-size: 17px; }
p { margin: 0; }

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

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

/* ปุ่ม */
.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 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--green); color: #fff; }
.btn-dark:hover { background: #22391F; }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { background: var(--line-d); }
.btn-cream { background: var(--cream); color: var(--green); border-color: var(--sand); }
.btn-ghost { background: #fff; color: var(--green); border-color: var(--sand); }
.btn-ghost:hover { background: var(--cream-2); }
:focus-visible { outline: 3px solid #B9CDA8; outline-offset: 2px; }

/* แถบหน้าตัวอย่าง */
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #1F2E1D; color: #fff; font-size: 13px; padding: 8px 16px; }
.demo-explain { min-height: 36px; background: #FFD95A; color: #3A2A00; border: 0; border-radius: 999px; 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,.97); 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; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-script { font-family: "Great Vibes", "Brush Script MT", cursive; font-size: 32px; color: var(--green); line-height: 1; }
.brand-script-sm { font-size: 24px; }
.brand-sub { font-size: 11.5px; font-weight: 600; letter-spacing: .22em; color: var(--green); margin: 2px 0 0 26px; }

/* รูปสำรอง */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, #E9DFCF, #F7F2EA); 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: #9C8F78; font-size: 14px; }

/* ฮีโร่ */
.hero { position: relative; background: #2A2620; color: #fff; }
.ph-hero { position: absolute; inset: 0; background: linear-gradient(135deg, #3B3328, #1E1A15); }
.ph-hero img { object-position: 65% 60%; }
.ph-hero .ph-label { color: rgba(255,255,255,.4); align-items: end; padding-bottom: 90px; }
.ph-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(20,16,10,.72) 0%, rgba(20,16,10,.35) 55%, rgba(20,16,10,.15) 100%); }
.hero-text { position: relative; z-index: 3; padding-top: 36px; padding-bottom: 96px; min-height: 340px; }
.hero .eyebrow { color: #F1D9A7; }
.hero h1 { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.lead { font-size: 17px; margin-top: 10px; color: #F3EDE3; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.hero-card { position: relative; z-index: 4; margin-top: -64px; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; background: #fff; padding: 14px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.hero-actions .btn { padding: 0 8px; }

.quick { list-style: none; margin: 14px 0 0; padding: 4px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.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(--green-2); }
.q-k { color: var(--muted); min-width: 60px; }
.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); }

.feats { list-style: none; margin: 12px 0 0; padding: 14px 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--cream); border-radius: var(--radius); }
.feats li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.feats .ic { width: 28px; height: 28px; color: var(--green); }
.feats strong { display: block; color: var(--green); font-size: 14px; }

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

/* เมนู */
.dishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.dish { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 10px; }
.ph-dish { aspect-ratio: 1; }
.dish h3 { font-family: "IBM Plex Sans Thai", sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; margin: 8px 8px 2px; }
.price { font-size: 14px; font-weight: 600; color: var(--gold); margin: 0 8px; }
.tag { position: absolute; z-index: 2; top: 6px; left: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--green); }
.tag-hot { background: #B3261E; color: #fff; }

.fullmenu { margin-top: 22px; background: var(--cream-2); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.fullmenu h3 { margin-bottom: 8px; }
.fullmenu details { border-top: 1px solid var(--border); }
.fullmenu summary { cursor: pointer; padding: 13px 26px 13px 0; font-weight: 600; color: var(--green); list-style: none; position: relative; }
.fullmenu summary::-webkit-details-marker { display: none; }
.fullmenu summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 20px; }
.fullmenu details[open] summary::after { content: "–"; }
.mlist { list-style: none; margin: 0 0 12px; padding: 0; }
.mlist li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 15px; }
.mlist li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted #CDBFA6; transform: translateY(-4px); }
.mlist b { order: 2; font-weight: 600; color: var(--gold); }
.fullmenu > .small { margin-top: 12px; }

/* จองโต๊ะ */
.book { margin-top: 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: block; }
.f-label { display: block; font-weight: 600; color: var(--green); font-size: 15px; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; min-height: 50px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 12px;
  font: inherit; color: var(--ink); background: #fff; -webkit-appearance: none; appearance: none;
}
.field select { padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232D4A2A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.field-row .f-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(--cream); color: var(--green); 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: #C4B9A5; cursor: default; }
.stepper output { min-width: 48px; text-align: center; font-weight: 600; font-size: 18px; }
.book-hint { min-height: 22px; font-size: 14px; color: var(--green-2); margin-bottom: 10px; }
.book .btn + .small { margin-top: 10px; }

/* โซน */
.zones { display: grid; gap: 14px; margin: 20px 0 16px; }
.zone { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ph-zone { aspect-ratio: 16 / 10; }
.zone figcaption { padding: 12px 14px; }
.zone strong { display: block; color: var(--green); }
.zone span { font-size: 14px; color: var(--muted); }

/* สั่งกลับบ้าน */
.order-grid { display: grid; gap: 10px; margin-top: 18px; }
.order { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.order strong { display: block; color: var(--ink); }
.order small { display: block; color: var(--muted); font-size: 13.5px; }
.order::after { content: "›"; margin-left: auto; font-size: 24px; color: #B9AC93; }
.order-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.order-grab { background: #00824A; }
.order-lm { background: #007A3D; }
.order-call { background: var(--cream); color: var(--green); }

/* การเดินทาง */
.addr { margin-top: 16px; }
.addr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.addr-actions .btn { padding: 0 10px; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; }
.checks .ic { color: var(--ok); margin-top: 3px; stroke-width: 2.4; }
.ph-entrance { aspect-ratio: 4 / 3; border-radius: 18px; }

/* รีวิว */
.rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 16px; color: var(--muted); }
.rating strong { color: var(--green); font-size: 18px; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #E0A526; 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 td.closed { color: var(--warn); }
.hours tr.today { background: var(--cream); }
.hours tr.today th::after { content: " · วันนี้"; color: var(--green-2); font-size: 13px; }
.share-box { background: var(--cream); border-radius: 18px; padding: 18px; align-self: start; }
.share-box .muted { margin: 6px 0 14px; }

/* 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(--green); 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(--green-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 14px; color: var(--muted); }

/* perdna */
.perdna-cta { background: var(--green); 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: #DCE6D6; }
.perdna-cta .btn-line { background: #fff; color: var(--line); --li: #fff; }
.perdna-cta .btn-line .ic-line { color: var(--line); }
.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(45,74,42,.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(--green); background: var(--cream); }
.dock .dock-main { background: var(--line); color: #fff; }

.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(--green); color: #fff; font-size: 14.5px; text-align: center; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* จอใหญ่ */
@media (min-width: 720px) {
  .dishes { grid-template-columns: repeat(6, 1fr); }
  .zones { grid-template-columns: repeat(3, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .order-grid { grid-template-columns: repeat(3, 1fr); }
  .book { max-width: 620px; }
}
@media (min-width: 900px) {
  .section { padding: 64px 0; }
  .hero-text { padding-top: 90px; padding-bottom: 150px; min-height: 520px; }
  .hero-text > * { max-width: 560px; }
  .ph-hero::after { background: linear-gradient(90deg, rgba(20,16,10,.78) 0%, rgba(20,16,10,.45) 45%, rgba(20,16,10,.05) 80%); }
  .hero-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px 20px; margin-top: -90px; }
  .hero-actions { grid-column: 1 / -1; max-width: 560px; }
  .quick, .feats { margin-top: 0; align-self: start; }
  .hero-card > .note { grid-column: 1 / -1; }
  .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; } }
.btn.is-off { opacity: .5; }
