:root {
  --brand: #ff385c;
  --brand-dark: #d70466;
  --ink: #222;
  --muted: #6a6a6a;
  --line: #ddd;
  --soft: #f7f7f7;
  --ok: #138a4b;
  --warn: #b26a00;
  --bad: #c13515;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .12);
  --bg: #fff;
  --card: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2f2; --muted: #a8a8a8; --line: #3a3a3a; --soft: #262626; --bg: #121212; --card: #1b1b1b;
    --shadow: 0 6px 20px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 600; }
h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 16px; }
h3 { font-size: 1.05rem; font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: var(--brand); font-size: 1.15rem; min-width: 0; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 10px 14px; border-radius: 22px; font-size: .95rem; font-weight: 500; }
.nav a:hover { background: var(--soft); }
@media (max-width: 760px) { .nav a.hide-sm { display: none; } }

/* Butang */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: transparent;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: transform .05s, background .15s;
}
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(90deg, #e61e4d 0%, #e31c5f 50%, #d70466 100%); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary[disabled] { background: #c8c8c8; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; padding: 14px 20px; font-size: 1.05rem; }
.btn.wa { background: #25d366; border-color: transparent; color: #fff; }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.btn.ghost { border-color: var(--line); }

/* Galeri */
.title-row { padding: 24px 0 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.sub { color: var(--muted); margin-top: 6px; }
.gallery { position: relative; display: grid; gap: 8px; border-radius: 16px; overflow: hidden; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 230px); }
.gallery .ph { position: relative; overflow: hidden; background: var(--soft); cursor: pointer; border: 0; padding: 0; }
.gallery .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, filter .2s; }
.gallery .ph:hover img { filter: brightness(.92); }
.gallery .ph:first-child { grid-column: span 2; grid-row: span 2; }
.gallery.n1 { grid-template-columns: 1fr; grid-template-rows: 460px; }
.gallery.n1 .ph:first-child { grid-column: auto; grid-row: auto; }
.gallery.n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 460px; }
.gallery.n2 .ph:first-child { grid-column: auto; grid-row: auto; }
.gallery.n3, .gallery.n4 { grid-template-columns: 2fr 1fr; }
.gallery.n3 .ph:first-child, .gallery.n4 .ph:first-child { grid-column: 1; grid-row: span 2; }
.show-all {
  position: absolute; right: 16px; bottom: 16px; background: var(--card); border: 1px solid var(--ink); border-radius: 8px; padding: 8px 14px;
  font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); z-index: 2;
}
.gallery-wrap { position: relative; }
.gallery-wrap .show-all { right: 16px; bottom: 16px; }
.m-gallery { display: none; }
@media (max-width: 760px) {
  .gallery { display: none; }
  .gallery-wrap .show-all { display: none; }
  .m-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; margin: 0 -16px; scrollbar-width: none; position: relative; }
  .m-gallery::-webkit-scrollbar { display: none; }
  .m-gallery img { flex: none; width: 100%; height: 280px; object-fit: cover; scroll-snap-align: center; }
  .m-counter { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.65); color: #fff; padding: 3px 10px; border-radius: 12px; font-size: .8rem; }
  .title-row { padding-top: 16px; }
}

/* Susun atur utama */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 80px; align-items: start; padding-bottom: 60px; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; gap: 0; } .booking-card-col { display: none; } }
section.block { padding: 32px 0; border-bottom: 1px solid var(--line); }
section.block:last-child { border-bottom: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 4px; color: var(--muted); }
.facts span:not(:last-child)::after { content: "·"; margin-left: 4px; }
.host { display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex: none; }
.highlights { display: grid; gap: 22px; }
.hl { display: flex; gap: 16px; align-items: flex-start; }
.hl .ic { font-size: 1.6rem; width: 32px; text-align: center; flex: none; }
.hl b { display: block; }
.desc { white-space: pre-line; }
.amen { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.amen div { display: flex; gap: 14px; align-items: center; }
.amen .ic { width: 28px; text-align: center; font-size: 1.35rem; }
@media (max-width: 520px) { .amen { grid-template-columns: 1fr; } }
.rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); background: var(--soft); }

/* Kad tempahan */
.booking-card-col { position: sticky; top: 96px; padding-top: 32px; }
.bcard { border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); background: var(--card); }
.price-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px; }
.price-line .big { font-size: 1.5rem; font-weight: 600; }
.pick { border: 1px solid #b0b0b0; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.pick .row { display: grid; grid-template-columns: 1fr 1fr; }
.pick .cell { padding: 10px 12px; text-align: left; background: transparent; border: 0; width: 100%; display: block; }
.pick .cell + .cell { border-left: 1px solid #b0b0b0; }
.pick .cell:hover { background: var(--soft); }
.pick .cell.active { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 10px; }
.pick .lab { font-size: .625rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; display: block; }
.pick .val { font-size: .9rem; color: var(--ink); }
.pick .val.ph-t { color: var(--muted); }
.pick .guests { border-top: 1px solid #b0b0b0; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #b0b0b0; background: transparent; font-size: 1.1rem; line-height: 1; display: grid; place-items: center; padding: 0; }
.stepper button[disabled] { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 20px; text-align: center; font-weight: 600; }
.guest-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.guest-row + .guest-row { border-top: 1px solid var(--line); }
.pop { position: absolute; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.pop.cal-pop { right: 0; top: 100%; margin-top: 8px; width: min(720px, calc(100vw - 32px)); }
.pickwrap { position: relative; }
.breakdown { margin-top: 18px; display: grid; gap: 10px; }
.breakdown .r { display: flex; justify-content: space-between; gap: 12px; }
.breakdown .r.tot { border-top: 1px solid var(--line); padding-top: 14px; font-weight: 700; }
.note { text-align: center; margin: 12px 0 0; font-size: .875rem; color: var(--muted); }
.err { color: var(--bad); font-size: .9rem; margin: 10px 0 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: .78rem; font-weight: 600; background: var(--soft); }
.badge.ok { background: #e3f6ec; color: var(--ok); }
.badge.warn { background: #fff1d6; color: var(--warn); }
.badge.bad { background: #fde5e0; color: var(--bad); }
.badge.info { background: #e4eefc; color: #1d5fc4; }

/* Kalendar */
.cal { user-select: none; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; position: relative; }
@media (max-width: 700px) { .cal-months { grid-template-columns: 1fr; gap: 24px; } .cal-m:nth-child(2) { display: block; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 36px; font-weight: 600; }
.cal-nav { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; font-size: 1.1rem; }
.cal-nav:hover { background: var(--soft); }
.cal-nav[disabled] { opacity: .25; cursor: default; background: transparent; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.cal-dow { font-size: .75rem; color: var(--muted); padding: 6px 0; }
.cal-d { aspect-ratio: 1; display: grid; place-items: center; font-size: .9rem; position: relative; border: 0; background: transparent; padding: 0; border-radius: 50%; max-height: 48px; }
.cal-d.empty { visibility: hidden; }
.cal-d:not(.off):hover { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-d.off { color: #b5b5b5; cursor: not-allowed; }
.cal-d.off.booked { text-decoration: line-through; }
.cal-d.today { font-weight: 800; }
.cal-d.range { background: var(--soft); border-radius: 0; }
.cal-d.sel { background: var(--ink); color: var(--bg); border-radius: 50%; z-index: 1; }
.cal-d.range-start::before, .cal-d.range-end::before { content: ""; position: absolute; inset: 0; background: var(--soft); z-index: -1; }
.cal-d.range-start::before { left: 50%; }
.cal-d.range-end::before { right: 50%; }
.cal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.link-btn { background: none; border: 0; text-decoration: underline; font-weight: 600; padding: 6px; }

/* Bar mobile */
.mbar { display: none; }
@media (max-width: 1000px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; align-items: center; gap: 12px; }
  body.has-mbar { padding-bottom: 80px; }
  .mbar .p b { font-size: 1.1rem; }
}

/* Lightbox */
.lb { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100; display: none; flex-direction: column; }
.lb.open { display: flex; }
.lb-top { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 14px 20px; }
.lb-stage { flex: 1; display: grid; place-items: center; position: relative; min-height: 0; padding: 0 56px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button.x { background: none; border: 0; color: #fff; font-size: 1.6rem; padding: 4px 10px; }
.lb .nv { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.3rem; }
.lb .nv:hover { background: rgba(255,255,255,.3); }
.lb .nv.l { left: 8px; } .lb .nv.r { right: 8px; }
.lb-cap { color: #fff; text-align: center; padding: 12px; min-height: 48px; font-size: .95rem; }

/* WhatsApp terapung */
.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: var(--shadow); text-decoration: none; }
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 1000px) { .wa-fab { bottom: 92px; } }
body.nofab .wa-fab { display: none; }

footer.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }

/* Borang tempahan */
.page-title { padding: 28px 0 8px; }
.steps-note { color: var(--muted); }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; padding: 16px 0 80px; }
@media (max-width: 1000px) { .form-layout { grid-template-columns: 1fr; gap: 24px; } .summary-col { order: -1; position: static !important; } }
.summary-col { position: sticky; top: 96px; }
.sum-top { display: flex; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sum-top img { width: 110px; height: 90px; object-fit: cover; border-radius: 10px; flex: none; }
.fsec { border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; background: var(--card); }
.fsec h2 { font-size: 1.15rem; margin-bottom: 4px; }
.fsec .hint { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
label.f { display: block; font-size: .85rem; font-weight: 600; }
label.f span.req { color: var(--brand); }
label.f small { font-weight: 400; color: var(--muted); display: block; margin-top: 2px; }
.in, select.in, textarea.in {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border: 1px solid #b0b0b0; border-radius: 10px; font: inherit; font-size: 1rem;
  background: var(--card); color: var(--ink);
}
.in:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.in.bad { border-color: var(--bad); outline: 1px solid var(--bad); }
textarea.in { resize: vertical; min-height: 84px; }
.upload { border: 2px dashed #b0b0b0; border-radius: 12px; padding: 16px; text-align: center; background: var(--soft); position: relative; min-height: 130px; display: grid; place-items: center; }
.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload img { max-height: 180px; border-radius: 8px; margin: 0 auto; }
.upload .ic { font-size: 1.8rem; }
.sig { border: 1px solid #b0b0b0; border-radius: 12px; background: #fff; position: relative; touch-action: none; }
.sig canvas { width: 100%; height: 180px; display: block; border-radius: 12px; }
.sig .ph-sig { position: absolute; inset: 0; display: grid; place-items: center; color: #999; pointer-events: none; font-size: .95rem; }
.sig .clear { position: absolute; top: 8px; right: 8px; font-size: .8rem; background: #eee; color: #222; border: 0; border-radius: 6px; padding: 4px 10px; }
.terms { max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--soft); font-size: .9rem; margin-bottom: 14px; }
.terms ol { margin: 6px 0 10px; padding-left: 20px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }
.alert.info { background: #e8f1fd; color: #174a96; }
.alert.warn { background: #fff4de; color: #7a4a00; }
.alert.bad { background: #fde8e4; color: #8f2410; }
.alert.ok { background: #e3f6ec; color: #0d6a39; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Status */
.narrow { max-width: 760px; margin: 0 auto; }
.stepper-bar { display: flex; margin: 8px 0 28px; }
.stp { flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--muted); }
.stp::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.stp:first-child::before { display: none; }
.stp .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--line); color: #fff; display: grid; place-items: center; margin: 0 auto 6px; position: relative; z-index: 1; font-weight: 700; }
.stp.done .dot, .stp.now .dot { background: var(--ok); }
.stp.now .dot { background: var(--brand); }
.stp.done::before, .stp.now::before { background: var(--ok); }
.stp.done, .stp.now { color: var(--ink); font-weight: 600; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.copy-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.copy-row:last-child { border: 0; }
.qr { max-width: 220px; border: 1px solid var(--line); border-radius: 12px; margin: 12px auto; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #222; color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); max-width: 90vw; }
@media print { .site-header, .wa-fab, .mbar, footer, .no-print { display: none !important; } }
.nav a { white-space: nowrap; }
@media (max-width: 480px) { .nav a { padding: 8px 12px; font-size: .85rem; } .brand { font-size: 1rem; } }
