/**
 * El Sueño Animado — Cabecera Fase 1.3 (logo centrado)
 */

:root {
	--esa-purple: #7470e5;
	--esa-purple-dark: #5a56c4;
	--esa-lavender: #f4f0ff;
	--esa-lavender-mid: #e8e5f8;
	--esa-white: #ffffff;
	--esa-text: #2d2a45;
	--esa-text-muted: #575372;
	--esa-accent: #f0a04b;
	--esa-border: #e6e3f2;
	--esa-shadow: 0 4px 18px rgba(45, 42, 69, 0.07);
	--esa-radius: 12px;
	--esa-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
	--esa-header-h: 78px;
}

/* -------------------------------------------------------------------------- */
/* Alcance                                                                     */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign header {
	font-family: var(--esa-font);
	position: relative;
	z-index: 80;
}

body.esa-header-redesign header .container {
	max-width: 1280px;
}

/* Neutralizar fondo castillo / overlay del Customizer (inline del padre). */
body.esa-header-redesign .main-header.esa-main-header,
body.esa-header-redesign .below-header {
	background-image: none !important;
	background-attachment: scroll !important;
	background-color: var(--esa-white) !important;
}

body.esa-header-redesign .main-header.esa-main-header:before,
body.esa-header-redesign .below-header:before {
	display: none !important;
	background: none !important;
}

/* Below-header vacío: no ocupa espacio. */
body.esa-header-redesign .below-header {
	display: none;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
}

/* -------------------------------------------------------------------------- */
/* 1. Barra superior                                                           */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .top-header {
	background: var(--esa-lavender);
	border-bottom: 1px solid var(--esa-border);
	min-height: 0;
	padding: 0;
}

body.esa-header-redesign .top-header:before {
	display: none;
	background: none;
}

/*
 * Centrado geométrico del mensaje respecto al ancho completo de la barra:
 * columna central auto + laterales 1fr. Las redes ocupan la columna derecha
 * sin desplazar el centro del texto.
 */
body.esa-header-redesign .top-header .top-header-bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 0.75rem;
	min-height: 34px;
	padding: 0.3rem 0;
}

body.esa-header-redesign .top-header .top-header-col1 {
	grid-column: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	float: none;
	width: auto;
	flex: none;
	min-width: 0;
	max-width: min(100%, calc(100vw - 7.5rem));
	text-align: center;
}

body.esa-header-redesign .top-header .top-header-col2 {
	grid-column: 3;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	justify-self: end;
	float: none;
	width: auto;
	flex: none;
	min-width: max-content;
}

body.esa-header-redesign .top-header .content-html {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #7470e5;
	line-height: 1.3;
	white-space: nowrap;
}

body.esa-header-redesign .top-header .content-social,
body.esa-header-redesign .top-header .content-social a {
	color: var(--esa-purple);
}

body.esa-header-redesign .top-header .content-social a:hover {
	color: var(--esa-purple-dark);
}

/* -------------------------------------------------------------------------- */
/* 2. Cabecera principal (una fila, logo centrado)                             */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-main-header {
	position: relative;
	z-index: 70;
	background: var(--esa-white);
	border-bottom: 1px solid var(--esa-border);
	box-shadow: 0 1px 0 rgba(45, 42, 69, 0.03);
}

body.esa-header-redesign.esa-mega-open .esa-main-header {
	z-index: 90;
}

body.esa-header-redesign .esa-main-header-bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	min-height: var(--esa-header-h);
	padding: 0.55rem 0;
}

body.esa-header-redesign .esa-header-left,
body.esa-header-redesign .esa-header-center,
body.esa-header-redesign .esa-header-right {
	display: flex;
	align-items: center;
	min-width: 0;
}

body.esa-header-redesign .esa-header-left {
	justify-content: flex-start;
	gap: 0.5rem;
}

body.esa-header-redesign .esa-header-center {
	justify-content: center;
}

body.esa-header-redesign .esa-header-right {
	justify-content: flex-end;
}

/* Logo centrado respecto al ancho total (columnas 1fr | auto | 1fr). */
body.esa-header-redesign .esa-logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

body.esa-header-redesign .esa-logo .custom-logo,
body.esa-header-redesign .esa-logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 88px;
	max-height: 72px;
	object-fit: contain;
}

body.esa-header-redesign .esa-logo-fallback {
	font-family: var(--esa-font);
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--esa-text);
	text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/* Barra horizontal de categorías (escritorio)                                 */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-cats-bar-wrap {
	position: relative;
	display: block;
	border-top: 1px solid var(--esa-border);
}

body.esa-header-redesign .esa-cats-bar {
	padding: 0;
}

body.esa-header-redesign .esa-cats-bar__list {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: center;
	gap: clamp(0.35rem, 1.2vw, 1.35rem);
	list-style: none;
	margin: 0;
	padding: 0.15rem 0 0.35rem;
}

body.esa-header-redesign .esa-cats-bar__item {
	margin: 0;
	flex: 0 0 auto;
}

body.esa-header-redesign .esa-cats-bar__link {
	display: inline-block;
	padding: 0.7rem 0.2rem;
	font-family: var(--esa-font);
	font-size: clamp(0.78rem, 0.72rem + 0.2vw, 0.9rem);
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--esa-text);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color 0.18s ease, border-color 0.18s ease;
}

body.esa-header-redesign .esa-cats-bar__link:hover,
body.esa-header-redesign .esa-cats-bar__link:focus-visible,
body.esa-header-redesign .esa-cats-bar__item.is-open > .esa-cats-bar__link {
	color: var(--esa-purple);
}

body.esa-header-redesign .esa-cats-bar__item.is-active > .esa-cats-bar__link,
body.esa-header-redesign .esa-cats-bar__link[aria-current="page"] {
	color: var(--esa-purple);
	border-bottom-color: var(--esa-purple);
}

/* -------------------------------------------------------------------------- */
/* Megamenú (escritorio)                                                       */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-mega {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 120;
	width: 100vw;
	margin-left: -50vw;
	padding-top: 0;
}

body.esa-header-redesign .esa-mega[hidden] {
	display: none;
}

body.esa-header-redesign .esa-mega__panel {
	background: var(--esa-white);
	border-bottom: 1px solid var(--esa-border);
	box-shadow: 0 18px 40px rgba(45, 42, 69, 0.1);
	transform-origin: top center;
	animation: esa-mega-in 0.18s ease;
}

body.esa-header-redesign .esa-mega__panel[hidden] {
	display: none;
}

@keyframes esa-mega-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body.esa-header-redesign .esa-mega__inner {
	width: min(100% - 2rem, 1180px);
	margin-inline: auto;
	padding: 1.35rem 0 1.5rem;
}

body.esa-header-redesign .esa-mega__list {
	--esa-mega-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--esa-mega-cols), minmax(0, 1fr));
	gap: 0.15rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.esa-header-redesign .esa-mega__link {
	display: block;
	padding: 0.55rem 0.15rem;
	font-family: var(--esa-font);
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--esa-text);
	text-decoration: none;
	border-radius: 6px;
	transition: color 0.15s ease, background-color 0.15s ease;
}

body.esa-header-redesign .esa-mega__link:hover,
body.esa-header-redesign .esa-mega__link:focus-visible,
body.esa-header-redesign .esa-mega__item.is-active > .esa-mega__link {
	color: var(--esa-purple);
	background: var(--esa-lavender);
	padding-inline: 0.55rem;
}

body.esa-header-redesign .esa-mega__all {
	display: inline-flex;
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--esa-border);
	font-family: var(--esa-font);
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--esa-purple);
	text-decoration: none;
}

body.esa-header-redesign .esa-mega__all:hover,
body.esa-header-redesign .esa-mega__all:focus-visible {
	color: var(--esa-purple-dark);
	text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Menú de categorías (panel móvil / acordeón)                                 */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-cat-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.esa-header-redesign .esa-cat-menu__item {
	margin: 0;
	position: relative;
}

body.esa-header-redesign .esa-cat-menu__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem;
}

body.esa-header-redesign .esa-cat-menu__link {
	flex: 1;
	display: block;
	padding: 0.6rem 1rem;
	font-family: var(--esa-font);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--esa-text);
	text-decoration: none;
}

body.esa-header-redesign .esa-cat-menu__link:hover,
body.esa-header-redesign .esa-cat-menu__item.is-active > .esa-cat-menu__row .esa-cat-menu__link {
	color: var(--esa-purple);
	background: var(--esa-lavender);
}

body.esa-header-redesign .esa-cat-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0 0.35rem 0 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--esa-text-muted);
	cursor: pointer;
}

body.esa-header-redesign .esa-cat-menu__toggle:hover {
	color: var(--esa-purple);
	background: var(--esa-lavender-mid);
}

body.esa-header-redesign .esa-cat-menu__chevron {
	display: block;
	width: 0.4rem;
	height: 0.4rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

body.esa-header-redesign .esa-cat-menu__item.is-open > .esa-cat-menu__row .esa-cat-menu__chevron {
	transform: rotate(45deg);
}

body.esa-header-redesign .esa-cat-menu__sub {
	list-style: none;
	margin: 0;
	padding: 0 0 0.35rem;
	display: none;
	background: #fbfaff;
}

body.esa-header-redesign .esa-cat-menu__item.is-open > .esa-cat-menu__sub {
	display: block;
}

body.esa-header-redesign .esa-cat-menu__sub-link {
	display: block;
	padding: 0.5rem 1rem 0.5rem 1.5rem;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--esa-text);
	text-decoration: none;
}

body.esa-header-redesign .esa-cat-menu__sub-link:hover,
body.esa-header-redesign .esa-cat-menu__sub-item.is-active > .esa-cat-menu__sub-link {
	color: var(--esa-purple);
	background: var(--esa-lavender);
}

/* -------------------------------------------------------------------------- */
/* Iconos / búsqueda / carrito                                                 */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-header-icons {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

body.esa-header-redesign .esa-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--esa-icon-surface, #f3f2f8);
	color: var(--esa-text);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

body.esa-header-redesign .esa-icon-btn:hover,
body.esa-header-redesign .esa-icon-btn[aria-expanded="true"] {
	color: var(--esa-purple);
	background: var(--esa-lavender);
}

body.esa-header-redesign .esa-icon {
	display: block;
}

body.esa-header-redesign .esa-header-icons__account .header-icon {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	float: none;
}

body.esa-header-redesign .esa-header-icons__account a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--esa-icon-surface, #f3f2f8);
	color: var(--esa-text);
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

body.esa-header-redesign .esa-header-icons__account a:hover {
	color: var(--esa-purple);
	background: var(--esa-lavender);
}

body.esa-header-redesign .esa-header-icons__account .th-icon {
	font-size: 1.25rem;
	line-height: 1;
}

/* Carrito cabecera: mismo círculo gris que lupa / favoritos / cuenta. */
body.esa-header-redesign .esa-header-cart .cart-icon,
body.esa-header-redesign .esa-header-cart .taiowc-wrap,
body.esa-header-redesign .esa-header-cart .taiowc-wrap.fxd-right,
body.esa-header-redesign .esa-header-cart .taiowc-wrap.taiowc-slide-right {
	position: static !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	float: none;
	margin: 0;
	transform: none !important;
	background: transparent !important;
	box-shadow: none;
	border: 0;
}

body.esa-header-redesign .esa-header-cart .taiowc-content {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	min-width: 42px;
	min-height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--esa-icon-surface, #f3f2f8) !important;
	color: var(--esa-text);
	box-shadow: none;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

body.esa-header-redesign .esa-header-cart .taiowc-content:hover {
	color: var(--esa-purple);
	background: var(--esa-lavender) !important;
}

body.esa-header-redesign .esa-header-cart .taiowc-content h4,
body.esa-header-redesign .esa-header-cart .taiowc-content .taiowc-total {
	display: none;
}

/* Anula el fondo morado de Open Shop / cart-checkout sobre .taiowc-cart-item. */
body.esa-header-redesign .esa-header-cart .taiowc-cart-item,
body.esa-header-redesign .esa-header-cart .thunk-icon .cart-icon .taiowc-cart-item,
body.esa-header-redesign .thunk-icon .esa-header-cart .taiowc-cart-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none;
}

body.esa-header-redesign .esa-header-cart .taiowc-icon,
body.esa-header-redesign .esa-header-cart .taiowc-icon svg {
	width: 22px;
	height: 22px;
	color: currentColor;
	stroke: currentColor;
	background: transparent !important;
}

/* Contador anclado a .taiowc-content (relative). Anula left/top del plugin. */
body.esa-header-redesign .esa-header-cart .taiowc-cart-count {
	position: absolute;
	top: -5px;
	right: -5px;
	left: auto;
	z-index: 2;
	display: block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	line-height: 0;
	background: transparent !important;
	opacity: 1;
	pointer-events: none;
}

body.esa-header-redesign .esa-header-cart .cart-count-item {
	position: static !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 18px;
	width: auto;
	height: 18px;
	margin: 0;
	padding: 0 4px;
	border: 2px solid var(--esa-white, #fff);
	border-radius: 999px;
	background: #7470e5 !important;
	color: #fff !important;
	box-shadow: none;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Buscador predictivo (inline junto a la lupa)                                */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-header-search {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.2rem;
	z-index: 120;
}

body.esa-header-redesign .esa-header-search__expand {
	position: relative;
	display: flex;
	align-items: center;
	width: 0;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	visibility: hidden;
	transform: translateX(8px);
	transition:
		width 0.24s ease,
		max-width 0.24s ease,
		opacity 0.18s ease,
		transform 0.24s ease;
}

body.esa-header-redesign .esa-header-search.is-open .esa-header-search__expand {
	width: clamp(240px, 22vw, 320px);
	max-width: 340px;
	opacity: 1;
	overflow: visible;
	pointer-events: auto;
	visibility: visible;
	transform: translateX(0);
}

body.esa-header-redesign .esa-header-search__form {
	width: 100%;
	margin: 0;
}

body.esa-header-redesign .esa-header-search__field {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	width: 100%;
	min-height: 40px;
	padding: 0 0.35rem 0 0.9rem;
	background: #fbfaff;
	border: 1px solid var(--esa-border);
	border-radius: 999px;
	transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

body.esa-header-redesign .esa-header-search__field:focus-within {
	border-color: rgba(116, 112, 229, 0.55);
	background: var(--esa-white);
	box-shadow: 0 0 0 2px rgba(116, 112, 229, 0.1);
}

body.esa-header-redesign .esa-header-search__input {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0.55rem 0.2rem;
	border: 0;
	background: transparent;
	font-family: var(--esa-font);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--esa-text);
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
}

body.esa-header-redesign .esa-header-search__input::-webkit-search-decoration,
body.esa-header-redesign .esa-header-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

body.esa-header-redesign .esa-header-search__input::placeholder {
	color: #6a6680;
	font-weight: 450;
}

body.esa-header-redesign .esa-header-search__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--esa-text-muted);
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
}

body.esa-header-redesign .esa-header-search__clear:hover,
body.esa-header-redesign .esa-header-search__clear:focus-visible {
	color: var(--esa-purple);
	background: var(--esa-lavender);
}

body.esa-header-redesign .esa-header-search__clear[hidden] {
	display: none;
}

body.esa-header-redesign .esa-search-toggle__icon--close {
	display: none;
}

body.esa-header-redesign .esa-header-search.is-open .esa-search-toggle__icon--open {
	display: none;
}

body.esa-header-redesign .esa-header-search.is-open .esa-search-toggle__icon--close {
	display: inline-flex;
}

body.esa-header-redesign .esa-header-search.is-open .esa-search-toggle__label-open {
	display: none;
}

body.esa-header-redesign .esa-header-search:not(.is-open) .esa-search-toggle__label-close {
	display: none;
}

/* Desplegable de resultados anclado al campo. */
body.esa-header-redesign .esa-header-search__dropdown {
	position: absolute;
	top: calc(100% + 0.45rem);
	right: 0;
	left: auto;
	z-index: 130;
	width: max(100%, 300px);
	max-width: min(360px, calc(100vw - 1.5rem));
	padding: 0.35rem;
	background: var(--esa-white);
	border: 1px solid var(--esa-border);
	border-radius: 14px;
	box-shadow: 0 10px 28px rgba(45, 42, 69, 0.1);
}

body.esa-header-redesign .esa-header-search__dropdown[hidden] {
	display: none;
}

body.esa-header-redesign .esa-header-search__results {
	max-height: min(58vh, 360px);
	overflow: auto;
}

body.esa-header-redesign .esa-header-search__results:empty {
	display: none;
}

body.esa-header-redesign .esa-search-hit {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.55rem 0.5rem;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease;
}

body.esa-header-redesign .esa-search-hit:hover,
body.esa-header-redesign .esa-search-hit:focus-visible,
body.esa-header-redesign .esa-search-hit.is-active {
	background: var(--esa-lavender);
	outline: none;
}

body.esa-header-redesign .esa-search-hit__img {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--esa-lavender-mid);
}

body.esa-header-redesign .esa-search-hit__body {
	flex: 1;
	min-width: 0;
}

body.esa-header-redesign .esa-search-hit__name {
	display: block;
	margin: 0 0 0.15rem;
	font-family: var(--esa-font);
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--esa-text);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.esa-header-redesign .esa-search-hit__price {
	display: block;
	font-family: var(--esa-font);
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--esa-purple);
	line-height: 1.3;
}

body.esa-header-redesign .esa-search-hit__price del {
	color: var(--esa-text-muted);
	font-weight: 450;
	margin-right: 0.3rem;
}

body.esa-header-redesign .esa-search-hit__price ins {
	text-decoration: none;
}

body.esa-header-redesign .esa-search-all {
	display: block;
	margin: 0.15rem 0 0;
	padding: 0.7rem 0.5rem 0.45rem;
	border-top: 1px solid var(--esa-border);
	font-family: var(--esa-font);
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--esa-purple);
	text-decoration: none;
}

body.esa-header-redesign .esa-search-all:hover,
body.esa-header-redesign .esa-search-all:focus-visible {
	color: var(--esa-purple-dark);
	text-decoration: underline;
}

body.esa-header-redesign .esa-header-search__status {
	padding: 0.55rem 0.5rem 0.45rem;
	font-family: var(--esa-font);
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--esa-text-muted);
}

body.esa-header-redesign .esa-header-search__status:empty {
	display: none;
	padding: 0;
}

body.esa-header-redesign.esa-search-open .esa-main-header {
	z-index: 95;
}

/* -------------------------------------------------------------------------- */
/* Barra inferior Open Shop Pro (#openshop-mobile-bar)                         */
/* Navegación morada fija (inicio / favoritos / menú / cuenta). Redundante     */
/* con la cabecera ESA. Se oculta por completo; no afecta a TAIOWC.             */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign #openshop-mobile-bar,
body.esa-header-redesign #openshop-mobile-bar.active,
body.esa-header-redesign #openshop-mobile-bar.hiding {
	display: none;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	height: 0;
	min-height: 0;
	overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/* Hamburguesa / panel móvil                                                   */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-mobile-menu-toggle {
	display: none;
	margin: 0;
	padding: 0;
	width: auto;
	max-width: none;
	float: none;
	text-align: left;
}

body.esa-header-redesign .esa-mobile-menu-toggle .menu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--esa-border);
	border-radius: 10px;
	background: var(--esa-white);
	cursor: pointer;
	padding: 0;
}

body.esa-header-redesign .esa-mobile-menu-toggle .icon-bar {
	display: block;
	width: 18px;
	height: 2px;
	margin: 3px auto;
	background: var(--esa-purple);
	border-radius: 2px;
}

body.esa-header-redesign .esa-main-header .sider.main {
	z-index: 20;
}

body.esa-header-redesign .esa-mobile-panel {
	padding-top: 0.5rem;
}

body.esa-header-redesign .esa-mobile-panel__title {
	margin: 0 0 1rem;
	padding-right: 2.5rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--esa-text);
}

body.esa-header-redesign .esa-mobile-panel__label {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--esa-text-muted);
}

body.esa-header-redesign .esa-mobile-panel__links {
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 1rem 0 0;
	border-top: 1px solid var(--esa-border);
}

body.esa-header-redesign .esa-mobile-panel__links a {
	display: block;
	padding: 0.7rem 0.15rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--esa-text);
	text-decoration: none;
}

body.esa-header-redesign .esa-mobile-panel__links a:hover {
	color: var(--esa-purple);
}

body.esa-header-redesign .esa-desktop-only {
	display: contents;
}

/* Escritorio: sider oculto (no off-canvas). */
@media screen and (min-width: 1025px) {
	body.esa-header-redesign .esa-main-header .sider.main {
		display: none;
	}
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                      */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 1024px) {
	body.esa-header-redesign .esa-mobile-menu-toggle {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		width: auto;
		flex: 0 0 auto;
		align-self: center;
	}

	/* Barra + megamenú solo en escritorio; en tablet/móvil → hamburguesa. */
	body.esa-header-redesign .esa-cats-bar-wrap {
		display: none;
	}

	body.esa-header-redesign .esa-desktop-only {
		display: none;
	}

	body.esa-header-redesign .esa-main-header-bar {
		min-height: 68px;
		padding: 0.45rem 0;
	}

	body.esa-header-redesign .esa-logo .custom-logo,
	body.esa-header-redesign .esa-logo img {
		max-width: 72px;
		max-height: 58px;
	}

	/*
	 * Capas móvil (coherentes con filtros/TAIOWC):
	 * contenido < overlay menú (1001 padre) < header+panel (1100) < filtros (1200+)
	 * El header crea stacking context (z:100); sin subirlo el overlay tapa el panel.
	 */
	/* Especificidad alta: shop.css también fija header a 100 en catálogo. */
	body.esa-header-redesign.mobile-menu-active header,
	body.esa-shop-redesign.esa-header-redesign.mobile-menu-active header,
	body.esa-product-redesign.esa-header-redesign.mobile-menu-active header,
	body.esa-cart-redesign.esa-header-redesign.mobile-menu-active header,
	body.esa-account-redesign.esa-header-redesign.mobile-menu-active header {
		z-index: 1100;
	}

	body.esa-header-redesign .open-shop-mobile-menu-wrapper {
		z-index: 1050;
		background: rgba(42, 39, 64, 0.4);
	}

	/* Evitar que el overlay invisible intercepte clics con el menú cerrado. */
	body.esa-header-redesign:not(.mobile-menu-active):not(.sticky-mobile-menu-active) .open-shop-mobile-menu-wrapper {
		pointer-events: none;
	}

	body.esa-header-redesign.mobile-menu-active {
		overflow: hidden;
	}

	body.esa-header-redesign .esa-main-header .sider.main {
		position: fixed;
		top: 0;
		left: -100%;
		width: min(300px, 86vw);
		max-width: 100%;
		height: 100vh;
		height: 100dvh;
		padding: 1.25rem 1.15rem 1.75rem;
		background: var(--esa-white);
		box-shadow: 4px 0 24px rgba(45, 42, 69, 0.12);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 20;
		transition: left 0.28s ease;
	}

	body.esa-header-redesign.mobile-menu-active .esa-main-header .sider.main,
	body.esa-header-redesign.mobile-menu-active .esa-main-header .sider.main.left {
		left: 0;
	}

	/* Compatibilidad barra admin WP (móvil ~46px, escritorio angosto ~32px). */
	body.admin-bar.esa-header-redesign .esa-main-header .sider.main {
		top: 46px;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	@media screen and (min-width: 783px) {
		body.admin-bar.esa-header-redesign .esa-main-header .sider.main {
			top: 32px;
			height: calc(100vh - 32px);
			height: calc(100dvh - 32px);
		}
	}

	/* Botón cierre visible sobre fondo blanco. */
	body.esa-header-redesign #esa-mobile-sider .menu-close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		top: 0.85rem;
		right: 0.85rem;
		left: auto;
		background: var(--esa-lavender);
		border-radius: 50%;
		z-index: 2;
	}

	body.esa-header-redesign #esa-mobile-sider .menu-close-btn {
		position: relative;
		margin: 0;
		width: 16px;
		min-width: 16px;
		min-height: 16px;
		color: var(--esa-text);
		font-size: 16px;
	}

	body.esa-header-redesign #esa-mobile-sider .menu-close-btn:before,
	body.esa-header-redesign #esa-mobile-sider .menu-close-btn:after {
		border-top-color: var(--esa-text);
	}

	/* En móvil el listado del panel usa acordeón vertical. */
	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__row {
		border-bottom: 1px solid var(--esa-border);
	}

	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__link {
		padding: 0.85rem 0.35rem 0.85rem 0.15rem;
		font-size: 0.98rem;
	}

	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__sub {
		padding: 0.15rem 0 0.35rem 0.65rem;
		background: transparent;
	}

	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__sub-link {
		padding: 0.55rem 0.35rem;
	}

	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__chevron {
		transform: rotate(45deg);
	}

	body.esa-header-redesign .esa-mobile-panel .esa-cat-menu__item.is-open > .esa-cat-menu__row .esa-cat-menu__chevron {
		transform: rotate(225deg);
	}
}

/* -------------------------------------------------------------------------- */
/* Móvil                                                                       */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 1024px) {
	/* Capa compacta sobre la fila de iconos; no empuja logo ni banner. */
	body.esa-header-redesign .esa-header-search.is-open .esa-header-search__expand {
		position: absolute;
		right: calc(100% + 0.15rem);
		top: 50%;
		transform: translateY(-50%);
		width: min(280px, calc(100vw - 7.5rem));
		max-width: min(300px, calc(100vw - 7.5rem));
	}

	body.esa-header-redesign .esa-header-search__dropdown {
		width: min(300px, calc(100vw - 1.5rem));
		right: 0;
	}
}

@media screen and (max-width: 767px) {
	body.esa-header-redesign .esa-header-search.is-open .esa-header-search__expand {
		width: min(220px, calc(100vw - 6.75rem));
		max-width: min(240px, calc(100vw - 6.75rem));
	}

	body.esa-header-redesign .esa-header-search__dropdown {
		width: min(280px, calc(100vw - 1.25rem));
		right: -42px;
	}

	body.esa-header-redesign .esa-search-hit__img {
		width: 40px;
		height: 40px;
		flex-basis: 40px;
	}

	body.esa-header-redesign {
		overflow-x: hidden;
	}

	body.esa-header-redesign .top-header .top-header-bar {
		grid-template-columns: 1fr auto 1fr;
		column-gap: 0.4rem;
		padding: 0.35rem 0;
		min-height: 32px;
	}

	body.esa-header-redesign .top-header .top-header-col1 {
		max-width: min(100%, calc(100vw - 5.5rem));
	}

	body.esa-header-redesign .top-header .content-html {
		font-size: 0.78rem;
		font-weight: 600;
		white-space: normal;
		line-height: 1.25;
	}

	body.esa-header-redesign .esa-main-header-bar {
		grid-template-columns: 1fr auto 1fr;
		min-height: 60px;
		gap: 0.5rem;
	}

	/* El padre oculta a veces col3; nuestras zonas no usan esas clases. */
	body.esa-header-redesign .esa-logo .custom-logo,
	body.esa-header-redesign .esa-logo img {
		max-width: 64px;
		max-height: 52px;
	}

	body.esa-header-redesign .esa-icon-btn,
	body.esa-header-redesign .esa-header-cart .taiowc-content {
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
	}
}

/* -------------------------------------------------------------------------- */
/* Accesibilidad                                                               */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .esa-main-header a:focus-visible,
body.esa-header-redesign .esa-main-header button:focus-visible,
body.esa-header-redesign .top-header a:focus-visible {
	outline: 2px solid var(--esa-purple);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Loaders existentes (Open Shop / WC blockUI / TAIOWC / búsqueda ESA)         */
/* Solo estética: no sustituye sistemas de carga ni AJAX.                      */
/* -------------------------------------------------------------------------- */

@keyframes esa-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Preloader de página Open Shop Pro */
.open_shop_overlayloader {
	background-color: rgba(255, 255, 255, 0.72) !important;
}

.open-shop-pre-loader img {
	opacity: 0.85;
	max-width: 48px;
	max-height: 48px;
}

/* Spinner genérico del padre (.loader) → violeta discreto */
.loader,
.woocommerce .loader,
.inifiniteLoader .loader,
.opn-shop-pagination-infinite .inifiniteLoader .loader {
	width: 22px !important;
	height: 22px !important;
	border-width: 2px !important;
	border-style: solid !important;
	border-color: rgba(116, 112, 229, 0.22) !important;
	border-top-color: #7470e5 !important;
	border-right-color: #7470e5 !important;
	border-bottom-color: #7470e5 !important;
	border-left-color: transparent !important;
	border-radius: 50% !important;
	animation: esa-spin 0.7s linear infinite !important;
	-webkit-animation: esa-spin 0.7s linear infinite !important;
}

/* WooCommerce blockUI (añadir al carrito / actualizar carrito) */
.blockUI.blockOverlay {
	background: rgba(255, 255, 255, 0.55) !important;
	opacity: 1 !important;
}

.blockUI.blockMsg,
.woocommerce .blockUI.blockMsg {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: transparent !important;
	padding: 0 !important;
	width: 28px !important;
	height: 28px !important;
	left: 50% !important;
	margin-left: -14px !important;
	top: 50% !important;
	margin-top: -14px !important;
}

.blockUI.blockMsg::before,
.woocommerce .blockUI.blockMsg::before {
	content: "";
	display: block;
	width: 22px;
	height: 22px;
	border: 2px solid rgba(116, 112, 229, 0.22);
	border-top-color: #7470e5;
	border-radius: 50%;
	animation: esa-spin 0.7s linear infinite;
}

/* TAIOWC: spinner de botón ya existe; unificar color corporativo */
.taiowc-btn-loader {
	width: 14px;
	height: 14px;
	border-width: 2px;
	border-color: rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
}

.taiowc-page-loader {
	background: rgba(255, 255, 255, 0.45) !important;
}

/* Búsqueda predictiva ESA: indicador discreto junto al texto de estado */
body.esa-header-redesign .esa-header-search__status.is-loading {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--esa-text-muted);
}

body.esa-header-redesign .esa-header-search__status.is-loading::before {
	content: "";
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(116, 112, 229, 0.25);
	border-top-color: #7470e5;
	border-radius: 50%;
	animation: esa-spin 0.65s linear infinite;
}

/* -------------------------------------------------------------------------- */
/* Hamburguesa móvil: leve desplazamiento a la izquierda (360–430 px)          */
/* Logo centrado (grid 1fr | auto | 1fr) se mantiene.                          */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 430px) {
	body.esa-header-redesign .esa-main-header > .container {
		padding-left: 0.55rem;
		padding-right: 0.75rem;
	}

	body.esa-header-redesign .esa-header-left {
		justify-content: flex-start;
		margin-left: 0;
	}

	/* El .menu-toggle del padre ocupaba todo el 1fr y empujaba el botón al centro. */
	body.esa-header-redesign .esa-mobile-menu-toggle {
		width: auto !important;
		margin: 0;
		text-align: left;
	}

	body.esa-header-redesign .esa-mobile-menu-toggle .menu-btn {
		width: 40px;
		height: 40px;
		float: none;
		margin: 0;
	}
}

/* -------------------------------------------------------------------------- */
/* GDPR Cookie Compliance — botón flotante (solo presentación)                 */
/* Evita solape con ATC / carrito flotante / filtros en móvil.                 */
/* No altera consentimiento ni lógica del plugin.                              */
/* -------------------------------------------------------------------------- */

#moove_gdpr_save_popup_settings_button {
	z-index: 45 !important;
}

@media screen and (max-width: 767px) {
	#moove_gdpr_save_popup_settings_button {
		bottom: 5.25rem !important;
		left: 0.75rem !important;
		width: 36px !important;
		height: 36px !important;
		z-index: 35 !important;
	}

	/* Bajo paneles ESA abiertos para no tapar menú/filtros. */
	body.mobile-menu-active #moove_gdpr_save_popup_settings_button,
	body.esa-shop-filters-open #moove_gdpr_save_popup_settings_button,
	body.esa-search-open #moove_gdpr_save_popup_settings_button {
		visibility: hidden;
		pointer-events: none;
	}
}

/* -------------------------------------------------------------------------- */
/* Avisos WC: CTA con acento de marca (no errores)                             */
/* Open Shop default open_shop_theme_clr = #ff0052 → «Ver carrito» rosa/rojo.  */
/* -------------------------------------------------------------------------- */

body.esa-header-redesign .woocommerce .woocommerce-message .button,
body.esa-header-redesign .woocommerce .woocommerce-info .button,
body.esa-header-redesign .woocommerce-message a.button,
body.esa-header-redesign .woocommerce-info a.button {
	color: var(--esa-purple);
	border-color: var(--esa-purple);
	background-color: transparent;
}

body.esa-header-redesign .woocommerce .woocommerce-message .button:hover,
body.esa-header-redesign .woocommerce .woocommerce-info .button:hover,
body.esa-header-redesign .woocommerce-message a.button:hover,
body.esa-header-redesign .woocommerce-info a.button:hover,
body.esa-header-redesign .woocommerce .woocommerce-message .button:focus-visible,
body.esa-header-redesign .woocommerce .woocommerce-info .button:focus-visible {
	color: #fff;
	background-color: var(--esa-purple);
	border-color: var(--esa-purple);
}

/* -------------------------------------------------------------------------- */
/* prefers-reduced-motion (cabecera / loaders globales)                        */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	body.esa-header-redesign *,
	body.esa-header-redesign *::before,
	body.esa-header-redesign *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.esa-search-status.is-loading::after,
	.loader,
	.taiowc-btn-loader,
	.taiowc-page-loader,
	.blockUI.blockOverlay::before {
		animation: none !important;
	}
}
