/* ============================================================
   Karura Bikes — package detail (packages/show)
   Scope: .w-pkg-* only. White page, mosaic gallery, sticky
   booking rail, mobile book bar. Square corners, hairline
   borders, accent only on CTAs and package prices.
   ============================================================ */

.w-pkg-page {
  background: #fff;
  padding: 1rem 0 2.75rem;
}

.w-pkg-h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading, 'Lato', sans-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--k-ink, #1a211c);
}

/* Mosaic: large left tile, 2×2 on the right. Last visible cell
   carries +N more when the gallery is longer than the grid. */

.w-pkg-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: min(64vw, 260px);
  background: #fff;
}

.w-pkg-mosaic__item {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: var(--k-surface, #eef3eb);
  overflow: hidden;
  cursor: pointer;
}

.w-pkg-mosaic__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.w-pkg-mosaic__item:focus-visible {
  outline: 2px solid var(--k-accent, #c45a4a);
  outline-offset: 2px;
  z-index: 1;
}

.w-pkg-mosaic[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.w-pkg-mosaic[data-count="2"] {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr;
}

.w-pkg-mosaic[data-count="3"] .w-pkg-mosaic__item:first-child,
.w-pkg-mosaic[data-count="4"] .w-pkg-mosaic__item:first-child,
.w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:first-child {
  grid-row: 1 / span 2;
}

.w-pkg-mosaic[data-count="4"] .w-pkg-mosaic__item:nth-child(4),
.w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(n+4) {
  display: none;
}

.w-pkg-mosaic__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 20, 0.5);
  color: #fff;
  font-family: var(--font-heading, 'Lato', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.w-pkg-mosaic__more--lg {
  display: none;
}

.w-pkg-split {
  margin-top: 1.35rem;
}

.w-pkg-overview {
  margin: 0 0 1.5rem;
}

.w-pkg-overview h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-heading, 'Lato', sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--k-ink, #1a211c);
}

.w-pkg-overview__lead {
  margin: 0 0 1rem;
  color: var(--k-ink, #1a211c);
  font-size: 1.03rem;
  line-height: 1.65;
}

.w-pkg-overview__facts {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border: 1px solid var(--k-line, #d4ddd6);
  background: #fff;
}

.w-pkg-overview__facts > div {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--k-line, #d4ddd6);
}

.w-pkg-overview__facts > div:first-child {
  border-top: 0;
}

.w-pkg-overview__facts dt {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--k-muted, #5b6660);
}

.w-pkg-overview__facts dd {
  margin: 0;
  font-weight: 700;
  color: var(--k-ink, #1a211c);
  line-height: 1.35;
}

/* Copy column stays left-aligned inside the 8-col, not a centered 900px measure. */

.w-pkg-page .w-pkg-copy.policy-content {
  max-width: none;
  margin-inline: 0;
}

.w-pkg-inclex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin: 1.5rem 0 0.4rem;
}

.w-pkg-inclex__col {
  border: 1px solid var(--k-line, #d4ddd6);
  background: #fff;
  padding: 1.1rem 1.15rem 1.2rem;
}

.w-pkg-inclex__col h2 {
  margin: 0 0 0.75rem;
}

.w-pkg-page .w-pkg-ticks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.w-pkg-ticks li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.55rem;
  color: var(--k-ink, #1a211c);
  line-height: 1.5;
}

.w-pkg-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--k-primary, #1f4d3a);
  border-bottom: 2px solid var(--k-primary, #1f4d3a);
  transform: rotate(-45deg);
}

.w-pkg-ticks--out li::before {
  top: 0.85rem;
  width: 0.7rem;
  height: 0;
  border-left: 0;
  border-bottom: 2px solid var(--k-muted, #5b6660);
  transform: none;
}

.w-pkg-steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.w-pkg-steps li {
  margin-bottom: 0.45rem;
}

/* Booking rail: brief, white, sticky on desktop. */

.w-pkg-book {
  margin: 0;
  border: 1px solid var(--k-line, #d4ddd6);
  background: #fff;
  padding: 1.2rem 1.2rem 1.3rem;
}

.w-pkg-book__eyebrow {
  margin: 0 0 0.15rem;
  color: var(--k-muted, #5b6660);
  font-size: 0.85rem;
  font-weight: 700;
}

.w-pkg-book__price {
  margin: 0 0 0.95rem;
  font-family: var(--font-heading, 'Lato', sans-serif);
  line-height: 1.2;
}

.w-pkg-book__price strong {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--k-accent, #c45a4a);
}

.w-pkg-book__price span {
  color: var(--k-muted, #5b6660);
  font-size: 0.98rem;
  font-weight: 700;
}

.w-pkg-book__facts {
  margin: 0 0 1rem;
}

.w-pkg-book__facts > div {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.4rem 0.75rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--k-line, #d4ddd6);
}

.w-pkg-book__facts dt {
  margin: 0;
  font-weight: 700;
  color: var(--k-ink, #1a211c);
}

.w-pkg-book__facts dd {
  margin: 0;
  color: var(--k-muted, #5b6660);
}

.w-pkg-book__form {
  border-top: 1px solid var(--k-line, #d4ddd6);
  padding-top: 1rem;
}

.w-pkg-book__label {
  margin: 0 0 0.55rem;
  font-weight: 700;
  color: var(--k-ink, #1a211c);
}

.w-pkg-book__counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.w-pkg-book__counts label {
  display: block;
  min-width: 0;
}

.w-pkg-book__counts span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--k-muted, #5b6660);
}

.w-pkg-book__counts input {
  width: 100%;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--k-line, #d4ddd6);
  border-radius: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--k-ink, #1a211c);
  background: #fff;
}

.w-pkg-book__counts input:focus {
  outline: 2px solid var(--k-primary, #1f4d3a);
  outline-offset: -1px;
  border-color: var(--k-primary, #1f4d3a);
}

.w-pkg-book__total {
  margin: 0.85rem 0;
  color: var(--k-ink, #1a211c);
}

.w-pkg-book__total strong {
  font-size: 1.15rem;
}

.w-pkg-book__submit {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.w-pkg-book__note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--k-muted, #5b6660);
}

/* Related — white cards, no tinted custom tile. */

.w-pkg-related {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--k-line, #d4ddd6);
  background: #fff;
}

.w-pkg-related__title {
  margin: 0 0 1.15rem;
  font-family: var(--font-heading, 'Lato', sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--k-ink, #1a211c);
}

.w-pkg-related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.w-pkg-related__card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--k-line, #d4ddd6);
  background: #fff;
  overflow: hidden;
}

.w-pkg-related__media,
.w-pkg-related__mark {
  display: block;
  width: 168px;
  height: 168px;
  background: var(--k-surface, #eef3eb);
}

.w-pkg-related__media img {
  display: block;
  width: 168px;
  height: 168px;
  object-fit: cover;
  object-position: center 18%;
}

.w-pkg-related__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--k-primary, #1f4d3a);
  font-size: 1.65rem;
}

.w-pkg-related__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.85rem 1rem;
}

.w-pkg-related__body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.w-pkg-related__body h3 a {
  color: var(--k-ink, #1a211c);
  text-decoration: none;
}

.w-pkg-related__body h3 a:hover {
  color: var(--k-primary, #1f4d3a);
  text-decoration: underline;
}

.w-pkg-related__body p {
  margin: 0 0 0.5rem;
  color: var(--k-muted, #5b6660);
  font-size: 0.95rem;
  line-height: 1.45;
}

.w-pkg-related__price {
  margin-top: auto;
}

.w-pkg-related__price strong {
  color: var(--k-accent, #c45a4a);
  font-size: 1.2rem;
}

.w-pkg-related__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.w-pkg-related__card--custom .w-pkg-related__body {
  justify-content: center;
}

/* Full-page gallery modal */

.w-pkg-lightbox[hidden] {
  display: none;
}

.w-pkg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  grid-template-columns: auto 1fr auto;
  background: #111814;
  color: #fff;
}

.w-pkg-lightbox__bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
}

.w-pkg-lightbox__count {
  margin: 0;
  font-weight: 700;
}

.w-pkg-lightbox__close,
.w-pkg-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.w-pkg-lightbox__close:focus-visible,
.w-pkg-lightbox__nav:focus-visible,
.w-pkg-lightbox__thumb:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.w-pkg-lightbox__nav--prev {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.w-pkg-lightbox__nav--next {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}

.w-pkg-lightbox__stage {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.w-pkg-lightbox__stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.w-pkg-lightbox__stage.is-zoomed {
  overflow: auto;
}

.w-pkg-lightbox__stage.is-zoomed img {
  max-width: none;
  max-height: none;
  width: 180%;
  cursor: zoom-out;
}

.w-pkg-lightbox__caption {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.35rem 1rem 0.2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.w-pkg-lightbox__thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.45rem 0.85rem calc(0.7rem + env(safe-area-inset-bottom));
}

.w-pkg-lightbox__thumb {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.w-pkg-lightbox__thumb img {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
}

.w-pkg-lightbox__thumb.is-active {
  border-color: #fff;
}

body.w-pkg-lb-open {
  overflow: hidden;
}

/* Mobile book bar replaces the WhatsApp bar on this page only. */

.w-pkg-mbar {
  display: none;
}

@media (min-width: 768px) {
  .w-pkg-mosaic {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: min(52vw, 420px);
  }

  .w-pkg-mosaic[data-count="3"] .w-pkg-mosaic__item:first-child,
  .w-pkg-mosaic[data-count="4"] .w-pkg-mosaic__item:first-child,
  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(2) { grid-column: 2; grid-row: 1; }
  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(3) { grid-column: 3; grid-row: 1; }
  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(4) { grid-column: 2; grid-row: 2; }
  .w-pkg-mosaic[data-count="4"] .w-pkg-mosaic__item:nth-child(4),
  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(n+4) {
    display: block;
  }

  .w-pkg-mosaic[data-count="5"] .w-pkg-mosaic__item:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }

  .w-pkg-mosaic__more--sm { display: none; }
  .w-pkg-mosaic__more--lg { display: flex; }

  .w-pkg-related__grid {
    grid-template-columns: 1fr;
  }

  .w-pkg-overview__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .w-pkg-overview__facts > div {
    border-top: 0;
    border-left: 1px solid var(--k-line, #d4ddd6);
  }

  .w-pkg-overview__facts > div:first-child {
    border-left: 0;
  }
}

@media (min-width: 992px) {
  .w-pkg-page {
    padding-top: 1.15rem;
  }

  .w-pkg-book {
    position: sticky;
    top: 92px;
  }

  .w-pkg-inclex {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .w-pkg-related__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  /* Hide the site WhatsApp bar on package pages; book bar takes that slot. */
  body:has(.w-pkg-page) {
    padding-bottom: 76px;
  }

  body:has(.w-pkg-page) .k-mobile-bar {
    display: none !important;
  }

  .w-pkg-mbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--k-line, #d4ddd6);
  }

  .w-pkg-mbar__text {
    margin: 0;
    min-width: 0;
    font-weight: 700;
    color: var(--k-ink, #1a211c);
    line-height: 1.3;
  }

  .w-pkg-mbar__btn {
    flex: 0 0 auto;
    min-width: 6.5rem;
    justify-content: center;
  }

  .w-pkg-book__submit {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .w-pkg-related__actions .k-btn,
  .w-pkg-book__submit {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .w-pkg-lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .w-pkg-lightbox__stage.is-zoomed img {
    width: 220%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .w-pkg-mosaic__item,
  .w-pkg-lightbox__stage img {
    transition: none;
  }
}
