:root {
  --bg: #fff7ef;
  --surface: #fff;
  --ink: #1e1712;
  --muted: #6d625b;
  --line: #eadbd0;
  --accent: #e6751f;
  --accent-dark: #bf5610;
  --green: #176a58;
  --shadow: 0 12px 32px rgba(75, 49, 31, 0.16);
}

* { box-sizing: border-box; }

.hms-booking-app {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }

.booking-hero {
  min-height: 300px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  display: grid;
  place-items: end center;
  padding: 38px 24px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(24, 16, 12, 0.05), rgba(24, 16, 12, 0.56)),
    var(--hero-image, url("https://images.unsplash.com/photo-1509316785289-025f5b846b35?auto=format&fit=crop&w=1800&q=80")) center/cover;
}

.booking-hero-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  text-shadow: 0 3px 14px rgba(0,0,0,0.32);
}

.booking-hero-copy p {
  margin: 0;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.36);
}

.category-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 34px 24px 22px;
  background: #fff1e6;
  text-align: center;
}

.category-section h2, .booking-intro h2 {
  margin: 0 0 22px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
}

.category-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-tile {
  display: grid;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
}

.category-tile img {
  width: 100%;
  aspect-ratio: 1.75 / 1;
  object-fit: cover;
  border: 1px solid #222;
  border-radius: 5px;
}

.category-tile strong {
  font-size: 18px;
  line-height: 1.05;
}

.category-tile span {
  justify-self: center;
  width: fit-content;
  background: #f29b49;
  color: #461c00;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hms-booking-app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 46px;
}

.booking-intro {
  margin-bottom: 16px;
  text-align: center;
}

.booking-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.booking-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 auto 22px;
  max-width: 760px;
  flex-wrap: wrap;
}

.search-box {
  min-height: 42px;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0 10px;
}

.search-box span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.search-box input {
  border: 0;
  outline: 0;
  width: 100%;
}

select, input, textarea {
  border: 1px solid var(--line);
  min-height: 40px;
  padding: 8px 10px;
  background: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  border: 1px solid #f0e6df;
}

.product-image {
  height: 170px;
  background: var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 13px 15px 16px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.product-price {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.product-note {
  color: #b56b32;
  font-size: 11px;
}

.product-body h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.product-actions a, .product-actions button, .modal-actions button, #sendBookingBtn {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.product-actions a {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
}

dialog {
  border: 0;
  border-radius: 8px;
  width: min(680px, calc(100vw - 28px));
  padding: 0;
  box-shadow: 0 28px 80px rgba(0,0,0,0.25);
}

dialog::backdrop {
  background: rgba(14, 24, 20, 0.46);
}

.booking-form {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.modal-head, .modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-head h2 { margin: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  transition: 0.18s ease;
}

.toast.visible { opacity: 1; }

.detail-dialog {
  width: min(920px, calc(100vw - 24px));
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.detail-gallery img, .detail-gallery .gallery-fallback {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #f5d9c3;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--accent);
}

.availability-box, .payment-box {
  border: 1px solid var(--line);
  background: #fff8f2;
  padding: 14px;
  border-radius: 8px;
}

.upsell-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.upsell-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.upsell-item label {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.payment-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .booking-hero { min-height: 230px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
