/**
 * Gridowp — primary site header.
 * Light palette only (no dark mode).
 */

:root {
	--gw-primary: #7DC246;
	--gw-primary-hover: #5F9E36;
	--gw-primary-light: #AFE093;
	--gw-accent: #FD662F;
	--gw-accent-light: #FF9A75;
	--gw-ink: #212529;
	--gw-ink-dim: #6C757D;
	--gw-bg: #FFFFFF;
	--gw-surface: #F8F9FA;
	--gw-surface-2: #F3F3F3;
	--gw-line: #DEE2E6;
	--gw-font: 'Cairo', 'Almarai', system-ui, sans-serif;
	--gw-content-width: 1500px;
	--gw-largeradius: 24px;
	--gw-miniradius: 14px;
}

body {
	background-color: var(--gw-bg);
	color: var(--gw-ink);
	font-family: var(--gw-font);
}

a {
	font-family: var(--gw-font);
}

/* ── Sticky nav wrapper ── */
.gw-nav-wrapper {
	position: sticky;
	top: 0;
	z-index: 40;
	width: 100%;
	padding: 8px 0;
	background: var(--gw-bg);
	border-bottom: 1px solid var(--gw-line);
	transition: box-shadow .25s ease;
}

.gw-nav-wrapper.is-scrolled {
	box-shadow: 0 8px 24px rgba(33, 37, 41, .08);
}

.gw-nav-row {
	max-width: var(--gw-content-width);
	margin-inline: auto;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding-block: 14px;
	padding-inline: clamp(24px, 3vw, 40px);
}

/* ── Site logo ── */
.gw-site-logo {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.gw-site-logo img {
	height: 42px;
	width: auto;
	display: block;
}

.gw-site-logo .gw-site-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--gw-ink);
	text-decoration: none;
}

.gw-site-logo a:focus {
	outline: none;
}

.gw-site-logo a:focus-visible {
	outline: 2px solid var(--gw-primary);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ── Nav menu ── */
.gw-nav {
	flex: 1;
	display: flex;
	align-items: center;
	overflow: visible;
}

.gw-nav-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 12px;
	width: 100%;
}

.gw-nav-links li {
	position: relative;
}

.gw-nav-links a {
	display: inline-block;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 16px;
	color: var(--gw-ink-dim);
	font-weight: 500;
	text-decoration: none;
	position: relative;
	background: transparent;
	transition: color .2s ease;
}

.gw-nav-links a::before {
	content: "";
	position: absolute;
	inset-inline: 10px;
	bottom: -4px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--gw-primary), var(--gw-primary-light));
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .22s ease;
	pointer-events: none;
}

.gw-nav-links a:focus {
	outline: none;
}

.gw-nav-links a:hover,
.gw-nav-links a:focus-visible {
	color: var(--gw-primary-hover);
}

.gw-nav-links a:focus-visible {
	outline: 2px solid var(--gw-primary);
	outline-offset: 2px;
}

.gw-nav-links a:hover::before,
.gw-nav-links a:focus-visible::before,
.gw-nav-links li.current-menu-item > a::before,
.gw-nav-links li.current-menu-ancestor > a::before {
	transform: scaleX(1);
}

.gw-nav-links li.current-menu-item > a,
.gw-nav-links li.current-menu-ancestor > a {
	color: var(--gw-primary-hover);
	font-weight: 600;
}

/* Mobile nav toggle / close buttons */
.gw-nav-toggle,
.gw-nav-close {
	-webkit-appearance: none;
	appearance: none;
	display: none;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 10px;
	align-items: center;
	justify-content: center;
	background: rgba(33, 37, 41, .04);
	border: 1px solid var(--gw-line);
	color: var(--gw-ink);
	cursor: pointer;
}

.gw-nav-toggle svg,
.gw-nav-close svg {
	stroke: var(--gw-ink);
	fill: none;
}

.gw-nav-panel-backdrop {
	display: none;
}

.gw-nav-panel {
	display: flex;
	flex: 1;
	width: 100%;
}

/* ── Right-side controls ── */
.gw-nav-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	flex-wrap: nowrap;
	min-width: max-content;
}

.gw-nav-right > * {
	align-self: center;
}

.gw-icon-btn {
	-webkit-appearance: none;
	appearance: none;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: rgba(33, 37, 41, .04);
	border: 1px solid var(--gw-line);
	transition: background .15s, border-color .15s;
	cursor: pointer;
	color: var(--gw-ink);
	position: relative;
	text-decoration: none;
	flex-shrink: 0;
}

.gw-icon-btn:focus,
.gw-account-btn:focus,
.gw-btn-shop:focus,
.gw-nav-toggle:focus,
.gw-nav-close:focus {
	outline: none;
}

/*
 * Underscores' base style.css has a blanket `button:focus { background:
 * var(--gw-primary-hover); color:#fff; }` rule. Since our icon/account/nav
 * buttons are real <button> elements, clicking them leaves them focused
 * (focus persists after the click, unlike :hover), so without this reset
 * they'd stay stuck solid-green until focus moves elsewhere.
 */
.gw-icon-btn:focus,
.gw-account-btn:focus,
.gw-nav-toggle:focus,
.gw-nav-close:focus {
	background: rgba(33, 37, 41, .04);
	border-color: var(--gw-line);
	color: var(--gw-ink);
}

.gw-icon-btn:focus-visible,
.gw-account-btn:focus-visible,
.gw-btn-shop:focus-visible,
.gw-nav-toggle:focus-visible,
.gw-nav-close:focus-visible {
	outline: 2px solid var(--gw-primary);
	outline-offset: 2px;
}

.gw-icon-btn:hover {
	background: rgba(33, 37, 41, .07);
	border-color: #CED4DA;
	color: var(--gw-ink);
}

.gw-cart-count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	border-radius: 99px;
	background: var(--gw-primary) !important;
	color: #fff !important;
	font-family: var(--gw-font);
	font-size: 10px;
	font-weight: 800;
	display: grid;
	place-items: center;
	border: 2px solid var(--gw-bg);
	padding: 0 3px;
	line-height: 1;
}

/* ── Account dropdown ── */
.gw-account-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	height: 38px;
	min-height: 38px;
	box-sizing: border-box;
}

.gw-account-btn {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 38px;
	height: 38px;
	max-height: 38px;
	padding: 0 7px;
	border-radius: 10px;
	border: 1px solid var(--gw-line);
	background: rgba(33, 37, 41, .04);
	color: var(--gw-ink);
	cursor: pointer;
	font: inherit;
	transition: background .15s, border-color .15s, color .15s;
}

.gw-account-btn:hover,
.gw-account-wrap.is-open .gw-account-btn {
	background: rgba(33, 37, 41, .07);
	border-color: #CED4DA;
	color: var(--gw-ink);
}

.gw-account-btn__inner {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	position: relative;
	z-index: 1;
}

.gw-account-btn__icon.gw-icon,
.gw-account-btn__icon.gw-icon svg {
	width: 1.35em;
	height: 1.35em;
}

.gw-account-btn__chev {
	transition: transform .2s ease;
}

.gw-account-btn__chev.gw-icon,
.gw-account-btn__chev.gw-icon svg {
	width: .85em;
	height: .85em;
	opacity: .65;
	color: var(--gw-ink-dim);
}

.gw-account-wrap.is-open .gw-account-btn__chev {
	transform: rotate(180deg);
}

.gw-account-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-end: 0;
	min-width: 220px;
	max-width: min(92vw, 280px);
	padding: 8px;
	border-radius: 14px;
	background: var(--gw-bg);
	border: 1px solid var(--gw-line);
	box-shadow: 0 16px 40px rgba(33, 37, 41, .14);
	z-index: 60;
}

.gw-account-dropdown__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--gw-ink-dim);
	text-decoration: none;
	font-size: .9rem;
	font-weight: 600;
	transition: background .12s, color .12s;
}

.gw-account-dropdown__item:hover {
	background: rgba(125, 194, 70, .08);
	color: var(--gw-ink);
}

.gw-account-dropdown__item--danger {
	color: var(--gw-accent);
}

.gw-account-dropdown__item--danger:hover {
	background: rgba(253, 102, 47, .1);
	color: var(--gw-accent);
}

.gw-account-dropdown__ico {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: rgba(125, 194, 70, .1);
	color: var(--gw-primary-hover);
	flex-shrink: 0;
}

.gw-account-dropdown__ico .gw-icon,
.gw-account-dropdown__ico .gw-icon svg {
	width: 1rem;
	height: 1rem;
}

.gw-account-dropdown__label {
	flex: 1;
	min-width: 0;
}

/* ── CTA button ── */
.gw-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 11px;
	font-family: var(--gw-font);
	font-weight: 700;
	font-size: 14.5px;
	line-height: 1.3;
	transition: transform .15s, box-shadow .2s, background .2s;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	border: none;
}

.gw-btn-shop {
	background: var(--gw-primary) !important;
	border: 1px solid var(--gw-primary-hover) !important;
	color: #fff !important;
	box-shadow: 0 4px 18px rgba(125, 194, 70, .35) !important;
}

.gw-btn-shop:hover {
	background: var(--gw-primary-hover) !important;
	border-color: var(--gw-primary-hover) !important;
	color: #fff !important;
	box-shadow: 0 6px 24px rgba(95, 158, 54, .4) !important;
	transform: translateY(-1px);
}

.gw-btn-shop svg {
	stroke: currentColor;
}

/*
 * Full-screen mobile menu overlay — matches how the reference site's
 * (WordPress core Navigation block) mobile menu behaves: a full-viewport
 * fade-in panel, not a narrow side drawer.
 */
@keyframes gw-overlay-fade-in {
	0% {
		opacity: 0;
		transform: translateY(.5em);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

body.gw-nav-open {
	overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 768px) {
	.gw-nav-row {
		padding-inline: 18px;
		gap: 12px;
	}

	.gw-nav-toggle {
		display: grid;
	}

	.gw-btn-shop span {
		display: none;
	}

	.gw-nav-panel-backdrop {
		display: none;
	}

	.gw-nav-panel {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: var(--gw-bg);
		padding: 5rem 1.5rem 2rem;
		overflow-y: auto;
	}

	.gw-nav.is-open .gw-nav-panel {
		display: flex;
		flex-direction: column;
		animation: gw-overlay-fade-in .15s ease-out forwards;
	}

	@media (prefers-reduced-motion: reduce) {
		.gw-nav.is-open .gw-nav-panel {
			animation-duration: .01ms;
		}
	}

	.gw-nav-close {
		display: grid;
		position: absolute;
		top: 1rem;
		left: 1rem;
	}

	.gw-nav-links {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.gw-nav-links a {
		display: block;
		padding: 12px 18px;
		font-size: 16px;
	}

	.gw-nav-links a::before {
		display: none;
	}
}

@media (max-width: 480px) {
	.gw-btn-shop {
		font-size: 13px;
		padding: 8px 12px;
	}
}
