/* Princess Land Nail & Spa — สไตล์ทั้งหน้า ออกแบบมือถือก่อน แล้วค่อยขยายเป็นแท็บเล็ตและคอม
   ใช้คู่กับ index.html และ script.js ชุดล่าสุด (สไตล์แถบผลงานและปุ่มบัตรสะสมแต้มอยู่ใน script.js) */
:root {
  --green: #55704F;
  --green-dark: #3F5A3B;
  --mint: #E3EFE6;
  --mint-2: #F0F6F1;
  --bg: #FAFBF8;
  --card: #FFFFFF;
  --ink: #1F2B23;
  --text-muted: #5B6B60;
  --line: #D5E2D8;
  --gold: #B8913C;
  --red: #B3261E;
  --gutter: 16px;
  --font: 'Prompt', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
a { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }

.container {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 1.5px solid var(--green); font: 600 1rem/1.2 var(--font);
  text-decoration: none; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--green); color: #FFFFFF; }
.btn-primary:hover, .btn-primary:active { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: #FFFFFF; color: var(--green-dark); }

/* ---------- หัวเว็บ (ติดบนจอ) ---------- */
.top-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 6px max(var(--gutter), env(safe-area-inset-left, 0px));
}
.brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; color: var(--green-dark); }
.brand span { font-size: .62rem; letter-spacing: .22em; font-weight: 500; }
.brand strong { font-size: 1.25rem; font-weight: 600; }
.lang-selector { display: flex; gap: 4px; }
.lang-btn {
  min-width: 38px; height: 32px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line);
  background: #FFFFFF; color: var(--ink); font: 500 .78rem/1 var(--font); cursor: pointer;
}
.lang-btn.active { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.nav-links { order: 3; flex: 1 0 100%; display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; background: var(--mint-2); color: var(--green-dark);
  text-decoration: none; font-size: .88rem; font-weight: 500; white-space: nowrap;
}

/* ---------- หน้าปก: รูปเต็มจอ ข้อความอยู่ใต้รูป ---------- */
.hero-cover-full { background: var(--mint); }
.hero-cover-full > img { width: 100%; max-width: 1500px; height: auto; margin: 0 auto; }   /* แสดงรูปปกครบทั้งใบ ไม่ตัดขอบ */
.hero-overlay { background: linear-gradient(180deg, var(--mint-2), var(--bg)); padding: 20px 0 26px; }
.hero-content-inner { text-align: center; }
.hero-overlay h1 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.3; font-weight: 600; color: var(--green-dark); text-wrap: balance; }
.hero-overlay p { margin: 0 auto; max-width: 34em; color: var(--text-muted); font-size: .97rem; }
.hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.hero-btns .btn { flex: 1 1 150px; max-width: 220px; }

/* ---------- หัวข้อแต่ละส่วน ---------- */
main.container { padding-top: 4px; }
section { padding: 34px 0 8px; }
.sec-head { text-align: center; margin-bottom: 20px; }
.sec-head h2 { margin: 0 0 6px; font-size: 1.55rem; line-height: 1.3; font-weight: 600; color: var(--green-dark); }
.sec-head p { margin: 0 auto; max-width: 34em; color: var(--text-muted); font-size: .95rem; }

/* ---------- โปรโมชั่น ---------- */
.promos-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.promo-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 30px -22px rgba(40, 70, 48, .6);
}
.promo-img-wrap { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mint); cursor: zoom-in; }
.promo-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.promo-img-wrap:hover img { transform: scale(1.04); }
.promo-price-badge {
  position: absolute; right: 12px; top: 12px; padding: 5px 16px; border-radius: 999px; background: var(--green);
  color: #FFFFFF; font-size: 1.15rem; font-weight: 700; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .5);
}
.promo-body { display: grid; gap: 8px; padding: 16px 16px 18px; }
.promo-body h3 { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--green-dark); }
.promo-body p { margin: 0; color: var(--text-muted); font-size: .93rem; }

/* ---------- บัตรสะสมแต้ม ---------- */
.loyalty-banner {
  display: grid; justify-items: center; gap: 12px; margin-top: 22px; padding: 22px 16px; text-align: center;
  border-radius: 22px; background: linear-gradient(160deg, var(--green), #3F6A45); color: #FFFFFF;
}
.loyalty-title { font-size: 1.2rem; font-weight: 600; }
.loyalty-banner p { margin: 0; max-width: 30em; font-size: .95rem; opacity: .96; }
.stamps-container { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.stamp-dot {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .75);
  color: #FFFFFF; font-size: .85rem; font-weight: 600;
}
.stamp-dot.free { background: var(--gold); border: 2px solid var(--gold); font-size: .6rem; }
.loyalty-banner .btn-primary { width: 100%; max-width: 320px; background: #FFFFFF; border-color: #FFFFFF; color: var(--green-dark); }
.loyalty-fallback { max-width: 320px; }
.loyalty-fallback .btn-ghost { min-height: 40px; padding: 6px 18px; font-size: .9rem; }

/* ---------- เมนูและราคา ---------- */
#menu-list { display: grid; gap: 20px; }
.menu-category { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.category-title {
  margin: 0; padding: 12px 16px; background: var(--green); color: #FFFFFF; text-align: center;
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
}
.menu-sub-group { padding: 12px 16px 6px; }
.menu-sub-group + .menu-sub-group { border-top: 8px solid var(--mint-2); }
.sub-title { margin-bottom: 2px; font-size: 1rem; font-weight: 600; color: var(--green-dark); }
.sub-note { margin: 0 0 4px; color: var(--text-muted); font-size: .8rem; line-height: 1.5; }
.menu-item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.menu-item-row:last-child { border-bottom: 0; }
.item-info { flex: 1 1 auto; min-width: 0; font-size: .95rem; line-height: 1.4; }
.menu-item-row > div:last-child { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.item-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-select-svc {
  min-width: 78px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--green);
  background: #FFFFFF; color: var(--green-dark); font: 600 .85rem/1 var(--font); cursor: pointer;
}
.btn-select-svc[aria-pressed="true"] { background: var(--green); color: #FFFFFF; }

/* ---------- จองคิว ---------- */
.booking-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.booking-card, .summary-card { min-width: 0; padding: 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 600; }
.step-title:not(:first-child) { margin-top: 22px; }
.step-num {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--mint); color: var(--green-dark); font-size: .85rem;
}
.days-grid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.day-btn {
  flex: 0 0 auto; width: 62px; padding: 8px 0; display: grid; text-align: center; scroll-snap-align: start;
  border-radius: 14px; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); font: 500 .78rem/1.3 var(--font); cursor: pointer;
}
.day-btn strong { font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.day-btn:disabled { opacity: .4; border-style: dashed; cursor: not-allowed; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot-btn {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink);
  font: 500 .95rem/1 var(--font); font-variant-numeric: tabular-nums; cursor: pointer;
}
.slot-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.slot-btn:disabled { border-style: dashed; color: var(--text-muted); background: transparent; text-decoration: line-through; opacity: .7; cursor: not-allowed; }
#slot-hint { color: var(--text-muted); font-size: .85rem; margin: 8px 0 0 !important; }
.form-group { display: grid; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: .9rem; font-weight: 500; }
.form-control {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #FFFFFF; color: var(--ink); font: 400 16px/1.5 var(--font);
}
textarea.form-control { min-height: 84px; resize: vertical; }
.summary-card h3 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 600; color: var(--green-dark); }
.sum-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.sum-list li { display: flex; justify-content: space-between; gap: 12px; }
.sum-list li span { min-width: 0; }
.sum-list li strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 600; }
.sum-when { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--mint-2); font-size: .92rem; }
.problems-err { min-height: 1.3em; margin-top: 8px; color: var(--red); font-size: .88rem; }
#line-btn { width: 100%; }

/* ---------- แถบสรุปที่ติดล่างจอเมื่อเลือกบริการ ---------- */
.pickbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  background: #FFFFFF; border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -16px rgba(40, 70, 48, .5);
}
.pickbar span { min-width: 0; font-size: .92rem; }
.pickbar .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- ดูรูปเต็ม ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 24, 17, .85); }
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; border-radius: 14px; }
.lightbox-close {
  position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: #FFFFFF; color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer;
}

/* ---------- ท้ายหน้า ---------- */
footer { margin-top: 34px; padding: 28px 0 calc(92px + env(safe-area-inset-bottom, 0px)); background: var(--green-dark); color: #E6EFE6; text-align: center; font-size: .92rem; }
footer h3 { font-size: 1.15rem; font-weight: 600; }
footer p { margin: 0; }
footer a { color: #FFFFFF; }

/* ---------- แท็บเล็ตและคอม ---------- */
@media (min-width: 700px) {
  :root { --gutter: 24px; }
  .hero-overlay h1 { font-size: 2rem; }
  .promos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  section { padding-top: 48px; }
  .sec-head h2 { font-size: 1.9rem; }
}
@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; gap: 24px; }
  .nav-links { order: 0; flex: 1; justify-content: flex-end; overflow: visible; }
  .nav-links a { background: transparent; font-size: 1rem; }
  .nav-links a:hover { background: var(--mint); }
  .menu-category { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
  .category-title { grid-column: 1 / -1; }
  .menu-sub-group + .menu-sub-group { border-top: 0; }
  .menu-sub-group { border-top: 1px solid var(--mint-2); }
  .booking-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
  .summary-card { position: sticky; top: 112px; }
  .loyalty-banner { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .promo-img-wrap img { transition: none; }
}