[id="site-footer"] { content-visibility: auto; contain-intrinsic-size: 1px 720px; }
[id="site-footer"] .footer-top { min-height: 160px; }
[id="site-footer"] .footer-middle { min-height: 120px; }

/* Remove gap under fixed header (first content block margin reset) */
body > .page-wrapper > main#maincontent > .columns > .column > :first-child { margin-top: 0 !important; }
main#maincontent [data-element="main"]:first-child { margin-top: 0 !important; }
.page-wrapper { margin-top: 0 !important; }
[id="site-footer"] { content-visibility: auto; contain-intrinsic-size: 1px 720px; }
[id="site-footer"] .footer-top { min-height: 160px; }
[id="site-footer"] .footer-middle { min-height: 120px; }
/* Critical CLS mitigations loaded in <head> */

/* Temporarily disable Page Builder-specific CLS guards */
/* Keep only header/search/wishlist protections below */

/* Force Page Builder content visible on desktop (override PB visibility flags) */
@media (min-width: 1024px) {
  .pagebuilder-mobile-only,
  .pagebuilder-desktop-hidden,
  img.pagebuilder-mobile-only,
  img.pagebuilder-desktop-hidden {
    display: block !important;
  }
}

/* Search form CLS prevention */
.minisearch { position: relative; min-height: 24px; }
.minisearch .suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 60; }

/* Klevu mini search - now visible with reduced size */
[x-data^="initMiniSearch"] { 
    display: block !important; 
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure search is visible before Alpine.js loads */
[x-data^="initMiniSearch"][x-cloak] { 
    display: block !important; 
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===================================================================
   NOTE: All Klevu CLS prevention is handled in the Klevu customization file:
   /rx/pub/klevu/klevu-user-customization-170780224012017013-v2.js (optimized)
   =================================================================== */

/* Dolphin Guestwishlist header heart stabilization */
[data-heart-root] {
    min-width: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}
[data-heart-root] > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
}
[data-heart-root] svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    stroke-width: 1.5 !important;
    font-weight: normal !important;
}
[data-heart-root] [data-heart-badge] {
    position: absolute !important;
    top: -4px !important;
    right: -6px !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    padding: 0 4px !important;
    opacity: 1 !important;
    visibility: visible !important;
}
[data-heart-root] [data-heart-badge]:empty {
    opacity: 0 !important;
    visibility: hidden !important;
}
[data-heart-root] span[x-show] {
    display: block !important;
}

/* Header icon CLS prevention */
#compare-link, #menu-cart-icon { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.customer-dropdown, .customer-menu { position: relative; min-width: 40px; min-height: 40px; }

/* Wishlist icon CLS prevention */
#add-to-wishlist, .wishlist-button, .wishlist-icon {
    min-width: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* Prevent wishlist counter from causing shifts */
.wishlist-counter, .wishlist-count, [data-wishlist-count] {
    position: absolute !important;
    top: -4px !important;
    right: -6px !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    padding: 0 4px !important;
    background-color: #dc2626 !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    z-index: 1 !important;
}