/* ==========================================================================
   Adventure Nomad — Motorhomes Page CSS
   (Used for motorhome-hire-wiltshire/ and individual motorhome pages)
   ========================================================================== */

/* --- Intro block --- */
.intro-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.intro-block-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
}

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

.intro-block-content p + p {
  margin-top: var(--space-4);
}

/* --- Fleet grid on motorhome hire page --- */
.motorhome-fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
}

/* --- What's included --- */
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
}

.included-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.included-icon {
  width: 48px;
  height: 48px;
  background: var(--teal-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal-deep);
}

.included-icon svg {
  width: 24px;
  height: 24px;
}

.included-item h4 {
  font-size: 0.95rem;
  margin-bottom: var(--space-1);
}

.included-item p {
  font-size: 0.85rem;
  color: var(--warm-grey);
}

/* --- Individual vehicle page --- */
.vehicle-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr);
  gap: var(--space-8);
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: flex-start;
}

/* Gallery */
.vehicle-gallery {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-5));
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--charcoal-mid);
  margin-bottom: var(--space-3);
}

.gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.gallery-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  width: 90px;
  min-width: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  background: var(--charcoal-mid);
  scroll-snap-align: start;
  flex-shrink: 0;
  opacity: 0.55;
  padding: 0;
}

.gallery-thumb:hover {
  opacity: 0.85;
}

.gallery-thumb.is-active {
  border-color: var(--teal);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-carousel-btn {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.gallery-carousel-btn:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.gallery-carousel-btn svg {
  width: 14px;
  height: 14px;
}

.gallery-caption {
  font-size: 0.82rem;
  color: var(--warm-grey);
  text-align: center;
  margin: var(--space-2) 0 0;
  min-height: 1.2em;
  font-style: italic;
}

/* Vehicle info panel */
.vehicle-info {
  padding-top: var(--space-2);
}

.vehicle-info h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: var(--space-2);
}

.vehicle-tagline {
  color: var(--warm-grey);
  font-size: 1rem;
  margin-bottom: var(--space-4);
}

.vehicle-booking {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--light-grey);
  margin: var(--space-6) 0;
}

.vehicle-booking h3 {
  font-size: 1rem;
  margin-bottom: var(--space-4);
}

/* Description section */
.vehicle-description {
  max-width: var(--max-width);
  margin: 0 auto;
}

.vehicle-description p + p {
  margin-top: var(--space-4);
}

/* Extras upsell horizontal scroll */
.extras-scroll {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: var(--teal-mid) transparent;
}

.extras-scroll::-webkit-scrollbar {
  height: 4px;
}

.extras-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.extras-scroll::-webkit-scrollbar-thumb {
  background: var(--teal-mid);
  border-radius: var(--radius-full);
}

.extra-card-mini {
  min-width: 180px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--light-grey);
  overflow: hidden;
  flex-shrink: 0;
  transition: box-shadow var(--transition);
}

.extra-card-mini:hover {
  box-shadow: var(--shadow);
}

.extra-card-mini .extra-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--charcoal-mid);
  overflow: hidden;
}

.extra-card-mini .extra-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extra-card-mini .extra-body {
  padding: var(--space-3) var(--space-4);
}

.extra-card-mini h4 {
  font-size: 0.88rem;
  margin-bottom: var(--space-1);
}

.extra-card-mini .extra-price {
  font-size: 0.8rem;
  color: var(--teal-deep);
  font-weight: 600;
}

/* "You may also like" section */
.also-like-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
}

/* --- Split hero (motorhome hire overview page) --- */
.page-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 55vh;
}

.page-hero-split__content {
  background: var(--charcoal);
  padding: var(--space-10) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero-split__content .label {
  color: var(--teal);
}

.page-hero-split__content h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
  margin: var(--space-3) 0 var(--space-4);
}

.page-hero-split__content .lead {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-6);
}

.split-hero-breadcrumb ol {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.split-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.split-hero-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.page-hero-split__image {
  position: relative;
  overflow: hidden;
}

.page-hero-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Fleet detail cards (overview page) --- */
.fleet-card-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.fleet-card-detail:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.fleet-card-detail__img {
  aspect-ratio: 4 / 3;
  background: var(--charcoal-mid);
  overflow: hidden;
  position: relative;
}

.fleet-card-detail__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.fleet-card-detail:hover .fleet-card-detail__img img {
  transform: scale(1.04);
}

.fleet-card-detail__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--teal);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.fleet-card-detail__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fleet-card-detail__price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: var(--space-1);
}

.fleet-card-detail__price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--warm-grey);
}

.fleet-card-detail__tagline {
  font-size: 0.88rem;
  color: var(--warm-grey);
  margin-bottom: var(--space-4);
  font-style: italic;
}

.fleet-card-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.fleet-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.fleet-card-detail__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-5);
  font-size: 0.83rem;
  color: var(--charcoal);
}

.fleet-card-feature {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.fleet-card-feature svg {
  width: 13px;
  height: 13px;
  color: var(--teal);
  flex-shrink: 0;
}

.fleet-card-detail__cta {
  margin-top: auto;
}

/* --- Vehicle spec pills (individual vehicle pages) --- */
.vehicle-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.vehicle-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--warm-grey);
}

.vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.vehicle-spec-pill {
  display: inline-flex;
  align-items: center;
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.vehicle-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.vehicle-feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.88rem;
  color: var(--charcoal);
}

.vehicle-feature-item svg {
  width: 15px;
  height: 15px;
  color: var(--teal);
  flex-shrink: 0;
}

.vehicle-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Force Booqable widget text to be visible on white background.
   The widget renders in a shadow/iframe context — a white background on the
   container ensures any near-white placeholder text stays readable. */
.vehicle-cta .booqable-datepicker {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-2);
  color: var(--charcoal) !important;
}

/* --- EU Travel info box --- */
.eu-info-box {
  background: rgba(0, 180, 200, 0.08);
  border: 1px solid rgba(0, 180, 200, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.eu-info-box svg {
  width: 24px;
  height: 24px;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}

.eu-info-box h4 {
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: var(--space-2);
}

.eu-info-box p {
  font-size: 0.9rem;
  color: var(--warm-grey);
  margin: 0;
}

/* --- Extras teaser grid --- */
.extras-teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
}

.extra-teaser-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  padding-bottom: var(--space-4);
  transition: box-shadow var(--transition);
}

.extra-teaser-card:hover {
  box-shadow: var(--shadow);
}

.extra-teaser-card .extra-img {
  aspect-ratio: 4 / 3;
  background: var(--charcoal-mid);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.extra-teaser-card .extra-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extra-teaser-card h4 {
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: var(--space-1);
  padding: 0 var(--space-3);
}

.extra-teaser-card .extra-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
}

/* Responsive */
@media (max-width: 1024px) {
  .motorhome-fleet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .extras-teaser-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .vehicle-detail-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .vehicle-gallery {
    position: static;
    max-width: 640px;
  }
}

@media (max-width: 768px) {
  .page-hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .page-hero-split__image {
    min-height: 240px;
    order: -1;
  }

  .page-hero-split__content {
    padding: var(--space-6) var(--content-padding);
  }

  .intro-block {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .motorhome-fleet-grid {
    grid-template-columns: 1fr;
  }

  .gallery-thumb {
    width: 75px;
    min-width: 75px;
  }

  .fleet-card-detail__features {
    grid-template-columns: 1fr;
  }

  .vehicle-features {
    grid-template-columns: 1fr;
  }

  .extras-teaser-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .eu-info-box {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* --- Gallery containment on mobile --- */
  .vehicle-gallery {
    max-width: 100%;
    overflow: hidden;
  }

  .gallery-main {
    max-width: 100%;
  }

  /* Constrain Booqable widgets so date picker doesn't overflow viewport */
  .booqable-datepicker,
  .booqable-product-button,
  .vehicle-cta {
    max-width: 100%;
    overflow: hidden;
  }

  /* Vehicle specs pills — ensure they wrap on small screens */
  .vehicle-specs {
    flex-wrap: wrap;
  }

  .vehicle-spec-pill {
    flex-shrink: 1;
    min-width: 0;
    word-break: break-word;
  }

  /* Ensure vehicle info column doesn't cause overflow */
  .vehicle-info {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}
