/*
 * Obsidian Research — Global Header + Rocky Sweep v1.0.2
 * Scope:
 * - Global Astra header visual refinement
 * - Rocky launcher safe-area behavior
 * No homepage, shop-card, footer, checkout, loyalty-ledger, or commerce logic.
 */

/* =========================================================
   GLOBAL HEADER — PREMIUM REFINEMENT
   ========================================================= */

:root{
	--obs-header-burgundy-1:#4f0710;
	--obs-header-burgundy-2:#2d0408;
	--obs-header-burgundy-3:#150204;
	--obs-header-red:#e21a2d;
	--obs-header-red-soft:#ff4657;
	--obs-header-line:rgba(255,255,255,.10);
	--obs-rocky-safe-bottom:16px;
}

/*
 * Keep Astra's existing structure and sizing.
 * Only calm the visual treatment.
 */
.site-header,
#masthead,
.ast-primary-header-bar,
.main-header-bar{
	position:relative;
	isolation:isolate;
}

.ast-primary-header-bar,
.main-header-bar{
	background:
		radial-gradient(
			circle at 13% 42%,
			rgba(177,18,40,.13) 0%,
			rgba(177,18,40,.05) 24%,
			transparent 46%
		),
		linear-gradient(
			102deg,
			#4b0710 0%,
			#3b050c 24%,
			#290408 52%,
			#160204 100%
		) !important;
	border-bottom:1px solid rgba(226,26,45,.72) !important;
	box-shadow:0 7px 22px rgba(13,0,3,.18) !important;
}

/*
 * Subtle dark veil tones down decorative molecules/background artwork
 * without deleting the site's existing header identity.
 */
.ast-primary-header-bar::after,
.main-header-bar::after{
	content:"";
	position:absolute;
	z-index:0;
	inset:0;
	pointer-events:none;
	background:
		linear-gradient(
			90deg,
			rgba(0,0,0,.04) 0%,
			rgba(0,0,0,.10) 52%,
			rgba(0,0,0,.18) 100%
		);
}

/* Keep real header content above the veil. */
.ast-primary-header-bar > *,
.main-header-bar > *{
	position:relative;
	z-index:1;
}

/* Logo / identity — cleaner and slightly calmer. */
.site-header .custom-logo-link,
.ast-site-identity,
.site-branding{
	filter:none !important;
}

.site-header .custom-logo-link{
	border:1px solid rgba(255,255,255,.10) !important;
	border-radius:14px !important;
	background:rgba(255,255,255,.025) !important;
	box-shadow:
		0 7px 20px rgba(0,0,0,.16),
		inset 0 1px 0 rgba(255,255,255,.05) !important;
	transition:
		border-color .18s ease,
		background-color .18s ease,
		transform .18s ease !important;
}

.site-header .custom-logo-link:hover{
	transform:translateY(-1px);
	border-color:rgba(255,255,255,.16) !important;
	background:rgba(255,255,255,.04) !important;
}

/* Crisp white navigation, restrained hover state. */
.site-header .main-header-menu > .menu-item > .menu-link,
.site-header .ast-builder-menu-1 .menu-item > .menu-link,
.site-header .ast-header-account-wrap,
.site-header .ast-header-account-wrap a,
.site-header .ast-site-header-cart,
.site-header .ast-site-header-cart a{
	color:rgba(255,255,255,.92) !important;
	-webkit-text-fill-color:currentColor !important;
	text-shadow:none !important;
}

.site-header .main-header-menu > .menu-item > .menu-link{
	font-weight:700 !important;
	transition:
		color .16s ease,
		opacity .16s ease !important;
}

.site-header .main-header-menu > .menu-item > .menu-link:hover,
.site-header .main-header-menu > .current-menu-item > .menu-link,
.site-header .main-header-menu > .current_page_item > .menu-link{
	color:#ffffff !important;
	-webkit-text-fill-color:#ffffff !important;
}

/*
 * Preserve existing active underline behavior while making it cleaner.
 * This targets Astra menu items only and does not change menu layout.
 */
.site-header .main-header-menu > .current-menu-item > .menu-link,
.site-header .main-header-menu > .current_page_item > .menu-link{
	text-decoration-color:var(--obs-header-red-soft) !important;
}

/* Account/cart icons inherit the same clean white treatment. */
.site-header :is(
	.ast-header-account-wrap,
	.ast-site-header-cart,
	.ast-cart-menu-wrap
) svg,
.site-header :is(
	.ast-header-account-wrap,
	.ast-site-header-cart,
	.ast-cart-menu-wrap
) svg *{
	fill:currentColor !important;
	stroke:currentColor;
	color:#ffffff !important;
}

/* Cart total remains legible without becoming another bright accent. */
.site-header .ast-woo-header-cart-info-wrap,
.site-header .ast-cart-menu-wrap .count,
.site-header .ast-site-header-cart .ast-woo-header-cart-info-wrap{
	color:rgba(255,255,255,.92) !important;
	font-weight:700 !important;
}

/* Mobile header: keep existing dimensions/functionality, only calm treatment. */
@media (max-width:921px){
	.ast-primary-header-bar,
	.main-header-bar{
		box-shadow:0 5px 18px rgba(13,0,3,.16) !important;
	}

	.site-header .custom-logo-link{
		border-radius:12px !important;
	}

	.ast-mobile-popup-drawer .ast-mobile-popup-inner{
		background:#0d0e11 !important;
	}

	.ast-mobile-popup-drawer .main-header-menu .menu-link{
		color:#f5f5f6 !important;
	}

	.ast-mobile-popup-drawer .main-header-menu .menu-link:hover,
	.ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link,
	.ast-mobile-popup-drawer .main-header-menu .current_page_item > .menu-link{
		color:#ff4a58 !important;
	}
}

/* =========================================================
   ROCKY — SAFE AREA ABOVE SEASONAL / FIXED BOTTOM BARS
   ========================================================= */

/*
 * JS sets --obs-rocky-safe-bottom to:
 * fixed bottom banner height + breathing room.
 *
 * These selectors intentionally include common Rocky naming patterns.
 */
:is(
	#rocky-launcher,
	#rocky-chat-launcher,
	#rocky-widget-launcher,
	.rocky-launcher,
	.rocky-chat-launcher,
	.rocky-widget-launcher,
	.ask-rocky,
	[data-rocky-launcher],
	[data-rocky]
){
	z-index:2147483000 !important;
}

/*
 * Only elements that are actually positioned by the widget will use this.
 * If Rocky has an inline bottom value, !important safely wins.
 */
:is(
	#rocky-launcher,
	#rocky-chat-launcher,
	#rocky-widget-launcher,
	.rocky-launcher,
	.rocky-chat-launcher,
	.rocky-widget-launcher,
	.ask-rocky,
	[data-rocky-launcher]
){
	bottom:var(--obs-rocky-safe-bottom) !important;
}

/* Keep the open Rocky panel above seasonal bars too. */
:is(
	#rocky-chat,
	#rocky-widget,
	.rocky-chat,
	.rocky-widget,
	[data-rocky-panel]
){
	z-index:2147482999 !important;
}

/*
 * Seasonal/promotional bars stay beneath interactive launchers.
 * This does not reposition or restyle them.
 */
:is(
	[id*="seasonal"][class*="bar"],
	[class*="seasonal"][class*="bar"],
	[id*="holiday"][class*="bar"],
	[class*="holiday"][class*="bar"],
	[id*="thanksgiving"][class*="bar"],
	[class*="thanksgiving"][class*="bar"],
	[id*="promo"][class*="bar"],
	[class*="promo"][class*="bar"]
){
	z-index:9000 !important;
}

/* Mobile gets slightly tighter breathing room. */
@media (max-width:640px){
	:root{
		--obs-rocky-safe-bottom:12px;
	}
}

/* Accessibility: no decorative movement added by this plugin. */
@media (prefers-reduced-motion:reduce){
	.site-header .custom-logo-link,
	.site-header .main-header-menu > .menu-item > .menu-link{
		transition:none !important;
	}
}


/* =========================================================
   v1.0.2 — HEADER CART / ACCOUNT COLOR LOCK
   Prevent global link styles from turning header commerce UI blue.
   ========================================================= */

.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-woo-header-cart-info-wrap,
    .ast-header-account-wrap
),
.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-woo-header-cart-info-wrap,
    .ast-header-account-wrap
) a,
.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-woo-header-cart-info-wrap,
    .ast-header-account-wrap
) span,
.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-woo-header-cart-info-wrap,
    .ast-header-account-wrap
) strong{
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
    text-decoration:none!important;
}

.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-header-account-wrap
) svg,
.site-header :is(
    .ast-site-header-cart,
    .ast-header-woo-cart,
    .ast-cart-menu-wrap,
    .ast-header-account-wrap
) svg *{
    color:#ffffff!important;
    fill:currentColor!important;
    stroke:currentColor!important;
    -webkit-text-fill-color:#ffffff!important;
}

.site-header .ast-site-header-cart:hover,
.site-header .ast-site-header-cart:hover a,
.site-header .ast-header-account-wrap:hover,
.site-header .ast-header-account-wrap:hover a{
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
}
