/**
 * Shared front-end and editor presentation.
 * Editable values come from theme.json presets.
 */

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
}

:where( .wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-site-title ) {
	overflow-wrap: anywhere;
}

img {
	max-width: 100%;
	height: auto;
}

:where( a, button, input, select, textarea, summary ):focus-visible {
	outline: 3px solid var( --wp--preset--color--terracotta );
	outline-offset: 4px;
}

:where( input, select, textarea ) {
	font: inherit;
}

.grocenest-topbar {
	padding: 6px 5vw;
	font-size: var(--wp--custom--type--size-12);
	line-height: 1.65;
}

.grocenest-topbar-inner {
	gap: 1rem;
}

.grocenest-topbar p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

@media ( max-width: 760px ) {
	.grocenest-topbar {
		font-size: var(--wp--custom--type--size-10);
	}

	.grocenest-topbar .grocenest-topbar-inner {
		justify-content: center;
	}

	.grocenest-topbar-note {
		display: none;
	}
}

.grocenest-header {
	--grocenest-header-search-space: 64px;
	position: relative;
	border-bottom: 1px solid var( --wp--preset--color--line );
	padding-block: 0;
}

.grocenest-header .grocenest-header-inner {
	position: relative;
	min-height: 90px;
	max-width: none;
	width: 100%;
	gap: 30px;
}

.grocenest-header-brand {
	flex-shrink: 1;
	max-width: 18rem;
}

.grocenest-header .grocenest-brand-mark {
	flex-shrink: 0;
	width: 34px;
	margin: 0;
}

.grocenest-brand-mark img {
	display: block;
	width: 34px;
	height: 44px;
	object-fit: contain;
}

.grocenest-header .wp-block-site-title {
	margin: 0;
	overflow-wrap: anywhere;
	font-size: var(--wp--custom--type--size-42);
	font-weight: 400;
	line-height: 0.9;
	letter-spacing: -0.06em;
	text-transform: lowercase;
}

.grocenest-header .grocenest-brand-caption {
	margin-block: 9px 0;
	font-size: var(--wp--custom--type--size-9);
	line-height: 1;
	letter-spacing: 0.26em;
	text-align: center;
}

.grocenest-header .grocenest-header-navigation {
	flex: 1;
	justify-content: center;
	font-size: var(--wp--custom--type--size-14);
}

.grocenest-header-navigation .wp-block-navigation__container {
	gap: 30px;
}

.grocenest-header-navigation .wp-block-navigation__submenu-container {
	padding: 0.5rem;
	border-color: var( --wp--preset--color--line );
	background: var( --wp--preset--color--cream );
	min-width: 15rem;
}

.grocenest-header-navigation .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0;
}

.grocenest-header-navigation .wp-block-navigation__responsive-container:not( .is-menu-open ) .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	padding-inline-end: 18px;
}

.grocenest-header-navigation .wp-block-navigation__responsive-container:not( .is-menu-open ) .wp-block-navigation__submenu-icon {
	position: absolute;
	inset-inline-end: 0;
	inset-block-start: 50%;
	transform: translateY( -50% );
	width: 12px;
	height: 12px;
	pointer-events: none;
}

.grocenest-header-navigation .wp-block-navigation__submenu-icon svg {
	width: 12px;
	height: 12px;
}

.grocenest-header .grocenest-header-actions {
	gap: 24px;
	flex-shrink: 0;
}

.grocenest-header .grocenest-header-basket {
	gap: 0.625rem;
	font-size: var(--wp--custom--type--size-13);
}

.grocenest-basket-label {
	margin: 0;
	font-size: var(--wp--custom--type--size-13);
}

.grocenest-header .wc-block-mini-cart__button {
	padding: 0;
	min-height: 44px;
	color: var( --wp--preset--color--forest );
}

.grocenest-header .wc-block-mini-cart__quantity-badge {
	display: flex;
	align-items: center;
	gap: 10px;
}

.grocenest-header .wc-block-mini-cart__icon {
	width: 32px;
	height: 32px;
	margin: 0;
}

.grocenest-header .grocenest-mini-cart-label {
	font-size: var(--wp--custom--type--size-13);
	font-weight: 400;
}

.grocenest-header .wc-block-mini-cart__badge {
	position: static;
	transform: none;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	min-height: 22px;
	padding: 0.125rem;
	border-radius: 50%;
	font-size: var(--wp--custom--type--size-10);
	font-weight: 700;
}

.grocenest-header .grocenest-header-search {
	width: 42px;
	margin: 0;
}

.grocenest-header-search .wp-block-search__button {
	width: 42px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var( --wp--preset--color--forest );
	align-items: center;
}

.grocenest-header-search .search-icon {
	transform: scaleX( -1 );
}

.grocenest-header-search .wp-block-search__input {
	border: 1px solid var( --wp--preset--color--line );
	border-radius: 4px;
	background: var( --wp--preset--color--white );
	color: var( --wp--preset--color--ink );
	font-size: var(--wp--custom--type--size-14);
}

.grocenest-header .grocenest-search-panel {
	position: absolute;
	z-index: 10;
	inset-block-start: 100%;
	inset-inline: 0;
	width: min( 800px, 90% );
	margin-inline: auto;
	padding-inline-end: 106px;
	box-sizing: border-box;
}

.grocenest-search-panel .wp-block-search__input {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	box-sizing: border-box;
}

.grocenest-header .grocenest-search-submit {
	position: absolute;
	z-index: 11;
	inset-block-start: 100%;
	inset-inline-end: max( 5%, calc( 50% - 400px ) );
	width: 98px;
	min-height: 44px;
	padding: 10px 16px;
	border: 0;
	border-radius: 4px;
	background: var( --wp--preset--color--forest );
	color: var( --wp--preset--color--white );
	font-size: var(--wp--custom--type--size-13);
}

.grocenest-header-search.wp-block-search__searchfield-hidden .grocenest-search-panel {
	opacity: 0;
	pointer-events: none;
}

.grocenest-header-search.wp-block-search__searchfield-hidden .grocenest-search-submit {
	display: none;
}

.grocenest-header:has( .grocenest-header-search:not( .wp-block-search__searchfield-hidden ) .grocenest-search-panel ) {
	padding-block-end: var( --grocenest-header-search-space );
}

@media ( max-width: 1050px ) {
	.grocenest-header .grocenest-header-inner {
		gap: 16px;
	}

	.grocenest-header-navigation .wp-block-navigation__container {
		gap: 17px;
	}

	.grocenest-header .grocenest-header-navigation {
		font-size: var(--wp--custom--type--size-12);
	}

	.grocenest-header .grocenest-header-actions {
		gap: 12px;
	}
}

@media ( max-width: 860px ) {
	.grocenest-header .grocenest-header-inner {
		min-height: 76px;
		gap: 6px;
		flex-wrap: nowrap;
	}

	.grocenest-header .grocenest-header-brand {
		max-width: calc( 100% - 165px );
	}

	.grocenest-header .wp-block-site-title {
		font-size: var(--wp--custom--type--size-35);
	}

	.grocenest-header .grocenest-brand-caption {
		font-size: var(--wp--custom--type--size-8);
	}

	.grocenest-header .grocenest-brand-mark,
	.grocenest-header .grocenest-brand-mark img {
		width: 26px;
	}

	.grocenest-header .grocenest-header-navigation {
		flex: 0;
		order: 3;
	}

	.grocenest-header-navigation .wp-block-navigation__responsive-container:not( .is-menu-open ) {
		display: none;
	}

	.grocenest-header .wp-block-navigation__responsive-container-open {
		display: flex;
	}

	.grocenest-header .grocenest-header-actions {
		gap: 5px;
		margin-inline-start: auto;
	}

	.grocenest-header .grocenest-mini-cart-label,
	.grocenest-header .grocenest-basket-label {
		display: none;
	}

}

@media ( max-width: 380px ) {
	.grocenest-header .grocenest-header-inner {
		gap: 4px;
	}

	.grocenest-header .wp-block-site-title {
		font-size: var(--wp--custom--type--size-29);
	}

	.grocenest-header .grocenest-brand-caption {
		font-size: var(--wp--custom--type--size-7);
		white-space: nowrap;
	}

	.grocenest-header .grocenest-header-brand {
		gap: 6px;
		max-width: calc( 100% - 125px );
	}

	.grocenest-header .grocenest-header-search,
	.grocenest-header-search .wp-block-search__button {
		width: 36px;
	}

	.grocenest-header .wc-block-mini-cart__quantity-badge {
		position: relative;
		width: 32px;
	}

	.grocenest-header .wc-block-mini-cart__badge {
		position: absolute;
		inset-block-start: -3px;
		inset-inline-end: -3px;
		min-width: 18px;
		min-height: 18px;
	}
}

.grocenest-header > .wp-block-group > .wp-block-group:first-child,
.grocenest-header > .wp-block-group > .wp-block-group:first-child > .wp-block-group {
	min-width: 0;
}

.grocenest-header > .wp-block-group > .wp-block-group:last-child {
	flex-shrink: 0;
	max-width: 100%;
}

.grocenest-header .wp-block-site-logo img {
	display: block;
	max-width: 100%;
	height: auto;
}

.grocenest-header .wp-block-navigation__responsive-container-open,
.grocenest-header .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

.grocenest-brand-caption {
	margin-block: 0.25rem 0;
	font-size: var(--wp--custom--type--size-8);
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.is-style-grocenest-eyebrow {
	font-size: var(--wp--custom--type--size-11);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.is-style-grocenest-card {
	padding: var( --wp--preset--spacing--50 );
	border: 1px solid var( --wp--preset--color--line );
	border-radius: 0.5rem;
}

.wp-site-blocks > main:has( .grocenest-hero ) {
	margin-block-start: 0;
}

.grocenest-hero,
.wp-block-group.has-global-padding > .grocenest-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	min-height: max( 590px, calc( 100svh - var( --grocenest-hero-offset, 130px ) ) );
	width: calc( 100% + var( --wp--style--root--padding-left, 0px ) + var( --wp--style--root--padding-right, 0px ) );
	max-width: none;
	margin-block: 0;
	margin-inline: calc( -1 * var( --wp--style--root--padding-left, 0px ) );
}

.grocenest-hero-copy {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-self: stretch;
	min-width: 0;
	padding-block: clamp( 40px, 6svh, 76px );
	padding-inline: 5vw clamp( 35px, 4vw, 80px );
}

.grocenest-hero-copy .is-style-grocenest-eyebrow {
	margin: 0 0 23px;
	font-size: var(--wp--custom--type--size-11);
	letter-spacing: 0.18em;
}

.grocenest-hero-copy h1 {
	margin: 0;
	font-size: var(--wp--custom--banner--hero-title);
	font-weight: 400;
	line-height: 1.14;
	letter-spacing: -0.045em;
}

.grocenest-hero-copy h1 em {
	color: var( --wp--preset--color--terracotta );
	font-style: normal;
	font-weight: 400;
}

.grocenest-hero-copy .grocenest-hero-description {
	max-width: 370px;
	margin-block: 26px 32px;
	font-size: var(--wp--custom--type--size-15);
	line-height: 1.65;
}

.grocenest-hero-copy .wp-block-buttons {
	gap: 24px;
	align-items: center;
	margin: 0;
}

.grocenest-hero-copy .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 24px;
	min-height: 44px;
	padding: 12px 22px;
	font-size: var(--wp--custom--type--size-13);
	font-weight: 500;
}

.grocenest-hero-copy .is-style-outline .wp-block-button__link {
	min-height: 0;
	padding: 0 0 2px;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	font-size: var(--wp--custom--type--size-14);
	font-weight: 400;
}

.grocenest-hero-copy .grocenest-hero-caption {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 35px 0 0;
	color: var( --wp--preset--color--muted );
	font-size: var(--wp--custom--type--size-12);
	line-height: 1.65;
}

.grocenest-hero-caption span {
	display: grid;
	place-items: center;
	flex: 0 0 24px;
	height: 24px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	color: var( --wp--preset--color--forest );
}

.grocenest-hero-media {
	position: relative;
	align-self: stretch;
	min-height: 500px;
	overflow: hidden;
	background: var( --wp--preset--color--sage );
}

.grocenest-hero-media .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.grocenest-hero-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.grocenest-hero-media .grocenest-hero-stamp {
	position: absolute;
	inset-block-start: 28px;
	inset-inline-end: 30px;
	display: block;
	box-sizing: border-box;
	padding-block: 27px;
	width: 105px;
	height: 105px;
	margin: 0;
	border: 1px solid var( --wp--preset--color--forest );
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--cream) 91%, transparent);
	font-family: var( --wp--preset--font-family--editorial );
	font-size: var(--wp--custom--type--size-19);
	line-height: 1.25;
	text-align: center;
	transform: rotate( 12deg );
}

.grocenest-hero-media .grocenest-hero-note {
	position: absolute;
	inset-block-end: 27px;
	inset-inline-start: 27px;
	margin: 0;
	padding: 15px 23px;
	border-radius: 4px;
	background: var( --wp--preset--color--cream );
	font-size: var(--wp--custom--type--size-12);
	line-height: 1.65;
}

.grocenest-hero-note strong {
	font-size: var(--wp--custom--type--size-15);
}

@media ( max-width: 1050px ) {
	.grocenest-hero-copy {
		padding: 50px 6vw;
	}
}

@media ( max-width: 760px ) {
	.grocenest-hero,
	.wp-block-group.has-global-padding > .grocenest-hero {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.grocenest-hero-copy {
		padding: 42px 6vw 38px;
	}

	.grocenest-hero-copy h1 {
		font-size: var(--wp--custom--banner--hero-title);
	}

	.grocenest-hero-copy .grocenest-hero-description {
		margin-block: 20px 26px;
		font-size: var(--wp--custom--type--size-14);
	}

	.grocenest-hero-media {
		min-height: 360px;
	}

	.grocenest-hero-media .grocenest-hero-stamp {
		inset-block-start: 20px;
		inset-inline-end: 20px;
		width: 83px;
		height: 83px;
		padding-block: 20px;
		font-size: var(--wp--custom--type--size-16);
	}

	.grocenest-hero-media .grocenest-hero-note {
		inset-block-end: 20px;
		inset-inline-start: 20px;
		padding: 12px 18px;
	}
}

@media ( max-width: 480px ) {
	.grocenest-hero-copy h1 {
		font-size: var(--wp--custom--banner--hero-title);
	}

	.grocenest-hero-copy h1 em {
		font-size: inherit;
	}
}

.grocenest-promises {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 25px;
	margin-block: 0;
	padding-block: 25px;
	border-bottom: 1px solid var( --wp--preset--color--line );
}

.grocenest-promises .grocenest-promise-item {
	gap: 14px;
	align-items: center;
	justify-content: center;
}

.grocenest-promises .grocenest-promise-icon {
	flex: 0 0 29px;
	margin: 0;
}

.grocenest-promise-icon img {
	display: block;
}

.grocenest-promises .grocenest-promise-copy p {
	margin: 0;
	font-size: var(--wp--custom--type--size-11);
	line-height: 1.65;
}

.grocenest-promise-copy strong {
	font-size: var(--wp--custom--type--size-13);
	font-weight: 600;
}

@media ( max-width: 760px ) {
	.grocenest-promises {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.grocenest-promises .grocenest-promise-item {
		justify-content: flex-start;
		padding-inline-start: 15px;
	}
}

.grocenest-journal {
	padding-block: var( --wp--preset--spacing--70 );
}

.grocenest-journal .wp-block-post-featured-image img {
	border-radius: 0.5rem;
}

.grocenest-footer {
	margin-block-start: var( --wp--preset--spacing--70 );
	padding-block: var( --wp--preset--spacing--60 );
	border-top: 1px solid var( --wp--preset--color--line );
	font-size: var(--wp--custom--type--size-13);
}

.grocenest-footer .wp-block-site-title {
	margin-block: 0;
}

.grocenest-footer-note {
	padding-block-start: var( --wp--preset--spacing--40 );
	border-top: 1px solid var( --wp--preset--color--line );
	font-size: var(--wp--custom--type--size-11);
}

.grocenest-page-main {
	padding-block: var( --wp--preset--spacing--70 );
}

@media ( prefers-reduced-motion: reduce ) {
	html {
		scroll-behavior: auto;
	}
}

/* Shared native pagination for the journal and WooCommerce catalog. */
:is( .grocenest-product-grid, .grocenest-blog-query ) > .wp-block-query-pagination {
	gap: 12px;
	margin-block: 32px 0;
	padding-block-start: 24px;
	border-top: 1px solid var( --wp--preset--color--line );
	font-size: var(--wp--custom--type--size-14);
	line-height: 1.4;
	flex-wrap: wrap;
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .page-numbers,
:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination-previous,
:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 10px 14px;
	box-sizing: border-box;
	border: 1px solid var( --wp--preset--color--line );
	border-radius: 4px;
	background: var( --wp--preset--color--white );
	color: var( --wp--preset--color--forest );
	text-decoration: none;
	margin: 0;
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .page-numbers.current {
	border-color: var( --wp--preset--color--forest );
	background: var( --wp--preset--color--forest );
	color: var( --wp--preset--color--white );
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .page-numbers.dots {
	min-width: 24px;
	padding-inline: 0;
	border: 0;
	background: transparent;
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination a:hover {
	border-color: var( --wp--preset--color--forest );
	background: var( --wp--preset--color--sage );
}

:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination a:focus-visible {
	outline: 2px solid var( --wp--preset--color--forest );
	outline-offset: 3px;
}

@media ( max-width: 480px ) {
	:is( .grocenest-product-grid, .grocenest-blog-query ) > .wp-block-query-pagination {
		gap: 10px;
	}

	:is( .grocenest-product-grid, .grocenest-blog-query ) .wp-block-query-pagination-numbers {
		width: 100%;
		gap: 6px;
	}
}


/* Native Navigation owns hover, focus, Escape and the responsive menu dialog. */
.grocenest-header-navigation .wp-block-navigation__submenu-container {
	border-radius: 6px;
	box-shadow: 0 16px 40px color-mix(in srgb, var(--wp--preset--color--forest-dark) 9%, transparent);
	z-index: 30;
}

.grocenest-header-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 12px 16px;
	font-size: var(--wp--custom--type--size-13);
	line-height: 1.5;
	border-radius: 4px;
}

.grocenest-header-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var( --wp--preset--color--sage );
}

.grocenest-header-navigation .wp-block-navigation__submenu-icon {
	pointer-events: auto;
}

@media ( min-width: 861px ) {
	.grocenest-header-navigation .wp-block-navigation__responsive-container:not( .is-menu-open ) .grocenest-mega-menu > .wp-block-navigation__submenu-container {
		display: grid;
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		width: min( 720px, calc( 100vw - 48px ) );
		min-width: 0;
		left: 50%;
		right: auto;
		transform: translateX( -50% );
		gap: 12px;
		padding: 24px;
		box-sizing: border-box;
	}

	.grocenest-header-navigation .grocenest-mega-menu > .wp-block-navigation__submenu-container > .wp-block-navigation-item {
		width: 100%;
		min-width: 0;
	}

	.grocenest-header-navigation .grocenest-mega-menu > .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		width: 100%;
		min-height: 52px;
		box-sizing: border-box;
		border: 1px solid var( --wp--preset--color--line );
		background: var( --wp--preset--color--white );
		font-size: var(--wp--custom--type--size-14);
	}

	.grocenest-header-navigation .grocenest-mega-menu > .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
		background: var( --wp--preset--color--sage );
	}
}

.grocenest-header-navigation .is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none;
	border-radius: 0;
	min-width: 0;
	width: 100%;
}

.grocenest-header-navigation .is-menu-open .grocenest-mega-menu > .wp-block-navigation__submenu-container {
	position: static;
	transform: none;
	display: flex;
	gap: 8px;
	padding: 12px 0 12px 16px;
}

.grocenest-header-navigation a:focus-visible,
.grocenest-header-navigation button:focus-visible {
	outline: 2px solid var( --wp--preset--color--forest );
	outline-offset: 4px;
}

.grocenest-header-navigation .grocenest-mega-menu > .wp-block-navigation__submenu-container {
	background: var( --wp--preset--color--cream );
	color: var( --wp--preset--color--forest );
}

.grocenest-header-navigation .grocenest-mega-menu .wp-block-navigation-item__content {
	color: var( --wp--preset--color--forest );
}

.grocenest-header-navigation .is-menu-open {
	background: var( --wp--preset--color--cream );
	color: var( --wp--preset--color--forest );
}

.grocenest-header-navigation .is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: stretch;
	gap: 16px;
}

.grocenest-header-navigation .is-menu-open .wp-block-navigation-item {
	width: 100%;
	align-items: stretch;
}

.grocenest-header-navigation .is-menu-open .wp-block-navigation-item__content {
	min-height: 44px;
	font-size: var(--wp--custom--type--size-14);
	text-align: left;
}

.grocenest-search-panel .wp-block-search__input {
	height: 44px;
}

@media ( max-width: 860px ) {
	.grocenest-header .grocenest-search-panel {
		width: 100%;
		padding-inline-end: 86px;
	}

	.grocenest-header .grocenest-search-submit {
		inset-inline-end: 0;
		width: 78px;
		padding-inline: 10px;
	}
}

/* Native Site Logo replaces the fallback text wordmark as one editable asset. */
.grocenest-logo {
	width: 210px;
	max-width: 100%;
	margin: 0;
}

.grocenest-header .wp-block-site-logo.grocenest-logo img,
.grocenest-footer .wp-block-site-logo.grocenest-logo img,
.grocenest-mobile-menu-intro .wp-block-site-logo.grocenest-logo img {
	display: block;
	width: 100%;
	max-width: 210px;
	height: auto;
}

.grocenest-mobile-menu-intro .grocenest-logo {
	width: 210px;
	max-width: calc( 100% - 56px );
	margin-bottom: 28px;
}

/* Native 404 and search templates share the storefront's wide content frame. */
.grocenest-discovery-main {
	padding-block: var(--wp--preset--spacing--section);
}

.grocenest-not-found {
	text-align: center;
	padding-block: var(--wp--preset--spacing--section-compact);
}

.grocenest-not-found .grocenest-error-code {
	margin-block: 0 24px;
	color: var(--wp--preset--color--terracotta);
	font-family: var(--wp--preset--font-family--editorial);
	font-size: var(--wp--custom--type--scale-19);
	line-height: 1;
	letter-spacing: -0.06em;
}

.grocenest-not-found h1 {
	font-size: var(--wp--custom--banner--page-title);
}

.grocenest-not-found > p:not( .grocenest-error-code, .is-style-grocenest-eyebrow ),
.grocenest-search-empty > p:not( .is-style-grocenest-eyebrow ) {
	max-width: 560px;
	margin-inline: auto;
	color: var(--wp--preset--color--muted);
}

.grocenest-not-found .wp-block-buttons,
.grocenest-search-empty .wp-block-buttons {
	justify-content: center;
	gap: 12px;
	margin-block-start: 28px;
}

.grocenest-discovery-search {
	max-width: 600px;
	margin-block: 28px;
	margin-inline: auto;
	text-align: start;
}

.grocenest-discovery-search .wp-block-search__label {
	display: block;
	margin-bottom: 8px;
	font-size: var(--wp--custom--type--size-14);
	font-weight: 600;
}

.grocenest-discovery-search .wp-block-search__inside-wrapper {
	gap: 8px;
}

.grocenest-discovery-search input {
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--custom--type--size-16);
}

.grocenest-discovery-search button {
	margin: 0;
}

.grocenest-search-intro {
	padding-block-end: 32px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin-block-end: 40px;
}

.grocenest-search-intro h1 {
	font-size: var(--wp--custom--banner--page-title);
	overflow-wrap: anywhere;
}

.grocenest-search-intro > p:not( .is-style-grocenest-eyebrow ) {
	color: var(--wp--preset--color--muted);
}

.grocenest-search-intro .grocenest-discovery-search {
	margin-inline-start: 0;
	margin-block-end: 0;
}

.grocenest-search-empty {
	padding: clamp(28px, 5vw, 64px);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--sage);
	text-align: center;
}

.grocenest-search-empty h2 {
	font-size: var(--wp--custom--type--scale-18);
}

.grocenest-search-query .grocenest-search-card {
	height: 100%;
	padding: 24px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--white);
}

.grocenest-search-card .wp-block-post-featured-image {
	margin-block-start: 0;
}

.grocenest-search-card .wp-block-post-featured-image img {
	border-radius: 4px;
}

@media (max-width: 480px) {
	.grocenest-discovery-search .wp-block-search__inside-wrapper {
		flex-wrap: wrap;
	}

	.grocenest-discovery-search input {
		flex-basis: 100%;
	}

	.grocenest-discovery-search button {
		width: 100%;
	}
}

/* Long merchant headings and search phrases remain readable at narrow widths. */
:is(.grocenest-hero-copy, .grocenest-market-hero, .grocenest-season-copy,
.grocenest-about-hero, .grocenest-contact-intro, .grocenest-help-intro,
.grocenest-blog-intro, .grocenest-transaction-intro, .grocenest-confirmation-intro) h1 {
	overflow-wrap: anywhere;
}

/* Equal button dimensions for both native 404 destinations. */
.grocenest-not-found .wp-block-buttons > .wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 52px;
	padding: 15px 24px;
	font-size: var(--wp--custom--type--size-14);
	line-height: 1.4;
}

/* Native WooCommerce account link beside Search and Mini-Cart. */
.grocenest-header-actions .grocenest-header-account {
	flex: 0 0 44px;
	width: 44px;
	margin: 0;
	color: var(--wp--preset--color--forest);
}

.grocenest-header-account .wc-block-customer-account__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	color: inherit;
	text-decoration: none;
}

.grocenest-header-account .wc-block-customer-account__link:hover {
	background: var(--wp--preset--color--sage);
}

.grocenest-header-account .wc-block-customer-account__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--forest);
	outline-offset: 2px;
}

.grocenest-header-account svg {
	width: 22px;
	height: 22px;
	margin: 0;
}

@media (max-width: 860px) {
	.grocenest-header .grocenest-header-brand {
		max-width: calc(100% - 209px);
	}
}

@media (max-width: 380px) {
	.grocenest-header .grocenest-header-brand {
		max-width: calc(100% - 169px);
	}
}

/* Compact Customer Account navigation; native dropdown setting controls it. */
.grocenest-header-account,
.grocenest-account-guest {
	position: relative;
}

.grocenest-header-account .wc-block-customer-account__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	list-style: none;
}

.grocenest-account-guest summary::-webkit-details-marker {
	display: none;
}

.grocenest-header-account .wc-block-customer-account__caret {
	width: 8px;
	height: 5px;
	margin-inline-start: 3px;
}

.grocenest-header-account .wc-block-customer-account__toggle:hover {
	background: var(--wp--preset--color--sage);
}

.grocenest-header-account .wc-block-customer-account__toggle:focus-visible {
	outline: 2px solid var(--wp--preset--color--forest);
	outline-offset: 2px;
}

.grocenest-header-account .wc-block-customer-account__dropdown {
	position: absolute;
	inset-inline-start: auto;
	inset-inline-end: 0;
	top: calc(100% + 8px);
	z-index: 100;
	box-sizing: border-box;
	width: 220px;
	min-width: 0;
	max-width: calc(100vw - 32px);
	padding: 8px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--forest-dark) 12%, transparent);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--custom--type--size-14);
}

.grocenest-header-account .wc-block-customer-account__dropdown-item {
	display: flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 12px;
	border-radius: 4px;
	color: inherit;
	line-height: 1.4;
	text-decoration: none;
}

.grocenest-header-account .wc-block-customer-account__dropdown-item:hover,
.grocenest-header-account .wc-block-customer-account__dropdown-item:focus-visible {
	background: var(--wp--preset--color--sage);
}

.grocenest-header-account .wc-block-customer-account__dropdown-item:focus-visible {
	outline: 2px solid var(--wp--preset--color--forest);
	outline-offset: -2px;
}

/* Pointer bridge allows movement from Account to its dropdown without a gap. */
.grocenest-header-account .wc-block-customer-account__dropdown::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: -10px;
	height: 10px;
}

.grocenest-account-guest[open] > .wc-block-customer-account__dropdown,
.grocenest-header-account.wc-block-customer-account--is-dropdown-open .wc-block-customer-account__dropdown {
	animation: grocenest-account-reveal 160ms ease-out;
}

@keyframes grocenest-account-reveal {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.grocenest-account-guest[open] > .wc-block-customer-account__dropdown,
	.grocenest-header-account.wc-block-customer-account--is-dropdown-open .wc-block-customer-account__dropdown {
		animation: none;
	}
}

/* Match guest Details and authenticated WooCommerce account presentation. */
.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__toggle {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--custom--type--size-14);
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
}

.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__visual {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__visual > svg {
	width: 22px;
	height: 22px;
}

.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__caret {
	width: 8px;
	height: 5px;
	margin: 0;
	margin-inline-start: 3px;
	transition: transform 160ms ease;
}

.grocenest-account-guest[open] .wc-block-customer-account__caret,
.grocenest-header-account.wc-block-customer-account--is-dropdown-open .wc-block-customer-account__caret {
	transform: rotate(180deg);
}

.grocenest-account-guest[open] > .wc-block-customer-account__toggle,
.grocenest-header-account.wc-block-customer-account--is-dropdown-open .wc-block-customer-account__toggle {
	background: var(--wp--preset--color--sage);
}

.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__dropdown-item {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	font-family: inherit;
	font-size: inherit;
	font-weight: 400;
	line-height: 1.4;
	white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
	.grocenest-header-actions .grocenest-header-account .wc-block-customer-account__caret {
		transition: none;
	}
}
