/* ============================================================
   Prana Beauty Header
   Fully responsive — nav shrinks between breakpoint and 1400px,
   mega panel is viewport-safe, no horizontal overflow.
   ============================================================ */

.pbh-header {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	/* Safety net: mega panel and translated children can't spawn a scrollbar */
	overflow-x: clip;
}

.pbh-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1400px;
	margin: 0 auto;
	width: 100%;
	gap: 16px;
	min-width: 0; /* let flex children shrink */
	position: relative !important; /* anchor for mega panels — keeps them centered on the header, not on the trigger */
}

/* ── Logo ── */
.pbh-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}

.pbh-logo img {
	display: block;
	height: auto;
	transition: width 0.25s ease;
}

.pbh-logo-text {
	font-size: 20px;
	font-weight: 700;
	color: #1B4332;
}

/* ── Navigation ── */
.pbh-nav {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	min-width: 0;
	flex: 1 1 auto;
	justify-content: center;
}

.pbh-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	/* No position:relative here — mega panel intentionally anchors to .pbh-inner above so it stays centered. */
	/* Fluid spacing: shrinks toward 8px on narrow, grows to the max set in Elementor */
	--pbh-nav-gap-max: 32px;
	margin: 0 clamp(6px, 0.8vw, calc(var(--pbh-nav-gap-max) / 2));
}

.pbh-nav-link {
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.5px;
	transition: color 0.2s ease;
	position: relative; /* anchor for absolutely-positioned floating badges */
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.pbh-nav-link.pbh-active {
	font-weight: 700;
}

.pbh-chevron {
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.pbh-nav-item.pbh-has-mega:hover .pbh-chevron {
	transform: rotate(180deg);
}

/* ── Badge ── */
.pbh-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	line-height: 1.4;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Floating pill badge (like the "New" / "Sale" callouts in the reference).
   Sits above the nav link text; anchored to .pbh-nav-link (position: relative). */
.pbh-badge-non-deyga {
	position: absolute;
	top: -14px;
	right: 0;
	left: auto;
	background: #fff3cd;
	color: #7a4e00;
	border: none;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
	z-index: 2;
	pointer-events: none;
}


/* Download badge: intentionally uses its own class because the original widget
   only gave the floating treatment to the exact badge text “NON-DEYGA”. */
.pbh-badge-download {
	position: absolute;
	top: -14px;
	right: 0;
	left: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #854828 !important;
	color: #FFFFFF !important;
	border: none;
	border-radius: 999px !important;
	padding: 2px 9px !important;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
	z-index: 2;
	pointer-events: none;
}

.pbh-badge-icon {
	display: block;
	width: 11px;
	height: 11px;
	flex: 0 0 11px;
}

/* On mobile drawer / narrow screens the nav-link is a big block row —
   let the badge sit inline next to the label instead of floating. */
@media (max-width: 1023px) {
	.pbh-badge-non-deyga,
	.pbh-badge-download {
		position: static;
		top: auto;
		left: auto;
		right: auto;
	}
}

/* ── Mega Menu ──
   Panel is absolutely positioned inside .pbh-inner (position: relative above),
   which is itself centered on the viewport (max-width: 1400px; margin: 0 auto).
   So `left: 50%` + translateX(-50%) always centers the panel on the viewport,
   regardless of which nav item triggered it.
   `!important` here is defensive against theme/Elementor stylesheets that like
   to slap `left`, `right`, or `width` on generic descendants of a section. */
.pbh-mega-panel {
	position: absolute !important;
	top: 100% !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	z-index: 9999;
	border-top: 3px solid #2D6A4F;
	border-radius: 2px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
	margin: 0 !important;
}

/* Width variants (replaces the broken inline width: 100% from the Angie version) */
.pbh-mega-width-full { width: min(calc(100vw - 40px), 1100px) !important; }
.pbh-mega-width-800  { width: min(calc(100vw - 40px), 800px) !important; }
.pbh-mega-width-600  { width: min(calc(100vw - 40px), 600px) !important; }

.pbh-nav-item.pbh-has-mega:hover > .pbh-mega-panel {
	opacity: 1;
	visibility: visible;
}

.pbh-mega-grid {
	display: grid;
	gap: 24px;
}

.pbh-mega-col {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pbh-mega-heading {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #E8E0D8;
}

.pbh-mega-link {
	display: block;
	text-decoration: none;
	font-size: 13px;
	padding: 6px 0;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.pbh-mega-link:hover {
	padding-left: 6px;
}

.pbh-mega-link.pbh-no-link {
	cursor: default;
}

/* ── Action Icons ── */
.pbh-actions {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.pbh-action-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	text-decoration: none;
	transition: all 0.2s ease;
}

.pbh-action-icon svg {
	transition: stroke 0.2s ease;
}

/* Cart Count */
.pbh-cart {
	position: relative;
}

.pbh-cart-count {
	position: absolute;
	top: -6px;
	right: -8px;
	font-size: 10px;
	font-weight: 700;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ── Hamburger ── */
.pbh-hamburger {
	display: none;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
	padding: 8px;
	margin: 0;
	z-index: 1001;
	color: #4A4A4A;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.pbh-hamburger:hover,
.pbh-hamburger:focus,
.pbh-hamburger:active {
	background-color: transparent;
	box-shadow: none;
	color: #2D6A4F;
}

/* Hamburger line container */
.pbh-hamburger-icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
	width: auto;
	height: auto;
	background: none;
}

/* Individual hamburger lines */
.pbh-hamburger-icon > span {
	display: block;
	width: 20px;
	height: 2px;
	background-color: currentColor;
	border-radius: 2px;
	transition:
		transform 0.3s ease,
		opacity 0.3s ease,
		background-color 0.2s ease;
	pointer-events: none;
}

/* Menu label */
.pbh-hamburger-text {
	display: inline-block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	background: none;
	color: currentColor;
	border-radius: 0;
	font-size: 11px;
	font-weight: 600;
	font-family: inherit;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

/* ── Mobile Drawer ── */
.pbh-mobile-overlay {
	display: none;
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	z-index: 9998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.pbh-mobile-overlay.pbh-visible {
	display: block;
	opacity: 1;
}

.pbh-mobile-nav {
	display: flex;
	position: fixed;
	top: 0;
	width: min(320px, 88vw);
	height: 100%;
	background: #FFFFFF;
	z-index: 9999;
	padding: 60px 24px 24px;
	overflow-y: auto;
	box-sizing: border-box;
	flex-direction: column;
	visibility: hidden;
	pointer-events: none;
	transition:
		right 0.3s ease,
		left 0.3s ease,
		visibility 0.3s ease;
}

.pbh-mobile-nav.pbh-side-right {
	right: -360px;
	left: auto;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.pbh-mobile-nav.pbh-side-right.pbh-open {
	right: 0;
	visibility: visible;
	pointer-events: auto;
}

.pbh-mobile-nav.pbh-side-left {
	left: -360px;
	right: auto;
	box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.pbh-mobile-nav.pbh-side-left.pbh-open {
	left: 0;
	visibility: visible;
	pointer-events: auto;
}

.pbh-mobile-close {
	position: absolute;
	top: 16px;
	background: none;
	border: none;
	cursor: pointer;
	color: #4A4A4A;
	line-height: 1;
	padding: 6px 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.pbh-side-right .pbh-mobile-close { right: 16px; left: auto; }
.pbh-side-left  .pbh-mobile-close { left: 16px;  right: auto; }

/* Mobile items */
.pbh-mobile-item {
	border-bottom: 1px solid #F0EBE5;
}

.pbh-mobile-link-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.pbh-mobile-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 0;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	color: #4A4A4A;
	transition: color 0.2s ease;
	flex: 1;
}

.pbh-mobile-link.pbh-active {
	color: #1B4332;
	font-weight: 700;
}

.pbh-mobile-link:hover {
	color: #2D6A4F;
}

.pbh-mobile-toggle {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4A4A4A;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.pbh-mobile-toggle.pbh-expanded {
	transform: rotate(180deg);
}

.pbh-mobile-toggle svg {
	pointer-events: none;
}

.pbh-mobile-sub {
	display: none;
	padding: 0 0 12px 16px;
}

.pbh-mobile-sub.pbh-sub-open {
	display: block;
}

.pbh-mobile-sub-heading {
	font-size: 13px;
	font-weight: 700;
	color: #1B4332;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 10px;
	margin-bottom: 6px;
	padding-bottom: 4px;
	border-bottom: 1px solid #E8E0D8;
}

.pbh-mobile-sub-link {
	display: block;
	text-decoration: none;
	font-size: 16px;
	color: #4A4A4A;
	padding: 6px 0;
	transition: color 0.2s ease;
}

.pbh-mobile-sub-link:hover {
	color: #2D6A4F;
}

/* ============================================================
   Default responsive breakpoint (1024px).
   Custom breakpoints set in the Elementor widget are output as
   inline <style> in render() with higher specificity via
   .elementor-element-{id}, so they override these rules.
   These defaults ensure the layout also works in the Elementor
   editor and anywhere the inline style isn't processed.
   ============================================================ */

@media (max-width: 1023px) {
	.pbh-nav { display: none !important; }
	.pbh-hamburger { display: flex !important; }

	.pbh-hamburger { order: -1; }
	.pbh-logo      { order: 0; flex: 1; justify-content: center; }
	.pbh-actions   { order: 1; }
}

/*
 * Do not hide the drawer or overlay here. The widget outputs its own
 * custom breakpoint in render(), so a hardcoded 1024px rule would conflict
 * whenever the Elementor breakpoint is set above 1024px.
 */
@media (min-width: 1024px) {
	.pbh-hamburger {
		display: none;
	}
}

/* On very narrow screens, tighten header padding so icons fit */
@media (max-width: 480px) {
	.pbh-header {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}
	.pbh-inner {
		gap: 8px;
	}
}

/* Final hamburger protection against cached/generated Elementor CSS */
.pbh-hamburger > .pbh-hamburger-icon {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px !important;
	width: auto !important;
	height: auto !important;
	background: transparent !important;
}

.pbh-hamburger > .pbh-hamburger-icon > span {
	display: block !important;
	width: 20px !important;
	height: 2px !important;
	min-width: 20px !important;
	background-color: #4a4a4a !important;
	border-radius: 2px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.pbh-hamburger > .pbh-hamburger-text {
	display: inline-block !important;
	width: auto !important;
	min-width: max-content !important;
	height: auto !important;
	background: transparent !important;
	background-color: transparent !important;
	color: #4a4a4a !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	white-space: nowrap !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
}