/**
 * OFF MARKET — document scroll layout fixes (Next.js hybrid pages).
 * No visual redesign; prevents dead scroll zones and orphaned spacers.
 */

:root {
  --om-floating-nav-top: 22px;
  --om-floating-nav-bar-height: 70px;
  --om-header-height: calc(
    var(--om-floating-nav-top) + var(--om-floating-nav-bar-height) + 10px
  );
}

html,
body {
  min-height: 100%;
  height: auto !important;
  max-height: none !important;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

html.is-preloader-disabled body {
  overflow-y: auto !important;
  position: static !important;
  touch-action: auto !important;
}

/* Archive block must not reserve layout space if it reappears in cached HTML */
#legacy-editorial {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Legacy favorites card template — clone source, not page content */
.js-favourite-list-single {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Orphaned GSAP / Locomotive pin spacers after footer */
.pin-spacer:empty,
.pin-spacer:not(:has(*)) {
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Locomotive virtual scroll must not lock document height */
html.has-scroll-smooth,
html.no-scroll-smooth,
html.has-scroll-smooth body,
html.no-scroll-smooth body,
[data-scroll-container] {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

/* Mobile menu lock — preserve width only while open */
@media (max-width: 979px) {
  body.menu-open {
    overflow: hidden !important;
    touch-action: none !important;
    position: fixed !important;
    width: 100% !important;
    left: 0;
    right: 0;
  }
}

/* Safety fallback — homepage sections must never stay hidden after navigation */
html.om-home-reveal-fallback [data-om-mobile-reveal],
html.om-home-reveal-fallback [data-reveal-section] .mav-reveal-item,
html.om-home-reveal-fallback [data-reveal] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}
