/**
 * Mobile horizontal overflow — “last line of defense”
 *
 * Loaded with wp_enqueue_scripts priority 99999 so it usually prints after most
 * plugins (Elementor, etc.). Uses !important only on scroll roots where builders
 * often set width/overflow later.
 *
 * If overflow persists, something may inject <style> mid-body; reintroduce a
 * tiny wp_footer print or raise specificity per that widget.
 */

@media screen and (max-width: 1000px) {

	html,
	body {
		overflow-x: hidden !important;
		max-width: 100% !important;
	}

	html.lenis,
	html.lenis body {
		overflow-x: hidden !important;
	}

	body #page,
	body #page.site {
		overflow-x: hidden !important;
		max-width: 100% !important;
	}

	body .site-content,
	body #content,
	body #primary.site-main,
	main#primary {
		max-width: 100% !important;
		overflow-x: hidden !important;
	}

	header#masthead,
	.site-header {
		max-width: 100% !important;
		overflow-x: hidden !important;
	}

	#megamenu-mobile {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		overflow-x: hidden !important;
	}
}
