/* Header-specific styles for Vaarahi Fashion */

.site-header--commerce {
	position: sticky;
	top: 0;
	z-index: 1030;
	/* background: var(--vaarahi-bg); */
	background: #efee1a;
	border-bottom: 1px solid var(--vaarahi-header-border);
	transition: box-shadow 0.2s ease;
}

.site-header--commerce.is-scrolled {
	box-shadow: 0 0.75rem 2rem rgba(17, 17, 17, 0.08);
}

/*
 * Single-row desktop header: brand+nav (left) | search (center) | actions (right).
 * Flexbox with space-between actively pushes the three groups apart to fill the
 * row's width; `gap` sets the minimum spacing so they never collide even when
 * there's little leftover space (which a grid's 1fr tracks wouldn't guarantee).
 */
.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 3rem;
	height: 80px;
}

.header-bar__brand {
	display: flex;
	align-items: center;
	gap: 3rem;
	min-width: 0;
	flex: 0 1 auto;
}

.header-bar__search {
	flex: 1 1 350px;
	max-width: 350px;
}

.header-bar__actions {
	flex: 0 0 auto;
}

.site-logo img {
	max-height: 56px;
	width: auto;
}

.header-search-form {
	width: 100%;
}

.header-search-form .form-control {
	border-right: 0;
	border-color: var(--vaarahi-border);
	border-radius: 999px 0 0 999px;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.header-search-form .btn {
	border-radius: 0 999px 999px 0;
}

.header-search-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	padding: 0;
}

.header-search-form__submit svg {
	width: 1.15rem;
	height: 1.15rem;
	color: #fff;
}

.header-actions .header-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--vaarahi-border);
	border-radius: 999px;
	background: var(--vaarahi-surface);
	color: var(--vaarahi-text);
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.header-actions .header-action:hover,
.header-actions .header-action:focus {
	transform: translateY(-1px);
	border-color: var(--vaarahi-primary);
	color: var(--vaarahi-primary);
}

.header-action__icon {
	width: 1.1rem;
	height: 1.1rem;
	flex: 0 0 auto;
}

.header-action__count {
	position: absolute;
	top: -0.35rem;
	right: -0.35rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: var(--vaarahi-primary);
	color: #fff;
	font-size: 0.6875rem;
	line-height: 1.15rem;
	text-align: center;
}

/*
 * Bootstrap's .navbar-nav defaults to flex-direction: column and only switches
 * to row inside a .navbar-expand-* wrapper. This header doesn't use the
 * .navbar component, so .header-nav sets its own row layout explicitly —
 * this is what keeps the desktop menu horizontal instead of stacking.
 */
.header-nav {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.header-nav > .nav-item {
	position: relative;
}

.header-nav > .nav-item > .nav-link {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--vaarahi-text);
}

.header-nav > .nav-item:hover > .nav-link,
.header-nav > .nav-item > .nav-link:focus {
	color: var(--vaarahi-primary);
}

.header-nav .dropdown-menu,
.header-mobile-nav .dropdown-menu {
	border: 0;
	border-radius: 1rem;
	box-shadow: 0 1.25rem 2.5rem rgba(17, 17, 17, 0.12);
	padding: 1.25rem;
}

.header-nav .mega-menu {
	left: 0;
	top: 100%;
	margin-top: 0.5rem;
	width: 40rem;
	padding: 1.5rem;
	display: none;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: stretch;
}

/* Only widen to two tracks when there's a promo image to fill the second one. */
.header-nav .mega-menu:has(.mega-menu__promo) {
	grid-template-columns: 2fr 1fr;
}

.header-nav .nav-item:hover > .dropdown-menu,
.header-nav .nav-item > .dropdown-menu.show {
	display: grid;
}

.mega-menu__links {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.mega-menu__heading {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--vaarahi-primary);
	margin: 0 0 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--vaarahi-border);
}

.mega-menu__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mega-menu__promo {
	position: relative;
	border-radius: 0.75rem;
	overflow: hidden;
}

.mega-menu__promo img {
	width: 100%;
	height: 100%;
	min-height: 12rem;
	object-fit: cover;
	display: block;
}

.mega-menu__promo-caption {
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: rgba(17, 17, 17, 0.65);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.header-nav .dropdown-item,
.header-mobile-nav .dropdown-item {
	white-space: normal;
	padding: 0.45rem 0;
	font-weight: 500;
	font-size: 14px;
}

.header-nav .dropdown-item:hover,
.header-mobile-nav .dropdown-item:hover {
	background: transparent;
	color: var(--vaarahi-primary);
}

.header-mobile-nav {
	background: var(--vaarahi-surface);
	border-top: 1px solid var(--vaarahi-header-border);
}

.header-mobile-nav .mobile-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.header-mobile-nav .mobile-menu > .nav-item > .nav-link {
	display: block;
	padding: 0.9rem 0;
	font-weight: 600;
	font-size: 14px;
	color: var(--vaarahi-text);
	border-bottom: 1px solid var(--vaarahi-border);
}

.header-mobile-nav .dropdown-menu {
	position: static;
	float: none;
	box-shadow: none;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	margin: 0 0 0.5rem;
	border-radius: 0.75rem;
	background: var(--vaarahi-bg);
}

.header-mobile-nav .dropdown-toggle::after {
	margin-left: 0.5rem;
}

.site-branding .custom-logo {
	max-width: 180px;
	height: auto;
}

.header-mobile .navbar-toggler {
	box-shadow: none;
}

.header-mobile .navbar-toggler-icon {
	width: 1.35rem;
	height: 1.35rem;
}
