/* =========================================================================
 * Vapier Header — styles
 * Scoped under .vp-header to avoid theme conflicts. RTL-aware via logical
 * properties + [dir="rtl"] overrides. Colors sampled from the design.
 * ====================================================================== */

.vp-header {
	--vp-primary: #bc0026;
	--vp-primary-dark: #9e0020;
	--vp-gold: #f0a020;
	--vp-dark: #0a0a0a;
	--vp-topbar-bg: #ffffff;
	--vp-topbar-border: #ececec;
	--vp-main-bg: #ffffff;
	--vp-field-bg: #f4f4f4;
	--vp-text: #232323;
	--vp-text-muted: #8a8a8a;
	--vp-nav-text: #ffffff;
	--vp-white: #ffffff;
	--vp-radius: 6px;
	--vp-container: 1290px;
	--vp-shadow: 0 12px 40px rgba(0, 0, 0, .12);
	--vp-ease: cubic-bezier(.16, 1, .3, 1);

	font-family: inherit;
	position: relative;
	z-index: 9000;
	background: var(--vp-main-bg);
	color: var(--vp-text);
}

.vp-header *,
.vp-header *::before,
.vp-header *::after {
	box-sizing: border-box;
}

.vp-header a {
	text-decoration: none;
	color: inherit;
	transition: color .2s var(--vp-ease);
}

.vp-header ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vp-header .vp-icon {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	display: block;
}

.vp-container {
	width: 100%;
	max-width: var(--vp-container);
	margin-inline: auto;
	padding-inline: 20px;
}

/* ---------------------------------------------------------------- TOP BAR */
.vp-topbar {
	background: var(--vp-topbar-bg);
	border-bottom: 1px solid var(--vp-topbar-border);
	font-size: 13px;
}

.vp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 42px;
	gap: 16px;
}

.vp-topbar__contact {
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
}

.vp-topbar__contact a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--vp-text);
}

.vp-topbar__contact a:hover {
	color: var(--vp-primary);
}

.vp-topbar__contact .vp-icon {
	width: 16px;
	height: 16px;
	color: var(--vp-text-muted);
}

.vp-topbar__social {
	display: flex;
	gap: 18px;
}

.vp-topbar__social a {
	color: var(--vp-text);
	display: inline-flex;
}

.vp-topbar__social a:hover {
	color: var(--vp-primary);
	transform: translateY(-1px);
}

.vp-topbar__social .vp-icon {
	width: 17px;
	height: 17px;
}

/* --------------------------------------------------------------- MAIN BAR */
.vp-main {
	background: var(--vp-main-bg);
}

.vp-main__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: 92px;
}

/* Logo */
.vp-logo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.vp-logo img {
	max-height: 46px;
	width: auto;
	display: block;
}

.vp-logo__mark .vp-icon {
	width: 34px;
	height: 34px;
	color: var(--vp-primary);
}

.vp-logo__text {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: .5px;
	color: var(--vp-text);
	line-height: 1;
}

/* Search */
.vp-search {
	position: relative;
	flex: 1 1 auto;
	max-width: 680px;
}

.vp-search__form {
	display: flex;
	align-items: stretch;
	background: var(--vp-field-bg);
	border-radius: var(--vp-radius);
	overflow: hidden;
	height: 52px;
}

.vp-search__input {
	flex: 1 1 auto;
	border: 0;
	background: transparent;
	padding-inline: 22px;
	font-size: 14px;
	color: var(--vp-text);
	outline: none;
	min-width: 0;
}

.vp-search__input::placeholder {
	color: var(--vp-text-muted);
}

.vp-search__cat {
	position: relative;
	display: flex;
	align-items: center;
	border-inline-start: 1px solid #e0e0e0;
	flex: 0 0 auto;
}

.vp-search__cat select {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: transparent;
	padding-inline: 18px 38px;
	height: 100%;
	font-size: 14px;
	color: var(--vp-text);
	cursor: pointer;
	outline: none;
	max-width: 170px;
}

.vp-search__cat .vp-icon {
	position: absolute;
	inset-inline-end: 12px;
	width: 16px;
	height: 16px;
	color: var(--vp-text-muted);
	pointer-events: none;
}

.vp-search__btn {
	flex: 0 0 auto;
	width: 62px;
	border: 0;
	background: var(--vp-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s var(--vp-ease);
}

.vp-search__btn:hover {
	background: var(--vp-primary-dark);
}

/* Live search results */
.vp-search__results {
	position: absolute;
	inset-inline: 0;
	top: calc(100% + 10px);
	background: #fff;
	border-radius: 10px;
	box-shadow: var(--vp-shadow);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s var(--vp-ease), transform .2s var(--vp-ease), visibility .2s;
	z-index: 20;
	max-height: 70vh;
	overflow-y: auto;
}

.vp-search.is-open .vp-search__results {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.vp-result {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	border-bottom: 1px solid #f1f1f1;
}

.vp-result:hover {
	background: #faf6f7;
}

.vp-result img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 auto;
	background: #f4f4f4;
}

.vp-result__body {
	min-width: 0;
}

.vp-result__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--vp-text);
	margin: 0 0 3px;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vp-result__price {
	font-size: 13px;
	color: var(--vp-primary);
	font-weight: 700;
}

.vp-result__price del {
	color: var(--vp-text-muted);
	font-weight: 400;
	margin-inline-end: 6px;
}

.vp-search__state,
.vp-search__all {
	padding: 14px 18px;
	font-size: 13px;
	text-align: center;
	color: var(--vp-text-muted);
}

.vp-search__all {
	display: block;
	background: #fafafa;
	color: var(--vp-primary);
	font-weight: 700;
}

.vp-search__all:hover {
	background: var(--vp-primary);
	color: #fff;
}

/* Action icons */
.vp-actions {
	display: flex;
	align-items: center;
	gap: 22px;
	flex: 0 0 auto;
	margin-inline-start: auto;
}

.vp-action {
	position: relative;
	display: inline-flex;
	color: #3a3a3a;
}

.vp-action:hover {
	color: var(--vp-primary);
}

.vp-action .vp-icon {
	width: 24px;
	height: 24px;
}

.vp-badge {
	position: absolute;
	top: -9px;
	inset-inline-end: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--vp-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.vp-badge--gold {
	background: var(--vp-gold);
	color: #3a2400;
}

.vp-badge.is-empty {
	display: none;
}

/* Mini cart dropdown */
.vp-cart {
	position: relative;
}

.vp-cart__dropdown {
	position: absolute;
	top: calc(100% + 18px);
	inset-inline-end: 0;
	width: 340px;
	background: #fff;
	border-radius: 10px;
	box-shadow: var(--vp-shadow);
	padding: 18px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s var(--vp-ease), transform .2s var(--vp-ease), visibility .2s;
	z-index: 30;
}

.vp-cart:hover .vp-cart__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.vp-cart__dropdown .woocommerce-mini-cart__total,
.vp-cart__dropdown .total {
	margin: 12px 0;
	font-size: 14px;
}

.vp-cart__dropdown .button {
	display: inline-block;
	margin-top: 6px;
}

/* ---------------------------------------------------------------- NAV BAR */
.vp-nav {
	background: var(--vp-dark);
	color: var(--vp-nav-text);
}

.vp-nav__inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	min-height: 56px;
}

/* Departments */
.vp-dept {
	position: relative;
	flex: 0 0 auto;
	display: flex;
}

.vp-dept__toggle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--vp-primary);
	color: #fff;
	border: 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	padding: 0 26px;
	height: 100%;
	min-width: 248px;
	border-radius: 8px 8px 0 0;
	font-family: inherit;
	transition: background .2s var(--vp-ease);
}

.vp-dept__toggle:hover {
	background: var(--vp-primary-dark);
}

.vp-dept__toggle .vp-icon {
	width: 20px;
	height: 20px;
}

.vp-dept__caret {
	margin-inline-start: auto;
	width: 16px;
	height: 16px;
	transition: transform .25s var(--vp-ease);
}

.vp-dept.is-open .vp-dept__caret {
	transform: rotate(180deg);
}

.vp-dept__panel {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	width: 280px;
	background: #fff;
	color: var(--vp-text);
	box-shadow: var(--vp-shadow);
	border-radius: 0 0 8px 8px;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s var(--vp-ease), transform .2s var(--vp-ease), visibility .2s;
	z-index: 40;
}

.vp-dept.is-open .vp-dept__panel,
.vp-dept:hover .vp-dept__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.vp-dept__menu a {
	display: block;
	padding: 11px 26px;
	font-size: 14px;
	color: var(--vp-text);
}

.vp-dept__menu li:hover > a {
	background: #f7f4f5;
	color: var(--vp-primary);
}

/* Primary menu */
.vp-primary {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.vp-primary__menu {
	display: flex;
	align-items: center;
	height: 100%;
}

.vp-primary__menu > li {
	position: relative;
}

.vp-primary__menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 18px;
	height: 56px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .4px;
	color: var(--vp-nav-text);
	text-transform: uppercase;
}

.vp-primary__menu > li > a:hover,
.vp-primary__menu > li.current-menu-item > a {
	color: var(--vp-gold);
}

.vp-menu-caret {
	width: 14px;
	height: 14px;
	transition: transform .25s var(--vp-ease);
}

.vp-primary__menu > li:hover > a .vp-menu-caret {
	transform: rotate(180deg);
}

/* Sub-menus */
.vp-primary__menu .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	min-width: 220px;
	background: #fff;
	box-shadow: var(--vp-shadow);
	border-radius: 0 0 8px 8px;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s var(--vp-ease), transform .2s var(--vp-ease), visibility .2s;
	z-index: 40;
}

.vp-primary__menu li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.vp-primary__menu .sub-menu a {
	display: block;
	padding: 10px 22px;
	font-size: 14px;
	color: var(--vp-text);
	text-transform: none;
	font-weight: 500;
}

.vp-primary__menu .sub-menu li:hover > a {
	background: #f7f4f5;
	color: var(--vp-primary);
}

.vp-primary__menu .sub-menu .sub-menu {
	top: 0;
	inset-inline-start: 100%;
	border-radius: 8px;
}

/* Delivery banner */
.vp-delivery {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	margin-inline-start: auto;
	padding-inline-start: 20px;
	font-size: 14px;
	color: var(--vp-white);
	white-space: nowrap;
}

.vp-delivery__icon {
	width: 26px;
	height: 26px;
	color: var(--vp-primary);
}

.vp-delivery__link {
	color: var(--vp-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
}

.vp-delivery__link:hover {
	color: #ffc861;
}

/* Mobile-only controls hidden on desktop */
.vp-burger,
.vp-submenu-toggle {
	display: none;
}

.vp-mobile-overlay {
	display: none;
}

/* ----------------------------------------------------------- STICKY MODE */
.vp-header.vp-sticky.is-stuck .vp-nav {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 9500;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
	animation: vpSlideDown .35s var(--vp-ease);
}

@keyframes vpSlideDown {
	from { transform: translateY(-100%); }
	to   { transform: translateY(0); }
}

.vp-header.vp-sticky.is-stuck .vp-dept__toggle {
	border-radius: 0;
}

/* =====================================================================
 * RESPONSIVE
 * ================================================================== */

/* ≤ 1200px — tighten spacing */
@media (max-width: 1200px) {
	.vp-main__inner { gap: 22px; }
	.vp-dept__toggle { min-width: auto; padding: 0 18px; }
	.vp-primary__menu > li > a { padding: 0 13px; }
	.vp-delivery__text { display: none; }
}

/* ≤ 992px — collapse nav into off-canvas drawer */
@media (max-width: 992px) {
	.vp-burger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 0;
		background: transparent;
		color: var(--vp-text);
		cursor: pointer;
		flex: 0 0 auto;
	}

	.vp-burger .vp-icon { width: 26px; height: 26px; }

	.vp-main__inner { gap: 16px; min-height: 72px; }

	/* Search drops to a full-width second row */
	.vp-search {
		order: 5;
		flex-basis: 100%;
		max-width: none;
	}

	.vp-main__inner { flex-wrap: wrap; }

	.vp-search__form { height: 46px; }

	/* The whole nav becomes an off-canvas drawer */
	.vp-nav {
		position: fixed;
		top: 0;
		inset-inline-start: 0;
		height: 100dvh;
		width: 320px;
		max-width: 86vw;
		background: #111;
		transform: translateX(-100%);
		transition: transform .35s var(--vp-ease);
		z-index: 9600;
		overflow-y: auto;
		padding-top: 64px;
	}

	[dir="rtl"] .vp-nav { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(100%); }

	.vp-header.is-menu-open .vp-nav { transform: translateX(0); }

	.vp-nav__inner {
		flex-direction: column;
		align-items: stretch;
		min-height: 0;
	}

	.vp-dept,
	.vp-primary,
	.vp-primary__menu { width: 100%; flex-direction: column; }

	.vp-dept__toggle {
		width: 100%;
		min-width: 0;
		border-radius: 0;
		height: 54px;
		justify-content: flex-start;
	}

	.vp-dept__panel {
		position: static;
		width: 100%;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border-radius: 0;
		background: #1c1c1c;
		display: none;
		padding: 0;
	}

	.vp-dept.is-open .vp-dept__panel { display: block; }
	.vp-dept__menu a { color: #ddd; padding: 12px 26px; }
	.vp-dept__menu li:hover > a { background: #262626; color: #fff; }

	.vp-primary__menu > li { width: 100%; }

	.vp-primary__menu > li > a {
		height: auto;
		padding: 15px 24px;
		justify-content: space-between;
		border-bottom: 1px solid rgba(255, 255, 255, .07);
	}

	.vp-menu-caret { display: none; }

	/* Accordion sub-menus */
	.vp-submenu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 6px;
		inset-inline-end: 8px;
		width: 40px;
		height: 40px;
		border: 0;
		background: transparent;
		color: #fff;
		cursor: pointer;
	}

	.vp-submenu-toggle .vp-icon { transition: transform .25s var(--vp-ease); }
	.vp-primary__menu > li.is-open > .vp-submenu-toggle .vp-icon { transform: rotate(180deg); }

	.vp-primary__menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border-radius: 0;
		background: #1c1c1c;
		padding: 0;
		display: none;
	}

	.vp-primary__menu > li.is-open > .sub-menu { display: block; }
	.vp-primary__menu .sub-menu a { color: #cfcfcf; padding: 12px 36px; }

	.vp-delivery {
		margin: 16px 24px;
		padding: 0;
		white-space: normal;
		color: #fff;
	}

	.vp-delivery__text { display: inline; }

	.vp-mobile-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .5);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s var(--vp-ease), visibility .3s;
		z-index: 9550;
	}

	.vp-header.is-menu-open .vp-mobile-overlay { opacity: 1; visibility: visible; }

	/* Sticky disabled inside drawer mode (nav is fixed already) */
	.vp-header.vp-sticky.is-stuck .vp-nav { position: fixed; animation: none; box-shadow: none; }
}

/* ≤ 600px — top bar + logo refinements */
@media (max-width: 600px) {
	.vp-topbar { font-size: 12px; }
	.vp-topbar__contact { gap: 16px; }
	.vp-topbar__contact li:nth-child(2) span,
	.vp-topbar__social { display: none; }
	.vp-logo__text { font-size: 24px; }
	.vp-logo__mark .vp-icon { width: 28px; height: 28px; }
	.vp-actions { gap: 16px; }
	.vp-action--compare { display: none; }
	.vp-action .vp-icon { width: 22px; height: 22px; }
	.vp-cart__dropdown { width: min(320px, 90vw); }
	.vp-search__input { padding-inline: 16px; }
	.vp-search__cat select { max-width: 120px; padding-inline: 12px 30px; }
	.vp-search__btn { width: 52px; }
}

@media (max-width: 380px) {
	.vp-search__cat { display: none; }
}
