/* =============================================================================
   Booking pages — tour/car detail layout, gallery, calendar, booking box
   ========================================================================== */

.tour-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

/* Gallery — full-width hero + an even thumbnail strip (robust for any count) */
.tour-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 24px;
}
.tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.tour-gallery__main {
  flex: 1 1 100%;
  aspect-ratio: 16 / 7;
  max-height: 460px;
}
.tour-gallery > img:not(.tour-gallery__main) {
  flex: 1 1 140px;
  max-width: 240px;      /* a lone thumbnail must not stretch full width */
  aspect-ratio: 4 / 3;
  min-width: 0;
}

/* Car product photos are square with their own backdrop — show them whole
   (never cropped) on a soft brand-tinted background. */
.tour-gallery--contain .tour-gallery__main {
  object-fit: contain;
  background: #eaf4f8;
  aspect-ratio: 3 / 2;
  max-height: 480px;
}
.tour-gallery--contain > img:not(.tour-gallery__main) {
  object-fit: contain;
  background: #eaf4f8;
  aspect-ratio: 1 / 1;
}

/* Meta blocks */
.meta-blocks { display: flex; flex-wrap: wrap; gap: 12px; }
.meta-block {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; min-width: 120px; display: flex; flex-direction: column; gap: 2px;
}
.meta-block span { font-size: .78rem; }
.meta-block b { font-size: 1.02rem; color: var(--navy); }

/* Included / excluded */
.incl-excl { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.check-list, .cross-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li, .cross-list li { padding-left: 28px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.cross-list li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 800; }

/* Itinerary */
.itinerary { display: flex; flex-direction: column; gap: 4px; }
.itin-day { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.itin-day__no { font-weight: 800; color: var(--orange-700); }
.itin-day__body h4 { color: var(--navy); }

/* Rates table */
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table th, .rates-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rates-table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* Booking box */
.booking-col { position: relative; }
.booking-box {
  position: sticky; top: 88px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 22px;
}
.booking-box__price { font-size: 1.05rem; }
.booking-box__price b { font-size: 1.7rem; color: var(--navy); }

.stepper-row { display: flex; gap: 14px; }
.stepper { flex: 1; }
.stepper label { font-size: .82rem; font-weight: 600; color: var(--navy); display: block; margin-bottom: 4px; }
.stepper > div { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 38px; height: 40px; border: 0; background: var(--bg-soft); font-size: 1.2rem; cursor: pointer; color: var(--navy); }
.stepper button:hover { background: var(--line); }
.stepper input { flex: 1; border: 0; text-align: center; font-size: 1rem; width: 100%; }

.quote-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: .95rem; color: var(--muted); }
.quote-line b { color: var(--ink); }
.quote-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.quote-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 1.1rem; }
.quote-total b { color: var(--navy); font-size: 1.3rem; }
.availability-note { margin-top: 8px; font-size: .88rem; font-weight: 600; }
.availability-note.ok { color: var(--ok); }
.availability-note.busy { color: var(--danger); }

/* Extras */
.extras-list { display: flex; flex-direction: column; gap: 8px; }
.extra-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.extra-item span { flex: 1; }
.extra-item em { font-style: normal; color: var(--muted); font-size: .88rem; }
.extra-item:has(input:checked) { border-color: var(--orange); background: #fff7f0; }

.selected-dep { font-size: .9rem; }

/* =============== Calendar =============== */
/* Selected-range summary (the calendar below is the only date picker). */
.daterange {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.daterange__slot { flex: 1 1 130px; border-bottom: 2px solid transparent; padding-bottom: 4px; }
.daterange__slot.is-active { border-bottom-color: var(--orange); }
.daterange__label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.daterange__value { display: block; font-size: 1rem; color: var(--navy); margin-top: 2px; }
.daterange__arrow { color: var(--muted); font-size: 1.1rem; }
.daterange__clear {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: .8rem; text-decoration: underline; padding: 4px;
}
.daterange__clear:hover { color: var(--orange); }

.calendar { user-select: none; }
.cal-month { margin-bottom: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { color: var(--navy); font-size: .98rem; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--navy); font-size: 1rem; }
.cal-nav button:hover { border-color: var(--navy); }
.cal-nav button[disabled] { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .88rem; border: 1px solid transparent; background: var(--bg-soft); color: var(--ink); cursor: pointer;
}
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.disabled, .cal-day.past, .cal-day.busy {
  background: #f0f1f4; color: #b6bac4; cursor: not-allowed; text-decoration: line-through;
}
.cal-day.busy { background: #fdecea; color: #d69b93; }
.cal-day.available { background: #eaf5ee; color: var(--ok); font-weight: 700; border-color: #cfe9d8; }
.cal-day.available:hover { background: var(--ok); color: #fff; }
.cal-day.selected, .cal-day.in-range { background: var(--orange); color: #fff; font-weight: 700; }
.cal-day.range-start, .cal-day.range-end { background: var(--orange-700); color: #fff; }

/* Responsive */
@media (max-width: 980px) {
  .tour-layout { grid-template-columns: 1fr; }
  .booking-box { position: static; }
  .booking-col { order: -1; }
}
@media (max-width: 640px) {
  .incl-excl { grid-template-columns: 1fr; }
  .itin-day { grid-template-columns: 60px 1fr; gap: 10px; }
  .tour-gallery__main { aspect-ratio: 16 / 10; max-height: none; }
  .tour-gallery > img:not(.tour-gallery__main) { flex-basis: 90px; }
}
