/* Itinerary page. Builds on brand.css tokens and components. */

.tour-head {
  padding: 26px 0 24px;
}

.tour-head h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
}

.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tour-meta-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.tour-meta-item span {
  color: var(--muted);
  font-weight: 600;
}

.star,
.rating-pill b {
  color: #e29817;
}

/* Gallery: one large photo plus four thumbnails */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
  overflow: hidden;
  border-radius: 28px;
}

.gallery.single {
  grid-template-columns: 1fr;
  grid-template-rows: 460px;
}

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--cream-dark);
  cursor: zoom-in;
}

.gallery-item:first-child {
  grid-row: span 2;
}

.gallery.single .gallery-item {
  grid-row: auto;
}

.gallery-item.extra {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(33, 29, 24, 0.55);
  font-weight: 800;
}

.lightbox {
  width: min(1100px, 100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--ink);
}

.lightbox::backdrop {
  background: rgba(20, 16, 12, 0.8);
}

.lightbox-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.lightbox-track img {
  flex: 0 0 100%;
  width: 100%;
  max-height: calc(100vh - 32px);
  object-fit: contain;
  scroll-snap-align: start;
}

.lightbox-close,
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

/* Two-column layout: content + sticky booking panel */
.tour-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
  padding: 42px 0 92px;
}

.tour-section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.tour-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.tour-section h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
}

.tour-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.tour-desc {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.tour-desc p {
  margin-bottom: 14px;
  color: inherit;
}

.tour-facts {
  margin: 26px 0 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  margin-top: 26px;
  padding-top: 56.25%;
  border-radius: 20px;
  background: var(--ink);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Day by day accordion (builds on the FAQ details styles) */
.days {
  border-top: 1px solid var(--line);
}

.day summary {
  align-items: center;
  justify-content: flex-start;
}

.day summary::after {
  margin-left: auto;
}

.daynum {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--brand);
  background: #fdece7;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daytitle {
  color: var(--ink);
}

.day-body {
  padding: 14px 0 6px;
}

.day-body > p {
  max-width: none;
  padding: 0;
  font-size: 0.95rem;
}

.day-label {
  margin: 22px 0 10px;
  color: #918275;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activities {
  display: grid;
  gap: 12px;
}

.activity,
.hotel {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.activity img,
.hotel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.activity strong,
.hotel strong {
  display: block;
  margin-bottom: 4px;
}

.activity p {
  max-width: none;
  padding: 0;
  font-size: 0.88rem;
}

.hotel {
  grid-template-columns: 110px 1fr;
  align-items: center;
}

.hotel strong span {
  color: var(--muted);
  font-weight: 600;
}

/* Inclusions */
.inclusions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
}

.checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.checklist li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  content: "\2713";
  font-size: 0.7rem;
  font-weight: 900;
}

.checklist.excluded li::before {
  color: #9b3b2a;
  background: #fbe9e4;
  content: "\00D7";
  font-size: 0.85rem;
}

.tour-section .promise {
  min-height: 0;
  gap: 24px;
}

/* Reviews */
.rating-pill {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.tour-reviews {
  display: grid;
  gap: 14px;
}

.tour-review {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.tour-reviews:not(.expanded) .tour-review.extra {
  display: none;
}

.tour-review .reviewer {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.tour-review .reviewer .stars {
  margin-left: auto;
}

.tour-review-text {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 12px;
  color: #544c44;
  font-size: 0.94rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.tour-review-text p {
  margin: 0 0 8px;
  color: inherit;
}

.reviews-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Booking panel */
.booking-panel {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  border-radius: 24px;
  scrollbar-width: thin;
}

.booking-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet-handle,
.sheet-close {
  display: none;
}

.booking-ticks {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.booking-ticks li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.booking-ticks li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "\2713";
  font-weight: 900;
}

.booking-price {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.booking-price span {
  color: var(--muted);
  font-size: 0.78rem;
}

.booking-price strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.15;
}

.date-picker {
  margin: 18px 0 14px;
}

.picker-label {
  display: block;
  margin-bottom: 10px;
  color: #887b70;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.date-select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d84a2f' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}

.date-select:hover {
  border-color: #d9c8b6;
}

.date-select:focus-visible {
  border-color: var(--brand);
  outline: 3px solid #fde1d8;
  outline-offset: 0;
}

.date-picker.nudge {
  animation: nudge 0.4s ease;
}

@keyframes nudge {
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.booking-cta,
.booking-talk {
  width: 100%;
}

.booking-cta.is-disabled {
  color: #fff;
  background: #c9b9ab;
  box-shadow: none;
  cursor: not-allowed;
}

.booking-cta.is-disabled:hover {
  transform: none;
}

.booking-note {
  margin: 10px 0 14px;
  font-size: 0.78rem;
  text-align: center;
}

.booking-talk {
  margin-top: 4px;
}

.review-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.review-badges img {
  width: 100%;
  height: auto;
}

.mobile-bookbar,
.sheet-backdrop {
  display: none;
}

@media (max-width: 980px) {
  .tour-layout {
    grid-template-columns: 1fr;
    padding-bottom: 60px;
  }

  .gallery {
    grid-template-rows: 170px 170px;
  }

  /* The booking panel becomes a bottom sheet opened from the sticky bar */
  .booking-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    max-height: 88vh;
    overflow-y: auto;
    transform: translateY(105%);
    transition: transform 0.3s ease, visibility 0.3s;
    visibility: hidden;
  }

  .booking-panel.sheet-open {
    transform: none;
    visibility: visible;
  }

  .booking-card {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 28px;
    border-radius: 24px 24px 0 0;
  }

  .sheet-handle {
    display: block;
    width: 44px;
    height: 5px;
    margin: -14px auto 14px;
    border-radius: 999px;
    background: var(--line);
  }

  .sheet-close {
    display: grid;
    background: var(--cream);
  }

  .booking-ticks {
    display: none;
  }

  .sheet-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(20, 16, 12, 0.45);
  }

  .mobile-bookbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 250, 0.97);
    box-shadow: 0 -8px 24px rgba(58, 42, 24, 0.08);
    backdrop-filter: blur(12px);
  }

  .mobile-bookbar span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
  }

  .mobile-bookbar strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.1;
  }

  .mobile-bookbar .btn {
    flex: 0 0 auto;
  }

  /* Keep the footer clear of the fixed booking bar */
  footer {
    padding-bottom: 110px;
  }
}

@media (max-width: 720px) {
  .tour-head {
    padding-top: 16px;
  }

  /* Swipeable photo strip on phones */
  .gallery,
  .gallery.single {
    display: flex;
    gap: 8px;
    margin: 0 -14px;
    overflow-x: auto;
    padding: 0 14px;
    border-radius: 0;
    scroll-snap-type: x mandatory;
  }

  .gallery-item,
  .gallery-item.extra {
    display: block;
    flex: 0 0 86%;
    height: 250px;
    border-radius: 18px;
    scroll-snap-align: center;
  }

  .gallery.single .gallery-item {
    flex-basis: 100%;
  }

  .gallery-more {
    display: none;
  }

  .activity,
  .hotel {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }

  .inclusions {
    grid-template-columns: 1fr;
  }

  .tour-review .reviewer {
    flex-wrap: wrap;
  }
}
