/* ==========================================================================
   Coach Sher — coachsher.com
   Dark + gold editorial layout, Thai-first typography
   ========================================================================== */

:root {
  --ink: #0b0a09;
  --surface: #131110;
  --surface-2: #1a1714;
  --line: #33291f;
  --gold: #d9a44e;
  --gold-2: #f4cc83;
  --cream: #f8efdc;
  --cream-2: #f0e3c8;
  --text: #f7f2e8;
  --muted: #c9bfb1;
  --brown: #3a2718;
  /* --font-head: "Noto Serif Thai", "Cormorant Garamond", Georgia, serif; */
  --font-head: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--ink); padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* background: rgba(9, 8, 7, .92); */
  background: radial-gradient(ellipse at 16% 0%, rgba(217, 164, 78, .45), #0000003b 94%), #160d0591;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand img { width: clamp(120px, 16vw, 168px); height: auto; max-height: 62px; object-fit: contain; }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 28px); font-size: .95rem; }
.site-nav a {
  text-decoration: none; color: var(--text); padding: 6px 0;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.site-nav a.btn { border-bottom: 0; white-space: nowrap; flex-shrink: 0; padding: 9px 20px; border-radius: 40px; }
.site-nav > .btn { flex-shrink: 0; white-space: nowrap; }
.site-nav a:hover { color: var(--gold-2); }
.site-nav a[aria-current="page"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.site-nav .lang-switch {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 40px; padding: 5px 12px;
}
.site-nav .lang-switch:hover { border-color: var(--gold); }

.nav-toggle, .nav-burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #1a1206;
  font-family: var(--font-body); font-weight: 500; font-size: .95rem;
  text-decoration: none; padding: 13px 26px; border: 1px solid var(--gold);
  border-radius: 40px; cursor: pointer; transition: background .2s, transform .2s, color .2s;
}
.btn:hover { background: var(--gold-2); border-color: var(--gold-2); transform: translateY(-1px); }
.btn-sm { padding: 8px 18px; font-size: .82rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: #57452f; }
.btn-ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold-2); }
.btn-dark { background: var(--brown); border-color: var(--brown); color: var(--cream); }
.btn-dark:hover { background: #241608; border-color: #241608; color: #fff; }
.btn-outline-dark { background: transparent; color: var(--brown); border-color: rgba(58, 39, 24, .45); }
.btn-outline-dark:hover { background: rgba(58, 39, 24, .07); color: var(--brown); border-color: var(--brown); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: stretch; min-height: min(760px, 92vh);
  background:
    radial-gradient(ellipse at 78% 18%, rgba(217, 164, 78, .16), transparent 58%),
    radial-gradient(ellipse at 12% 88%, rgba(217, 164, 78, .08), transparent 55%),
    var(--ink);
  border-bottom: 1px solid var(--line);
}
.hero-media { position: relative; overflow: hidden; min-height: 420px; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none; /* ให้การลาก/คลิกทะลุไปถึงสไลด์ได้ */
  background: linear-gradient(90deg, transparent 62%, var(--ink) 100%),
              linear-gradient(0deg, rgba(11, 10, 9, .85) 0%, transparent 30%);
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px, 6vw, 84px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 84px);
  max-width: 700px;
}
.eyebrow {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 6px; font-weight: 500;
}
.tagline { font-size: .95rem; color: var(--muted); letter-spacing: .02em; margin: 0; }
.rule { display: block; width: 74px; height: 1px; background: var(--gold); margin: 20px 0 24px; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500;
  letter-spacing: -.01em; line-height: 1.15; margin: 0 0 20px;
}
.lead { font-size: clamp(1rem, 1.35vw, 1.12rem); color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions.center { justify-content: center; }

/* ---------- hero slider (รูปเลื่อนซ้าย–ขวา จัดการที่ /admin/content.php) ---------- */
.hero-track {
  position: absolute; inset: 0; display: flex;
  transition: transform .62s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
  cursor: grab;
  touch-action: pan-y; /* ปัดซ้าย–ขวาให้สไลด์ ปัดขึ้น–ลงให้หน้าเว็บเลื่อนปกติ */
}
.hero-media.is-dragging .hero-track { cursor: grabbing; }
.hero-media.is-dragging { user-select: none; }
.hero-track img { -webkit-user-drag: none; user-select: none; }
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; }

/* ลิงก์ทับทั้งรูป (ใช้เมื่อไม่ได้ใส่ข้อความบนปุ่ม) */
.hero-slide-hit { position: absolute; inset: 0; z-index: 1; }

.hero-slide-cap {
  position: absolute; z-index: 2;
  left: clamp(16px, 3vw, 30px); bottom: 72px;
  max-width: min(440px, 76%);
}
/* เงาซอฟต์ใต้ข้อความ — ให้อ่านได้แม้รูปสว่างตรงมุม */
.hero-slide-cap::before {
  content: ""; position: absolute; z-index: -1;
  inset: -22px -34px -18px -30px; border-radius: 18px;
  background: radial-gradient(ellipse at 0% 100%,
      rgba(7, 6, 5, .88) 0%, rgba(7, 6, 5, .62) 48%, rgba(7, 6, 5, 0) 78%);
}
.hero-slide-cap p {
  margin: 0 0 10px; font-size: .92rem; line-height: 1.5; letter-spacing: .02em;
  font-weight: 400; color: var(--cream-2); text-shadow: 0 2px 16px rgba(0, 0, 0, .85);
}
.hero-slide-cap p::before {
  content: ""; display: block; width: 34px; height: 1px;
  background: var(--gold); margin-bottom: 10px;
}
.hero-slide-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 40px;
  background: rgba(18, 15, 12, .62); border: 1px solid rgba(217, 164, 78, .55);
  color: var(--gold-2); font-size: .82rem; text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s, color .2s;
}
.hero-slide-btn:hover { background: var(--gold); border-color: var(--gold); color: #1a1206; }

.hero-play {
  position: absolute; z-index: 3; top: 20px; right: 20px;
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; padding: 0;
  /* background: rgba(12, 10, 8, .5); border: 1px solid rgba(217, 164, 78, .6); */
  background: #ff0000; border: 1px solid rgba(217, 164, 78, .6);
  color: var(--gold-2); font-size: .95rem; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.hero-play:hover { background: var(--gold); border-color: var(--gold); color: #1a1206; transform: scale(1.04); }
.hero-play::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(217, 164, 78, .25);
  animation: heroPlayPulse 3.4s ease-out infinite;
}
@keyframes heroPlayPulse {
  0% { transform: scale(.92); opacity: .75; }
  70% { transform: scale(1.16); opacity: 0; }
  100% { opacity: 0; }
}

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; cursor: pointer;
  background: rgba(12, 10, 8, .48); border: 1px solid rgba(217, 164, 78, .4);
  color: var(--cream); font-size: 1.45rem; line-height: 1;
  backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s, color .2s;
}
.hero-arrow span { display: block; margin-top: -5px; }
.hero-arrow:hover { background: var(--gold); border-color: var(--gold); color: #1a1206; }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

.hero-dots {
  position: absolute; z-index: 3; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 30px;
  background: rgba(10, 9, 8, .42); backdrop-filter: blur(4px);
}
.hero-dots button {
  width: 8px; height: 8px; padding: 0; border-radius: 20px; cursor: pointer;
  border: 1px solid rgba(217, 164, 78, .65); background: transparent;
  transition: width .25s ease, background .2s, border-color .2s;
}
.hero-dots button.is-on { width: 22px; background: var(--gold); border-color: var(--gold); }

/* ---------- video lightbox (YouTube / TikTok จากสไลด์) ---------- */
.video-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 4vw, 40px);
  background: rgba(5, 4, 3, .86); backdrop-filter: blur(6px);
  animation: videoFade .22s ease;
}
.video-modal[hidden] { display: none; }
.video-modal-box { position: relative; width: min(980px, 100%); }
.video-modal-frame {
  position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px; padding: 0;
  border-radius: 50%; cursor: pointer;
  background: rgba(19, 17, 16, .92); border: 1px solid var(--line); color: var(--text);
  font-size: .9rem;
}
.video-modal-close:hover { border-color: var(--gold); color: var(--gold-2); }
body.video-open { overflow: hidden; }
@keyframes videoFade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .hero-slide-cap { bottom: 62px; max-width: 84%; }
  .hero-slide-cap p { font-size: .86rem; }
  .hero-play { width: 46px; height: 46px; top: 14px; right: 14px; font-size: .85rem; }
  .hero-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
}

/* จอแคบ: ลูกศรจะทับคำบรรยาย — ใช้ปัดนิ้ว/จุดนำทางแทน */
@media (max-width: 700px) {
  .hero-arrow { display: none; }
  .hero-slide-cap { bottom: 56px; max-width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { transition: none; }
  .hero-play::after { animation: none; }
  .video-modal { animation: none; }
}

/* ---------- pillars ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 44px);
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(38px, 5vw, 64px) clamp(18px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
}
.pillar { text-align: center; }
.pillar-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px;
  border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-2); font-size: 1.35rem;
}
.pillar h2 { font-size: 1.08rem; letter-spacing: .01em; margin-bottom: 6px; }
.pillar p { font-size: .93rem; color: var(--muted); margin: 0; }

/* ---------- sections ---------- */
.section { padding: clamp(52px, 7vw, 96px) clamp(18px, 4vw, 32px); }
.section-head { max-width: 720px; margin: 0 auto clamp(30px, 4vw, 48px); text-align: center; }
.section-head.left { text-align: left; margin-left: 0; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 6px 0 12px; }
.section-sub { color: var(--muted); margin: 0; }
.note { text-align: center; color: var(--muted); font-size: .88rem; margin: 26px 0 0; }

/* ---------- service cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; max-width: var(--wrap); margin: 0 auto;
}
.cards.three { max-width: 980px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 24px; transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px;
  border: 1px solid rgba(217, 164, 78, .55); border-radius: 50%;
  color: var(--gold-2); font-size: 1.3rem;
}
.card-icon.big { width: 62px; height: 62px; font-size: 1.6rem; margin-bottom: 18px; }
.card h2, .card h3 { font-size: 1.24rem; margin: 0 0 8px; }
.card p { font-size: .93rem; color: var(--muted); margin: 0 0 18px; }
.card-link { font-size: .82rem; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }
.card:hover .card-link { color: var(--gold-2); }

/* การ์ดบริการแบบมีภาพประกอบ (เลือกได้จากหลังบ้าน: บริการ → การ์ดหน้า /services) */
.card.card-has-photo { padding: 0 0 24px; overflow: hidden; }
.card.card-has-photo .card-photo {
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: #0b0a09; border-bottom: 1px solid var(--line);
}
.card.card-has-photo .card-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: .94; transition: transform .5s ease, opacity .3s;
}
.card.card-has-photo:hover .card-photo img { transform: scale(1.04); opacity: 1; }
.card.card-has-photo .card-body { display: block; padding: 20px 26px 0; }
.card.card-has-photo h2, .card.card-has-photo h3 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
  .card.card-has-photo .card-photo img { transition: none; }
}

/* ---------- steps ---------- */
.steps-section { background: var(--cream); color: var(--brown); }
.steps-section .eyebrow { color: #9a6a22; }
.steps-section .section-sub { color: #6b5334; }
.steps-wrap { max-width: var(--wrap); margin: 0 auto; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
}
.steps li { border-top: 1px solid rgba(58, 39, 24, .25); padding-top: 18px; }
.step-num { font-family: var(--font-head); font-size: 1.6rem; color: #b07c2c; display: block; margin-bottom: 4px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { font-size: .93rem; color: #5b472c; margin: 0; }

/* ---------- about teaser ---------- */
.about-teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px); align-items: center;
  max-width: var(--wrap); margin: 0 auto;
}
.teaser-media img {
  border-radius: var(--radius); border: 1px solid var(--line);
  aspect-ratio: 4 / 3; object-fit: cover; object-position: center 25%;
}
.teaser-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 6px 0 0; }
.teaser-copy p { color: var(--muted); }
.text-link { color: var(--gold); text-decoration: none; font-size: .95rem; }
.text-link:hover { color: var(--gold-2); }

/* ---------- cta band ---------- */
.cta-band {
  background: linear-gradient(120deg, #f6e3bd, #e2b165 55%, #d3a25a);
  color: var(--brown); padding: clamp(44px, 6vw, 76px) clamp(18px, 4vw, 32px);
}
.cta-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.cta-inner h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 10px; }
.cta-inner p { color: #5b4327; margin-bottom: 24px; }

/* ---------- page head ---------- */
.page-head {
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 32px) clamp(30px, 4vw, 52px);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(217, 164, 78, .16), transparent 60%),
    var(--ink);
  border-bottom: 1px solid var(--line);
}
.page-head .inner { max-width: var(--wrap); margin: 0 auto; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 8px 0 16px; max-width: 22ch; }
.page-head .lead { margin: 0; }

/* ---------- page-head + รูปประกอบด้านขวา (ใช้ที่ /about) -------------------
   ข้อความอยู่ซ้าย รูป 1–3 รูปอยู่ขวา · จอ ≤1024px ซ่อนรูป (แกลเลอรีด้านล่างมีอยู่แล้ว) */
.page-head-split .inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 38%);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.page-head-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: clamp(220px, 24vw, 300px);
}
.page-head-shots[data-count="1"] { grid-template-columns: 1fr; }
.page-head-shots[data-count="3"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.page-head-shots[data-count="3"] .page-head-shot:first-child { grid-row: span 2; }
.page-head-shot {
  margin: 0; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(217, 164, 78, .30); background: #0b0a09;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .95);
}
.page-head-shot img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 24%;
  transition: transform .5s ease;
}
.page-head-shot:hover img { transform: scale(1.04); }
.service-head .card-icon { margin-top: 6px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.error-page { text-align: left; }

/* ---------- prose ---------- */
.prose-wrap { padding-top: clamp(36px, 5vw, 64px); padding-inline: max(clamp(18px, 4vw, 32px), calc((100% - var(--wrap)) / 2)); }
/* คอลัมน์อ่าน: กว้างไม่เกิน 760px และอยู่กลางหน้า (เดิมชิดซ้ายทำให้เหลือที่ว่างด้านขวาเยอะ) */
.prose { max-width: 760px; margin-inline: auto; }
.prose p { font-size: 1.06rem; line-height: 1.85; color: #ddd4c6; margin: 0 0 1.05em; }
.prose > p:first-of-type, .prose > p:first-child { font-size: 1.12rem; color: #e9e1d3; }
.prose h2 { font-size: 1.32rem; margin: 36px 0 10px; color: var(--gold-2); }
.prose .note { text-align: left; margin-top: 12px; font-size: .85rem; color: #a89c8c; }
.about-quote {
  margin: 40px 0; padding: 24px 28px; border-left: 2px solid var(--gold);
  font-family: var(--font-head); font-size: 1.3rem; line-height: 1.5; color: var(--gold-2);
  background: rgba(217, 164, 78, .05);
}
.about-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 30px;
}
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--muted); font-size: .96rem; }
.plain-list li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.plain-list.check li::before { content: "✦"; font-size: .8rem; top: .15em; }

/* ---------- about: รูปภาพประกอบ (จากหลังบ้าน → หน้า About) ---------- */
.about-gallery-section { padding-top: 0; }
.about-gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
  max-width: var(--wrap); margin: 0 auto;
}
.about-figure { margin: 0; }
.about-figure a {
  display: block; position: relative; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.about-figure a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.about-figure a img { transition: transform .35s ease; }
.about-figure a:hover img, .about-figure a:focus-visible img { transform: scale(1.02); }
.about-figure img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); background: #0b0a09;
}
.about-figure figcaption { margin-top: 8px; font-size: .86rem; color: var(--muted); }

/* GLightbox — ปรับให้เข้ากับธีม (CSS ไลบรารีโหลดทีหลัง main.css จึงใช้ body นำหน้าเพื่อชนะ specificity) */
body .goverlay { background: #080706; }
body .gslide-description .gdesc-inner { background: rgba(11, 10, 9, .92); }
body .gslide-description .gslide-desc { font-family: var(--font); font-size: .92rem; color: #e9e0d1; }

/* ตัวนับรูป + แถบรูปย่อ (เติมจาก assets/js/about-gallery.js ตอนเปิดกล่อง) */
body .about-gcounter {
  position: fixed; top: 14px; left: 18px; z-index: 20;
  font-family: var(--font); font-size: .82rem; letter-spacing: .06em;
  color: rgba(233, 224, 209, .78); pointer-events: none;
}
body .about-gthumbs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; align-items: flex-end; gap: 8px;
  padding: 26px 12px 10px; pointer-events: auto;
  background: linear-gradient(180deg, rgba(8, 7, 6, 0) 0, rgba(8, 7, 6, .88) 22px, rgba(8, 7, 6, .88) 100%);
  transition: bottom .25s ease;
}
body .about-gthumb {
  width: 64px; height: 48px; padding: 0; border: 1px solid rgba(217, 164, 78, .28);
  border-radius: 6px; overflow: hidden; background: #0b0a09; cursor: pointer;
  opacity: .62; transition: opacity .2s, border-color .2s, transform .2s;
}
body .about-gthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
body .about-gthumb:hover { opacity: .92; }
body .about-gthumb.is-active { opacity: 1; border-color: var(--gold); transform: translateY(-2px); }
body .about-gthumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 620px) {
  body .about-gthumb { width: 48px; height: 36px; }
  body .about-gcounter { top: 10px; left: 12px; font-size: .76rem; }
}
.service-figure { margin: 36px 0; }
.service-figure:first-child { margin-top: 0; margin-bottom: 28px; }
.service-figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }

/* วิดีโอในหน้าบริการ (เล่นในกล่องเดียวกับ hero) */
.service-video { margin: 36px 0; }
.video-poster {
  position: relative; display: block; width: 100%; min-height: 200px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #0b0a09; cursor: pointer; line-height: 0;
}
.video-poster img { display: block; width: 100%; height: auto; opacity: .82; transition: opacity .2s, transform .35s; }
.video-poster:hover img { opacity: 1; transform: scale(1.02); }
.video-poster-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; padding-left: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 9, 8, .72); border: 1px solid rgba(217, 164, 78, .7);
  color: var(--gold-2); font-size: 1.1rem; transition: background .2s, color .2s, border-color .2s;
}
.video-poster:hover .video-poster-play { background: var(--gold); color: #1a1206; border-color: var(--gold); }
.video-poster:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .video-poster img, .video-poster-play { transition: none; }
}
.inline-cta {
  margin-top: 40px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--surface);
}
.inline-cta p { margin: 0; color: var(--muted); max-width: 42ch; }
.inline-cta strong { color: var(--text); display: block; font-family: var(--font-head); font-weight: 500; font-size: 1.1rem; }
.other-services { border-top: 1px solid var(--line); }

/* ---------- contact ---------- */
.contact-wrap {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(30px, 5vw, 70px); max-width: var(--wrap); margin: 0 auto; align-items: start;
}
.contact-info h2, .contact-form h2 { font-size: 1.15rem; margin: 0 0 6px; color: var(--gold-2); }
.contact-info > h2:not(:first-child) { margin-top: 26px; }
.contact-info p { color: var(--muted); margin: 0 0 6px; }
.contact-info a { color: var(--text); }
.contact-info a:hover { color: var(--gold-2); }
.social.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.social.plain a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.social.plain a:hover { color: var(--gold-2); }

.contact-form {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3.4vw, 36px);
}
.contact-form h2 { margin-bottom: 18px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; background: #0d0c0b; color: var(--text);
  border: 1px solid #3b3127; border-radius: 8px;
  padding: 12px 14px; font-family: var(--font-body); font-size: .97rem;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); outline: none; }
.field textarea { resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: 4px 0 20px; }
.consent input { margin-top: 4px; accent-color: var(--gold); }
.consent a { color: var(--gold); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 8px; font-size: .93rem; margin-bottom: 18px; border: 1px solid; }
.alert.success { background: rgba(120, 168, 96, .12); border-color: rgba(120, 168, 96, .5); color: #cfe6bd; }
.alert.error { background: rgba(190, 90, 70, .12); border-color: rgba(190, 90, 70, .5); color: #f3c7bd; }

/* ---------- footer ---------- */
.site-footer { background: #080706; border-top: 1px solid var(--line); padding-top: clamp(38px, 5vw, 60px); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px) 34px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px;
}
.footer-brand img { width: 150px; height: auto; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: .85rem; letter-spacing: .06em; margin: 0; }
.footer-col h3 { font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-family: var(--font-body); font-weight: 500; }
.footer-col p { margin: 0 0 6px; color: var(--muted); font-size: .92rem; }
.footer-col a { text-decoration: none; color: var(--muted); }
.footer-col a:hover { color: var(--gold-2); }
.social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid #1d1916; padding: 16px clamp(18px, 4vw, 32px);
  max-width: var(--wrap); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .78rem; color: #8d8377;
}
.footer-bottom a { color: #8d8377; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .page-head-split .inner { grid-template-columns: 1fr; }
  .page-head-shots { display: none; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { min-height: 0; height: min(72vw, 520px); }
  .hero-media::after {
    background: linear-gradient(0deg, var(--ink) 2%, transparent 45%);
  }
  .hero-copy { padding-top: 8px; max-width: none; }
  .cards, .steps, .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-wrap { grid-template-columns: 1fr; }
  .about-teaser { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px; cursor: pointer;
  }
  .nav-burger span { display: block; height: 1.5px; background: var(--gold); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0a0908; border-bottom: 1px solid var(--line);
    padding: 8px 18px 18px; display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid #1c1815; }
  .site-nav .lang-switch { border: 0; border-bottom: 1px solid #1c1815; border-radius: 0; padding: 12px 0; }
  .site-nav .btn { margin-top: 14px; }
  .header-inner { position: relative; }
  .pillars { grid-template-columns: 1fr; text-align: left; gap: 26px; }
  .pillar { display: grid; grid-template-columns: 54px 1fr; column-gap: 16px; text-align: left; }
  .pillar-icon { grid-row: span 2; margin: 0; align-self: start; }
  .cards, .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .page-head h1 { max-width: none; }
  .about-grid { gap: 22px; }
  .about-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .about-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .hero-actions .btn { width: 100%; }
  .cta-inner .hero-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- blog listing ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px; max-width: var(--wrap); margin: 0 auto;
}
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.post-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #1a1714; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-placeholder {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-size: 2rem; color: var(--gold);
  background: radial-gradient(circle at 30% 30%, rgba(217, 164, 78, .22), transparent 60%), #141110;
}
.post-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-card-body h2 { font-size: 1.2rem; line-height: 1.35; margin: 0; }
.post-card-body h2 a { text-decoration: none; }
.post-card-body h2 a:hover { color: var(--gold-2); }
.post-card-body p { font-size: .92rem; color: var(--muted); margin: 0; }
.post-card-body .card-link { margin-top: auto; padding-top: 6px; }
.post-meta {
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: #9d9285; display: flex; flex-wrap: wrap; gap: 8px; margin: 0;
}
.post-card-mini { padding: 22px 22px 24px; }
.post-card-mini h3 { font-size: 1.1rem; margin: 6px 0 8px; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 44px auto 0; max-width: var(--wrap); flex-wrap: wrap;
}
.pager-status { font-size: .85rem; color: var(--muted); letter-spacing: .06em; }
.empty-state { text-align: center; padding: 40px 0 60px; color: var(--muted); max-width: var(--wrap); margin: 0 auto; }

/* ---------- single article ---------- */
.article-head {
  padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 32px) clamp(24px, 3vw, 36px);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(217, 164, 78, .15), transparent 58%),
    var(--ink);
  border-bottom: 1px solid var(--line);
}
.article-head .inner { max-width: var(--wrap); margin: 0 auto; }
.article-head h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem); margin: 0 0 16px; max-width: 26ch;
}
.article-cover { max-width: 980px; margin: clamp(24px, 4vw, 40px) auto 0; padding: 0 clamp(18px, 4vw, 32px); }
.article-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; max-height: 520px; object-fit: cover; }
/* เนื้อหาบทความ: คอลัมน์อ่านกว้าง 800px บนเดสก์ท็อป/แท็บเล็ต · มือถือเต็มความจอเหมือนเดิม
   (ต้องเขียนทับ .prose ด้วย เพราะ .prose ตั้ง max-width: 760px ไว้ — max-width ที่เล็กกว่าจะชนะ) */
.article-body,
.article-body.prose {
  max-width: calc(800px + 2 * clamp(18px, 4vw, 32px));
  margin-inline: auto;
  padding: clamp(28px, 4vw, 48px) clamp(18px, 4vw, 32px) clamp(20px, 4vw, 40px);
}
.article-body h2 { font-size: 1.5rem; color: var(--gold-2); margin: 40px 0 12px; }
.article-body h3, .article-body h4 { font-size: 1.18rem; color: var(--text); margin: 30px 0 10px; }
.article-body p { color: #ddd4c6; }
.article-body ul, .article-body ol { color: #ddd4c6; padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .5em; }
.article-body img { border-radius: 10px; margin: 1.4em 0; }
.article-body blockquote {
  margin: 24px 0; padding: 16px 22px; border-left: 2px solid var(--gold);
  background: rgba(217, 164, 78, .05); font-style: italic; color: var(--gold-2);
}
.article-back { margin-top: 26px; }

@media (max-width: 980px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .post-grid { grid-template-columns: 1fr; }
  .article-head h1 { max-width: none; }
  .article-cover { padding: 0 16px; }
}

/* ---------- article gallery ---------- */
.post-gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 1.4em 0 2em;
}
.post-gallery figure { margin: 0; }
.post-gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 10px; margin: 0;
}
@media (max-width: 620px) {
  .post-gallery { grid-template-columns: 1fr; }
}

/* ---------- booking ---------- */
.booking-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(22px, 3.5vw, 42px); max-width: var(--wrap); margin: 0 auto; align-items: start;
}
.booking-main { display: flex; flex-direction: column; gap: 14px; }
.booking-step {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.6vw, 26px);
}
.booking-step h2 {
  font-size: 1.02rem; display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-family: var(--font-body); font-weight: 500;
}
.step-badge {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-2);
  font-size: .8rem; font-family: var(--font-body);
}
.service-picker .field { margin: 0; }

.day-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: thin; scroll-snap-type: x mandatory;
}
.day-chip {
  flex: 0 0 auto; min-width: 78px; text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  color: var(--muted); background: #0f0d0c; scroll-snap-align: start;
  transition: border-color .2s, color .2s, background .2s;
}
.day-chip:hover { border-color: var(--gold); color: var(--gold-2); }
.day-chip.is-active { border-color: var(--gold); background: rgba(217, 164, 78, .12); color: var(--gold-2); }
.day-dow { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.day-num { display: block; font-size: .9rem; font-weight: 500; margin-top: 2px; }

.slots { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.slot span {
  display: inline-block; min-width: 74px; text-align: center; padding: 9px 14px;
  border: 1px solid #3b3127; border-radius: 40px; font-size: .92rem; color: var(--text);
  background: #0d0c0b; transition: border-color .2s, background .2s, color .2s;
}
.slot input:checked + span { background: var(--gold); border-color: var(--gold); color: #1a1206; font-weight: 600; }
.slot input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.slot:not(.slot-taken):hover span { border-color: var(--gold); }

/* ---------- ช่องเวลาที่ถูกจองแล้ว ---------- */
.slot-taken > span {
  display: inline-flex; align-items: center; gap: 7px;
  border-style: dashed; border-color: #332b24; color: #837567;
  background: #0a0908; cursor: not-allowed;
}
.slot-tag {
  font-style: normal; font-size: .66rem; letter-spacing: .01em; line-height: 1;
  padding: 3px 7px; border-radius: 20px; white-space: nowrap;
  background: rgba(170, 138, 100, .2); color: #c3ad93;
}
.slot-tag-free { background: rgba(217, 164, 78, .2); color: var(--gold-2); }
.slot-hint { font-size: .78rem; color: var(--muted); margin: -6px 0 16px; }
.slots-all-taken { margin-top: -6px; }

/* ---------- เอฟเฟกต์กระตุ้นการจอง (โค้ชตั้งได้ที่ /admin/availability.php) ---------- */
@property --slot-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* เอฟเฟกต์ใช้กับช่องที่ว่างเท่านั้น — ช่อง "ถูกจองแล้ว" แสดงนิ่ง ๆ ไม่มีแสงวิ่ง/กระพริบ */
.slots-urge-pulse .slot:not(.slot-taken) span { animation: slotPulse 3.4s ease-in-out infinite; }
.slots-urge-pulse .slot:not(.slot-taken):nth-child(3n + 2) span { animation-delay: .55s; }
.slots-urge-pulse .slot:not(.slot-taken):nth-child(3n + 3) span { animation-delay: 1.1s; }
@keyframes slotPulse {
  0%, 100% { border-color: #3b3127; box-shadow: 0 0 0 rgba(217, 164, 78, 0); }
  50% { border-color: rgba(217, 164, 78, .8); box-shadow: 0 0 12px rgba(217, 164, 78, .16); }
}

.slots-urge-sweep .slot:not(.slot-taken) span { position: relative; }
.slots-urge-sweep .slot:not(.slot-taken) span::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--slot-angle),
    rgba(240, 214, 168, 0) 0deg 240deg,
    rgba(240, 214, 168, .9) 300deg,
    rgba(240, 214, 168, 0) 348deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: slotSweep 3.6s linear infinite;
  pointer-events: none;
}
.slots-urge-sweep .slot:not(.slot-taken):nth-child(2n) span::after { animation-delay: -1.3s; }
.slots-urge-sweep .slot:not(.slot-taken):nth-child(3n) span::after { animation-delay: -2.4s; }
@keyframes slotSweep { to { --slot-angle: 360deg; } }
.slots-urge-sweep .slot input:checked + span::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .slots-urge-pulse .slot span,
  .slots-urge-sweep .slot span::after { animation: none; }
}

.grid-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.booking-summary {
  border: 1px dashed #3b3127; border-radius: 10px; padding: 10px 14px;
  margin-bottom: 16px; display: flex; flex-direction: column; gap: 2px;
}
.summary-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.booking-summary strong { font-size: 1rem; font-weight: 500; }
.booking-summary span:last-child { font-size: .88rem; color: var(--gold-2); }
.booking-summary.summary-row { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.booking-summary.summary-row .summary-label { flex-basis: 100%; }
.small-note { text-align: left; margin: 12px 0 0; }
.booking-empty {
  border: 1px dashed #4a3d30; border-radius: 10px; padding: 18px; text-align: center;
  color: var(--muted); font-size: .92rem; margin: 0;
}

.booking-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #100e0c; }
.side-card h2 { font-size: .92rem; font-family: var(--font-body); font-weight: 600; color: var(--gold-2); margin: 0 0 6px; }
.side-card h2:not(:first-child) { margin-top: 18px; }
.side-card p { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.side-card a { color: var(--text); }
.side-card a:hover { color: var(--gold-2); }
.side-card.muted { background: transparent; }
.mini-steps { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .9rem; }
.mini-steps li { margin-bottom: 8px; }

.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;
}

/* ---------- booking confirmation ---------- */
.confirm-wrap { max-width: 760px; margin: 0 auto; }
.confirm-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  padding: clamp(22px, 3.4vw, 34px);
}
.ref-block { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 22px; }
.ref-block strong { font-family: var(--font-head); font-size: 1.7rem; letter-spacing: .04em; color: var(--gold-2); }
.ref-block .summary-label { flex-basis: 100%; }
.ref-block + .code-moved { margin: -12px 0 20px; }
.badge.status-new { color: #f0d6a8; border-color: rgba(217, 164, 78, .6); background: rgba(217, 164, 78, .1); }
.badge.status-confirmed { color: #b7dd9f; border-color: rgba(127, 176, 105, .6); background: rgba(127, 176, 105, .1); }
.badge.status-done, .badge.status-cancelled { color: #c9bfb1; border-color: #4a3d30; }
.badge { display: inline-block; font-size: .75rem; padding: 3px 10px; border-radius: 20px; border: 1px solid; }

.booking-detail { margin: 0 0 22px; border-top: 1px solid var(--line); }
.booking-detail > div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid #241f1a; }
.booking-detail dt { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.booking-detail dd { margin: 0; font-size: .95rem; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.confirm-next h2 { font-size: 1.1rem; margin-bottom: 8px; }

/* ---------- status check + booking code ---------- */
.alert.warn { background: rgba(217, 164, 78, .1); border-color: rgba(217, 164, 78, .5); color: #f0d6a8; }
.code-warning { margin-bottom: 20px; line-height: 1.65; }
.code-warning strong { display: block; margin-bottom: 3px; color: var(--gold-2); font-size: .95rem; }
.code-value { font-family: var(--font-head); }
.copy-code { padding: 5px 14px; }
.field-help { display: block; margin-top: 5px; color: #a89c8c; font-size: .78rem; line-height: 1.5; }
.side-link { margin-top: 12px; }
.check-form {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: clamp(20px, 3vw, 30px); margin-bottom: 22px;
}
.check-form .btn { margin-top: 6px; }
.check-result { margin-top: 4px; }
.check-help { margin-top: 18px; }

/* ---------- booking calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.cal-head strong { font-weight: 500; font-size: .95rem; color: var(--gold-2); }
.cal-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 1.1rem; line-height: 1;
  touch-action: manipulation;
}
.cal-nav:hover { border-color: var(--gold); color: var(--gold-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: .72rem; color: var(--muted); padding-bottom: 2px; }
.cal-pad { aspect-ratio: 1 / 1; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 9px;
  background: #14110f; color: var(--text); text-decoration: none; font-size: .92rem;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.cal-day:active { transform: scale(.96); }
.cal-day.is-loading { opacity: .55; }
a.cal-day:hover { border-color: var(--gold); color: var(--gold-2); }
.cal-day.is-off { opacity: .28; }
.cal-day.is-full { opacity: .52; }
.cal-full { font-size: .6rem; line-height: 1; color: #b37a63; margin-top: 1px; }
.cal-day.is-today { border-color: rgba(244, 204, 131, .7); }
.cal-day.is-selected { background: var(--gold); border-color: var(--gold); color: #1a1206; font-weight: 600; }
.cal-day.is-selected .cal-free { color: #4a3712; }
.cal-free { font-size: .68rem; color: #9ed07f; margin-top: 1px; line-height: 1; }
.cal-legend { font-size: .74rem; color: var(--muted); margin: 8px 0 0; }

/* ---------- month switch (AJAX): fade in place, never jump ---------- */
.cal-panel { transition: opacity .16s ease; }
.cal-panel.is-loading { opacity: .45; }
.cal-panel.is-in { animation: calIn .26s ease; }
@keyframes calIn {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.cal-nav.is-busy { opacity: .4; pointer-events: none; }
.cal-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- time slots: smooth swap (AJAX date picking) ---------- */
.slot-area { min-height: 58px; transition: opacity .18s ease; }
.slot-area.is-swapping { opacity: .35; }
.slot-area.is-in { animation: slotIn .28s ease; }
@keyframes slotIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.slot-loading { font-size: .82rem; color: var(--muted); margin: 0 0 10px; }
.is-hidden { display: none !important; }

/* ---------- sticky summary ---------- */
.summary-card { position: sticky; top: 16px; }
.summary-card dl { margin: 0 0 12px; display: grid; gap: 8px; }
.summary-card dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #2a231c; padding-bottom: 6px; }
.summary-card dt { color: var(--muted); font-size: .8rem; }
.summary-card dd { margin: 0; font-size: .9rem; text-align: right; color: var(--gold-2); }

/* ---------- booking overlay (กำลังจองคิว / สำเร็จ) ---------- */
.booking-overlay {
  position: fixed; inset: 0; z-index: 9998; padding: 24px;
  background: rgba(6, 5, 4, .84); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.booking-overlay[hidden] { display: none; }
.bo-box { text-align: center; max-width: 420px; }
.bo-spinner {
  width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  border: 3px solid rgba(217, 164, 78, .25); border-top-color: var(--gold);
  animation: bo-spin .9s linear infinite;
}
@keyframes bo-spin { to { transform: rotate(360deg); } }
.bo-title { font-family: var(--font-head); font-size: 1.25rem; color: var(--gold-2); margin: 0 0 6px; }
.bo-sub { color: var(--muted); font-size: .9rem; margin: 0; }
.booking-overlay[data-state="done"] .bo-spinner { border-color: #7fb069; animation: none; position: relative; }
.booking-overlay[data-state="done"] .bo-spinner::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; color: #9ed07f;
}
.booking-overlay[data-state="error"] .bo-spinner { display: none; }
.booking-overlay[data-state="error"] .bo-title { font-size: 1rem; color: #f3c7bd; line-height: 1.6; }

@media (max-width: 980px) {
  .summary-card { position: static; }
}

/* ---------- self-service change (หน้าเช็กสถานะ) ---------- */
.change-card { margin-top: 16px; }
.change-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.change-actions form { margin: 0; }
.resched-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.slot-btn {
  border: 1px solid var(--line); background: #14110f; color: var(--text);
  padding: 9px 16px; border-radius: 20px; font-size: .88rem; cursor: pointer;
}
.slot-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.booking-detail .status-ok { color: #9ed07f; }

@media (max-width: 980px) {
  .booking-wrap { grid-template-columns: 1fr; }
  .booking-side { order: 0; }
}
@media (max-width: 620px) {
  .grid-2col { grid-template-columns: 1fr; }
  .booking-detail > div { grid-template-columns: 1fr; gap: 2px; }
  .slot span { min-width: 68px; padding: 8px 12px; }
  /* ปุ่มเปลี่ยนเดือนให้กดง่ายด้วยนิ้ว (≥40px) */
  .cal-nav { width: 42px; height: 42px; font-size: 1.25rem; }
}

/* slimmer, dark scrollbar for the date strip */
.day-strip::-webkit-scrollbar { height: 6px; }
.day-strip::-webkit-scrollbar-track { background: transparent; }
.day-strip::-webkit-scrollbar-thumb { background: #3a3027; border-radius: 3px; }
.day-strip::-webkit-scrollbar-thumb:hover { background: var(--gold); }
.day-strip { scrollbar-color: #3a3027 transparent; }

/* grid children must be allowed to shrink below their content width (date strip) */
.booking-main, .booking-side { min-width: 0; }
