/* Performance guardrails loaded after the visual theme.
   Keep the full design intact; only prevent avoidable mobile jank/layout shifts. */

@media (max-width: 767px) {
  html,
  body {
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-content,
  .hero-headline,
  .hero-subheading {
    max-width: min(100%, calc(100vw - 40px)) !important;
    overflow-wrap: break-word;
  }

  .hero-subheading {
    width: min(100%, calc(100vw - 40px)) !important;
    font-size: clamp(0.95rem, 3.85vw, 1.05rem) !important;
    line-height: 1.55 !important;
  }

  .woocommerce,
  .woocommerce-page,
  .woocommerce .container,
  .luxe-shop-page,
  .luxe-shop-page .container,
  .luxe-shop-header,
  .luxe-shop-header > div,
  .luxe-shop-description,
  .luxe-shop-layout,
  .luxe-collection-sidebar,
  .luxe-collection-filter,
  .luxe-shop-results,
  .luxe-shop-toolbar,
  .luxe-empty-cart-container,
  .pdp-breadcrumb,
  .pdp-title {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
  }

  .luxe-shop-description {
    width: min(100%, 24ch) !important;
    max-width: 24ch !important;
    white-space: normal !important;
    font-size: clamp(0.95rem, 4vw, 1.05rem) !important;
    line-height: 1.55 !important;
  }

  .luxe-shop-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .woocommerce-cart .luxe-empty-cart-container {
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .woocommerce-cart .cart-empty-title {
    max-width: 100% !important;
    font-size: clamp(1.9rem, 8.5vw, 2.15rem) !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  .woocommerce-cart .return-to-shop,
  .woocommerce-cart .return-to-shop .button {
    max-width: 100% !important;
    white-space: normal !important;
  }

  .pdp-breadcrumb {
    white-space: normal !important;
  }

  .pdp-breadcrumb-current,
  .pdp-title {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .luxe-collection-filter__title,
  .luxe-collection-filter__header,
  .luxe-collection-search,
  .luxe-shop-active-filters,
  .luxe-shop-sorting {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #ticker-bar,
  #ticker-bar .ticker-wrapper,
  .bestsellers-rail-wrap {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    contain: paint;
  }

  body.home .luxe-bestsellers .bestsellers-rail,
  body.front-page .luxe-bestsellers .bestsellers-rail {
    max-width: 100% !important;
  }

  .swiper,
  .swiper-wrapper,
  .swiper-slide,
  .product-card,
  .promo-card,
  .category-card,
  .review-card,
  #cart-drawer,
  .mobile-sticky-cta {
    will-change: auto !important;
  }

  .product-card__img,
  .promo-card__img,
  .category-card__img,
  .hero-bg__img,
  .coverflow-img-link img {
    will-change: auto !important;
  }

  [data-animate],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-animate],
  [data-stagger],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
