/* Designed header menu — wood palette, RTL */

#masthead {
	position: sticky;
	top: 0;
	z-index: 1000;
}

body.admin-bar #masthead {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar #masthead {
		top: 46px;
	}
}

#masthead,
#masthead .main-header-bar-wrap,
#masthead .ast-primary-header-bar,
#masthead .ast-builder-grid-row,
#masthead .site-header-section,
#ast-desktop-header {
	overflow: visible;
}

#masthead .ast-primary-header-bar {
	position: relative;
	background: rgba(255, 241, 227, 0.88) !important;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 0 !important;
	box-shadow: 0 1px 0 rgba(196, 165, 116, 0.35);
	transition: background 0.35s ease, box-shadow 0.35s ease;
}

#masthead.is-scrolled .ast-primary-header-bar {
	background: rgba(255, 241, 227, 0.96) !important;
	box-shadow: 0 14px 36px rgba(61, 43, 31, 0.1);
}

#masthead .ast-primary-header-bar::after {
	content: "";
	position: absolute;
	right: 0;
	left: 0;
	bottom: 0;
	z-index: 1;
	height: 2px;
	background: linear-gradient(90deg, transparent, #c4a574 18%, #4a6741 50%, #c4a574 82%, transparent);
	transform: scaleX(0);
	transform-origin: center;
	animation: wood-line 0.9s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
	pointer-events: none;
}

#masthead .ast-builder-grid-row {
	position: relative;
	z-index: 2;
}

#masthead .custom-logo {
	width: 72px !important;
	height: auto !important;
	transition: width 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#masthead .custom-logo-link {
	display: inline-flex;
	border-radius: 50%;
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#masthead .custom-logo-link:hover,
#masthead .custom-logo-link:focus-visible {
	transform: rotate(-6deg) scale(1.06);
}

#masthead.is-scrolled .custom-logo {
	width: 56px !important;
}

#masthead .site-title a {
	font-family: "Heebo", sans-serif;
	font-weight: 700;
	font-size: clamp(1.05rem, 1.6vw, 1.4rem);
	letter-spacing: -0.02em;
	color: var(--wood-bark, #3d2b1f) !important;
	text-decoration: none;
	transition: color 0.25s ease;
}

#masthead .site-title a:hover,
#masthead .site-title a:focus-visible {
	color: var(--wood-forest, #4a6741) !important;
}

/* Desktop links */

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item {
	animation: wood-nav-drop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:nth-child(1) { animation-delay: 0.08s; }
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:nth-child(2) { animation-delay: 0.15s; }
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:nth-child(3) { animation-delay: 0.22s; }
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:nth-child(4) { animation-delay: 0.29s; }
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:nth-child(5) { animation-delay: 0.36s; }

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > .menu-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	font-family: "Heebo", sans-serif !important;
	font-size: 1.02rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	height: auto !important;
	padding: 0.7rem 0.85rem !important;
	color: var(--wood-bark, #3d2b1f) !important;
	background: transparent !important;
	border-radius: 999px;
	transition: color 0.25s ease, background 0.25s ease;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > .menu-link::after {
	content: "";
	position: absolute;
	right: 0.85rem;
	left: 0.85rem;
	bottom: 0.28rem;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--wood-forest, #4a6741), var(--wood-oak-light, #c4a574));
	transform: scaleX(0);
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:hover > .menu-link,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:focus-within > .menu-link,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .current-menu-item > .menu-link,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .current-menu-ancestor > .menu-link {
	color: var(--wood-forest, #4a6741) !important;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:hover > .menu-link::after,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:focus-within > .menu-link::after,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .current-menu-item > .menu-link::after,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .current-menu-ancestor > .menu-link::after {
	transform: scaleX(1);
}

body.ast-desktop #primary-site-navigation-desktop .menu-link .ast-arrow-svg {
	width: 11px !important;
	height: 7px !important;
	fill: currentColor;
	transition: transform 0.35s ease;
}

body.ast-desktop #primary-site-navigation-desktop .menu-item-has-children:hover > .menu-link .ast-arrow-svg,
body.ast-desktop #primary-site-navigation-desktop .menu-item-has-children:focus-within > .menu-link .ast-arrow-svg {
	transform: rotate(180deg);
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > a.menu-link[href*="/cart/"] {
	margin-inline-start: 0.25rem;
	padding: 0.5rem 0.95rem 0.5rem 1.05rem !important;
	color: #fff !important;
	background: var(--wood-forest, #4a6741) !important;
	white-space: nowrap !important;
	box-shadow: 0 8px 18px rgba(74, 103, 65, 0.22);
	transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > a.menu-link[href*="/cart/"]::before {
	content: "";
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 7h12l-1 13H7L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 7h12l-1 13H7L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > a.menu-link[href*="/cart/"]::after {
	display: none;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > a.menu-link[href*="/cart/"]:hover,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item > a.menu-link[href*="/cart/"]:focus-visible {
	color: #fff !important;
	background: #3d5636 !important;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(74, 103, 65, 0.3);
}

/* Dropdown panels */

body.ast-desktop #primary-site-navigation-desktop .main-header-menu .sub-menu {
	top: calc(100% - 8px) !important;
	right: 0 !important;
	left: auto !important;
	width: max-content !important;
	min-width: 12.5rem !important;
	max-width: min(22rem, calc(100vw - 1.5rem)) !important;
	margin: 0 !important;
	padding: 0.7rem !important;
	--wood-turn: 0deg;
	border: 1.5px solid transparent !important;
	border-radius: 18px !important;
	background-color: #fffaf3 !important;
	background-image:
		linear-gradient(#fffaf3, #fffaf3),
		conic-gradient(from 0deg, #4a6741 0deg, #c4a574 var(--wood-turn), transparent var(--wood-turn)) !important;
	background-origin: border-box !important;
	background-clip: padding-box, border-box !important;
	box-shadow: 0 18px 44px rgba(61, 43, 31, 0.14) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(10px) scale(0.98);
	transform-origin: top right;
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
	z-index: 30;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item:last-child > .sub-menu {
	right: auto !important;
	left: 0 !important;
	transform-origin: top left;
}

body.ast-desktop #primary-site-navigation-desktop .main-header-menu .menu-item:hover > .sub-menu,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu .menu-item:focus-within > .sub-menu,
body.ast-desktop #primary-site-navigation-desktop .main-header-menu .menu-item > .sub-menu.toggled-on {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none;
	pointer-events: auto;
	animation: wood-trace 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@property --wood-turn {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

body.ast-desktop #primary-site-navigation-desktop .sub-menu .ast-icon {
	display: none !important;
}

body.ast-desktop #primary-site-navigation-desktop .sub-menu .menu-item {
	opacity: 0;
	transform: translateY(6px);
}

body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item,
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item {
	animation: wood-sub-in 0.4s ease forwards;
}

body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(1),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(1) { animation-delay: 0.04s; }
body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(2),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(2) { animation-delay: 0.08s; }
body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(3),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(3) { animation-delay: 0.12s; }
body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(4),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(4) { animation-delay: 0.16s; }
body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(5),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(5) { animation-delay: 0.2s; }
body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item:nth-child(6),
body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item:nth-child(6) { animation-delay: 0.24s; }

body.ast-desktop #primary-site-navigation-desktop .sub-menu .menu-link {
	display: block;
	padding: 0.55rem 0.85rem !important;
	border-radius: 12px;
	font-family: "Heebo", sans-serif;
	font-weight: 500;
	line-height: 1.35 !important;
	color: var(--wood-bark, #3d2b1f) !important;
	white-space: normal;
	transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

body.ast-desktop #primary-site-navigation-desktop .sub-menu .menu-link:hover,
body.ast-desktop #primary-site-navigation-desktop .sub-menu .menu-link:focus-visible {
	background: rgba(74, 103, 65, 0.1);
	color: var(--wood-forest, #4a6741) !important;
	transform: translateX(-4px);
}

/* Mobile bar + drawer */

body.ast-header-break-point #masthead .custom-logo {
	width: 56px !important;
}

body.ast-header-break-point .menu-toggle.main-header-menu-toggle {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(196, 165, 116, 0.9);
	background: #fffaf3;
	color: var(--wood-bark, #3d2b1f);
	transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

body.ast-header-break-point .menu-toggle.main-header-menu-toggle:hover,
body.ast-header-break-point .menu-toggle.main-header-menu-toggle:focus-visible {
	transform: scale(1.05);
}

body.ast-main-header-nav-open.ast-header-break-point .menu-toggle.main-header-menu-toggle {
	background: var(--wood-forest, #4a6741);
	color: #fff;
	border-color: var(--wood-forest, #4a6741);
}

body.ast-header-break-point .ast-mobile-header-content {
	position: fixed !important;
	inset: var(--wood-header-h, 76px) 0 0 0 !important;
	z-index: 999;
	overflow: auto;
	padding: 0.5rem 1.15rem 2.5rem !important;
	background:
		radial-gradient(420px 220px at 100% 0%, rgba(196, 165, 116, 0.38), transparent 62%),
		radial-gradient(360px 240px at 0% 100%, rgba(74, 103, 65, 0.16), transparent 58%),
		#fff1e3 !important;
}

body.ast-main-header-nav-open.ast-header-break-point .ast-mobile-header-content {
	animation: wood-panel 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#ast-mobile-site-navigation ul.main-header-menu[hidden] {
	display: none !important;
}

.wood-mobile-menu {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0.4rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: wood;
}

.wood-mobile-item {
	counter-increment: wood;
	border-bottom: 1px solid rgba(196, 165, 116, 0.35);
}

body.ast-main-header-nav-open .wood-mobile-item {
	animation: wood-link-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	animation-delay: calc(var(--wood-i, 0) * 70ms + 60ms);
}

.wood-mobile-row {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.wood-mobile-link {
	flex: 1;
	display: flex;
	align-items: center;
	padding: 0.95rem 0.15rem;
	font-family: "Heebo", sans-serif;
	font-size: 1.28rem;
	font-weight: 600;
	line-height: 1.3 !important;
	color: var(--wood-bark, #3d2b1f);
	text-decoration: none;
}

.wood-mobile-link::before {
	content: counter(wood, decimal-leading-zero);
	margin-inline-end: 0.8rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--wood-oak, #7a5230);
}

.wood-mobile-item.is-current > .wood-mobile-row .wood-mobile-link {
	color: var(--wood-forest, #4a6741);
}

.wood-sub-toggle {
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(196, 165, 116, 0.22);
	cursor: pointer;
	flex: none;
}

.wood-sub-toggle span {
	display: block;
	width: 9px;
	height: 9px;
	margin: 0 auto;
	border-right: 2px solid var(--wood-bark, #3d2b1f);
	border-bottom: 2px solid var(--wood-bark, #3d2b1f);
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform 0.3s ease;
}

.wood-mobile-item.is-open .wood-sub-toggle span {
	transform: rotate(225deg) translate(-1px, -1px);
}

.wood-mobile-sub {
	margin: 0 0 0.7rem;
	padding: 0.25rem 0.2rem 0.45rem 0;
	list-style: none;
}

.wood-mobile-item.is-open .wood-mobile-sub {
	animation: wood-sub-reveal 0.35s ease;
}

.wood-mobile-sub a {
	display: block;
	margin-inline-start: 2.4rem;
	padding: 0.55rem 0.8rem;
	border-radius: 12px;
	font-family: "Heebo", sans-serif;
	color: var(--wood-bark, #3d2b1f);
	text-decoration: none;
	transition: background 0.25s ease, transform 0.25s ease;
}

.wood-mobile-sub a:hover,
.wood-mobile-sub a:focus-visible {
	background: rgba(74, 103, 65, 0.1);
	color: var(--wood-forest, #4a6741);
	transform: translateX(-4px);
}

.wood-mobile-link[href*="/cart/"] {
	color: var(--wood-forest, #4a6741) !important;
}

@keyframes wood-line {
	to { transform: scaleX(1); }
}

@keyframes wood-trace {
	from { --wood-turn: 0deg; }
	to { --wood-turn: 360deg; }
}

@keyframes wood-nav-drop {
	from { opacity: 0; transform: translateY(-12px); }
	to { opacity: 1; transform: none; }
}

@keyframes wood-sub-in {
	to { opacity: 1; transform: none; }
}

@keyframes wood-panel {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: none; }
}

@keyframes wood-link-in {
	from { opacity: 0; transform: translateX(22px); }
	to { opacity: 1; transform: none; }
}

@keyframes wood-sub-reveal {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	#masthead .ast-primary-header-bar::after,
	body.ast-desktop #primary-site-navigation-desktop .main-header-menu > .menu-item,
	body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu > .menu-item,
	body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu > .menu-item,
	body.ast-main-header-nav-open.ast-header-break-point .ast-mobile-header-content,
	body.ast-main-header-nav-open .wood-mobile-item,
	.wood-mobile-item.is-open .wood-mobile-sub {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	#masthead .ast-primary-header-bar::after {
		transform: none;
	}

	body.ast-desktop #primary-site-navigation-desktop .menu-item:hover > .sub-menu,
	body.ast-desktop #primary-site-navigation-desktop .menu-item:focus-within > .sub-menu {
		animation: none !important;
		--wood-turn: 360deg;
	}
}
