/* Miller Gadgets v365 — mobile/runtime paint-cost reductions. */
#storeGrid > .product-card,
#storeGrid > .product-card-v39 {
  content-visibility: auto;
  contain-intrinsic-size: 560px;
}

/* Keep below-the-fold sections cheap until they approach the viewport. */
main > section:not(:first-child),
.page-shell > section:not(:first-child) {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

@media (max-width: 1080px) {
  /* Persistent glass blur is expensive while scrolling on mobile GPUs. The surfaces
     remain visually solid, but no longer re-blur the page every frame. */
  .product-card,
  .product-card-v39,
  .store-feature-card,
  .category-card,
  .top-nav,
  .mobile-drawer,
  .mg-product-tools,
  .mg-floating-help,
  .mg-v317-compare-button,
  .mg-v317-compare-tray {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  html body .mg-is-card,
  html body .mg-is-card img,
  html body .mg-is-primary-action {
    will-change: auto !important;
  }
}

@media (hover: none), (pointer: coarse) {
  /* Hover lift/zoom has no value on touch and creates extra compositor work. */
  html body .mg-is-card,
  html body .mg-is-card img,
  .product-card,
  .product-card-v39 {
    transition-property: background-color, border-color, box-shadow !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto !important; }
}
