/* Child-theme ownership is deliberately limited to the three header actions. */
.header-wrapper .bambu-header-actions,
.mobile-header-wrapper .bambu-header-actions {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0 !important;
	overflow: visible !important;
}

.header-wrapper .bambu-header-actions > .et_b_header-search,
.header-wrapper .bambu-header-actions > .et_b_header-cart,
.header-wrapper .bambu-header-actions > .et_b_header-account,
.mobile-header-wrapper .bambu-header-actions > .et_b_header-search,
.mobile-header-wrapper .bambu-header-actions > .et_b_header-cart,
.mobile-header-wrapper .bambu-header-actions > .et_b_header-account {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	display: flex !important;
	flex: 0 0 42px !important;
	width: 42px !important;
	min-width: 42px !important;
	height: 58px !important;
	margin: 0 !important;
	align-items: center !important;
	justify-content: center !important;
	transform: none !important;
	overflow: visible !important;
}

.header-wrapper .bambu-header-actions .et_b_search-icon,
.header-wrapper .bambu-header-actions .et_b_header-cart > a,
.header-wrapper .bambu-header-actions .et_b_header-account > a,
.mobile-header-wrapper .bambu-header-actions .et_b_search-icon,
.mobile-header-wrapper .bambu-header-actions .et_b_header-cart > a,
.mobile-header-wrapper .bambu-header-actions .et_b_header-account > a {
	display: flex !important;
	position: relative;
	width: 42px !important;
	min-width: 42px !important;
	height: 42px !important;
	padding: 0 !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 6px;
	background: transparent;
	transition: background-color .15s ease;
}

.header-wrapper .bambu-header-actions .et_b_search-icon:hover,
.header-wrapper .bambu-header-actions .et_b_header-account > a:hover,
.header-wrapper .bambu-header-actions .et_b_header-account > a:focus-visible,
.mobile-header-wrapper .bambu-header-actions .et_b_search-icon:hover,
.mobile-header-wrapper .bambu-header-actions .et_b_header-account > a:hover,
.mobile-header-wrapper .bambu-header-actions .et_b_header-account > a:focus-visible {
	background: #f3f3f3;
}

.header-wrapper .bambu-header-actions .et_b-icon,
.mobile-header-wrapper .bambu-header-actions .et_b-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 23px !important;
	line-height: 1 !important;
}

.header-wrapper .bambu-header-actions .et_b-icon svg,
.mobile-header-wrapper .bambu-header-actions .et_b-icon svg {
	display: block;
	width: 23px;
	height: 23px;
}

/* XStore's search and mini-cart hover panels remain in the DOM for fragments,
   but cannot display or capture input. */
.header-wrapper .bambu-header-actions .et_b_header-search > .et-mini-content,
.header-wrapper .bambu-header-actions .et_b_header-cart > .et-mini-content,
.mobile-header-wrapper .bambu-header-actions .et_b_header-search > .et-mini-content,
.mobile-header-wrapper .bambu-header-actions .et_b_header-cart > .et-mini-content {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.header-wrapper .bambu-header-actions .et_b_header-cart .et-quantity,
.mobile-header-wrapper .bambu-header-actions .et_b_header-cart .et-quantity {
	position: absolute !important;
	top: -5px !important;
	right: -5px !important;
	z-index: 2;
	display: flex;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #00c853 !important;
	color: #fff !important;
	font-size: 10px !important;
	line-height: 16px !important;
}

.header-wrapper .bambu-header-actions .et_b_header-cart > .et-quantity,
.mobile-header-wrapper .bambu-header-actions .et_b_header-cart > .et-quantity {
	display: none !important;
}

.header-wrapper,
.header-main,
.header-main .et-row-container,
.header-main .et-wrap-columns,
.header-main .et_column,
.mobile-header-wrapper {
	overflow: visible !important;
}

.bambu-account-control > .bambu-account-panel.et-mini-content {
	position: absolute !important;
	z-index: 10020 !important;
	top: calc(100% + 6px) !important;
	right: 0 !important;
	left: auto !important;
	display: block !important;
	box-sizing: border-box;
	width: 310px !important;
	min-width: 0 !important;
	max-width: calc(100vw - 24px) !important;
	padding: 20px 24px !important;
	overflow: visible !important;
	border: 1px solid #e5e5e5 !important;
	border-radius: 8px !important;
	background: #fff !important;
	box-shadow: 0 5px 16px rgba(0, 0, 0, .14) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translateY(-6px) !important;
	transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}

/* Bridge the small visual gap below the account button so hover does not drop. */
.bambu-account-control > .bambu-account-panel.et-mini-content::before {
	position: absolute;
	top: -7px;
	right: 0;
	left: 0;
	height: 7px;
	content: "";
}

.bambu-account-control.bambu-account-open > .bambu-account-panel {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateY(0) !important;
}

@media (hover: hover) and (pointer: fine) {
	.bambu-account-control:hover > .bambu-account-panel {
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		transform: translateY(0) !important;
	}
}

.bambu-account-panel__email {
	margin: 0 0 12px;
	overflow-wrap: anywhere;
	color: #969696;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
}

.bambu-account-panel__center,
.bambu-account-panel__logout,
.bambu-account-panel__guest-link {
	color: #171717 !important;
	text-decoration: none !important;
}

.bambu-account-panel__center {
	display: flex;
	min-height: 38px;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
}

.bambu-account-panel__center-icon {
	display: inline-flex;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
}

.bambu-account-panel__center-icon svg { width: 24px !important; height: 24px !important; }
.bambu-account-panel__divider { height: 1px; margin: 10px 0 9px; background: #dcdcdc; }

.bambu-account-panel__logout {
	display: flex;
	min-height: 28px;
	align-items: center;
	font-size: 14px;
	font-weight: 600;
}

.bambu-account-control > .bambu-account-panel.et-mini-content.bambu-account-panel--guest {
	width: 120px !important;
	padding: 11px 0 !important;
	border-radius: 7px !important;
}

.bambu-account-panel__guest-link {
	display: flex;
	min-height: 38px;
	padding: 8px 24px;
	align-items: center;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 700;
}

/* Keep the linked form clear of the sticky header without changing form layout. */
#bambu-account-login,
#bambu-account-register { scroll-margin-top: 90px; }

.bambu-account-panel a:hover,
.bambu-account-panel a:focus-visible { background: #f5f5f5; outline: none; }

@media (max-width: 1023px) {
	.header-wrapper .bambu-header-actions > .et_b_header-search,
	.header-wrapper .bambu-header-actions > .et_b_header-cart,
	.header-wrapper .bambu-header-actions > .et_b_header-account,
	.mobile-header-wrapper .bambu-header-actions > .et_b_header-search,
	.mobile-header-wrapper .bambu-header-actions > .et_b_header-cart,
	.mobile-header-wrapper .bambu-header-actions > .et_b_header-account {
		flex-basis: 40px !important;
		width: 40px !important;
		min-width: 40px !important;
	}

	.bambu-account-control > .bambu-account-panel.et-mini-content {
		position: fixed !important;
		top: var(--bambu-mobile-header-bottom, 58px) !important;
		right: 12px !important;
		width: min(310px, calc(100vw - 24px)) !important;
	}

}

@media (prefers-reduced-motion: reduce) {
	.bambu-account-control > .bambu-account-panel.et-mini-content { transition: none !important; }
}

