:root {
	--solene-header-height: 96px;
}

body.solene-site {
	padding-top: var(--solene-header-height);
}

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	direction: ltr;
	background:
		linear-gradient(180deg, rgba(244, 241, 234, 0.98), rgba(226, 219, 207, 0.95));
	border-bottom: 1px solid rgba(255, 255, 255, 0.62);
	box-shadow: 0 14px 34px rgba(31, 20, 13, 0.14);
	backdrop-filter: blur(18px);
}

.header-shell {
	display: grid;
	grid-template-columns: minmax(86px, 1fr) auto minmax(86px, 1fr);
	align-items: center;
	gap: 18px;
	min-height: var(--solene-header-height);
	width: min(1180px, calc(100% - 32px));
	margin-inline: auto;
}

.header-left {
	display: flex;
	align-items: center;
	justify-self: start;
	min-width: 0;
}

.brand {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	min-width: 0;
	line-height: 1;
}

.brand::before,
.brand::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	pointer-events: none;
	border-radius: 999px;
	transform: translate(-50%, -50%);
}

.brand::before {
	width: 8px;
	height: 8px;
	background: #c8a45d;
	box-shadow: 0 0 14px rgba(200, 164, 93, 0.75);
	animation: solene-logo-spark-one 4.8s linear infinite;
}

.brand::after {
	width: 8px;
	height: 8px;
	background: #c8a45d;
	box-shadow: 0 0 14px rgba(200, 164, 93, 0.75);
	animation: solene-logo-spark-two 4.8s linear infinite;
}

.brand img {
	position: relative;
	z-index: 1;
	width: clamp(170px, 12vw, 230px);
	max-height: 86px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 10px 20px rgba(77, 56, 42, 0.16));
}

.brand-glow {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	justify-self: end;
	min-width: 0;
}

.language-switcher,
.cart-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 999px;
	color: var(--solene-white);
	font-family: var(--font-bold);
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
}

.language-switcher {
	overflow: hidden;
	padding: 4px;
	border: 1px solid rgba(200, 164, 93, 0.34);
	background: rgba(255, 255, 255, 0.68);
	box-shadow: 0 10px 24px rgba(77, 56, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(10px);
}

.language-switcher a {
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 38px;
	padding: 0 13px;
	border-radius: 999px;
	color: #4d382a !important;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher a + a {
	border-inline-start: 0;
}

.language-switcher a.is-active {
	background: #4d382a;
	color: #ffffff !important;
	box-shadow: 0 8px 18px rgba(77, 56, 42, 0.18);
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
	background: #c8a45d;
	color: #4d382a;
	transform: translateY(-1px);
}

.cart-pill {
	position: relative;
	gap: 10px;
	min-width: 138px;
	padding: 0 20px 0 17px;
	background: var(--solene-brown);
	box-shadow: 0 12px 24px rgba(77, 56, 42, 0.22);
	transition: transform 0.2s ease, background 0.2s ease;
}

.cart-pill:hover {
	transform: translateY(-1px);
	background: #3d2b20;
}

.cart-icon {
	position: relative;
	width: 16px;
	height: 13px;
	border: 2px solid currentColor;
	border-top: 0;
	border-radius: 2px;
}

.cart-icon::before {
	content: "";
	position: absolute;
	left: -2px;
	top: -5px;
	width: 8px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-left: 2px solid currentColor;
	transform: skewX(-18deg);
}

.cart-icon::after {
	content: "";
	position: absolute;
	left: 2px;
	right: 2px;
	bottom: -6px;
	height: 4px;
	background:
		radial-gradient(circle at 0 50%, currentColor 0 2px, transparent 2px),
		radial-gradient(circle at 100% 50%, currentColor 0 2px, transparent 2px);
}

.cart-count {
	position: absolute;
	left: 29px;
	top: 6px;
	display: grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	border-radius: 999px;
	background: var(--solene-taupe);
	color: var(--solene-white);
	font-family: var(--font-bold);
	font-size: 11px;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(31, 20, 13, 0.18);
}

.cart-label {
	padding-top: 1px;
}

.cart-toast {
	position: absolute;
	right: max(16px, calc((100vw - 1180px) / 2));
	top: calc(100% + 12px);
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 48px;
	padding: 10px 14px 10px 18px;
	border: 1px solid rgba(244, 241, 234, 0.38);
	border-radius: var(--solene-radius);
	background: var(--solene-brown);
	color: var(--solene-white);
	box-shadow: 0 18px 44px rgba(31, 20, 13, 0.26);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-8px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.cart-toast.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.cart-toast strong {
	font-size: 14px;
}

.cart-toast a {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--solene-taupe);
	color: var(--solene-white);
	font-family: var(--font-bold);
	font-size: 12px;
}

@media (min-width: 768px) and (max-width: 1024px) {
	:root {
		--solene-header-height: 88px;
	}

	.brand img {
		width: clamp(150px, 16vw, 190px);
		max-height: 78px;
	}
}

@media (max-width: 767px) {
	:root {
		--solene-header-height: 78px;
	}

	html {
		scroll-padding-top: var(--solene-header-height);
	}

	.header-shell {
		grid-template-columns: minmax(76px, 1fr) auto minmax(48px, 1fr);
		gap: 8px;
		width: min(100% - 20px, 1180px);
		min-height: var(--solene-header-height);
	}

	.brand img {
		width: clamp(92px, 24vw, 118px);
		max-height: 52px;
	}

	.brand::before {
		width: 7px;
		height: 7px;
	}

	.language-switcher,
	.cart-pill {
		min-height: 40px;
		font-size: 12px;
	}

	.language-switcher a {
		min-width: 34px;
		min-height: 32px;
		padding: 0 8px;
	}

	.cart-pill {
		min-width: 48px;
		padding: 0 14px;
	}

	.cart-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.cart-count {
		left: 27px;
		top: 4px;
	}

	.cart-toast {
		left: 10px;
		right: 10px;
		justify-content: space-between;
		top: calc(100% + 8px);
	}
}

/* ملاحظة تعديل: تأثير الشعار وزر اللغة في الهيدر يمكن تغييره من هذا الجزء. */
@keyframes solene-logo-spark-one {
	0% {
		transform: translate(-50%, -50%) rotate(0deg) translateX(76px) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg) translateX(76px) rotate(-360deg);
	}
}

@keyframes solene-logo-spark-two {
	0% {
		transform: translate(-50%, -50%) rotate(180deg) translateX(76px) rotate(-180deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(540deg) translateX(76px) rotate(-540deg);
	}
}

@media (max-width: 767px) {
	@keyframes solene-logo-spark-one {
		0% {
			transform: translate(-50%, -50%) rotate(0deg) translateX(48px) rotate(0deg);
		}
		100% {
			transform: translate(-50%, -50%) rotate(360deg) translateX(48px) rotate(-360deg);
		}
	}

	@keyframes solene-logo-spark-two {
		0% {
			transform: translate(-50%, -50%) rotate(180deg) translateX(48px) rotate(-180deg);
		}
		100% {
			transform: translate(-50%, -50%) rotate(540deg) translateX(48px) rotate(-540deg);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.brand::before,
	.brand::after {
		animation: none !important;
	}
}

.cart-pill {
	gap: 0;
	min-width: 52px;
	width: 52px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(200, 164, 93, 0.32);
	background: #4d382a;
	color: #ffffff;
}

.cart-pill:hover {
	background: #3f2d22;
}

.cart-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.cart-count {
	left: auto;
	right: 3px;
	top: 2px;
	min-width: 19px;
	height: 19px;
	border: 1px solid rgba(255, 255, 255, 0.86);
	background: #c8a45d;
	color: #4d382a;
	font-size: 11px;
}

@media (max-width: 767px) {
	.cart-pill {
		min-width: 46px;
		width: 46px;
		height: 40px;
	}

	.cart-count {
		right: 1px;
		top: 0;
	}
}
