/* Header — matches the existing La Spunta custom header. */

.ls-header {
	--ls-accent: #2563eb;
	--ls-accent-hover: #1d4ed8;
	--ls-border: #e2e8f0;
	background: #f5f6fb;
	color: #1e293b;
	position: relative;
	z-index: 200;
	width: 100%;
	display: block;
}
.ls-header *,
.ls-header *::before,
.ls-header *::after { box-sizing: border-box; }
.ls-header-top { padding: 18px 0; }
.ls-header-top-inner {
	display: grid;
	grid-template-columns: auto minmax(220px, 520px) auto;
	align-items: center;
	gap: 24px;
}
.ls-header-logo .logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
}
.ls-header-logo .logo-link > h1,
.ls-header-logo .logo-link > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
}
.ls-header-logo .logo-image { max-height: 42px; width: auto; }
.ls-logo-check { color: var(--ls-accent); flex-shrink: 0; }
.ls-header-search { width: 100%; max-width: 520px; justify-self: center; }
.ls-header-search .search-form { position: relative; margin: 0; width: 100%; }
.ls-header-search .search-form label { display: block; margin: 0; }
.ls-header-search .search-form input[type="search"],
.ls-header-search .search-form input[type="text"] {
	width: 100%;
	height: 46px;
	padding: 0 18px 0 44px;
	border: 1px solid var(--ls-border);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	outline: none;
}
.ls-header-search .search-form input:focus {
	border-color: #93c5fd;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.ls-header-search .search-button {
	position: absolute;
	left: 16px;
	top: 23px;
	transform: translateY(-50%);
	background: none;
	border: 0;
	padding: 0;
	color: #64748b;
	pointer-events: none;
	display: inline-flex;
}
.ls-search-preview {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 40;
	max-height: min(60vh, 420px);
	overflow: auto;
	background: #fff;
	border: 1px solid var(--ls-border);
	border-radius: 16px;
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}
.ls-search-preview[hidden] { display: none !important; }
.ls-search-preview__item,
.ls-search-preview__all,
.ls-search-preview__empty {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	color: #1e293b;
	text-decoration: none;
	border-bottom: 1px solid var(--ls-border);
}
.ls-search-preview__item:last-child,
.ls-search-preview__all:last-child,
.ls-search-preview__empty:last-child { border-bottom: 0; }
.ls-search-preview__item img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	flex: 0 0 auto;
	background: #f1f5f9;
}
.ls-search-preview__item span {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.ls-search-preview__item strong {
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 700;
}
.ls-search-preview__item em {
	font-style: normal;
	font-size: 0.8rem;
	color: #64748b;
}
.ls-search-preview__item:hover,
.ls-search-preview__item:focus-visible,
.ls-search-preview__all:hover,
.ls-search-preview__all:focus-visible {
	background: #f8fafc;
}
.ls-search-preview__all,
.ls-search-preview__empty {
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ls-accent);
}
.ls-search-preview__empty {
	font-weight: 500;
	color: #64748b;
}
.ls-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 18px;
	flex-shrink: 0;
}
.ls-header-actions .auth-link,
.ls-header-actions .ls-header-login {
	color: #1e293b;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	white-space: nowrap;
}
.ls-header-actions .auth-link:hover,
.ls-header-actions .ls-header-login:hover { color: var(--ls-accent); }
.ls-header-actions .ls-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--ls-accent);
	color: #fff !important;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 700;
	white-space: nowrap;
	border: 0;
}
.ls-header-actions .ls-header-cta:hover {
	background: var(--ls-accent-hover);
	color: #fff !important;
}
.ls-header-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.ls-header-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: #111;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.ls-header-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ls-header-toggle.is-open span:nth-child(2) { opacity: 0; }
.ls-header-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ls-header-nav { border-top: 1px solid var(--ls-border); }
.ls-header-nav__bar {
	display: flex;
	align-items: center;
	gap: 16px;
}
.ls-header-nav__bar .navigation-ls-main {
	flex: 1 1 auto;
	min-width: 0;
}
.ls-header-actions .ls-header-toggle { display: none; }
.ls-header-toggle--nav {
	flex: 0 0 auto;
	margin-left: auto;
}
.ls-header-drawer { display: none; }
.ls-header-drawer:not([hidden]) {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 30;
	max-height: min(75vh, 640px);
	overflow-y: auto;
	background: #f5f6fb;
	border-top: 1px solid var(--ls-border);
	box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
}
.ls-header-drawer__nav .menu,
.ls-header-drawer__nav ul {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0 !important;
	padding: 4px 0 8px !important;
	list-style: none !important;
}
.ls-header-drawer__nav .menu > li > a {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid var(--ls-border);
	color: #0f172a;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	pointer-events: auto;
}
.ls-header-drawer__nav .menu > li.current-menu-item > a,
.ls-header-drawer__nav .menu > li > a[aria-current="page"] {
	color: var(--ls-accent);
}
.ls-header-drawer__legal {
	padding: 8px 0 16px;
}
.ls-header-drawer__legal ul {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ls-header-drawer__legal a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid var(--ls-border);
	color: #64748b;
	font-weight: 600;
	text-decoration: none;
}
@media (min-width: 941px) {
	.ls-header-drawer__account { display: none; }
	.ls-header-drawer:not([hidden]) {
		background: var(--ls-accent);
		border-top: 0;
		box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
		max-height: none;
	}
	.ls-header-drawer > .wrap {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px 48px;
		padding-top: 28px;
		padding-bottom: 36px;
	}
	.ls-header-drawer > .wrap:has(.ls-header-drawer__legal) {
		grid-template-columns: minmax(0, 1fr) 200px;
	}
	.ls-header-drawer__nav .menu,
	.ls-header-drawer__nav ul {
		display: block;
		columns: 4;
		column-gap: 40px;
		margin: 0 !important;
		padding: 0 !important;
	}
	.ls-header-drawer__nav .menu > li {
		break-inside: avoid;
		margin: 0;
	}
	.ls-header-drawer__nav .menu > li > a {
		padding: 9px 0;
		border-bottom: 0;
		color: #fff;
		font-size: 1rem;
		font-weight: 500;
		line-height: 1.35;
	}
	.ls-header-drawer__nav .menu > li > a:hover,
	.ls-header-drawer__nav .menu > li > a:focus-visible {
		color: #fff;
		text-decoration: underline;
		text-underline-offset: 4px;
	}
	.ls-header-drawer__nav .menu > li.current-menu-item > a,
	.ls-header-drawer__nav .menu > li > a[aria-current="page"] {
		color: #fff;
		text-decoration: underline;
		text-decoration-color: #f5c518;
		text-decoration-thickness: 2px;
		text-underline-offset: 5px;
	}
	.ls-header-drawer__legal {
		margin: 0;
		padding: 0 0 0 28px;
		border-left: 1px solid rgba(255, 255, 255, 0.22);
	}
	.ls-header-drawer__legal a {
		padding: 9px 0;
		border-bottom: 0;
		color: #fff;
		font-weight: 500;
	}
	.ls-header-drawer__legal a:hover,
	.ls-header-drawer__legal a:focus-visible {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}
.ls-header-search-bar { display: none; }
.ls-search-panel[hidden] { display: none !important; }
.ls-header .navigation-ls-main { padding: 0; margin: 0; }
.ls-header .navigation-ls-main .menu,
.ls-header .navigation-ls-main ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 28px;
	margin: 0 !important;
	padding: 14px 0 !important;
	list-style: none !important;
}
.ls-header .navigation-ls-main .menu > li,
.ls-header .navigation-ls-main ul > li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	position: relative;
}
.ls-header .navigation-ls-main .menu > li > a,
.ls-header .navigation-ls-main ul > li > a {
	display: inline-block;
	padding: 6px 0;
	color: #334155;
	text-decoration: none;
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.4;
	border-bottom: 2px solid transparent;
}
.ls-header .navigation-ls-main .menu > li > a:hover,
.ls-header .navigation-ls-main .menu > li.current-menu-item > a,
.ls-header .navigation-ls-main .menu > li.current_page_item > a,
.ls-header .navigation-ls-main .menu > li.current-menu-ancestor > a {
	color: var(--ls-accent);
	border-bottom-color: var(--ls-accent);
}
.ls-header .navigation-ls-main .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	padding: 8px 0 !important;
	background: #fff;
	border: 1px solid var(--ls-border);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
	z-index: 20;
	flex-direction: column;
	gap: 0;
}
.ls-header .navigation-ls-main .menu > li:hover > .sub-menu,
.ls-header .navigation-ls-main .menu > li:focus-within > .sub-menu {
	display: flex;
}
.ls-header .navigation-ls-main .sub-menu a {
	display: block;
	padding: 8px 14px;
	white-space: nowrap;
}

@media (max-width: 940px) {
	.ls-header { position: relative; }
	.ls-header-top { padding: 14px 0; }
	.ls-header-top-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}
	.ls-header-logo { flex: 0 1 auto; min-width: 0; }
	.ls-header-logo .logo-link > h1,
	.ls-header-logo .logo-link > span { font-size: 1.15rem; }
	.ls-header-top .ls-header-search { display: none; }
	.ls-header-search-bar {
		display: block;
		padding: 0 0 12px;
	}
	.ls-header-search-bar .ls-header-search {
		max-width: none;
		margin-top: 0;
	}
	.ls-header-actions { gap: 12px; }
	.ls-header-actions .auth-link,
	.ls-header-actions .ls-header-login { display: none; }
	.ls-header-actions .ls-header-cta {
		min-height: 38px;
		padding: 0 18px;
		font-size: 0.9rem;
	}
	.ls-header-actions .ls-header-toggle { display: inline-flex; }
	.ls-header-toggle--nav { display: none; }

	.ls-header-nav {
		display: block;
		position: relative;
		border-top: 1px solid var(--ls-border);
		background: #f5f6fb;
	}
	@media (prefers-reduced-motion: reduce) {
		.ls-header { transition: none; }
	}
	.ls-header-nav .wrap { position: relative; }
	.ls-header .navigation-ls-main { position: relative; }
	.ls-header .navigation-ls-main.is-scrollable::after {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 36px;
		background: linear-gradient(to right, rgba(245, 246, 251, 0), #f5f6fb 80%);
		pointer-events: none;
	}
	.ls-header .navigation-ls-main .menu,
	.ls-header .navigation-ls-main ul {
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0 22px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 0 !important;
	}
	.ls-header .navigation-ls-main .menu::-webkit-scrollbar,
	.ls-header .navigation-ls-main ul::-webkit-scrollbar { display: none; }
	.ls-header .navigation-ls-main .menu > li,
	.ls-header .navigation-ls-main ul > li {
		flex: 0 0 auto;
		width: auto;
		scroll-snap-align: start;
	}
	.ls-header .navigation-ls-main .menu > li > a,
	.ls-header .navigation-ls-main ul > li > a {
		display: inline-flex;
		align-items: center;
		width: auto;
		min-height: 44px;
		padding: 10px 0;
		white-space: nowrap;
		border-bottom: 2px solid transparent;
	}
	.ls-header .navigation-ls-main .sub-menu { display: none !important; }

	.ls-header-drawer__account {
		display: flex;
		flex-direction: column;
		padding: 4px 0 8px;
	}
	.ls-header-drawer__account .auth-link,
	.ls-header-drawer__account .ls-header-login {
		display: block;
		padding: 12px 0;
		border-bottom: 1px solid var(--ls-border);
		color: #1e293b;
		font-weight: 600;
		text-decoration: none;
	}
	.ls-header-drawer__nav .sub-menu {
		display: flex;
		position: static;
		flex-direction: column;
		gap: 0;
		min-width: 0;
		margin: 0;
		padding: 0 0 4px 14px !important;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
	.ls-header-drawer__nav .sub-menu a {
		display: block;
		padding: 10px 0;
		border-bottom: 1px solid var(--ls-border);
		color: #334155;
		font-weight: 500;
		text-decoration: none;
		white-space: normal;
	}
}
