@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Playfair+Display:wght@500;600&display=swap');

:root {
  --sand: #fdf9f4;
  --shell: #fff4ec;
  --rose: #f3dede;
  --deep: #543c3e;
  --muted: #7a5f63;
  --accent: #d39aa8;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 28px 60px rgba(84, 60, 62, 0.12);
  --font: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top, var(--shell), var(--sand));
  color: var(--deep);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--deep);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(211, 154, 168, 0.25);
}

.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--deep);
}

.nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--deep);
  border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-link {
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover {
  color: var(--deep);
}

.nav-link--active {
  background: var(--rose);
  color: var(--deep);
  box-shadow: none;
}

.booking-page {
  width: min(1160px, 100%);
  margin: 0 auto 4rem;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 6vw, 4rem);
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.summary-card,
.slot-card,
.form-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(243, 222, 221, 0.85));
  border-radius: 30px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 25px 60px rgba(84, 60, 62, 0.12);
  border: 1px solid rgba(211, 154, 168, 0.35);
}

.slot-card {
  grid-area: slots;
}

.summary-card {
  grid-area: summary;
}

.form-card {
  grid-area: form;
}

section h1,
section h2,
section h3 {
  font-family: 'Playfair Display', serif;
  margin-top: 0;
  color: var(--deep);
}

#summaryContent {
  font-size: 0.95rem;
}

.summary-row {
  border: 1px solid rgba(84, 60, 62, 0.15);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
}

.summary-row > :first-child {
  flex: 1 1 180px;
  min-width: 0;
}

.summary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 0 200px;
}

.summary-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(84, 60, 62, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep);
  font-weight: 600;
  cursor: pointer;
}

.summary-qty {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.summary-remove {
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: var(--accent);
}

.summary-line-total {
  font-weight: 600;
  margin-left: 8px;
}

.summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.secondary-btn {
  border-radius: 999px;
  border: 1px solid var(--deep);
  padding: 0.65rem 1.3rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(84, 60, 62, 0.15);
}

.secondary-link {
  background: none;
  border: none;
  color: var(--deep);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.summary-total {
  margin-top: 8px;
  font-weight: 600;
}

.summary-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.date-strip__shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.date-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(84, 60, 62, 0.2);
  background: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--deep);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.date-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.date-nav-btn--hidden {
  visibility: hidden;
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.75rem;
}

.date-pill {
  padding: 0.5rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 60, 62, 0.15);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.date-pill .dow {
  display: block;
  font-weight: 600;
}

.date-pill .day {
  display: block;
  font-size: 1rem;
}

.date-pill.active {
  border-color: var(--deep);
  background: rgba(243, 222, 221, 0.85);
  color: var(--deep);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(84, 60, 62, 0.15);
}

.slot-heading {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.slot-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  padding: 0.25rem 0;
}

.slot-pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 60, 62, 0.2);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-pill.selected {
  border-color: var(--deep);
  background: rgba(243, 222, 221, 0.85);
  color: var(--deep);
  font-weight: 600;
}

.slot-pill.booked {
  border-color: rgba(84, 60, 62, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: rgba(84, 60, 62, 0.4);
  cursor: not-allowed;
}

.slot-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

form label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(84, 60, 62, 0.15);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  box-sizing: border-box;
  margin-top: 0.35rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--deep);
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
.date-pill:focus-visible,
.slot-pill:focus-visible,
.secondary-btn:focus-visible,
.primary-btn:focus-visible {
  outline: 2px solid rgba(211, 154, 168, 0.6);
  outline-offset: 3px;
}

.whatsapp-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 6px 0 2px;
}

.primary-btn {
  margin-top: 10px;
  width: 100%;
  padding: 0.85rem 0;
  border-radius: 999px;
  border: none;
  background: var(--deep);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(84, 60, 62, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 45px rgba(84, 60, 62, 0.25);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(84, 60, 62, 0.12);
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
}

.invoice-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.invoice-modal--open {
  display: flex;
}

.invoice-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.invoice-modal__dialog {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 222, 221, 0.95));
  border-radius: 30px;
  width: min(620px, calc(100% - 2rem));
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(84, 60, 62, 0.3);
  z-index: 1;
  border: 1px solid rgba(211, 154, 168, 0.35);
}

.invoice-modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(84, 60, 62, 0.1);
}

.invoice-modal__body {
  padding: 12px 20px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  color: var(--deep);
}

.invoice-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}

.invoice-modal__footer {
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(84, 60, 62, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.invoice-modal__totals {
  font-weight: 600;
}

.invoice-modal__grand {
  font-size: 1.1rem;
  color: var(--deep);
}

.invoice-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .nav-toggle {
    display: flex;
  }

  body.nav-ready .nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: clamp(1rem, 5vw, 3rem);
    left: clamp(1rem, 5vw, 3rem);
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(79, 63, 71, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 12;
  }

  body.nav-ready .nav-link {
    width: 100%;
    text-align: left;
  }

  body.nav-ready .nav.nav--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .booking-page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "slots"
      "form";
  }

  .summary-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 961px) {
  .booking-page {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    grid-template-areas:
      "slots summary"
      "form summary";
    align-items: start;
  }

  .summary-card {
    position: sticky;
    top: 110px;
    align-self: start;
  }
}

@media (max-width: 720px) {
  .booking-page {
    padding: 1.5rem 1.25rem;
  }

  .summary-card,
  .slot-card,
  .form-card {
    border-radius: 22px;
    padding: 1.1rem 1.25rem;
  }

  .slot-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}

@media (max-width: 520px) {
  .summary-row {
    flex-wrap: wrap;
  }

  .summary-actions {
    width: 100%;
    justify-content: space-between;
  }

  .summary-line-total {
    width: 100%;
    text-align: right;
  }

  .summary-footer {
    width: 100%;
  }

  .summary-footer > * {
    width: 100%;
    text-align: center;
  }

  .secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .invoice-modal__dialog {
    width: calc(100% - 1.25rem);
    max-height: 92vh;
    border-radius: 22px;
  }

  .invoice-modal__body {
    padding: 0.85rem 1rem 1.25rem;
  }

  .invoice-modal__actions {
    width: 100%;
  }

  .invoice-modal__actions .secondary-btn {
    flex: 1 1 100%;
  }
}
