/*
 * Wide screens: the page — header, content and footer, everything inside .ml-site — scales up
 * from its 1440px design the way browser zoom does, so a 1920 or 2560px monitor shows the same
 * layout bigger instead of a narrow strip down the middle (and pieces sized to the window, like
 * the torn-paper edges, stay where they belong). The page keeps a layout width of about
 * 1500–1800px at every size. Pop-ups, the cart panel, the phone menu and the admin bar sit
 * outside .ml-site and keep their normal size. Off in the Elementor editor, where its own
 * handles and drag-and-drop need the page unscaled.
 */

.ml-site {
	--ml-zoom: 1;
	zoom: var(--ml-zoom);
}

@media (min-width: 1680px) {
	.ml-site {
		--ml-zoom: 1.1;
	}
}

@media (min-width: 1880px) {
	.ml-site {
		--ml-zoom: 1.2;
	}
}

@media (min-width: 2080px) {
	.ml-site {
		--ml-zoom: 1.3;
	}
}

@media (min-width: 2280px) {
	.ml-site {
		--ml-zoom: 1.42;
	}
}

@media (min-width: 2480px) {
	.ml-site {
		--ml-zoom: 1.55;
	}
}

@media (min-width: 2800px) {
	.ml-site {
		--ml-zoom: 1.75;
	}
}

@media (min-width: 3200px) {
	.ml-site {
		--ml-zoom: 2;
	}
}

@media (min-width: 3600px) {
	.ml-site {
		--ml-zoom: 2.25;
	}
}

body.elementor-editor-active .ml-site,
body.elementor-editor-preview .ml-site {
	--ml-zoom: 1;
}

/* Full-width blocks are measured in window widths, which scale too: back to the window. */
.ml-site .alignfull {
	width: calc(100vw / var(--ml-zoom));
	max-width: calc(100vw / var(--ml-zoom));
	margin-inline: calc(50% - 50vw / var(--ml-zoom));
}

/*
 * Elementor Pro's menu cart (an Elementor Theme Builder header inside .ml-site): its shade is
 * 100vw wide and holds the sliding panel, so on a scaled page the panel landed past the right
 * edge of the screen and only the shade showed. Back to the window's width.
 */
.ml-site .elementor-menu-cart__container {
	width: calc(100vw / var(--ml-zoom));
	max-width: calc(100vw / var(--ml-zoom));
}
