/**
 * Fulfill Engine custom store embed — mobile-friendly viewport sizing.
 * Pattern adapted from troopermom.com (scroll inside iframe, not the parent page).
 */

body.ta-page-custom-store {
	margin: 0;
	overflow: hidden;
	height: 100dvh;
	height: 100svh;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

html:has(body.ta-page-custom-store) {
	height: 100%;
	overflow: hidden;
}

body.ta-page-custom-store.ta-header-menu-open {
	overflow: hidden;
}

body.ta-page-custom-store .ta-header {
	flex-shrink: 0;
	position: sticky;
	top: 0;
	z-index: 50;
}

body.ta-page-custom-store .ta-footer {
	display: none;
}

body.ta-page-custom-store #main.ta-site {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
}

.ta-custom-store-section {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
}

.ta-custom-store-section iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	vertical-align: top;
	touch-action: manipulation;
}

@media (max-width: 1100px) {
	body.ta-page-custom-store #main.ta-site {
		position: fixed;
		top: var(--ta-custom-store-header-offset, 7rem);
		left: 0;
		right: 0;
		bottom: 0;
		flex: none;
		height: auto;
	}
}

@media (min-width: 1101px) {
	body.ta-page-custom-store #main.ta-site {
		height: calc(100dvh - var(--ta-custom-store-header-offset, 4.5rem));
		height: calc(100svh - var(--ta-custom-store-header-offset, 4.5rem));
	}
}
