.gg-mobile-header,
.gg-mobile-menu {
	display: none;
}

@media (max-width: 1024px) {
	body.gg-has-mobile-header #masthead,
	body.gg-has-mobile-header .elementor-element-4ff637a,
	body.gg-has-mobile-header .gg-home__search {
		display: none !important;
	}

	.gg-mobile-header {
		position: sticky;
		inset-block-start: 0;
		z-index: 100;
		display: block;
		padding: 0 16px 10px;
		border-block-end: 1px solid var(--ggm-border);
		background: var(--ggm-bg);
		color: var(--ggm-text);
	}

	.gg-mobile-header--retracted:not(:focus-within) {
		transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 46px)));
	}

	@media (prefers-reduced-motion: no-preference) {
		.gg-mobile-header {
			transition: transform 160ms ease-out;
		}
	}

	.admin-bar .gg-mobile-header {
		inset-block-start: var(--wp-admin--admin-bar--height, 32px);
	}

	.gg-mobile-header__bar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		align-items: center;
		min-height: 58px;
		gap: 8px;
	}

	.gg-mobile-header__menu,
	.gg-mobile-header__cart {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		width: fit-content;
		min-height: 44px;
		color: inherit;
		font-size: 14px;
		font-weight: 650;
	}

	.gg-mobile-header__cart {
		position: relative;
		justify-self: end;
		justify-content: center;
		min-width: 44px;
		font-size: 24px;
	}

	.gg-mobile-header__brand {
		font-size: 21px;
		font-weight: 750;
		text-align: center;
	}

	.gg-mobile-header__brand :is(a, img) {
		display: block;
		color: inherit;
	}

	.gg-mobile-header__brand img {
		width: auto;
		max-width: clamp(110px, 37vw, 168px);
		height: auto;
		max-height: 38px;
		object-fit: contain;
	}

	.gg-mobile-header__hamburger {
		display: inline-block;
		position: relative;
		width: 19px;
		height: 14px;
		flex: 0 0 auto;
		border-block: 2px solid currentColor;
	}

	.gg-mobile-header__hamburger::after {
		content: "";
		position: absolute;
		inset: 4px 0 auto;
		border-block-start: 2px solid currentColor;
	}

	#gg-mobile-cart-count:not([hidden]) {
		position: absolute;
		inset: 3px 0 auto auto;
		display: grid;
		place-items: center;
		min-width: 19px;
		min-height: 19px;
		padding-inline: 4px;
		border-radius: 20px;
		background: var(--ggm-accent);
		color: var(--ggm-ink);
		font-size: 11px;
		line-height: 1;
	}

	[dir="rtl"] #gg-mobile-cart-count {
		inset: 3px auto auto 0;
	}

	.gg-mobile-header__search .dgwt-wcas-search-wrapp {
		width: 100%;
		max-width: none;
	}

	body.gg-midnight .gg-mobile-header__search :is(input[type="search"], .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input) {
		min-height: 46px;
		height: 46px;
		border: 1px solid #d8e2ee;
		border-radius: 9px;
		background: #f3f7fb;
		color: #0c1d31;
		font-size: 16px;
	}

	body.gg-midnight .gg-mobile-header__search input[type="search"]::placeholder {
		color: #42546a !important;
		font-style: normal;
		opacity: 1;
	}

	body.gg-has-mobile-header #gg-home-new {
		scroll-margin-block-start: 130px;
	}

	.gg-mobile-menu[open] {
		position: fixed;
		inset: 0 auto 0 0;
		display: flex;
		flex-direction: column;
		width: min(92vw, 380px);
		max-width: none;
		height: 100%;
		max-height: none;
		margin: 0;
		padding: 0;
		border: 0;
		border-right: 1px solid var(--ggm-border);
		background: var(--ggm-bg);
		color: var(--ggm-text);
		box-shadow: 12px 0 48px rgb(0 0 0 / 35%);
	}

	.gg-mobile-menu::backdrop {
		background: rgb(0 9 16 / 72%);
	}

	html:has(.gg-mobile-menu[open]) {
		overflow: hidden;
	}

	.gg-mobile-menu__head {
		display: flex;
		flex: 0 0 auto;
		justify-content: space-between;
		align-items: center;
		min-height: 58px;
		padding: env(safe-area-inset-top) 16px 0;
		border-block-end: 1px solid var(--ggm-border);
	}

	.gg-mobile-menu__head h2 {
		margin: 0;
		color: inherit;
		font-size: 24px;
		user-select: none;
	}

	.gg-mobile-menu__head button {
		display: grid;
		place-items: center;
		min-width: 44px;
		min-height: 44px;
		padding: 0;
		border: 0;
		background: transparent;
		color: inherit;
		font-size: 22px;
	}

	.gg-mobile-menu__content {
		flex: 1;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4px 16px max(16px, env(safe-area-inset-bottom));
		scrollbar-color: var(--ggm-border) transparent;
	}

	.gg-mobile-menu__content :is(ul, h3) {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.gg-mobile-menu__content h3 {
		margin-block-start: 16px;
		color: var(--ggm-muted);
		font-size: 14px;
		font-weight: 650;
	}

	.gg-mobile-menu__quick {
		display: flex;
		flex-wrap: wrap;
		gap: 0 16px;
		border-block-end: 1px solid var(--ggm-border);
	}

	.gg-mobile-menu__content :is(a, summary) {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		min-height: 44px;
		color: inherit;
		font-size: 15px;
		line-height: 1.3;
	}

	.gg-mobile-menu__quick a {
		color: var(--ggm-accent-hover);
		font-weight: 650;
	}

	.gg-mobile-menu__links li + li {
		border-block-start: 1px solid var(--ggm-border);
	}

	.gg-mobile-menu__links a::after {
		content: "";
		flex: 0 0 auto;
		width: 7px;
		height: 7px;
		margin-inline-end: 4px;
		transform: rotate(45deg);
		border-block-start: 1px solid currentColor;
		border-inline-end: 1px solid currentColor;
	}

	[dir="rtl"] .gg-mobile-menu__links a::after {
		transform: rotate(-45deg);
	}

	.gg-mobile-menu__links a[aria-current],
	.gg-mobile-menu__currency [aria-current] {
		color: var(--ggm-accent-hover);
	}

	.gg-mobile-menu__content .gg-mobile-menu__service,
	.gg-mobile-menu__language {
		margin-block-start: 14px;
		border-block-start: 1px solid var(--ggm-border);
	}

	.gg-mobile-menu__language summary {
		display: list-item;
		padding-block: 12px;
		cursor: pointer;
	}

	.gg-mobile-menu__currency ul {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	.gg-mobile-menu__currency button[data-currency] {
		min-width: 46px;
		min-height: 44px;
		padding: 4px 6px;
		background: var(--ggm-surface);
		color: var(--ggm-text);
		border: 1px solid var(--ggm-border);
		border-radius: 6px;
	}

	.gg-mobile-menu__currency button[aria-current] {
		border-color: var(--ggm-accent);
		color: var(--ggm-accent-hover);
	}
}

@media (max-width: 600px) {
	/* WordPress's toolbar scrolls offscreen at this breakpoint. */
	.admin-bar .gg-mobile-header {
		inset-block-start: 0;
	}
}
