/* ============================================================
   styles.css — Moon Whale Pattaya · จองโต๊ะงานพลุ 2026
   ชุดสีดึงมาจาก PDF "แพ็คเกจจองงานพลุ2026" โดยตรง (สุ่มค่าสีจากภาพผังจริง)
     พื้นหลัง   #23130f      กล่องโต๊ะครีม  #b99a6e
     น้ำตาลกลาง #4d3123      ตัวอักษรครีม   #f0e2cc
   ============================================================ */
:root {
  --bg: #23130f;
  --bg-2: #2c1a13;
  --panel: #33201a;
  --panel-2: #3d2820;
  --line: #5a3c2c;
  --line-soft: #4a3125;

  --cream: #b99a6e;          /* premium — แถวริมระเบียง/ริมกระจก */
  --cream-2: #d8bd94;
  --brown: #4d3123;          /* standard — แถวถัดเข้าไป */
  --brown-2: #6f4a35;

  --text: #f0e2cc;
  --muted: #b09b82;

  --ok: #7fb069;
  --held: #d99a4e;
  --busy: #6b5346;
  --danger: #d9635f;

  --radius: 14px;
  --shadow: 0 12px 38px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Sukhumvit Set", "IBM Plex Sans Thai", "Noto Sans Thai", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 72px; }

/* ---------- ปุ่มสลับภาษา (ลอยมุมขวาบนของภาพปก) ---------- */
.langbar {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  display: flex; gap: 6px; margin: 0;
}
.langbar .tab { padding: 6px 12px; font-size: 12.5px; font-weight: 700; }
.demobar:not([hidden]) ~ .langbar { top: 58px; }
body { position: relative; }

/* ---------- Header พร้อมภาพปก ---------- */
header.hero {
  position: relative; text-align: center; padding: 74px 16px 54px;
  background: linear-gradient(180deg, rgba(35,19,15,.62) 0%, rgba(35,19,15,.86) 55%, var(--bg) 100%),
              url("img/hero.jpg") center 22% / cover no-repeat;
  border-bottom: 1px solid var(--line-soft);
}
.hero .kicker { color: var(--cream); letter-spacing: .34em; font-size: 11px; font-weight: 700; }
.hero h1 { margin: 14px 0 6px; font-size: clamp(28px, 5.4vw, 46px); line-height: 1.12; font-weight: 800; }
.hero h1 span { color: var(--cream); display: block; font-size: .56em; letter-spacing: .12em; margin-top: 10px; }
.hero p { color: #ddc9ad; margin: 6px 0; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---------- Stepper ---------- */
.steps { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 24px 0 26px; }
.steps div {
  font-size: 12px; color: var(--muted); padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 999px; white-space: nowrap;
}
.steps div.on { color: #23130f; background: var(--cream); border-color: var(--cream); font-weight: 700; }
.steps div.done { color: var(--cream); border-color: var(--cream); }

/* ---------- Panels ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: .01em; }
.card h2 small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 3px; }
.step { display: none; }
.step.active { display: block; }

/* ---------- ปุ่ม ---------- */
button { font: inherit; cursor: pointer; border-radius: 10px; transition: .15s; }
.btn { background: var(--cream); color: #23130f; border: 0; padding: 12px 26px; font-weight: 800; font-size: 15px; }
.btn:hover:not(:disabled) { background: var(--cream-2); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 12px 22px; }
.btn-ghost:hover { color: var(--text); border-color: var(--cream); }
.actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; flex-wrap: wrap; }

/* ---------- ตัวเลือกวัน ---------- */
.opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 16px; }
.opt {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line-soft);
  color: var(--text); padding: 16px 18px;
}
.opt:hover { border-color: var(--cream); }
.opt.sel { border-color: var(--cream); background: #4a3024; box-shadow: 0 0 0 3px rgba(185, 154, 110, .2); }
.opt b { display: block; font-size: 16px; }
.opt small { color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.tab { background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--muted); padding: 9px 15px; font-size: 13.5px; }
.tab.sel { background: var(--cream); border-color: var(--cream); color: #23130f; font-weight: 700; }

/* ---------- เลย์เอาต์แบบ PDF: ผังซ้าย / ข้อมูล+รูปขวา ---------- */
.zonegrid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
@media (max-width: 860px) { .zonegrid { grid-template-columns: 1fr; } }

.planwrap {
  background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 12px; overflow-x: auto;
}
.planwrap svg { display: block; width: 100%; height: auto; min-width: 300px; touch-action: manipulation; }
.tbl { cursor: pointer; }
.tbl rect { transition: .12s; }
.tbl:hover rect.box { stroke: #fff; stroke-width: 2.4; }
.tbl.na { cursor: not-allowed; }
.tbl.na:hover rect.box { stroke-width: 1.3; }
.tbl text { pointer-events: none; }

/* ---------- แผงข้อมูลโซนแบบ PDF ---------- */
.viewshot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); }
.viewshot img { display: block; width: 100%; height: auto; }
.viewshot figcaption {
  background: var(--panel-2); color: var(--muted); font-size: 12px;
  padding: 8px 12px; margin: 0; line-height: 1.5;
}

.pricecard {
  background: var(--cream); color: #23130f; border-radius: 12px;
  padding: 16px 18px; margin-top: 14px;
}
.pricecard .tables { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; opacity: .82; }
.pricecard .price { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 2px 0 0; }
.pricecard .price small { font-size: 14px; font-weight: 600; }
.pricecard .inc { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.pricecard .vch { background: #23130f; color: var(--cream); border-radius: 7px; padding: 4px 11px; white-space: nowrap; font-weight: 700; }

.infocard {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-size: 13px;
}
.infocard h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--cream); letter-spacing: .06em; font-weight: 700; }
.infocard p { margin: 3px 0; color: var(--text); }
.infocard p.dim { color: var(--muted); }

.legend { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend .lrow { display: flex; align-items: center; gap: 9px; padding: 3px 0; }
.legend i { width: 26px; height: 15px; border-radius: 4px; flex: none; display: inline-block; }

/* ---------- ฟอร์ม ---------- */
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label.f { display: block; margin-top: 14px; }
label.f span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
label.f span b { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--text);
  background: #2a1811; border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--cream); }
input::placeholder, textarea::placeholder { color: #8a7360; }
select option { background: #2a1811; }

.drinkgrp { margin-top: 18px; }
.drinkgrp h4 { margin: 0 0 8px; font-size: 13px; color: var(--cream); letter-spacing: .05em; }
.drinks { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.drink {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line-soft);
  color: var(--text); padding: 11px 13px; font-size: 13.5px;
}
.drink:hover { border-color: var(--cream); }
.drink.sel { border-color: var(--cream); background: #4a3024; }
.drink b { display: block; font-size: 13.5px; }
.drink small { color: var(--muted); font-size: 11.5px; line-height: 1.45; display: block; margin-top: 2px; }

/* ---------- สรุปยอด ---------- */
.sum { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; }
.sum .row { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; font-size: 14px; }
.sum .row span:first-child { color: var(--muted); }
.sum .row.total {
  border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px;
  font-size: 20px; font-weight: 800; color: var(--cream);
}

/* ---------- ชำระเงิน ---------- */
.pay { display: grid; gap: 20px; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }
@media (max-width: 700px) { .pay { grid-template-columns: 1fr; } }
.qrbox { background: #fff; border-radius: 12px; padding: 12px; }
.qrbox svg { display: block; width: 100%; height: auto; }
.bank { font-size: 14px; }
.bank .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bank .row span:first-child { color: var(--muted); }
.bank .row b { text-align: right; }
.acct { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 17px; letter-spacing: .06em; color: var(--cream); }

.timer { text-align: center; font-size: 14px; color: var(--held); margin: 14px 0; }
.timer b { font-size: 21px; font-family: ui-monospace, monospace; }

.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 26px 16px;
  text-align: center; color: var(--muted); cursor: pointer; margin-top: 14px;
}
.drop:hover { border-color: var(--cream); color: var(--text); }
.drop img { max-width: 190px; max-height: 240px; border-radius: 8px; margin-top: 10px; }

/* ---------- ข้อความแจ้งเตือน ---------- */
.note { border-radius: 10px; padding: 12px 15px; font-size: 13.5px; margin-top: 14px; }
.note.warn { background: rgba(217, 154, 78, .12); border: 1px solid rgba(217, 154, 78, .4); color: #edc38a; }
.note.err { background: rgba(217, 99, 95, .12); border: 1px solid rgba(217, 99, 95, .42); color: #f0b0ad; }
.note.ok { background: rgba(127, 176, 105, .12); border: 1px solid rgba(127, 176, 105, .4); color: #b9d9a8; }
.note.info { background: rgba(185, 154, 110, .08); border: 1px solid var(--line-soft); color: var(--muted); }

.done-mark { text-align: center; font-size: 52px; }
.ref { text-align: center; font-family: ui-monospace, monospace; font-size: 28px; letter-spacing: .12em; color: var(--cream); margin: 10px 0 4px; }

ul.terms { color: var(--muted); font-size: 13px; padding-left: 20px; margin: 10px 0 0; }
ul.terms li { margin: 4px 0; }

footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 16px; }
.badge {
  display: inline-block; background: rgba(185, 154, 110, .14); border: 1px solid rgba(185, 154, 110, .38);
  color: var(--cream); border-radius: 999px; padding: 3px 11px; font-size: 11.5px; margin-left: 6px;
}

/* ---------- ป๊อบอัพเลือกมิกเซอร์ ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(12, 6, 4, .76); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; width: 100%; max-width: 470px; max-height: calc(100vh - 36px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 22px 20px; box-shadow: 0 22px 60px rgba(0, 0, 0, .6);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.modal-box h3 { margin: 0; font-size: 20px; }
.modal-sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; line-height: 1;
  background: transparent; border: 1px solid var(--line-soft); color: var(--muted); font-size: 20px;
}
.modal-x:hover { color: var(--text); border-color: var(--cream); }
.modal-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; }

.mixcount {
  margin: 16px 0 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px;
  background: rgba(185, 154, 110, .1); border: 1px solid var(--line-soft); text-align: center;
}
.mixcount b { color: var(--cream); font-size: 18px; font-family: ui-monospace, monospace; }
.mixcount.full { background: rgba(127, 176, 105, .12); border-color: rgba(127, 176, 105, .4); }

.mixlist { display: grid; gap: 9px; }
.mixrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1.5px solid var(--line-soft); border-radius: 11px; padding: 11px 14px;
}
.mixrow.on { border-color: var(--cream); background: #4a3024; }
.mixrow .nm { flex: 1; min-width: 0; }
.mixrow .nm b { display: block; font-size: 14px; }
.mixrow .nm small { color: var(--muted); font-size: 11.5px; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 32px; height: 32px; font-size: 18px; line-height: 1; font-weight: 700;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
}
.stepper button:hover:not(:disabled) { border-color: var(--cream); color: var(--cream); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper .qty { width: 26px; text-align: center; font-size: 16px; font-weight: 800; font-family: ui-monospace, monospace; }

/* แถบสรุปมิกเซอร์ที่เลือกไว้ (แสดงในขั้นที่ 3) */
.mixpick {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 12px 14px; margin-top: 14px; font-size: 13.5px;
}
.mixpick .lbl { color: var(--cream); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; }
.mixpick .val { flex: 1; min-width: 140px; }
.mixpick .val.none { color: var(--muted); }
.mixpick button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 7px 14px; font-size: 13px; }
.mixpick button:hover { color: var(--text); border-color: var(--cream); }

/* ---------- ป๊อบอัพเมนูเครื่องดื่มพร้อมรูป ---------- */
.modal-box.wide { max-width: 880px; }

.dkbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px;
}
.dkbar .btn-menu {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--panel-2); border: 1.5px solid var(--cream); color: var(--cream);
  padding: 10px 18px; font-size: 13.5px; font-weight: 700;
}
.dkbar .btn-menu:hover { background: var(--cream); color: #23130f; }
.dkbar .btn-menu .thumbs { display: flex; }
.dkbar .btn-menu .thumbs img {
  width: 20px; height: 26px; object-fit: cover; border-radius: 3px;
  margin-left: -6px; border: 1px solid var(--panel-2); background: var(--bg);
}
.dkbar .btn-menu .thumbs img:first-child { margin-left: 0; }

/* กริดการ์ดเครื่องดื่มในป๊อบอัพ */
.dkgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.dkcard {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line-soft);
  border-radius: 12px; padding: 0; overflow: hidden; color: var(--text);
  display: flex; flex-direction: column;
}
.dkcard:hover { border-color: var(--cream); }
.dkcard.sel { border-color: var(--cream); box-shadow: 0 0 0 3px rgba(185, 154, 110, .22); }
/* กรอบรูปต้องสูงเท่ากันทุกใบ จึงถอดรูปออกจากการคิดขนาดกล่องด้วย position:absolute
   (ไม่งั้นรูปที่อัตราส่วนต่างกัน เช่น Kono ที่เกือบจัตุรัส จะดันกล่องให้สูงไม่เท่าเพื่อน) */
.dkcard .ph {
  position: relative; flex: none; aspect-ratio: 3 / 4;
  background: var(--bg); border-bottom: 1px solid var(--line-soft);
}
.dkcard .ph img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.dkcard .ph .nopic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 10px; }
.dkcard .ph .nopic { color: var(--line); font-size: 11.5px; letter-spacing: .06em; }
.dkcard .ph .tick {
  position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cream); color: #23130f; font-size: 14px; font-weight: 800;
  display: none; align-items: center; justify-content: center;
}
.dkcard.sel .ph .tick { display: flex; }
.dkcard .tx { padding: 9px 11px 11px; flex: 1; }
.dkcard .tx b { display: block; font-size: 12.5px; line-height: 1.35; }
.dkcard .tx small { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.45; margin-top: 3px; }

/* รูปย่อในปุ่มเลือกเครื่องดื่ม (ขั้นที่ 3) */
.drink { display: flex; align-items: center; gap: 11px; }
.drink .dth {
  width: 38px; height: 50px; flex: none; border-radius: 5px; object-fit: contain;
  background: var(--bg); border: 1px solid var(--line-soft);
}
.drink .dtx { min-width: 0; }

/* รูปรวม + แถบรูปอาหาร (ใช้กับโซน Once ที่ PDF ไม่มีรูปแยกรายเครื่องดื่ม) */
.dkhero { margin: 14px 0 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); }
.dkhero img { display: block; width: 100%; height: auto; }
.dkhero figcaption { background: var(--panel-2); color: var(--muted); font-size: 11.5px; padding: 8px 12px; }

.dkstrip { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.dkstrip img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line-soft); display: block; background: var(--bg);
}

/* ---------- เลือกเครื่องดื่มแบบระบุจำนวน ---------- */
.drink { display: flex; align-items: center; gap: 11px; cursor: default; }
.drink.sel { border-color: var(--cream); background: #4a3024; }
.drink .dtx { flex: 1; min-width: 0; }
.drink .stepper { flex: none; }

.drinkgrp.blocked { opacity: .45; }
.drinkgrp h4 .off { color: var(--muted); font-weight: 400; letter-spacing: 0; }

.mixcount .lnk {
  background: transparent; border: 0; color: var(--cream); text-decoration: underline;
  font-size: 12.5px; padding: 0 0 0 6px;
}
.mixcount .lnk:hover { color: var(--cream-2); }

/* การ์ดในป๊อบอัพ: แตะรูป = เพิ่ม 1 และมีตัวเลขบอกจำนวนที่เลือก */
.dkcard { cursor: default; }
.dkcard .ph { cursor: pointer; }
.dkcard[aria-disabled] .ph, .dkcard .ph[aria-disabled] { cursor: not-allowed; }
.dkcard .ph .tick {
  position: absolute; top: 7px; right: 7px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: var(--cream); color: #23130f;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.dkcard .tx { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dkcard .tx .stepper { align-self: flex-start; }

/* ---------- แถบเตือนโหมดเดโม ---------- */
.demobar {
  position: sticky; top: 0; z-index: 80;
  background: #d99a4e; color: #23130f;
  text-align: center; font-size: 13px; line-height: 1.5;
  padding: 9px 16px; font-weight: 500;
}
.demobar[hidden] { display: none; }
.demobar b { font-weight: 800; }

.demobar #demoreset {
  background: #23130f; color: #f0e2cc; border: 0;
  font-size: 12px; font-weight: 700; padding: 5px 12px; margin-left: 8px;
  border-radius: 999px; vertical-align: 1px;
}
.demobar #demoreset:hover:not(:disabled) { background: #3d2820; }
.demobar #demoreset:disabled { opacity: .45; cursor: default; }

/* ---------- วันที่ปิดรับจอง ---------- */
.opt.closed { opacity: .45; cursor: not-allowed; }
.opt.closed:hover { border-color: var(--line-soft); }
.opt .closedtag { color: var(--held); font-weight: 700; }

/* ---------- กล่องเงื่อนไขการจอง + ติ๊กยอมรับ ---------- */
.termsbox {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 16px 18px; margin-top: 20px;
}
.termsbox h4 { margin: 0 0 8px; font-size: 13px; color: var(--cream); letter-spacing: .05em; }
.termsbox ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 12.5px; }
.termsbox ul li { margin: 5px 0; line-height: 1.55; }

.chk {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  padding: 10px 12px; border: 1.5px solid var(--line-soft); border-radius: 10px;
  margin-top: 9px; font-size: 13px; line-height: 1.5; transition: .15s;
}
.chk:hover { border-color: var(--cream); }
.chk input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--cream); cursor: pointer; }
.chk input:checked ~ span { color: var(--text); }
.chk span { color: var(--muted); }
.chk.miss { border-color: var(--danger); background: rgba(217, 99, 95, .08); }
