/* Deco Rock Website 2.0 — Phase 6 performance / Core Web Vitals */

/* Prevent layout shift from oversized intrinsic dimensions */
img {
  max-width: 100%;
  height: auto;
}

/* Homepage hero slideshow — must eager-load; do not lazy-load these imgs */
.cbp-bislideshow,
.cbp-bislideshow li,
.cbp-bislideshow img {
  content-visibility: visible !important;
}

.cbp-bislideshow img {
  max-width: none;
}

.cbp-bicontrols {
  z-index: 10;
  pointer-events: auto;
}

/* Homepage layout: authority band at bottom, slideshow visible above */
body.dr-home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dr-home-page .head {
  flex-shrink: 0;
}

body.dr-home-page .dr-home-authority {
  margin-top: auto;
  flex-shrink: 0;
}

body.dr-home-page footer.fix {
  flex-shrink: 0;
}

/* Hero product image — reserve space, avoid CLS */
.pic-shad,
.product-hero img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  object-fit: contain;
}

/* Below-fold nav thumbnails — smaller decode cost */
.submenu-content img,
.prod-drop img,
.p-rows img {
  content-visibility: auto;
  contain-intrinsic-size: 120px 100px;
}

/* Footer / social icons */
footer img,
.foot-icons img {
  width: auto;
  max-height: 27px;
}

/* Reduce paint cost for long FAQ / related sections */
.dr-faq,
.dr-related-links,
.dr-ai-summary {
  content-visibility: auto;
  contain-intrinsic-size: auto 200px;
}

/* Respect reduced motion */
@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;
  }
}
