/* แก้โทนสีทั้งหน้าได้จากจุดนี้จุดเดียว */
:root {
  --bg: #e7eef6;
  --card: #ffffff;
  --ink: #1c2838;
  --muted: #8b95a6;
  --text: #5d6b80;
  --gold: #b0893f;
  --line: #e7edf4;
  --sky: #e7f3fb;
  --navy: #1b2433;
  --red: #ef4444;
  --shadow: 0 16px 40px rgba(28, 45, 74, 0.08);
  --radius: 28px;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }

.site-header,
.villa {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand__name {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand__name {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}
.contact {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(28, 45, 74, 0.06);
}

.villa {
  margin-bottom: 40px;
  padding: 14px 14px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gallery { position: relative; }
.gallery__viewport {
  height: 430px;
  border-radius: 22px;
  overflow: hidden;
  background: #d7e0ea;
}
.gallery__viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.gallery__viewport img.is-active { display: block; }
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(20, 32, 51, 0.16);
  cursor: pointer;
}
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }

.villa__intro { padding: 26px 18px 8px; }
.villa__intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.villa__intro p {
  margin: 6px 0 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 0;
  margin: 18px 18px 8px;
  padding: 0;
  list-style: none;
}
.amenities li {
  padding: 0 22px;
  border-left: 1px solid var(--line);
}
.amenities li:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
.amenities h2 {
  margin: 0 0 6px;
  color: #9aa6b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.amenities p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.booking { padding: 18px 18px 6px; }
.booking__controls {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr 0.75fr 0.75fr;
  gap: 14px;
  align-items: end;
}
.extra-bed {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--sky);
}
.extra-bed__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #607089;
  font-size: 13px;
}
.extra-bed__row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.stepper output {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}
.extra-bed__note {
  margin: 0;
  color: #7b8798;
  font-size: 13px;
  line-height: 1.45;
}
.extra-bed__note strong {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-weight: 700;
}

.field { display: grid; gap: 8px; min-width: 0; }
.field span {
  color: #9aa6b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.field select,
.field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8b95a6 50%), linear-gradient(135deg, #8b95a6 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-error {
  margin: 12px 0 0;
  color: var(--red);
  font-size: 14px;
}
.booking__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}
.price { margin: 0; }
.price strong {
  font-family: var(--sans);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.baht {
  font-family: var(--sans);
  font-size: 0.62em;
  font-weight: 600;
}
.price span { color: var(--muted); font-size: 16px; }
.price small {
  display: block;
  min-height: 18px;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
}
.reserve {
  min-width: 230px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.reserve:hover { background: #2a3548; }

.summary {
  width: min(440px, calc(100% - 32px));
  border: 0;
  border-radius: 20px;
  padding: 24px;
}
.summary::backdrop { background: rgba(20, 28, 40, 0.45); }
.summary h2 { margin: 0 0 12px; font-family: var(--display); font-size: 32px; }
.summary dl { margin: 0; }
.summary dt { margin-top: 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.summary dd { margin: 2px 0 0; font-weight: 700; }
.summary__actions { display: flex; gap: 10px; margin-top: 18px; }
.summary__close {
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 900px) {
  .brand__name { font-size: 16px; }
  .gallery__viewport { height: 280px; }
  .villa__intro h1 { font-size: 38px; }
  .amenities { grid-template-columns: 1fr 1fr; }
  .amenities li:nth-child(n) {
    border-left: 1px solid var(--line);
    padding-left: 16px;
  }
  .amenities li:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .booking__controls { grid-template-columns: 1fr 1fr; }
  .extra-bed,
  .booking__controls > label:first-of-type { grid-column: 1 / -1; }
  .field input.check-in,
  .field input.check-out {
    padding-left: 8px;
    padding-right: 4px;
    font-size: 13px;
  }
  .extra-bed__row {
    flex-direction: column;
    align-items: flex-start;
  }
  .booking__footer { flex-direction: column; align-items: stretch; }
  .reserve { width: 100%; }
}
@media (max-width: 560px) {
  .site-header { align-items: center; gap: 10px; }
  .brand__name { font-size: 15px; line-height: 1.15; letter-spacing: 0.02em; }
  .brand__tag { font-size: 10px; letter-spacing: 0.08em; }
  .contact { padding: 8px 12px; }
}

/* แถบล่าง | แก้สีได้ที่นี่ */
.cart-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(920px, calc(100% - 24px));
  padding: 42px 20px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(28, 45, 74, 0.16);
  transform: translateX(-50%);
}
.cart-bar[hidden] { display: none; }
.cart-bar__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 3px solid #c41212;
  border-radius: 50%;
  padding: 0;
  background: #e10600;
  cursor: pointer;
}
.cart-bar__close::before,
.cart-bar__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: #fff;
}
.cart-bar__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.cart-bar__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.cart-bar__count {
  margin: 4px 0 0;
  color: #f08a1a;
  font-size: 33px;
  font-weight: 800;
}
.cart-bar__note {
  margin: 2px 0 0;
  color: #8b95a6;
  font-size: 13px;
}
.cart-bar__total { margin: 0; text-align: right; }
.cart-bar__total span {
  display: block;
  color: #8b95a6;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.cart-bar__total strong {
  font-size: 51px;
  font-weight: 800;
}
.cart-bar__confirm {
  min-width: 170px;
  height: 105px;
  border: 0;
  border-radius: 16px;
  background: #f08a1a;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
}
.cart-bar__confirm:hover { background: #d97812; }

@media (max-width: 700px) {
  .cart-bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 42px 18px 18px;
  }
  .cart-bar__count { font-size: 24px; }
  .cart-bar__note { font-size: 16px; }
  .cart-bar__total { text-align: right; }
  .cart-bar__total strong { font-size: 33px; white-space: nowrap; }
  .cart-bar__confirm {
    width: 33vw;
    min-width: 33vw;
    flex: 0 0 33vw;
    height: 78px;
    padding: 0 15px;
    font-size: 18px;
  }
  .cart-bar__close {
    top: 9px;
    right: 9px;
    width: 48px;
    height: 48px;
    transform: none;
  }
  .cart-bar__close::before,
  .cart-bar__close::after {
    width: 21px;
    height: 6px;
  }
}
@media (min-width: 701px) {
  .cart-bar { padding-top: 48px; }
}

.details {
  position: relative;
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: 28px;
  padding: 52px 28px 24px;
}
#details-cancel {
  position: absolute;
  top: 16px;
  left: 20px;
  border: 0;
  background: none;
  color: #9aa6b8;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.details::backdrop { background: rgba(20, 28, 40, 0.55); }
.details h2 {
  margin: 0 0 28px;
  color: var(--navy);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}
.details label { display: block; margin-bottom: 18px; }
.details label span {
  display: block;
  margin-bottom: 8px;
  color: #f08a1a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.details input {
  width: 100%;
  height: 52px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  padding: 0 16px;
  background: #f4f7fb;
  color: var(--ink);
}
.details__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.details__actions button[type="submit"] {
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.pay {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: auto;
  padding: 28px 16px 40px;
  background: #121a2c;
  color: #fff;
  text-align: center;
}
.pay[hidden] { display: none; }
.pay__note { margin: 0; color: #f08a1a; font-size: 13px; }
.pay h1 { margin: 8px 0; color: #f08a1a; font-size: 32px; letter-spacing: 0.04em; }
.pay__time { margin: 0 0 18px; letter-spacing: 0.08em; }
.pay__card, .pay__ids, .pay__qr {
  width: min(420px, 100%);
  margin: 0 auto 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
}
.pay__card, .pay__ids { padding: 16px; }
.pay__card p { margin: 0 0 12px; line-height: 1.6; }
.pay__card button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #2a3548;
  color: #fff;
  cursor: pointer;
}
.pay__card button.is-bounce {
  animation: pay-bounce 0.35s ease;
}
@keyframes pay-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.pay__ids { display: grid; grid-template-columns: 1fr 1fr; text-align: left; }
.pay__ids p:last-child { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.pay__status { color: #3dd68c; }
.pay__label { margin: 18px 0 8px; letter-spacing: 0.12em; font-size: 13px; }
.pay__timer {
  display: inline-block;
  margin: 0;
  padding: 8px 22px;
  border-radius: 999px;
  background: #e11d2e;
  font-size: 28px;
  font-weight: 800;
}
.pay__amount { margin: 0 0 18px; font-size: 42px; font-weight: 800; }
.pay__qr { overflow: hidden; background: #f4f7fb; color: #1c2838; }
.pay__qr p { margin: 18px 0 8px; font-size: 22px; font-weight: 800; }
.pay__qr span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #1c2838;
  color: #fff;
  font-size: 13px;
}
.pay__qr-box {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  background: #fff;
  line-height: 180px;
  font-weight: 800;
}
.pay__qr img { display: block; width: 180px; height: 180px; margin: 0 auto 16px; object-fit: contain; }

.admin { width: min(480px, calc(100% - 32px)); margin: 40px auto; }
.admin h1 { margin: 0 0 20px; }
.admin label { display: block; margin-bottom: 14px; }
.admin label span { display: block; margin-bottom: 6px; font-weight: 700; }
.admin input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin img { display: block; width: 180px; margin: 8px 0 16px; }
.admin button {
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #1b2433;
  color: #fff;
  cursor: pointer;
}
.pay__qr footer { padding: 14px; background: #24324a; color: #fff; }
.pay__qr footer small, .pay__qr footer strong { display: block; }
.pay__actions {
  display: grid;
  gap: 10px;
  width: min(420px, 100%);
  margin: 24px auto 8px;
}
.pay__slip, .pay__fb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pay__slip { background: #24324a; }
.pay__fb { background: #1877f2; }
.pay__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c542;
}
.brand__mark img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.check-in,
.check-out { cursor: pointer; }
.date-picker {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}
