/* GSV — Header (Gold Edge) | WPCode Snippet 2508 */
/* =========================================================
   GSV — Header · Gold Edge
   الشريط ذهبي، واللوقو في لسان أسود يتدلّى تحت خط الهيدر.
   ========================================================= */
#header {
	--gsv-gold-a: #f7ba0a;
	--gsv-gold-b: #e79a05;
	--gsv-gold-lit: #ffcd05;
	--gsv-ink: #0d0a06;
	--gsv-on-gold: #1f1600;
	--gsv-top-row: 30px;
	--gsv-tab-w: 132px;
	--gsv-tab-h: 106px;
	--gsv-tab-drop: 36px;
}

/* ---------- 1. Thin top strip ---------- */
#header [data-row="top"] .ct-container {
	gap: 16px;
}

#header .ct-header-text {
	min-width: 0;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

#header .ct-header-text .entry-content {
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #b6a884;
}

.gsv-tag-short {
	display: none;
}

#header [data-row="top"] .ct-header-socials .ct-social-box a {
	opacity: 0.8;
	transition: opacity 0.18s ease;
}

#header [data-row="top"] .ct-header-socials .ct-social-box a:hover {
	opacity: 1;
}

/* ---------- 2. The gold bar ---------- */
#header [data-row="middle"] {
	background-image: linear-gradient(90deg, var(--gsv-gold-a) 0%, var(--gsv-gold-b) 100%);
	overflow: visible;
}

#header [data-device="desktop"] [data-row="middle"] .ct-container {
	grid-template-columns: 152px minmax(0, 1fr) auto;
	align-items: center;
	overflow: visible;
}

#header [data-device="desktop"] [data-row="middle"] [data-column="middle"] {
	justify-self: start;
}

#header [data-device="desktop"] [data-row="middle"] [data-column="end"] {
	justify-self: end;
}

/* ---------- 3. The notch: logo in a black tab ---------- */
#header [data-device="desktop"] .site-branding {
	width: var(--gsv-tab-w);
	height: var(--gsv-tab-h);
	margin-bottom: calc(-1 * var(--gsv-tab-drop));
	align-self: start;
	justify-self: start;
	background: var(--gsv-ink);
	border-radius: 0 0 24px 24px;
	display: grid;
	place-items: center;
	position: relative;
	z-index: 6;
	box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.5);
}

#header .site-branding .site-logo-container img {
	filter: drop-shadow(0 0 18px rgba(255, 190, 20, 0.4));
}

/* ---------- 4. Categories: hover pill, solid pill for the open one ---------- */
#header [data-row="middle"] .menu > li > .ct-menu-link {
	position: relative;
	height: 40px;
	margin-block: auto;
	padding-inline: 11px;
	border-radius: 9px;
	color: var(--gsv-on-gold);
	font-weight: 700;
	transition: background-color 0.18s ease, color 0.18s ease;
}

#header [data-row="middle"] .menu > li:hover > .ct-menu-link {
	background-color: rgba(31, 22, 0, 0.12);
}

#header [data-row="middle"] .menu > li.current-menu-item > .ct-menu-link,
#header [data-row="middle"] .menu > li.current-menu-ancestor > .ct-menu-link,
#header [data-row="middle"] .menu > li.current-menu-parent > .ct-menu-link {
	background-color: var(--gsv-on-gold);
	color: var(--gsv-gold-lit);
}

#header [data-row="middle"] .menu > li > .ct-menu-link svg {
	fill: currentColor;
}

/* ---------- 5. Icons on the gold ---------- */
#header [data-row="middle"] [data-column="end"] [data-items] {
	display: flex;
	align-items: center;
	gap: 6px;
}

#header [data-row="middle"] .ct-header-search,
#header [data-row="middle"] .ct-account-item,
#header [data-row="middle"] .ct-cart-item {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--gsv-on-gold);
	transition: background-color 0.18s ease;
}

#header [data-row="middle"] .ct-header-search:hover,
#header [data-row="middle"] .ct-account-item:hover,
#header [data-row="middle"] .ct-cart-item:hover {
	background-color: rgba(31, 22, 0, 0.12);
}

#header [data-row="middle"] .ct-cart-item .ct-icon-container {
	position: relative;
	display: grid;
	place-items: center;
}

/* ---------- 6. Sticky on scroll ----------
   Blocksy never prints the data-sticky hook its own sticky script waits for,
   so the header is pinned here. The dark strip scrolls away; the gold bar
   stays. Where scroll-driven animation is supported the tab retracts into
   the bar so the pinned state is a clean rail. */
#header {
	position: sticky;
	top: calc(-1 * var(--gsv-top-row));
	z-index: 100;
}

@supports (animation-timeline: scroll()) {
	#header [data-device="desktop"] .site-branding {
		animation: gsv-tab-retract linear both;
		animation-timeline: scroll(root);
		animation-range: 50px 180px;
	}

	#header [data-device="mobile"] .site-branding {
		animation: gsv-tab-retract-m linear both;
		animation-timeline: scroll(root);
		animation-range: 50px 150px;
	}

	#header [data-device="mobile"] [data-row="bottom"] {
		overflow: hidden;
		animation: gsv-collapse-search linear both;
		animation-timeline: scroll(root);
		animation-range: 50px 150px;
	}
}

@keyframes gsv-tab-retract {
	from { height: 106px; margin-bottom: -36px; border-bottom-left-radius: 24px; border-bottom-right-radius: 24px; }
	to   { height: 70px;  margin-bottom: 0;     border-bottom-left-radius: 0;    border-bottom-right-radius: 0; }
}

@keyframes gsv-tab-retract-m {
	from { height: 76px; margin-bottom: -18px; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
	to   { height: 58px; margin-bottom: 0;     border-bottom-left-radius: 0;    border-bottom-right-radius: 0; }
}

@keyframes gsv-collapse-search {
	from { height: 68px; opacity: 1; }
	to   { height: 0;    opacity: 0; }
}

/* ---------- 7. Narrow desktop: keep the nine categories on one line ---------- */
@media (max-width: 1320px) {
	#header [data-row="middle"] .menu > li > .ct-menu-link {
		padding-inline: 7px;
		font-size: 12.5px;
	}
}

@media (max-width: 1199.98px) {
	.gsv-tag-full { display: none; }
	.gsv-tag-short { display: inline; }
}

/* ---------- 8. Mobile ---------- */
@media (max-width: 999.98px) {
	#header {
		--gsv-top-row: 28px;
	}

	#header .ct-header-text {
		font-size: 10px;
		letter-spacing: -0.1px;
	}

	#header [data-row="top"] .ct-container {
		gap: 10px;
	}

	#header [data-device="mobile"] [data-row="middle"] .ct-container {
		overflow: visible;
	}

	#header [data-device="mobile"] .site-branding {
		width: 96px;
		height: 76px;
		margin-bottom: -18px;
		align-self: start;
		justify-self: center;
		background: var(--gsv-ink);
		border-radius: 0 0 20px 20px;
		display: grid;
		place-items: center;
		position: relative;
		z-index: 6;
		box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.55);
	}

	/* the cream strip the tab cuts into */
	#header [data-device="mobile"] [data-row="bottom"] .ct-container {
		min-height: 68px;
		align-items: end;
		padding-bottom: 12px;
	}

	#header [data-device="mobile"] [data-row="bottom"] .ct-search-box {
		width: 100%;
	}

	#header [data-device="mobile"] [data-row="bottom"] .ct-search-form-inner {
		height: 38px;
		border-radius: 999px;
		background-color: #ffffff;
		border: 1px solid rgba(31, 22, 0, 0.13);
	}

	#header [data-device="mobile"] [data-row="bottom"] input[type="search"] {
		color: #1f1600;
		font-size: 13px;
	}

	#header [data-device="mobile"] [data-row="bottom"] input[type="search"]::placeholder {
		color: #9a9081;
		opacity: 1;
	}

	#header [data-device="mobile"] [data-row="bottom"] .ct-search-box button svg {
		fill: var(--gsv-gold-b);
	}

	#header [data-row="middle"] .ct-cart-item {
		width: 36px;
		height: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#header * {
		transition-duration: 0.01ms !important;
	}
}

/* =========================================================
   Floating language switcher — bottom-right, clear of WhatsApp
   ========================================================= */
.wpml-floating-language-switcher {
	z-index: 90;
}
