/**
 * Mobile storefront shell — homepage header on shop, category, product (v1.6.163).
 */

/* Design tokens (mirror homepage mobile — scoped so vars resolve on Woo pages) */
.rw-mobile-storefront-chrome {
	--rw-cream: #fdfaf6;
	--rw-mocha: #5c4033;
	--rw-olive: #4a5240;
	--rw-charcoal: #2c2c2c;
	--rw-gold: #c9a96e;
	--rw-sand: #f0ebe3;
	--rw-border: #e8e0d6;
	--rw-muted: #8a7a6a;
	--rw-announce-h: 32px;
	--rw-header-h: 52px;
	width: 100%;
	max-width: 100%;
	margin: 0;
	background: var(--rw-cream);
	color: var(--rw-charcoal);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}

.rw-mobile-storefront-chrome *,
.rw-mobile-storefront-chrome *::before,
.rw-mobile-storefront-chrome *::after {
	box-sizing: border-box;
}

/* Announcement + header — self-contained if homepage-mobile CSS is delayed/stripped */
.rw-mobile-storefront-chrome .rw-mob-announce {
	position: sticky;
	top: 0;
	z-index: 1000;
	height: var(--rw-announce-h);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rw-charcoal);
	color: var(--rw-gold);
	padding: 0 12px;
}

.rw-mobile-storefront-chrome .rw-mob-announce__text {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.35;
	color: var(--rw-gold);
	transition: opacity 0.4s ease;
}

.rw-mobile-storefront-chrome .rw-mob-header {
	position: sticky;
	top: var(--rw-announce-h);
	z-index: 999;
	height: var(--rw-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	background: var(--rw-cream);
	border-bottom: 0.5px solid var(--rw-border);
}

.rw-mobile-storefront-chrome .rw-mob-header__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.rw-mobile-storefront-chrome .rw-mob-header__logo {
	color: var(--rw-gold);
	flex-shrink: 0;
	display: flex;
}

.rw-mobile-storefront-chrome .rw-mob-header__title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--rw-charcoal);
	line-height: 1.1;
}

.rw-mobile-storefront-chrome .rw-mob-header__tagline {
	font-size: 7px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rw-gold);
	margin-top: 2px;
}

.rw-mobile-storefront-chrome .rw-mob-header__actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.rw-mobile-storefront-chrome .rw-mob-header__icon {
	position: relative;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var(--rw-charcoal);
	padding: 0;
	cursor: pointer;
	text-decoration: none;
}

.rw-mobile-storefront-chrome .rw-mobile-menu-btn {
	flex-direction: column;
	gap: 5px;
	padding: 4px;
}

.rw-mobile-storefront-chrome .rw-mobile-menu-btn__bar {
	display: block;
	width: 18px;
	height: 1.5px;
	background: var(--rw-charcoal);
	border-radius: 2px;
}

.rw-mobile-storefront-chrome .rw-mob-header__cart-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 14px;
	height: 14px;
	padding: 0 3px;
	border-radius: 999px;
	background: var(--rw-olive);
	color: #f5f0e8;
	font-size: 8px;
	line-height: 14px;
	text-align: center;
}

@media (max-width: 767px) {
	body.regalwear-mobile-storefront-shell #main-container > #regal-mega-menu-root,
	body.regalwear-mobile-storefront-shell #main-container > #masthead,
	body.regalwear-mobile-storefront-shell #main-container > #header,
	body.regalwear-mobile-storefront-shell #header,
	body.regalwear-mobile-storefront-shell #masthead.site-header-luxury,
	body.regalwear-mobile-storefront-shell .regal-mega-menu-mount,
	body.regalwear-mobile-storefront-shell .regal-mega-menu-header,
	body.regalwear-mobile-storefront-shell #regal-mega-menu-root,
	body.regalwear-mobile-storefront-shell .ct-header,
	body:has(.rw-mobile-storefront-chrome) #main-container > #regal-mega-menu-root,
	body:has(.rw-mobile-storefront-chrome) #main-container > #header,
	body:has(.rw-mobile-storefront-chrome) .regal-mega-menu-header,
	body:has(.rw-mobile-storefront-chrome) #regal-mega-menu-root,
	body:has(.rw-mobile-storefront-chrome) .ct-header {
		display: none !important;
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		visibility: hidden !important;
		border: none !important;
	}

	body.regalwear-mobile-storefront-shell #main-container,
	body.regalwear-mobile-storefront-shell main#main,
	body:has(.rw-mobile-storefront-chrome) #main-container,
	body:has(.rw-mobile-storefront-chrome) main#main {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}

	body.regalwear-mobile-storefront-shell .rw-mobile-storefront-chrome,
	body.regalwear-mobile-storefront-shell .rw-mob-announce,
	body.regalwear-mobile-storefront-shell .rw-mob-header,
	body:has(.rw-mobile-storefront-chrome) .rw-mobile-storefront-chrome {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		box-sizing: border-box;
	}

	/* Breadcrumbs sit directly under mobile chrome */
	body.regalwear-mobile-storefront-shell #main-container > .regal-breadcrumbs-bar,
	body:has(.rw-mobile-storefront-chrome) #main-container > .regal-breadcrumbs-bar {
		margin-top: 0 !important;
		background: #faf8f5;
		border-bottom: 1px solid rgba(75, 54, 33, 0.12);
	}

	body.regalwear-mobile-storefront-shell .regal-breadcrumbs-bar__inner,
	body:has(.rw-mobile-storefront-chrome) .regal-breadcrumbs-bar__inner {
		padding-top: 0.45rem;
		padding-bottom: 0.45rem;
	}

	body.regalwear-mobile-storefront-shell .rw-product-breadcrumb-wrap {
		margin-top: 0;
		border-top: none;
		background: #faf8f5;
	}

	/* Compact Blocksy category hero (type-2) — was ~330px tall on mobile */
	body.regalwear-mobile-storefront-shell.tax-product_cat main#main > .hero-section[data-type="type-2"],
	body:has(.rw-mobile-storefront-chrome).tax-product_cat main#main > .hero-section[data-type="type-2"],
	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"],
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] {
		--hero-min-height: 0px !important;
		--min-height: 0px !important;
		min-height: 0 !important;
		height: auto !important;
		max-height: none !important;
		padding: 10px 16px 12px !important;
		margin: 0 !important;
		display: block !important;
		align-items: unset !important;
		justify-content: unset !important;
		background: #fdfaf6 !important;
		background-image: none !important;
		text-align: center !important;
		overflow: visible !important;
	}

	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .entry-header,
	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .entry-header.ct-container-narrow,
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] .entry-header {
		margin: 0 auto !important;
		padding: 0 !important;
		max-width: 100% !important;
	}

	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .page-title,
	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] h1.page-title,
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] .page-title {
		margin: 0 !important;
		font-size: 1.125rem !important;
		line-height: 1.25 !important;
		letter-spacing: 0.08em !important;
		text-transform: uppercase !important;
		color: #4b3621 !important;
		font-weight: 500 !important;
	}

	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .page-description,
	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .page-description p,
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] .page-description {
		margin: 0.35rem 0 0 !important;
		font-size: 0.75rem !important;
		line-height: 1.45 !important;
		color: #5a5a5a !important;
		max-width: 100% !important;
	}

	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .ct-media-container,
	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] .ct-hero-media,
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] .ct-media-container {
		display: none !important;
		height: 0 !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	body.regalwear-mobile-storefront-shell.tax-product_cat .hero-section[data-type="type-2"] + .ct-container,
	body:has(.rw-mobile-storefront-chrome).tax-product_cat .hero-section[data-type="type-2"] + .ct-container {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}
}

@media (min-width: 768px) {
	body.regalwear-mobile-storefront-shell .rw-mobile-storefront-chrome,
	.rw-mobile-storefront-chrome {
		display: none !important;
	}
}
