/**
 * FashionFlow responsive site header and mobile navigation.
 */

.ff-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--ff-color-border);
	background: color-mix(in srgb, var(--ff-color-background) 94%, transparent);
}

.ff-header__inner {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr) auto;
	min-height: 4.5rem;
	align-items: center;
	gap: var(--ff-space-2);
}

.ff-header__brand {
	min-width: 0;
	justify-self: center;
}

.ff-site-title,
.ff-footer__title {
	display: inline-block;
	max-width: 12rem;
	overflow: hidden;
	color: var(--ff-color-foreground);
	font-family: var(--ff-font-editorial);
	font-size: clamp(1.3rem, 4vw, 1.65rem);
	line-height: 1;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-logo-link {
	display: block;
}

.custom-logo {
	width: auto;
	max-height: 2.5rem;
}

.ff-primary-navigation {
	display: none;
}

.ff-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.15rem;
}

.ff-icon-button,
.ff-header-action {
	display: inline-flex;
	width: 2.75rem;
	height: 2.75rem;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ff-color-foreground);
	text-decoration: none;
}

.ff-icon-button:hover,
.ff-header-action:hover {
	background: var(--ff-color-accent-soft);
}

.ff-icon-button svg,
.ff-header-action svg,
.ff-mobile-navigation__utilities svg {
	width: 1.35rem;
	height: 1.35rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
}

.ff-header-action__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ff-nav-backdrop {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgb(40 35 31 / 0.48);
	backdrop-filter: blur(2px);
}

.ff-mobile-navigation {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	width: min(88vw, 24rem);
	padding: var(--ff-space-4);
	overflow-y: auto;
	background: var(--ff-color-card);
	box-shadow: -18px 0 48px rgb(40 35 31 / 0.16);
}

.ff-mobile-navigation__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--ff-space-4);
	border-bottom: 1px solid var(--ff-color-border);
	font-family: var(--ff-font-editorial);
	font-size: 1.5rem;
}

.ff-primary-menu,
.ff-mobile-menu {
	padding: 0;
	margin: 0;
	list-style: none;
}

.ff-mobile-menu {
	padding-block: var(--ff-space-4);
}

.ff-mobile-menu a {
	display: flex;
	min-height: 3.35rem;
	align-items: center;
	border-bottom: 1px solid var(--ff-color-border);
	color: var(--ff-color-foreground);
	font-family: var(--ff-font-editorial);
	font-size: 1.35rem;
	text-decoration: none;
}

.ff-mobile-menu a:hover {
	color: var(--ff-color-accent);
}

.ff-mobile-navigation__utilities {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ff-space-2);
	padding-top: var(--ff-space-4);
}

.ff-mobile-navigation__utilities a {
	display: flex;
	min-height: 3rem;
	align-items: center;
	justify-content: center;
	gap: var(--ff-space-1);
	padding: var(--ff-space-2);
	border: 1px solid var(--ff-color-border);
	border-radius: 999px;
	color: var(--ff-color-foreground);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

body.admin-bar .ff-mobile-navigation {
	top: 46px;
}

body.admin-bar .ff-site-header {
	top: 46px;
}

@media (min-width: 48.875rem) {
	body.admin-bar .ff-mobile-navigation {
		top: 32px;
	}

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

@media (min-width: 64rem) {
	.ff-header__inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		min-height: 5rem;
		gap: clamp(1.5rem, 3vw, 3rem);
	}

	.ff-menu-toggle {
		display: none;
	}

	.ff-header__brand {
		justify-self: start;
	}

	.ff-primary-navigation {
		display: block;
		min-width: 0;
	}

	.ff-primary-menu {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: clamp(0.75rem, 1.4vw, 1.5rem);
	}

	.ff-primary-menu a {
		position: relative;
		display: block;
		padding-block: 1rem;
		color: var(--ff-color-foreground);
		font-size: clamp(0.78rem, 1vw, 0.9rem);
		font-weight: 600;
		text-decoration: none;
		white-space: nowrap;
	}

	.ff-primary-menu a::after {
		position: absolute;
		right: 0;
		bottom: 0.72rem;
		left: 0;
		height: 2px;
		background: var(--ff-color-accent);
		content: "";
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 160ms ease;
	}

	.ff-primary-menu a:hover::after,
	.ff-primary-menu .current-menu-item > a::after,
	.ff-primary-menu .current_page_item > a::after {
		transform: scaleX(1);
	}

	.ff-header__actions {
		gap: var(--ff-space-1);
	}

	.ff-header-action {
		width: auto;
		gap: 0.35rem;
		padding-inline: 0.65rem;
	}

	.ff-header-action__label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
		font-size: 0.78rem;
		font-weight: 600;
		white-space: nowrap;
	}
}

@supports (backdrop-filter: blur(8px)) {
	.ff-site-header {
		backdrop-filter: blur(12px);
	}
}
