/*
 * AiRCO 2026 responsive hardening — v1.4.0
 * Grounded in the 2026-08-06 staging backup plus the 2026-08-07 supplied
 * homepage/about/cart/checkout/commercial-maintenance captures.
 *
 * Goals:
 * - eliminate horizontal document scrolling on mobile;
 * - keep the approved desktop composition unchanged;
 * - give the theme homepage stable laptop/tablet/mobile breakpoints;
 * - protect Elementor interior layouts from theme overflow;
 * - keep WooCommerce Cart/Checkout usable on narrow screens.
 */

/* ---------- Document-wide overflow safety ---------- */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

#content,
main,
section,
.elementor-page-shell,
.elementor-page-shell > .elementor,
.elementor-location-header,
.elementor-location-footer,
.woocommerce,
.woocommerce-page {
  max-width: 100%;
}

/* Grid/flex children are allowed to shrink instead of widening the viewport. */
.hero-grid > *,
.trades-grid > *,
.band-grid > *,
.num-grid > *,
.member-grid > *,
.faq-grid > *,
.rev-grid > *,
.foot-grid > *,
.dispatch-head > *,
.dispatch-temp > *,
.dispatch-row > *,
.member-card-head > *,
.strip-inner > * {
  min-width: 0;
}

.wrap {
  width: 100%;
}

/* The hero grid also owns the .wrap class. Its vertical padding shorthand in
 * style.css previously zeroed .wrap's horizontal gutter. Restore the gutter. */
.hero-grid {
  padding-left: 28px;
  padding-right: 28px;
}

/* Long/third-party content must stay inside its host. */
img,
svg,
canvas,
video,
iframe,
embed,
object {
  max-width: 100%;
}

.reviews-embed,
.reviews-embed iframe,
.reviews-embed .lc_reviews_widget {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.marquee {
  width: 100%;
  max-width: 100%;
  contain: paint;
}

/* Elementor remains responsible for its design. These rules only stop its
 * full-width/stretched wrappers from creating document-level side scrolling. */
.elementor-page-shell,
.elementor-location-header,
.elementor-location-footer {
  overflow-x: hidden;
}
@supports (overflow: clip) {
  .elementor-page-shell,
  .elementor-location-header,
  .elementor-location-footer {
    overflow-x: clip;
  }
}
.elementor-page-shell .elementor-widget-container,
.elementor-location-header .elementor-widget-container,
.elementor-location-footer .elementor-widget-container {
  min-width: 0;
}

/* ---------- Laptop / small desktop ---------- */
@media (min-width: 941px) and (max-width: 1240px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }
  .hero-grid {
    gap: 42px;
    padding: 92px 32px 82px;
  }
  .dispatch {
    padding: 26px;
  }
  body .dispatch-temp b {
    font-size: 6rem !important;
  }
  .band-grid,
  .member-grid {
    gap: 48px;
  }
  .faq-grid {
    gap: 54px;
  }
  .foot-grid {
    gap: 34px;
  }
}

/* ---------- Tablet ---------- */
@media (min-width: 641px) and (max-width: 940px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero-grid {
    padding: 64px 24px 56px;
  }
  .hero-grid > div:first-child,
  .dispatch {
    width: 100%;
  }
  .dispatch {
    max-width: 660px;
  }
  .trades-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trades-grid .trade:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
  }
  .band-grid,
  .member-grid,
  .faq-grid,
  .rev-grid {
    grid-template-columns: 1fr;
  }
  .band .photo {
    max-width: 720px;
  }
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 48px;
  }
  .woocommerce-shell {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  body {
    font-size: 16px;
    line-height: 1.62;
  }

  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  body.home main#top > section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .hero-grid {
    gap: 30px;
    padding: 48px 18px 44px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
    line-height: .98;
    letter-spacing: 0;
  }

  .hero .lede {
    max-width: none;
    margin-bottom: 26px;
    font-size: 1rem;
    line-height: 1.58;
  }

  .kicker {
    gap: 10px;
    margin-bottom: 16px;
    font-size: .62rem !important;
    letter-spacing: .15em !important;
  }

  .kicker::before {
    width: 24px;
  }

  .hero-ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 28px;
  }

  .hero-ctas .btn {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-proof {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 18px;
  }

  .dispatch {
    width: 100%;
    padding: 20px 18px;
    border-radius: 12px;
  }

  .dispatch-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 14px;
    margin-bottom: 18px;
  }

  .dispatch-temp {
    gap: 12px;
  }

  body .dispatch-temp b {
    font-size: clamp(4.3rem, 22vw, 5.5rem) !important;
  }

  body .dispatch-temp b sup {
    font-size: 1.45rem !important;
  }

  .dispatch-temp > span {
    flex: 1 1 105px;
    font-size: .84rem;
    line-height: 1.45;
  }

  .dispatch-row {
    align-items: flex-start;
    gap: 10px;
    font-size: .86rem;
  }

  .dispatch-row span {
    flex: 1 1 56%;
  }

  .dispatch-row b {
    flex: 0 1 42%;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .strip-inner {
    gap: 7px 12px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .strip span,
  .strip a {
    font-size: .84rem;
  }

  .strip a {
    white-space: normal;
  }

  .trades-grid {
    grid-template-columns: 1fr;
  }

  .trade-body {
    padding: 22px 20px 24px;
  }

  .band {
    padding: 60px 0;
  }

  .band-grid,
  .member-grid,
  .faq-grid,
  .rev-grid {
    gap: 32px;
  }

  .num-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
    margin-top: 42px;
    padding-top: 36px;
  }

  .num b {
    font-size: 2.7rem;
  }

  .num span {
    letter-spacing: .13em;
  }

  .member-card-head {
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 22px 20px;
  }

  .member-card-head .price {
    font-size: 1.7rem;
  }

  .member-card-body {
    padding: 24px 20px 26px;
  }

  summary {
    padding-right: 34px;
    font-size: .98rem;
    line-height: 1.45;
  }

  summary::after {
    right: 4px;
    width: 10px;
    height: 10px;
  }

  .area-cities {
    gap: 8px;
  }

  .area-cities a,
  .area-cities span {
    padding: 6px 12px;
    font-size: .82rem;
  }

  .finale {
    padding: 60px 0;
  }

  .finale h2 {
    font-size: clamp(2rem, 10vw, 2.8rem);
    line-height: 1.02;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  footer.site {
    padding-top: 54px;
  }

  .foot-logo-img {
    max-width: min(220px, 100%);
  }

  .logo-trades {
    width: auto;
    max-width: 100%;
    letter-spacing: .2em;
    overflow-wrap: anywhere;
  }

  .foot-legal {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 42px;
    padding-top: 20px;
  }

  .foot-actions .btn {
    flex: 1 1 130px;
  }

  .callbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .callbar .btn,
  .callbar .btn-call {
    min-width: 0;
    white-space: nowrap;
  }

  .page-shell,
  .woocommerce-shell {
    padding-top: 44px;
    padding-bottom: 72px;
  }

  .page-header {
    margin-bottom: 30px;
  }

  .entry-content,
  .entry-content table,
  .entry-content pre {
    max-width: 100%;
  }

  /* WooCommerce Blocks — Cart and Checkout */
  .wc-block-components-sidebar-layout,
  .wc-block-cart,
  .wc-block-checkout,
  .wc-block-components-main,
  .wc-block-components-sidebar {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .wc-block-components-sidebar-layout {
    display: block !important;
  }

  .wc-block-components-main,
  .wc-block-components-sidebar {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .wc-block-components-sidebar {
    margin-top: 28px !important;
  }

  .wc-block-components-product-name {
    font-size: 1.08rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
  }

  .wc-block-components-quantity-selector,
  .wc-block-components-quantity-selector input,
  .woocommerce input,
  .woocommerce select,
  .woocommerce textarea {
    max-width: 100%;
  }
}

/* Very narrow phones: remove the last remaining width pressure. */
@media (max-width: 380px) {
  .wrap {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero-grid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .dispatch-temp {
    flex-wrap: wrap;
  }

  .dispatch-temp > span {
    flex-basis: 100%;
  }

  .member-card-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .num-grid {
    gap: 22px 12px;
  }

  .callbar {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* v1.5.0: Theme Builder location wrappers must remain shrink-safe without
   imposing layout/spacing on Elementor's own design. */
.elementor-location-single,
.elementor-location-archive {
  min-width: 0;
  max-width: 100%;
}
