/*
 * 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 {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.esph-primary-nav .menu-item-has-children > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.esph-primary-nav .menu-item-has-children > a::after {
	width: 6px;
	height: 6px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	content: "";
	transform: translateY(-2px) rotate(45deg);
	transition: transform 180ms ease;
}

.esph-primary-nav .sub-menu {
	position: absolute;
	top: calc(100% + 14px);
	left: -18px;
	z-index: 80;
	display: grid;
	min-width: 210px;
	gap: 0;
	padding: 9px;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(17, 17, 17, .12);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-6px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
	visibility: hidden;
}

.esph-primary-nav .sub-menu::before {
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: 15px;
	content: "";
}

.esph-primary-nav .sub-menu .sub-menu {
	top: -10px;
	left: calc(100% + 9px);
}

.esph-primary-nav .sub-menu a {
	display: block;
	padding: 10px 12px;
	white-space: nowrap;
}

.esph-primary-nav li:hover > .sub-menu,
.esph-primary-nav li:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
}

.esph-primary-nav li:hover > a::after,
.esph-primary-nav li:focus-within > a::after {
	transform: translateY(1px) rotate(225deg);
}

.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-brand__logo {
	display: block;
	width: auto;
	max-width: 220px;
	height: auto;
	max-height: 44px;
	object-fit: contain;
}

.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,
.esph-mobile-scrim,
.esph-bottom-nav {
	display: none;
}

.esph-mobile-menu .esph-mobile-primary-menu {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.esph-mobile-menu .esph-mobile-primary-menu li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.esph-mobile-menu .esph-mobile-primary-menu a {
	display: block;
	padding: 15px 44px 15px 2px;
	border-bottom: 1px solid #eeeeee;
	font-size: 15px;
	line-height: 1.3;
}

.esph-mobile-menu .sub-menu {
	display: grid;
	max-height: 0;
	margin: 0;
	padding: 0 0 0 16px;
	overflow: hidden;
	list-style: none;
	opacity: 0;
	transition: max-height 300ms cubic-bezier(.2, .8, .2, 1), opacity 200ms ease;
}

.esph-mobile-menu .is-submenu-open > .sub-menu {
	max-height: 800px;
	opacity: 1;
}

.esph-submenu-toggle {
	position: absolute;
	top: 6px;
	right: 0;
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: #17151a;
	cursor: pointer;
}

.esph-submenu-toggle svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	transition: transform 200ms ease;
}

.esph-submenu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

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

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

@media (max-width: 760px) {
	html.esph-menu-open,
	html.esph-menu-open body {
		overflow: hidden;
	}

	body.esph-header-plugin-active {
		padding-bottom: 0;
	}

	body.esph-header-plugin-active .storefront-handheld-footer-bar,
	body.esph-header-plugin-active #es-universal-mobile-nav {
		display: none !important;
	}

	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-brand__logo {
		max-width: 170px;
		max-height: 36px;
	}

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

	.esph-tools {
		gap: 10px;
	}

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

	.esph-mobile-scrim {
		position: fixed;
		inset: 0;
		z-index: 99978;
		display: block;
		background: rgba(17, 17, 17, .42);
		opacity: 0;
		pointer-events: none;
		transition: opacity 260ms ease;
	}

	.esph-mobile-menu {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 99979;
		display: block;
		width: min(390px, 88vw);
		padding: 0 20px 32px;
		overflow-y: auto;
		background: #fff;
		box-shadow: 18px 0 50px rgba(17, 17, 17, .15);
		transform: translate3d(-102%, 0, 0);
		transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
	}

	body.admin-bar .esph-mobile-menu {
		top: 46px;
	}

	.esph-header.is-menu-open .esph-mobile-scrim {
		opacity: 1;
		pointer-events: auto;
	}

	.esph-header.is-menu-open .esph-mobile-menu {
		transform: translate3d(0, 0, 0);
	}

	.esph-mobile-menu__head {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 16px;
		min-height: 64px;
		border-bottom: 1px solid #e8e8e8;
	}

	.esph-mobile-menu__head .esph-brand {
		justify-self: start;
	}

	.esph-mobile-close {
		display: grid;
		width: 40px;
		height: 40px;
		place-items: center;
		padding: 0;
		border: 0;
		background: transparent;
		color: #17151a;
		cursor: pointer;
	}

	.esph-mobile-close svg {
		width: 22px;
		height: 22px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.35;
	}

	.esph-bottom-nav {
		position: fixed;
		bottom: max(12px, env(safe-area-inset-bottom));
		left: 50%;
		z-index: 99970;
		display: grid;
		grid-template-columns: repeat(4, auto);
		max-width: calc(100vw - 24px);
		padding: 4px;
		border: 1px solid rgba(17, 17, 17, .08);
		border-radius: 999px;
		background: rgba(255, 255, 255, .96);
		box-shadow: 0 10px 30px rgba(17, 17, 17, .16), 0 2px 8px rgba(17, 17, 17, .08);
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
		transform: translateX(-50%);
	}

	.esph-bottom-nav a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 36px;
		padding: 0 15px;
		border-radius: 999px;
		color: #111;
		font: 500 12px/1 "Instrument Sans", Arial, sans-serif;
		text-decoration: none;
		white-space: nowrap;
		transition: background 180ms ease, color 180ms ease, transform 180ms ease;
	}

	.esph-bottom-nav a:active {
		transform: scale(.96);
	}

	.esph-bottom-nav a[aria-current="page"] {
		background: #111;
		color: #fff;
	}
}

@media (max-width: 390px) {
	.esph-bottom-nav a {
		padding: 0 10px;
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.esph-header *,
	.esph-mobile-scrim,
	.esph-mobile-menu,
	.esph-bottom-nav *,
	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;
	}
}


/* Ethnic Senora v1.2 — warm ivory and signature maroon */
.esph-header{
  --esph-ivory:#fff9ed;
  --esph-surface:#fffdf8;
  --esph-maroon:#7d2638;
  --esph-maroon-deep:#571827;
  --esph-ink:#2c2022;
  --esph-line:#eadfd8;
  background:var(--esph-ivory);
  border-bottom-color:var(--esph-line);
  color:var(--esph-ink);
}
.esph-brand{color:var(--esph-maroon)!important}
.esph-brand em{color:var(--esph-maroon-deep)}
.esph-primary-nav a:hover,
.esph-tool:hover{color:var(--esph-maroon);opacity:1}
.esph-primary-nav .current-menu-item>a,
.esph-primary-nav .current_page_item>a{color:var(--esph-maroon);font-weight:600}
.esph-primary-nav .sub-menu{background:var(--esph-surface);border-color:var(--esph-line);box-shadow:0 18px 48px rgba(87,24,39,.14)}
.esph-primary-nav .sub-menu a:hover{background:#f8eee7;color:var(--esph-maroon)}
.esph-cart{background:var(--esph-maroon);color:var(--esph-ivory)!important}
.esph-cart:hover{background:var(--esph-maroon-deep);color:var(--esph-ivory)!important}
.esph-cart b{display:grid;min-width:17px;height:17px;place-items:center;border-radius:999px;background:var(--esph-ivory);color:var(--esph-maroon);padding:0 4px}
.esph-menu-toggle,
.esph-submenu-toggle,
.esph-mobile-close{color:var(--esph-maroon)}
.esph-mobile-menu{background:var(--esph-ivory);box-shadow:18px 0 50px rgba(87,24,39,.18)}
.esph-mobile-menu__head,
.esph-mobile-menu .esph-mobile-primary-menu a{border-bottom-color:var(--esph-line)}
.esph-mobile-menu .esph-mobile-primary-menu a:hover{color:var(--esph-maroon)}
@media(max-width:760px){
  .esph-bottom-nav{
    --esph-ivory:#fff9ed;
    --esph-maroon:#7d2638;
    --esph-maroon-deep:#571827;
    border-color:rgba(125,38,56,.22);
    background:#fff;
    box-shadow:none;
  }
  .esph-bottom-nav a{
    color:var(--esph-maroon);
    transition:background-color 220ms ease,color 220ms ease;
  }
  .esph-bottom-nav a.is-active,
  .esph-bottom-nav a[aria-current="page"]{
    background:var(--esph-maroon-deep)!important;
    color:var(--esph-ivory)!important;
    box-shadow:none!important;
    border-color:var(--esph-maroon-deep)!important;
  }
}
