/*
 * The Mohur global header shell.
 * Navigation content remains editable through the Site Editor.
 */
.the-mohur-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(248, 243, 235, 0.97);
	border-bottom: 1px solid var(--tm-color-border);
	transition:
		background-color var(--tm-duration-standard) var(--tm-ease-out),
		border-color var(--tm-duration-standard) var(--tm-ease-out);
}

#main-content {
	scroll-margin-top: 6rem;
}

.the-mohur-announcement-bar p {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin: 0;
}

.the-mohur-announcement-bar p::before,
.the-mohur-announcement-bar p::after {
	width: 1.25rem;
	height: 1px;
	background: var(--tm-color-accent);
	content: "";
	opacity: 0.8;
}

.the-mohur-header-inner {
	position: relative;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-rows: auto;
	align-items: center;
	min-height: clamp(4.75rem, 6vw, 5.5rem);
	column-gap: var(--tm-space-m);
}

.the-mohur-primary-navigation {
	position: static;
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	justify-self: start;
}

.the-mohur-primary-navigation .wp-block-navigation__container {
	position: static;
	gap: clamp(0.7rem, 1.25vw, 1.35rem);
}

.the-mohur-primary-navigation .wp-block-navigation-item__content,
.the-mohur-legal-navigation .wp-block-navigation-item__content {
	padding: 0.7rem 0;
	color: var(--tm-color-text);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
}

.the-mohur-primary-navigation .wp-block-navigation-item__content:hover,
.the-mohur-primary-navigation .wp-block-navigation-item__content:focus-visible,
.the-mohur-legal-navigation .wp-block-navigation-item__content:hover,
.the-mohur-legal-navigation .wp-block-navigation-item__content:focus-visible {
	color: var(--tm-color-primary);
}

.the-mohur-primary-navigation .wp-block-navigation-item__content::after,
.the-mohur-legal-navigation .wp-block-navigation-item__content::after {
	display: block;
	width: 0;
	height: 1px;
	margin-top: 0.25rem;
	background: var(--tm-color-accent);
	content: "";
	transition: width var(--tm-duration-standard) var(--tm-ease-out);
}

.the-mohur-primary-navigation .wp-block-navigation-item__content:hover::after,
.the-mohur-primary-navigation .wp-block-navigation-item__content:focus-visible::after,
.the-mohur-legal-navigation .wp-block-navigation-item__content:hover::after,
.the-mohur-legal-navigation .wp-block-navigation-item__content:focus-visible::after {
	width: 100%;
}

.the-mohur-header-brand {
	position: relative;
	grid-column: 2;
	grid-row: 1;
	min-width: clamp(8rem, 12vw, 11.25rem);
	justify-content: center;
	justify-self: center;
}

.the-mohur-header-brand .wp-block-site-logo,
.the-mohur-header-brand .wp-block-site-logo img {
	max-height: 3.4rem;
	object-fit: contain;
}

.the-mohur-header-brand .wp-block-site-title {
	margin: 0;
}

.the-mohur-header-brand .wp-block-site-title a {
	color: var(--tm-color-primary-dark);
	font-family: var(--tm-font-display);
	font-size: clamp(1.6rem, 2.5vw, 2.15rem);
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.the-mohur-header-brand:has(.wp-block-site-logo img) .the-mohur-header-title-fallback {
	display: none;
}

.the-mohur-header-utilities {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	gap: var(--tm-space-xs);
}

.the-mohur-header-utilities > * {
	min-width: 2.75rem;
	min-height: 2.75rem;
}

.the-mohur-header-utilities .wp-block-search {
	position: relative;
	z-index: 2;
	width: auto;
}

.the-mohur-header-utilities .wp-block-search__button {
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	background: transparent;
	color: var(--tm-color-text);
}

.the-mohur-header-utilities .wp-block-search__button:hover,
.the-mohur-header-utilities .wp-block-search__button:focus-visible {
	background: var(--tm-color-surface);
	color: var(--tm-color-primary);
}

.the-mohur-header-utilities .wp-block-search__inside-wrapper {
	min-height: 2.75rem;
	border: 0;
	background: transparent;
}

.the-mohur-header-utilities .wp-block-search__input {
	min-height: 2.75rem;
	border: 0;
	border-radius: var(--tm-radius-none);
	background: var(--tm-color-surface);
	color: var(--tm-color-text);
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.the-mohur-header-search.wp-block-search__button-only:not(.wp-block-search__searchfield-hidden) {
	position: absolute;
	top: 50%;
	right: 5.75rem;
	width: min(19rem, calc(100vw - 8rem));
	transform: translateY(-50%);
}

.the-mohur-header-search.wp-block-search__button-only:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper {
	border: 1px solid var(--tm-color-border);
	background: var(--tm-color-surface);
	box-shadow: var(--tm-shadow-quiet);
}

.the-mohur-header-utilities .wc-block-customer-account__link,
.the-mohur-header-utilities .wc-block-mini-cart__button {
	display: inline-flex;
	min-width: 2.75rem;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: 1px solid transparent;
	border-radius: var(--tm-radius-none);
	color: var(--tm-color-text);
	text-decoration: none;
}

.the-mohur-header-utilities .wc-block-customer-account__link:hover,
.the-mohur-header-utilities .wc-block-customer-account__link:focus-visible,
.the-mohur-header-utilities .wc-block-mini-cart__button:hover,
.the-mohur-header-utilities .wc-block-mini-cart__button:focus-visible {
	background: var(--tm-color-surface);
	color: var(--tm-color-primary);
}

.the-mohur-header-utilities .wc-block-mini-cart__amount {
	display: none;
}

.the-mohur-header-utilities .wc-block-mini-cart__badge {
	min-width: 1.25rem;
	padding-inline: 0.2rem;
	background: var(--tm-color-primary);
	color: var(--tm-color-white);
	font-size: 0.65rem;
	font-variant-numeric: tabular-nums;
}

.the-mohur-mobile-search,
.the-mohur-mobile-only-link,
.the-mohur-mobile-help-link {
	display: none !important;
}

@media (min-width: 782px) {
	.the-mohur-primary-navigation .wp-block-navigation__container > .wp-block-navigation-item.has-child {
		position: static;
	}

	.the-mohur-shop-menu > .wp-block-navigation__submenu-container,
	.the-mohur-mega-menu > .wp-block-navigation__submenu-container {
		left: 50%;
		right: auto;
		max-width: calc(100% - (2 * var(--tm-space-m)));
		transform: translateX(-50%);
		overflow-x: clip;
	}

	.the-mohur-shop-menu > .wp-block-navigation__submenu-container {
		display: grid;
		grid-template-columns: repeat(2, minmax(10rem, 1fr));
		width: min(40rem, calc(100% - (2 * var(--tm-space-m))));
		gap: 0 var(--tm-space-l);
		padding: var(--tm-space-l);
		border: 1px solid var(--tm-color-border);
		background: var(--tm-color-surface);
		box-shadow: var(--tm-shadow-quiet);
	}

	.the-mohur-shop-menu > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: 0.55rem 0;
		font-size: 0.78rem;
		font-weight: 500;
		letter-spacing: 0.03em;
		text-transform: none;
	}

	.the-mohur-shop-menu > .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
		display: none;
	}

	.the-mohur-mega-menu > .wp-block-navigation__submenu-container {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		width: min(70rem, calc(100% - (2 * var(--tm-space-m))));
		gap: var(--tm-space-l);
		padding: var(--tm-space-l) var(--tm-space-xl);
		border: 1px solid var(--tm-color-border);
		background: var(--tm-color-surface);
		box-shadow: var(--tm-shadow-quiet);
	}

	.the-mohur-mega-menu > .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon {
		display: none;
	}

	.the-mohur-mega-menu .the-mohur-mega-column > .wp-block-navigation__submenu-container {
		position: static;
		display: grid;
		gap: 0.15rem;
		min-width: 0;
		padding: 0.6rem 0 0;
		border: 0;
		background: transparent;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
	}

	.the-mohur-mega-menu .the-mohur-mega-column > .wp-block-navigation-item__content {
		padding-bottom: 0.4rem;
		color: var(--tm-color-primary);
		font-size: 0.68rem;
		letter-spacing: 0.11em;
	}

	.the-mohur-mega-menu .the-mohur-mega-column > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: 0.32rem 0;
		font-size: 0.78rem;
		font-weight: 500;
		letter-spacing: 0.02em;
		text-transform: none;
	}

	.the-mohur-mega-menu .the-mohur-mega-column > .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
		display: none;
	}
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--tm-color-surface);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	padding: var(--tm-space-m) 0;
}

@media (max-width: 1100px) {
	.the-mohur-primary-navigation .wp-block-navigation__container {
		gap: 0.45rem;
	}

	.the-mohur-primary-navigation .wp-block-navigation-item__content {
		font-size: 0.61rem;
		letter-spacing: 0.045em;
	}
}

@media (max-width: 781px) {
	.the-mohur-primary-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: block;
	}

	.the-mohur-header-inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-rows: auto;
		min-height: 4.25rem;
		gap: var(--tm-space-xs);
		padding-block: var(--tm-space-xs);
	}

	.the-mohur-primary-navigation {
		grid-column: 1;
		grid-row: 1;
		order: 1;
	}

	.the-mohur-header-brand {
		grid-column: 2;
		grid-row: 1;
		order: 2;
		min-width: 0;
		max-width: min(11rem, calc(100vw - 10rem));
	}

	.the-mohur-header-utilities {
		grid-column: 3;
		grid-row: 1;
		order: 3;
		gap: 0.15rem;
	}

	.the-mohur-header-utilities .wc-block-customer-account,
	.the-mohur-header-search {
		display: none;
	}

	.the-mohur-header-brand .wp-block-site-title a {
		font-size: clamp(1.35rem, 6vw, 1.8rem);
	}

	.the-mohur-header-brand .wp-block-site-logo img {
		width: auto;
		max-height: 2.6rem;
		max-width: 100%;
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container-open {
		width: 2.75rem;
		height: 2.75rem;
		padding: 0.6rem;
		border: 1px solid var(--tm-color-border);
		color: var(--tm-color-text);
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container-open:hover,
	.the-mohur-primary-navigation .wp-block-navigation__responsive-container-open:focus-visible {
		background: var(--tm-color-primary);
		color: var(--tm-color-white);
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container.is-menu-open {
		padding: var(--tm-space-m);
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
		width: 2.75rem;
		height: 2.75rem;
		margin-inline-start: auto;
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		display: flex;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.the-mohur-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: block;
		padding: 0.85rem 0;
		border-bottom: 1px solid var(--tm-color-border);
		font-size: 0.78rem;
	}

	.the-mohur-mobile-search,
	.the-mohur-mobile-only-link,
	.the-mohur-mobile-help-link {
		display: block !important;
	}

	.the-mohur-mobile-search {
		width: 100%;
		margin: var(--tm-space-s) 0;
	}

	.the-mohur-mobile-search .wp-block-search__inside-wrapper {
		min-height: 2.75rem;
		border: 1px solid var(--tm-color-border);
		background: var(--tm-color-background);
	}

	.the-mohur-mobile-search .wp-block-search__input {
		min-width: 0;
		border: 0;
		background: transparent;
		font-size: 0.75rem;
		letter-spacing: 0.04em;
	}

	.the-mohur-mobile-search .wp-block-search__button {
		min-width: 2.75rem;
		min-height: 2.75rem;
		margin: 0;
		padding: 0.6rem;
		border: 0;
		background: var(--tm-color-primary);
		color: var(--tm-color-white);
	}

}

@media (min-width: 782px) {
	body.admin-bar .the-mohur-site-header {
		top: 32px;
	}
}

@media (max-width: 781px) {
	body.admin-bar .the-mohur-site-header {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.the-mohur-site-header,
	.the-mohur-primary-navigation .wp-block-navigation-item__content::after {
		transition: none;
	}
}