/* QBH — mobile header, footer, offer bar, booking flows */

/* Global responsive fix to prevent horizontal scroll */
body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

@media (max-width: 900px) {
  .qbh-wizard-layout,
  .qbh-journey-wizard {
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  .qbh-wizard-summary-bar {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .qbh-header-inner {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem var(--qbh-gutter, 1rem);
  }

  .qbh-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    justify-self: start;
  }

  .qbh-logo-link {
    grid-column: 2;
    justify-self: center;
  }

  .qbh-nav,
  .qbh-header-desktop-actions {
    display: none !important;
  }

  .qbh-wa-mobile-only {
    display: flex !important;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    justify-self: end;
    padding: 0.5rem !important;
    min-width: 44px;
    min-height: 44px;
  }

  .qbh-footer {
    padding: 2.5rem 0 1.25rem;
  }

  .qbh-footer .qbh-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .qbh-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    text-align: center;
  }

  .qbh-footer-col-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .qbh-footer-tagline {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .qbh-footer-social {
    justify-content: center;
  }

  .qbh-footer-contact-row {
    justify-content: center;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .qbh-footer-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
  }

  .qbh-footer-meta p {
    margin: 0;
  }

  .qbh-footer-brand {
    overflow: hidden;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }

  .qbh-footer-brand span {
    font-size: clamp(2.25rem, 16vw, 4.5rem);
    line-height: 0.9;
  }

  .qbh-offer-page main section.flex.gap-8,
  .qbh-offer-page main section.flex.gap-12 {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  /* Offer mobile bar + sidebar: see qbh-offer-active.css (max-width: 900px) */

  .qbh-template-page .grid.grid-cols-2,
  .qbh-template-page .grid.grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 769px) {
  .qbh-menu-toggle {
    display: none !important;
  }

  .qbh-wa-mobile-only {
    display: none !important;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .qbh-nav {
    gap: 1rem;
    font-size: 0.8rem;
  }
}

.qbh-offer-hotels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .qbh-offer-hotels-grid {
    grid-template-columns: 1fr;
  }
}

.qbh-offer-hotel-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.qbh-offer-hotel-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.qbh-offer-hotel-card .qbh-offer-hotel-body {
  padding: 1rem;
}

/* Offer page desktop layout fix */
@media (min-width: 901px) {
  .qbh-offer-page main > section.flex.gap-8,
  .qbh-offer-page main > section.flex.gap-12 {
    flex-wrap: nowrap !important;
  }
}

.qbh-offer-page main > section.flex.gap-8 > div:first-child,
.qbh-offer-page main > section.flex.gap-12 > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.qbh-offer-page main > section.flex.gap-8 > aside,
.qbh-offer-page main > section.flex.gap-12 > aside {
  min-width: 280px;
  max-width: 340px;
  width: 100%;
}

/* Grid layout in qbh-offer-active.css handles desktop aside; don't fight it */
@media (min-width: 901px) {
  .qbh-offer-page main > section.flex.gap-8 > aside,
  .qbh-offer-page main > section.flex.gap-12 > aside {
    max-width: 320px;
    width: 320px;
  }
}

/* Offer page inner grids responsive */
@media (max-width: 1200px) {
  .qbh-offer-page main > section.flex.gap-8,
  .qbh-offer-page main > section.flex.gap-12 {
    gap: 2rem !important;
  }
}

/* Admin responsive */
@media (max-width: 768px) {
  .qbh-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .qbh-admin-wrap {
    flex-direction: column;
  }
  .qbh-admin-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--qbh-border);
  }
  .qbh-admin-sidebar a { font-size: 0.75rem; padding: 0.5rem; }
  .qbh-admin-content { padding: 1rem; }
  .qbh-offer-hotels-grid {
    grid-template-columns: 1fr !important;
  }

  .qbh-hotels-search-wrap .qbh-hotels-search-form,
  .qbh-hotels-search-wrap #hero-planner-form {
    min-height: 0;
  }

  .qbh-filter-pax-row {
    grid-template-columns: 1fr;
  }

  .qbh-hotel-listing-side {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    min-width: 0;
  }

  .qbh-hotel-listing-actions {
    flex-direction: column;
  }

  .qbh-checkout-summary,
  .qbh-payment-options {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
  }
}
