/**
 * Rustfun site header.
 */

.rf-site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	color: var(--rf-color-text-inverse);
	background: var(--rf-iron);
	border-bottom: 1px solid var(--rf-color-border);
}

.admin-bar .rf-site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .rf-site-header {
		top: 46px;
	}
}

.rf-header-shell {
	width: min(100% - 40px, 1360px);
	min-height: 82px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: 224px minmax(0, 1fr) 224px;
	align-items: center;
	gap: clamp(24px, 3vw, 48px);
}

.rf-header-brand {
	position: relative;
	width: 224px;
	display: block;
	line-height: 0;
}

.rf-header-brand::after {
	position: absolute;
	top: 43%;
	right: -7px;
	z-index: 1;
	width: 26.4%;
	height: 25%;
	content: "";
	background: var(--rf-iron);
}

.rf-logo-filter {
	position: absolute;
	overflow: hidden;
}

.rf-header-brand img {
	width: 100%;
	height: auto;
	display: block;
	filter: url("#rf-logo-light-r");
}

.rf-header-brand .rf-header-logo-domain {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	clip-path: inset(42% -4% 32% 77%);
	transform: scale(1.2);
	transform-origin: 77.5% 54%;
}

.rf-primary-nav {
	min-width: 0;
}

.rf-primary-menu {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(4px, 0.8vw, 12px);
	list-style: none;
}

.rf-primary-menu > li {
	margin: 0;
	padding: 0;
}

.rf-primary-menu > li > a {
	position: relative;
	isolation: isolate;
	min-height: 42px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rf-color-text-inverse);
	background: transparent;
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.075em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	border-block: 2px solid transparent;
	transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.rf-primary-menu > li > a::before {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 3px;
	z-index: 0;
	height: 3px;
	content: "";
	background: linear-gradient(
		90deg,
		var(--rf-oxide) 0 76%,
		var(--rf-sulfur) 76% 88%,
		var(--rf-canvas) 88% 100%
	);
	clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rf-primary-menu > li > a::after {
	position: absolute;
	top: -25%;
	bottom: -25%;
	left: 0;
	z-index: 0;
	width: 28%;
	content: "";
	background: linear-gradient(
		105deg,
		transparent 0 34%,
		rgba(247, 240, 222, 0.08) 34% 44%,
		rgba(213, 166, 59, 0.28) 48%,
		rgba(247, 240, 222, 0.08) 52% 62%,
		transparent 62% 100%
	);
	opacity: 0;
	transform: translateX(-150%) skewX(-12deg);
}

.rf-primary-menu > li > a:hover,
.rf-primary-menu > li > a:focus-visible {
	color: var(--rf-sulfur);
	background: rgba(89, 99, 94, 0.16);
	transform: translateY(-1px);
}

.rf-primary-menu > li > a:hover::before,
.rf-primary-menu > li > a:focus-visible::before,
.rf-primary-menu > .current-menu-item > a::before,
.rf-primary-menu > .current_page_item > a::before {
	transform: scaleX(1);
}

.rf-primary-menu > li > a:hover::after,
.rf-primary-menu > li > a:focus-visible::after {
	animation: rf-menu-weld-scan 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rf-primary-menu > .current-menu-item > a,
.rf-primary-menu > .current_page_item > a {
	color: var(--rf-color-on-highlight);
	background: var(--rf-sulfur);
	border-color: var(--rf-canvas);
}

.rf-primary-menu > .current-menu-item > a::before,
.rf-primary-menu > .current_page_item > a::before {
	background: linear-gradient(
		90deg,
		var(--rf-oxide) 0 72%,
		transparent 72% 80%,
		var(--rf-iron) 80% 100%
	);
	clip-path: none;
}

@keyframes rf-menu-weld-scan {
	0% {
		opacity: 0;
		transform: translateX(-150%) skewX(-12deg);
	}

	22% {
		opacity: 1;
	}

	100% {
		opacity: 0;
		transform: translateX(460%) skewX(-12deg);
	}
}

.rf-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.rf-header-tool {
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rf-color-text-inverse);
	background: transparent;
	text-decoration: none;
	border: 1px solid rgba(247, 240, 222, 0.3);
	box-shadow: inset 0 -2px 0 var(--rf-oxide);
	transition: color 130ms ease, background-color 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.rf-header-tool:hover,
.rf-header-tool:focus-visible {
	color: var(--rf-color-on-highlight);
	background: var(--rf-sulfur);
	border-color: var(--rf-sulfur);
	box-shadow: inset 0 -2px 0 var(--rf-canvas);
}

.rf-header-tool:focus-visible {
	outline: 2px solid var(--rf-canvas);
	outline-offset: 3px;
}

.rf-header-tool svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rf-header-cart-count {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 20px;
	height: 20px;
	padding-inline: 4px;
	display: grid;
	place-items: center;
	color: var(--rf-color-on-primary);
	background: var(--rf-oxide);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 0.68rem;
	font-weight: 900;
	line-height: 1;
	border: 2px solid var(--rf-iron);
	border-radius: 999px;
}

.rf-header-cart-count[data-count="0"] {
	display: none;
}

.rf-header-account-avatar {
	width: 30px;
	height: 30px;
	display: block;
	object-fit: cover;
	border-radius: 50%;
}

.rf-header-account.is-logged-in::after {
	position: absolute;
	right: 5px;
	bottom: 5px;
	width: 7px;
	height: 7px;
	content: "";
	background: var(--rf-sulfur);
	border: 1px solid var(--rf-iron);
}

body.rf-cart-drawer-open {
	overflow: hidden;
}

.rf-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 1200;
	pointer-events: none;
	visibility: hidden;
	transition: visibility 0s linear 240ms;
}

.rf-cart-drawer-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	background: rgba(16, 20, 19, 0.58);
	border: 0;
	border-radius: 0;
	opacity: 0;
	cursor: default;
	transition: opacity 200ms ease;
}

.rf-cart-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(430px, 100%);
	height: 100dvh;
	display: flex;
	flex-direction: column;
	color: var(--rf-iron);
	background: var(--rf-color-surface);
	border-top: 5px solid var(--rf-oxide);
	border-left: 1px solid var(--rf-steel);
	box-shadow: -12px 0 0 rgba(184, 73, 36, 0.16);
	outline: 0;
	transform: translateX(calc(100% + 14px));
	transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rf-cart-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
	transition-delay: 0s;
}

.rf-cart-drawer.is-open .rf-cart-drawer-overlay {
	opacity: 1;
}

.rf-cart-drawer.is-open .rf-cart-drawer-panel {
	transform: translateX(0);
}

.rf-cart-drawer-header {
	min-height: 98px;
	padding: 22px 24px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	color: var(--rf-color-text-inverse);
	background: var(--rf-iron);
	border-bottom: 1px solid var(--rf-steel);
}

.rf-cart-drawer-kicker {
	margin: 0 0 6px;
	color: var(--rf-sulfur);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rf-cart-drawer-header h2 {
	margin: 0;
	color: var(--rf-color-text-inverse);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: clamp(1.8rem, 5vw, 2.35rem);
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: -0.025em;
	text-transform: uppercase;
}


.rf-cart-drawer button.rf-cart-drawer-close {
	width: 42px;
	height: 42px;
	min-height: 42px;
	padding: 0;
	flex: 0 0 42px;
	display: grid;
	place-items: center;
	color: var(--rf-color-text-inverse);
	background: rgba(247, 240, 222, 0.06);
	font-size: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	border: 1px solid var(--rf-steel);
	border-radius: 0;
	box-shadow: none;
	box-sizing: border-box;
	cursor: pointer;
}

.rf-cart-drawer button.rf-cart-drawer-close:hover,
.rf-cart-drawer button.rf-cart-drawer-close:focus {
	color: var(--rf-sulfur);
	background: rgba(247, 240, 222, 0.1);
	border-color: var(--rf-sulfur);
}

.rf-cart-drawer button.rf-cart-drawer-close:focus-visible {
	outline: 2px solid var(--rf-sulfur);
	outline-offset: 3px;
}

.rf-cart-drawer-close svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: square;
}

.rf-cart-drawer-content {
	min-height: 0;
	padding: 0 24px 24px;
	flex: 1;
	overflow: hidden;
}

.rf-cart-drawer .widget_shopping_cart_content {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.rf-cart-drawer .woocommerce-mini-cart {
	min-height: 0;
	margin: 0;
	padding: 4px 0 0;
	flex: 1;
	overflow-y: auto;
	list-style: none;
}

.rf-cart-drawer .widget_shopping_cart_content .woocommerce-mini-cart-item {
	position: relative;
	min-height: 102px;
	margin: 0;
	padding: 18px 34px 18px 0;
	border-bottom: 1px solid rgba(89, 99, 94, 0.35);
}

.rf-cart-drawer .woocommerce-mini-cart-item > a:not(.remove) {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	align-items: start;
	gap: 14px;
	color: var(--rf-iron);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 0.95rem;
	font-weight: 900;
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
}

.rf-cart-drawer .widget_shopping_cart_content .woocommerce-mini-cart-item img {
	width: 72px;
	height: 72px;
	margin: 0;
	float: none;
	object-fit: cover;
	border: 1px solid var(--rf-steel);
}

.rf-cart-drawer .widget_shopping_cart_content .woocommerce-mini-cart-item .quantity {
	margin: -28px 0 0 86px;
	display: block;
	color: var(--rf-oxide);
	font-size: 0.9rem;
	font-weight: 800;
}

.rf-cart-drawer .woocommerce-mini-cart-item .remove {
	position: absolute;
	top: 18px;
	right: 0;
	width: 25px;
	height: 25px;
	display: grid;
	place-items: center;
	color: var(--rf-oxide) !important;
	background: transparent;
	font-size: 1.35rem;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	border: 1px solid rgba(184, 73, 36, 0.5);
	border-radius: 0;
}

.rf-cart-drawer .woocommerce-mini-cart-item .remove:hover,
.rf-cart-drawer .woocommerce-mini-cart-item .remove:focus-visible {
	color: var(--rf-color-on-primary) !important;
	background: var(--rf-oxide);
}

.rf-cart-drawer .woocommerce-mini-cart__total {
	margin: 0;
	padding: 20px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	color: var(--rf-iron);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 1.05rem;
	font-weight: 900;
	text-transform: uppercase;
	border-top: 1px solid var(--rf-steel);
}

.rf-cart-drawer .woocommerce-mini-cart__total .amount {
	color: var(--rf-oxide);
	font-size: 1.4rem;
}

.rf-cart-drawer .woocommerce-mini-cart__buttons {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.rf-cart-drawer .woocommerce-mini-cart__buttons .button {
	min-height: 48px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rf-color-on-primary);
	background: var(--rf-oxide);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 0.73rem;
	font-weight: 900;
	letter-spacing: 0.075em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	border: 0;
	border-radius: 0;
}

.rf-cart-drawer .woocommerce-mini-cart__buttons .button:hover,
.rf-cart-drawer .woocommerce-mini-cart__buttons .button:focus-visible {
	color: var(--rf-color-on-highlight);
	background: var(--rf-sulfur);
}

.rf-cart-drawer .woocommerce-mini-cart__empty-message {
	margin: auto;
	padding: 32px 20px;
	color: var(--rf-steel);
	font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.35;
	text-align: center;
	text-transform: uppercase;
}

.admin-bar .rf-cart-drawer-panel {
	top: 32px;
	height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .rf-cart-drawer-panel {
		top: 46px;
		height: calc(100dvh - 46px);
	}
}

.rf-menu-toggle {
	width: 46px;
	height: 46px;
	padding: 0;
	display: none;
	place-items: center;
	align-content: center;
	gap: 5px;
	color: var(--rf-color-text-inverse);
	background: var(--rf-color-border);
	border: 2px solid var(--rf-steel);
	border-radius: 0;
	cursor: pointer;
}

.rf-menu-toggle:hover,
.rf-menu-toggle:focus-visible {
	color: var(--rf-color-on-highlight);
	background: var(--rf-sulfur);
	border-color: var(--rf-canvas);
}

.rf-menu-toggle span {
	width: 20px;
	height: 2px;
	display: block;
	background: currentColor;
	transform-origin: center;
	transition: transform 150ms ease, opacity 150ms ease;
}

.rf-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.rf-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.rf-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.rf-header-seam {
	height: 5px;
	background: repeating-linear-gradient(
		135deg,
		var(--rf-oxide) 0,
		var(--rf-oxide) 12px,
		var(--rf-iron) 12px,
		var(--rf-iron) 24px
	);
	border-top: 1px solid var(--rf-steel);
}

@media (max-width: 1120px) {
	.rf-header-shell {
		grid-template-columns: 190px minmax(0, 1fr) 190px;
		gap: 18px;
	}

	.rf-header-brand {
		width: 190px;
	}

	.rf-primary-menu > li > a {
		padding-inline: 7px;
		font-size: 0.7rem;
	}

}

@media (max-width: 960px) {
	.rf-site-header {
		position: sticky;
	}

	.rf-header-shell {
		min-height: 74px;
		grid-template-columns: minmax(150px, 190px) 1fr;
		gap: 16px;
	}

	.rf-primary-nav {
		position: absolute;
		top: calc(100% + 5px);
		left: 20px;
		right: 20px;
		max-height: 0;
		overflow: hidden;
		visibility: hidden;
		opacity: 0;
		background: var(--rf-iron);
		border: 2px solid var(--rf-steel);
		box-shadow: 0 6px 0 var(--rf-oxide);
		transition: max-height 190ms ease, opacity 140ms ease, visibility 140ms ease;
	}

	.rf-primary-nav.is-open {
		max-height: calc(100vh - 110px);
		overflow-y: auto;
		visibility: visible;
		opacity: 1;
	}

	.rf-primary-menu {
		padding: 10px;
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}

	.rf-primary-menu > li {
		min-width: 0;
	}

	.rf-primary-menu > li > a {
		width: 100%;
		min-height: 48px;
		padding-inline: 8px;
		justify-content: center;
		font-size: 0.78rem;
		text-align: center;
		border: 0;
	}

	.rf-menu-toggle {
		display: grid;
	}
}

@media (max-width: 600px) {
	.admin-bar .rf-site-header {
		top: 0;
	}

	.rf-header-shell {
		width: min(100% - 24px, 1360px);
		grid-template-columns: minmax(146px, 176px) 1fr;
	}

	.rf-header-brand {
		width: min(176px, 100%);
	}

	.rf-primary-nav {
		left: 12px;
		right: 12px;
	}

	.rf-cart-drawer-header {
		min-height: 88px;
		padding: 18px 18px 16px;
	}

	.rf-cart-drawer-content {
		padding-inline: 18px;
	}
}

@media (max-width: 400px) {
	.rf-header-shell {
		grid-template-columns: minmax(128px, 148px) 1fr;
		gap: 8px;
	}

	.rf-header-brand {
		width: min(148px, 100%);
	}

	.rf-header-actions {
		gap: 5px;
	}

	.rf-header-tool,
	.rf-menu-toggle {
		width: 42px;
		height: 42px;
	}

	.rf-primary-menu {
		padding: 8px;
		gap: 4px;
	}

	.rf-primary-menu > li > a {
		padding-inline: 4px;
		font-size: 0.7rem;
		letter-spacing: 0.055em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rf-primary-menu > li > a,
	.rf-primary-menu > li > a::before,
	.rf-header-tool,
	.rf-menu-toggle span,
	.rf-primary-nav,
	.rf-cart-drawer-overlay,
	.rf-cart-drawer-panel {
		transition: none;
	}

	.rf-primary-menu > li > a:hover::after,
	.rf-primary-menu > li > a:focus-visible::after {
		animation: none;
	}
}
