/*
 * Ethnic Senora Storefront Header
 * Every selector is scoped to the plugin body class or the esph-header root.
 */

body.esph-header-plugin-active .site-header {
	background: transparent;
	border: 0 !important;
	border-top: 0 !important;
	box-shadow: none;
	margin: 0;
	min-height: 0;
	overflow: visible !important;
	padding: 0;
	position: static !important;
	z-index: auto !important;
}

body.esph-header-plugin-active .site-header > .col-full {
	width: 100%;
	max-width: none;
	margin: 0;
	overflow: visible !important;
	padding: 0;
}

/*
 * Storefront's parent header can create a stacking context. If it remains
 * above the document root, the cart drawer appears to begin below the header
 * even though the drawer itself has a high z-index. Keep these values scoped
 * to this plugin and above the supplied theme's overlay layer.
 */
body.esph-header-plugin-active .es-global-cart-scrim,
body.esph-header-plugin-active .es-checkout-scrim {
	z-index: 99990 !important;
}

body.esph-header-plugin-active .es-global-cart-drawer,
body.esph-header-plugin-active .es-checkout-panel.is-overlay {
	z-index: 99995 !important;
	top: 0 !important;
}

body.esph-header-plugin-active #es-checkout-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 99990;
}

body.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: auto !important;
	width: min(420px, 92vw) !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	overflow: hidden !important;
}

body.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay > header {
	flex: 0 0 64px !important;
	height: 64px !important;
	min-height: 64px !important;
	padding: 14px 22px 12px !important;
	box-sizing: border-box !important;
}

body.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay > .es-checkout-body {
	padding-top: 22px !important;
}

/*
 * Keep the outgoing cart scrim alive while checkout is being fetched. This
 * prevents a one-frame clear viewport where the header appears to flash above
 * the drawer before checkout's scrim is inserted.
 */
html.esph-checkout-loading body.esph-header-plugin-active .es-global-cart-scrim {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

body.admin-bar.esph-header-plugin-active .es-global-cart-drawer {
	top: 32px !important;
	height: calc(100dvh - 32px) !important;
}

/*
 * The WP admin bar is visible in the supplied screenshot. Give only the
 * checkout panel a little extra breathing room below it so its own header
 * row is never tucked under the toolbar. The cart drawer keeps its existing
 * correct offset.
 */
body.admin-bar.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay {
	top: 46px !important;
	height: calc(100dvh - 46px) !important;
}

@media (max-width: 782px) {
	body.admin-bar.esph-header-plugin-active .es-global-cart-drawer {
		top: 46px !important;
		height: calc(100dvh - 46px) !important;
	}

	body.admin-bar.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay {
		top: 52px !important;
		height: calc(100dvh - 52px) !important;
	}

	body.esph-header-plugin-active #es-checkout-overlay .es-checkout-panel.is-overlay {
		width: 100vw !important;
	}
}

body.esph-header-plugin-active .site-header .esph-header {
	margin: 14px 0 0;
}

.esph-header,
.esph-header * {
	box-sizing: border-box;
}

.esph-header {
	position: sticky;
	top: 0;
	z-index: 70;
	width: 100%;
	overflow: visible;
	background: #fff;
	border-bottom: 1px solid #e8e8e8;
	color: #17151a;
	font-family: "Instrument Sans", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/*
 * The supplied theme's cart and checkout UI is still the owner of these
 * overlays. These transitions only smooth their entrance; they do not change
 * their markup, URLs, fields, payment methods, or WooCommerce handlers.
 */
body.esph-header-plugin-active #es-checkout-overlay {
	opacity: 0;
	transition: opacity 220ms ease;
}

body.esph-header-plugin-active #es-checkout-overlay.esph-checkout-ready {
	opacity: 1;
}

body.esph-header-plugin-active #es-checkout-overlay.esph-checkout-ready .es-checkout-panel.is-overlay {
	animation: esph-checkout-panel-in 280ms cubic-bezier(.2, .8, .2, 1) both;
	will-change: transform, opacity;
}

@keyframes esph-checkout-panel-in {
	from {
		opacity: 0;
		transform: translate3d(18px, 0, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

.esph-header a {
	color: inherit;
	text-decoration: none;
}

.esph-header__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 20px;
	width: min(1380px, 100%);
	margin: 0 auto;
	padding: 15px 30px;
}

.esph-primary-nav,
.esph-primary-menu {
	display: flex;
	align-items: center;
	gap: 26px;
	margin: 0;
	padding: 0;
}

.esph-primary-nav ul {
	display: flex;
	align-items: center;
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.esph-primary-nav li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.esph-primary-nav a,
.esph-tool {
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	transition: opacity 160ms ease;
}

.esph-primary-nav a:hover,
.esph-tool:hover {
	opacity: .66;
}

.esph-brand {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	white-space: nowrap;
	font-family: "Epilogue", Arial, sans-serif;
	font-size: 30px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.06em;
}

.esph-brand em {
	font-family: "Instrument Serif", Georgia, serif;
	font-size: 30px;
	font-style: normal;
	font-weight: 400;
	letter-spacing: -.04em;
}

.esph-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 17px;
	min-width: 0;
}

.esph-tool {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.esph-icon {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

.esph-cart {
	padding: 9px 14px;
	border-radius: 999px;
	background: #111;
	color: #fff !important;
}

.esph-cart b {
	font-size: 11px;
	font-weight: 600;
}

.esph-menu-toggle {
	display: none;
	width: 36px;
	height: 36px;
	padding: 8px;
	border: 0;
	background: transparent;
	color: #17151a;
	cursor: pointer;
}

.esph-menu-toggle span {
	display: block;
	width: 20px;
	height: 1px;
	margin: 4px 0;
	background: currentColor;
	transition: transform 160ms ease, opacity 160ms ease;
}

.esph-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(5px) rotate(45deg);
}

.esph-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.esph-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-5px) rotate(-45deg);
}

.esph-mobile-menu {
	display: grid;
	gap: 15px;
	padding: 18px;
	border-top: 1px solid #e8e8e8;
	background: #fff;
}

.esph-mobile-menu[hidden] {
	display: none;
}

.esph-mobile-menu a {
	font-size: 14px;
}

.esph-mobile-checkout {
	padding-top: 15px;
	border-top: 1px solid #e8e8e8;
}

body.admin-bar .esph-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .esph-header {
		top: 46px;
	}
}

@media (max-width: 760px) {
	body.esph-header-plugin-active .site-header .esph-header {
		margin-top: 10px;
	}

	.esph-header__inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		padding: 14px 17px;
	}

	.esph-menu-toggle {
		display: block;
	}

	.esph-primary-nav {
		display: none;
	}

	.esph-brand {
		justify-self: center;
		font-size: 25px;
	}

	.esph-brand em {
		font-size: 25px;
	}

	.esph-search span,
	.esph-account {
		display: none;
	}

	.esph-tools {
		gap: 10px;
	}

	.esph-cart {
		padding: 8px 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.esph-header *,
	body.esph-header-plugin-active #es-checkout-overlay,
	body.esph-header-plugin-active #es-checkout-overlay.esph-checkout-ready .es-checkout-panel.is-overlay {
		animation: none !important;
		transition: none !important;
	}

	body.esph-header-plugin-active #es-checkout-overlay {
		opacity: 1;
	}
}
