/* ПРОМСМАРТ — mobile polish (staging)
   Stage 1: hamburger menu visible
   Stage 2: no white side gutters
   Stage 3: homepage blocks / taps */

:root {
	--ps-gutter: 24px;
}

img,
video,
iframe,
svg,
embed,
object {
	max-width: 100%;
}

.wp-block-image img,
.uagb-image__figure img {
	height: auto;
}

/* Do not clip #page / html — Astra dropdown lives in #masthead */
html,
body,
#page,
.site {
	overflow-x: visible !important;
}

@media (max-width: 921px) {
	:root {
		--ps-gutter: 16px;
	}

	#content,
	.site-content,
	.entry-content,
	.site-main {
		max-width: 100%;
		overflow-x: clip;
	}

	.wp-block-spectra-container,
	.wp-block-uagb-container,
	.uagb-is-root-container {
		max-width: 100%;
		box-sizing: border-box;
	}

	/* Kill 100vw alignfull pull that leaves white strips */
	.entry-content > .alignfull {
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Homepage: content flush to the viewport; inner blocks keep their gutters */
	body.home .site-content > .ast-container {
		padding-left: 0 !important;
		padding-right: 0 !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	/* ===== Stage 1: hamburger above the hero ===== */
	#masthead,
	.ast-mobile-header-wrap,
	#ast-mobile-header {
		position: relative;
		z-index: 10050;
		overflow: visible !important;
	}

	.ast-main-header-wrap,
	.main-header-bar-wrap,
	.ast-primary-header-bar {
		overflow: visible !important;
	}

	.ast-mobile-header-wrap .ast-mobile-header-content {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 10060;
		width: 100%;
		box-sizing: border-box;
		max-height: min(78vh, 640px);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 8px 16px 20px;
		background: #182338;
		box-shadow: 0 22px 48px rgba(10, 16, 28, 0.38);
	}

	body.ast-main-header-nav-open .ast-mobile-header-wrap .ast-mobile-header-content,
	body.ast-header-break-point.ast-main-header-nav-open .ast-mobile-header-wrap .ast-mobile-header-content {
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		height: auto !important;
	}

	#ast-mobile-header .main-header-bar-navigation,
	#ast-mobile-header .main-navigation,
	#ast-mobile-header .ast-builder-menu-mobile {
		background: #182338 !important;
		height: auto !important;
		min-height: 0 !important;
	}

	#ast-mobile-header ul.main-header-menu,
	#ast-mobile-header ul#ast-hf-mobile-menu {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
		height: auto !important;
	}

	#ast-mobile-header .main-header-menu > .menu-item {
		display: block !important;
		width: 100% !important;
		float: none !important;
	}

	#ast-mobile-header .menu-link {
		color: #fff !important;
	}

	#ast-mobile-header .current-menu-item > .menu-link {
		color: #9de377 !important;
	}
}

@media (max-width: 544px) {
	.wp-block-button__link,
	a.ast-button,
	.ast-custom-button,
	button.button,
	input[type="submit"],
	.woocommerce a.button,
	.woocommerce button.button {
		min-height: 44px;
		box-sizing: border-box;
		touch-action: manipulation;
	}

	.main-header-bar,
	.ast-primary-header-bar,
	.ast-mobile-header-wrap {
		padding-left: env(safe-area-inset-left, 0px);
		padding-right: env(safe-area-inset-right, 0px);
	}
}

@media (max-width: 380px) {
	:root {
		--ps-gutter: 14px;
	}
}
