/**
 * El Sueño Animado — Ficha individual de producto
 * Solo aplica con body.esa-product-redesign
 */

body.esa-product-redesign {
	--esa-p-purple: #7470e5;
	--esa-p-purple-dark: #5a56c4;
	--esa-p-lavender: #f4f0ff;
	--esa-p-lavender-mid: #e8e5f8;
	--esa-p-white: #ffffff;
	--esa-p-text: #2d2a45;
	--esa-p-muted: #575372;
	--esa-p-border: #e6e3f2;
	--esa-p-accent: #f0a04b;
	--esa-p-radius: 12px;
	--esa-p-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
	--esa-p-max: 1520px;
	background: var(--esa-p-white) !important;
}

body.esa-product-redesign #page,
body.esa-product-redesign .main-area,
body.esa-product-redesign .content-wrap,
body.esa-product-redesign .page-content {
	background: var(--esa-p-white) !important;
}

body.esa-product-redesign.esa-header-redesign header {
	z-index: 100;
}

/* -------------------------------------------------------------------------- */
/* Contenedor amplio                                                           */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .esa-product-page {
	position: relative;
	z-index: 1;
	padding: 0 0 3.5rem;
	font-family: var(--esa-p-font);
	color: var(--esa-p-text);
	background: var(--esa-p-white);
}

body.esa-product-redesign .esa-product-page .content-wrap > .container,
body.esa-product-redesign .page-content.esa-product-page .container {
	max-width: var(--esa-p-max) !important;
	width: 100%;
	padding-left: clamp(1rem, 2.5vw, 2rem);
	padding-right: clamp(1rem, 2.5vw, 2rem);
	margin-left: auto;
	margin-right: auto;
}

body.esa-product-redesign .esa-product-main,
body.esa-product-redesign .esa-product-main .primary-content-wrap {
	width: 100%;
	max-width: none;
	float: none;
	margin: 0;
	padding: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
}

body.esa-product-redesign .esa-product-page .page-head,
body.esa-product-redesign .esa-product-page .ast-container,
body.esa-product-redesign #secondary,
body.esa-product-redesign .sidebar-main,
body.esa-product-redesign aside#sidebar-primary {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Breadcrumbs                                                                 */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .esa-product-crumbs {
	margin: 0.75rem 0 1.25rem;
}

body.esa-product-redesign .esa-product-crumbs__list,
body.esa-product-redesign .esa-product-crumbs .woocommerce-breadcrumb {
	margin: 0;
	padding: 0;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--esa-p-muted);
	line-height: 1.4;
}

body.esa-product-redesign .esa-product-crumbs a {
	color: var(--esa-p-muted);
	text-decoration: none;
}

body.esa-product-redesign .esa-product-crumbs a:hover,
body.esa-product-redesign .esa-product-crumbs a:focus-visible {
	color: var(--esa-p-purple-dark);
	outline: none;
}

body.esa-product-redesign .esa-product-crumbs__sep {
	margin: 0 0.35rem;
	opacity: 0.55;
}

/* -------------------------------------------------------------------------- */
/* Layout principal: galería + summary                                         */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .thunk-single-product-summary-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	align-items: start;
	float: none !important;
	width: 100% !important;
	max-width: none;
	margin: 0 0 2.5rem;
	padding: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
	position: relative;
}

body.esa-product-redesign .thunk-single-product-summary-wrap::before,
body.esa-product-redesign .thunk-single-product-summary-wrap::after {
	display: none !important;
	content: none !important;
}

body.esa-product-redesign div.product {
	position: relative;
}

body.esa-product-redesign div.product div.images,
body.esa-product-redesign div.product .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	margin: 0;
}

body.esa-product-redesign div.product div.summary {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	float: none !important;
	width: 100% !important;
	margin: 0;
	padding: 0.15rem 0 0;
	clear: none;
	gap: 0;
}

/* Evitar que floats del padre (form.cart, wishlist…) rompan el apilado */
body.esa-product-redesign div.product div.summary > * {
	float: none !important;
	clear: none;
	max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Galería (nativa WC + FlexSlider)                                            */
/* No forzar width/overflow en el wrapper: FlexSlider necesita width > 100%    */
/* en línea para colocar las diapositivas en fila horizontal.                  */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .woocommerce-product-gallery {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: var(--esa-p-white);
	border: 1px solid var(--esa-p-border);
	border-radius: var(--esa-p-radius);
	padding: 0.75rem;
}

body.esa-product-redesign .woocommerce-product-gallery .flex-viewport {
	float: none !important;
	width: 100% !important;
	max-height: min(540px, 58vh);
	margin: 0 !important;
	border-radius: 10px;
	background: var(--esa-p-white);
	overflow: hidden;
}

/* El wrapper lo dimensiona FlexSlider (p. ej. 600%); no anular con !important. */
body.esa-product-redesign .woocommerce-product-gallery__wrapper {
	float: none;
	margin: 0 !important;
	max-height: none;
	overflow: visible;
	background: transparent;
}

body.esa-product-redesign .woocommerce-product-gallery__image {
	background: var(--esa-p-white);
	text-align: center;
}

body.esa-product-redesign .woocommerce-product-gallery__image a {
	display: block;
	line-height: 0;
}

body.esa-product-redesign .woocommerce-product-gallery__image img,
body.esa-product-redesign .woocommerce-product-gallery .flex-viewport img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: min(520px, 56vh) !important;
	object-fit: contain;
	object-position: center;
	padding: 0.75rem;
	margin: 0 auto;
	display: inline-block;
	vertical-align: middle;
}

body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs,
body.esa-product-redesign .woocommerce-product-gallery ol.flex-control-nav {
	float: none !important;
	display: flex !important;
	flex-wrap: wrap;
	gap: 0.55rem;
	width: 100% !important;
	margin: 0 !important;
	padding: 0;
	list-style: none;
}

body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li {
	float: none !important;
	width: 72px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0;
}

body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li img {
	width: 72px !important;
	height: 72px !important;
	max-width: 72px !important;
	max-height: 72px !important;
	object-fit: contain;
	padding: 0.35rem;
	background: var(--esa-p-white);
	border: 1px solid var(--esa-p-border);
	border-radius: 8px;
	opacity: 1 !important;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li img:hover {
	border-color: var(--esa-p-purple);
	box-shadow: 0 0 0 2px rgba(116, 112, 229, 0.18);
	opacity: 1 !important;
}

body.esa-product-redesign .woocommerce-product-gallery__trigger {
	top: 1rem !important;
	right: 1rem !important;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: var(--esa-p-white) !important;
	border: 1px solid var(--esa-p-border);
	box-shadow: 0 2px 8px rgba(45, 42, 69, 0.06);
	z-index: 2;
}

body.esa-product-redesign .woocommerce-product-gallery__trigger::before,
body.esa-product-redesign .woocommerce-product-gallery__trigger::after {
	/* Conserva icono zoom nativo WC */
}

body.esa-product-redesign span.onsale {
	top: 1.1rem !important;
	left: 1.1rem !important;
	right: auto !important;
	min-height: 0;
	padding: 0.28rem 0.55rem;
	border-radius: 6px;
	background: var(--esa-p-accent) !important;
	color: #2f220f !important;
	font-family: var(--esa-p-font);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	z-index: 3;
}

/* -------------------------------------------------------------------------- */
/* Summary: categoría, título, precio, stock                                   */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .esa-product-category {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--esa-p-muted);
}

body.esa-product-redesign .esa-product-category a {
	color: inherit;
	text-decoration: none;
}

body.esa-product-redesign .esa-product-category a:hover,
body.esa-product-redesign .esa-product-category a:focus-visible {
	color: var(--esa-p-purple-dark);
	outline: none;
}

body.esa-product-redesign div.product .product_title {
	margin: 0 0 0.65rem;
	padding: 0;
	font-family: var(--esa-p-font);
	font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.75rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--esa-p-text);
}

/* Solo el precio principal del summary (no el de variaciones dentro del form) */
body.esa-product-redesign div.product .summary > .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.45rem 0.65rem;
	width: 100%;
	margin: 0 0 0.55rem;
	padding: 0;
	font-family: var(--esa-p-font);
	font-size: clamp(1.45rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 700;
	color: var(--esa-p-text);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

body.esa-product-redesign div.product .summary > .price del {
	font-size: 0.72em;
	font-weight: 500;
	color: var(--esa-p-muted);
	opacity: 0.9;
}

body.esa-product-redesign div.product .summary > .price ins {
	text-decoration: none;
	color: var(--esa-p-purple-dark);
}

body.esa-product-redesign .esa-product-sale-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin: 0 0 0.75rem;
	padding: 0.22rem 0.5rem;
	border-radius: 6px;
	background: var(--esa-p-accent);
	color: #2f220f;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

body.esa-product-redesign .woocommerce-product-rating {
	margin: 0 0 0.75rem;
	float: none !important;
	width: 100%;
}

body.esa-product-redesign .woocommerce-product-details__short-description {
	display: block;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.75rem 0 0;
	border-top: 1px solid var(--esa-p-border);
	border-bottom: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--esa-p-muted);
}

body.esa-product-redesign .woocommerce-product-details__short-description:empty {
	display: none;
}

/* Stock en línea propia, nunca al lado del botón */
body.esa-product-redesign .summary > .stock,
body.esa-product-redesign .woocommerce-variation-availability .stock,
body.esa-product-redesign .stock {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	width: auto;
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 0.28rem 0.55rem;
	border-radius: 6px;
	background: #eef8f0;
	color: #2f6b3a;
	font-size: 0.8rem;
	font-weight: 600;
	float: none !important;
}

body.esa-product-redesign .stock.out-of-stock {
	background: #f8eeee;
	color: #8a3a3a;
}

/* -------------------------------------------------------------------------- */
/* Variaciones                                                                 */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign form.variations_form table.variations {
	width: 100%;
	margin: 0 0 1rem;
	border: 0;
}

body.esa-product-redesign form.variations_form table.variations th,
body.esa-product-redesign form.variations_form table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}

body.esa-product-redesign form.variations_form table.variations .label {
	margin: 0 0 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--esa-p-text);
}

body.esa-product-redesign form.variations_form table.variations .label label {
	font-weight: 600;
}

body.esa-product-redesign form.variations_form table.variations tr + tr .label {
	margin-top: 0.85rem;
}

body.esa-product-redesign .esa-variation-select--native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

body.esa-product-redesign .esa-variation-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 0.35rem;
}

body.esa-product-redesign .esa-variation-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.35rem;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--esa-p-border);
	border-radius: 8px;
	background: var(--esa-p-white);
	color: var(--esa-p-text);
	font-family: var(--esa-p-font);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

body.esa-product-redesign .esa-variation-swatch:hover,
body.esa-product-redesign .esa-variation-swatch:focus-visible {
	border-color: var(--esa-p-purple);
	outline: none;
}

body.esa-product-redesign .esa-variation-swatch.is-selected {
	border-color: var(--esa-p-purple);
	background: var(--esa-p-purple);
	color: var(--esa-p-white);
}

body.esa-product-redesign .esa-variation-swatch.is-disabled,
body.esa-product-redesign .esa-variation-swatch:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

body.esa-product-redesign .reset_variations,
body.esa-product-redesign .esa-variation-reset {
	display: inline-block;
	margin: 0.35rem 0 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--esa-p-purple-dark);
	text-decoration: none;
}

body.esa-product-redesign .reset_variations:hover,
body.esa-product-redesign .reset_variations:focus-visible {
	text-decoration: underline;
	outline: none;
}

/* Fallback: select nativo si no hay JS */
body.esa-product-redesign form.variations_form select:not(.esa-variation-select--native) {
	width: 100%;
	max-width: 280px;
	min-height: 42px;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--esa-p-border);
	border-radius: 8px;
	background: var(--esa-p-white);
	font-family: var(--esa-p-font);
	font-size: 0.9rem;
	color: var(--esa-p-text);
}

/* -------------------------------------------------------------------------- */
/* Cantidad + comprar + favoritos                                              */
/* -------------------------------------------------------------------------- */

/*
 * Causa del orden incorrecto: Open Shop Pro deja form.cart con float:left.
 * Precio/stock en inline-flex quedaban en la misma fila a la derecha del form.
 */
body.esa-product-redesign form.cart {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.85rem;
	width: 100% !important;
	max-width: 100%;
	margin: 0 0 1rem;
	float: none !important;
	clear: both;
}

body.esa-product-redesign form.cart .variations,
body.esa-product-redesign form.cart .woocommerce-variation,
body.esa-product-redesign form.cart .single_variation_wrap,
body.esa-product-redesign form.cart .woocommerce-variation-add-to-cart {
	width: 100%;
	float: none !important;
}

body.esa-product-redesign form.cart .single_variation_wrap {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.75rem;
}

/* Precio/stock de variación: bloque encima de cantidad+botón, no al lado */
body.esa-product-redesign .woocommerce-variation {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	width: 100%;
}

body.esa-product-redesign .woocommerce-variation-price,
body.esa-product-redesign .woocommerce-variation-availability {
	width: 100%;
}

body.esa-product-redesign .woocommerce-variation-price .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.45rem;
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--esa-p-text);
}

body.esa-product-redesign form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
}

/* Fila de compra en productos simples: cantidad + botón */
body.esa-product-redesign form.cart:not(.variations_form) {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

body.esa-product-redesign .open-shop-quantity {
	display: inline-flex !important;
	align-items: stretch;
	float: none !important;
	margin: 0 !important;
	border: 1px solid var(--esa-p-border) !important;
	border-radius: 10px !important;
	overflow: hidden;
	background: var(--esa-p-white);
	height: 44px;
	box-sizing: border-box;
}

/* El .quantity interior solo envuelve el input: no repetir borde ni flex shrink a 0. */
body.esa-product-redesign .open-shop-quantity .quantity,
body.esa-product-redesign form.cart .open-shop-quantity div.quantity {
	display: flex !important;
	align-items: stretch;
	flex: 0 0 auto;
	float: none !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	overflow: visible;
	background: transparent;
	height: 44px;
	min-width: 48px;
	box-sizing: border-box;
}

body.esa-product-redesign form.cart button.minus,
body.esa-product-redesign form.cart button.plus {
	float: none !important;
	flex: 0 0 40px;
	width: 40px;
	height: 44px;
	border: 0;
	background: var(--esa-p-lavender);
	color: var(--esa-p-text);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

body.esa-product-redesign form.cart button.minus:hover,
body.esa-product-redesign form.cart button.plus:hover,
body.esa-product-redesign form.cart button.minus:focus-visible,
body.esa-product-redesign form.cart button.plus:focus-visible {
	background: var(--esa-p-lavender-mid);
	color: var(--esa-p-purple-dark);
	outline: none;
}

body.esa-product-redesign form.cart button.minus:disabled,
body.esa-product-redesign form.cart button.plus:disabled,
body.esa-product-redesign form.cart button.minus.is-disabled,
body.esa-product-redesign form.cart button.plus.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

body.esa-product-redesign form.cart input.qty,
body.esa-product-redesign form.cart input[type="number"],
body.esa-product-redesign form.cart input.qty.esa-qty-fixed {
	float: none !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 48px !important;
	min-width: 48px !important;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-left: 1px solid var(--esa-p-border) !important;
	border-right: 1px solid var(--esa-p-border) !important;
	border-radius: 0 !important;
	background: var(--esa-p-white);
	color: var(--esa-p-text) !important;
	font-family: var(--esa-p-font);
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

body.esa-product-redesign form.cart input.qty::-webkit-outer-spin-button,
body.esa-product-redesign form.cart input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.esa-product-redesign form.cart .single_add_to_cart_button,
body.esa-product-redesign form.cart button.single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: min(100%, 180px);
	min-height: 44px;
	margin: 0 !important;
	padding: 0.7rem 1.35rem !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--esa-p-purple) !important;
	color: var(--esa-p-white) !important;
	font-family: var(--esa-p-font) !important;
	font-size: 0.92rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	line-height: 1.2 !important;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

body.esa-product-redesign form.cart .single_add_to_cart_button:hover,
body.esa-product-redesign form.cart .single_add_to_cart_button:focus-visible {
	background: var(--esa-p-purple-dark) !important;
	outline: none;
}

body.esa-product-redesign form.cart .single_add_to_cart_button:disabled,
body.esa-product-redesign form.cart .single_add_to_cart_button.disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Compare vacío (TH Product Compare) — oculto; ver PHP */
body.esa-product-redesign .thunk-compare,
body.esa-product-redesign .th-product-compare-btn-wrap,
body.esa-product-redesign .entry-summary .th-product-compare-btn,
body.esa-product-redesign form.cart .th-product-compare-btn {
	display: none !important;
}

/* Contenedor modal del plugin Compare: no debe tapar la ficha si está vacío/cerrado */
body.esa-product-redesign .th-compare-output-wrap:not(.active):not(.open):not(.th-show):not(.th-compare-open) {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
	z-index: -1 !important;
}

/* Favoritos YITH — debajo de la compra */
body.esa-product-redesign .summary .yith-wcwl-add-to-wishlist,
body.esa-product-redesign .entry-summary .yith-wcwl-add-to-wishlist,
body.esa-product-redesign .yith-wcwl-add-to-wishlist,
body.esa-product-redesign .yith-add-to-wishlist-button-block {
	float: none !important;
	display: flex;
	align-items: center;
	align-self: flex-start;
	width: auto;
	max-width: 100%;
	margin: 0 0 0.35rem !important;
	vertical-align: middle;
}

body.esa-product-redesign .yith-wcwl-add-to-wishlist-button,
body.esa-product-redesign .summary .yith-wcwl-add-button a,
body.esa-product-redesign .summary .yith-wcwl-wishlistaddedbrowse a,
body.esa-product-redesign .summary .yith-wcwl-wishlistexistsbrowse a,
body.esa-product-redesign a.add_to_wishlist,
body.esa-product-redesign .yith-wcwl-add-to-wishlist a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.45rem 0.9rem !important;
	border: 1px solid var(--esa-p-border) !important;
	border-radius: 10px !important;
	background: var(--esa-p-white) !important;
	color: var(--esa-p-text) !important;
	font-family: var(--esa-p-font) !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	width: auto !important;
	height: auto !important;
	letter-spacing: normal !important;
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

body.esa-product-redesign .yith-wcwl-add-to-wishlist a:hover,
body.esa-product-redesign .yith-wcwl-add-to-wishlist a:focus-visible,
body.esa-product-redesign .yith-wcwl-add-to-wishlist-button:hover,
body.esa-product-redesign .yith-wcwl-add-to-wishlist-button:focus-visible {
	border-color: var(--esa-p-purple) !important;
	color: var(--esa-p-purple-dark) !important;
	outline: none;
}

body.esa-product-redesign .summary .yith-wcwl-add-to-wishlist .add_to_wishlist::before,
body.esa-product-redesign .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a::before,
body.esa-product-redesign .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a::before {
	content: none !important;
	display: none !important;
}

body.esa-product-redesign .thunk-single-product-summary-wrap .yith-wcwl-add-button .yith-wcwl-icon {
	display: inline-block !important;
}

body.esa-product-redesign .product_meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin: 1.15rem 0 0;
	padding: 0.9rem 0 0;
	border-top: 1px solid var(--esa-p-border);
	font-size: 0.8rem;
	color: var(--esa-p-muted);
	width: 100%;
	clear: both;
}

body.esa-product-redesign .product_meta a {
	color: var(--esa-p-purple-dark);
	text-decoration: none;
}

body.esa-product-redesign .product_meta a:hover,
body.esa-product-redesign .product_meta a:focus-visible {
	text-decoration: underline;
	outline: none;
}

body.esa-product-redesign .product_meta > span {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

/* -------------------------------------------------------------------------- */
/* Acordeones (sustituyen tabs antiguas)                                       */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .esa-product-accordions {
	margin: 0 0 2.75rem;
	border: 1px solid var(--esa-p-border);
	border-radius: var(--esa-p-radius);
	background: var(--esa-p-white);
	overflow: hidden;
}

body.esa-product-redesign .esa-product-accordion + .esa-product-accordion {
	border-top: 1px solid var(--esa-p-border);
}

body.esa-product-redesign .esa-product-accordion__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin: 0;
	padding: 1rem 1.15rem;
	border: 0;
	background: var(--esa-p-white);
	color: var(--esa-p-text);
	font-family: var(--esa-p-font);
	font-size: 0.95rem;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	transition: background 0.18s ease;
}

body.esa-product-redesign .esa-product-accordion__toggle:hover,
body.esa-product-redesign .esa-product-accordion__toggle:focus-visible {
	background: var(--esa-p-lavender);
	outline: none;
}

body.esa-product-redesign .esa-product-accordion__icon {
	position: relative;
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
}

body.esa-product-redesign .esa-product-accordion__icon::before,
body.esa-product-redesign .esa-product-accordion__icon::after {
	content: "";
	position: absolute;
	background: var(--esa-p-muted);
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

body.esa-product-redesign .esa-product-accordion__icon::before {
	top: 5px;
	left: 0;
	width: 12px;
	height: 2px;
}

body.esa-product-redesign .esa-product-accordion__icon::after {
	top: 0;
	left: 5px;
	width: 2px;
	height: 12px;
}

body.esa-product-redesign .esa-product-accordion.is-open .esa-product-accordion__icon::after {
	opacity: 0;
	transform: scaleY(0);
}

body.esa-product-redesign .esa-product-accordion__panel {
	padding: 0 1.15rem 1.15rem;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--esa-p-text);
}

body.esa-product-redesign .esa-product-accordion__panel[hidden] {
	display: none !important;
}

body.esa-product-redesign .esa-product-accordion__panel h2,
body.esa-product-redesign .esa-product-accordion__panel .woocommerce-Reviews-title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

body.esa-product-redesign .esa-product-accordion__panel table.shop_attributes {
	width: 100%;
	border: 0;
}

body.esa-product-redesign .esa-product-accordion__panel table.shop_attributes th,
body.esa-product-redesign .esa-product-accordion__panel table.shop_attributes td {
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--esa-p-border);
	background: transparent;
	font-size: 0.88rem;
}

/* Ocultar tabs clásicas si quedara markup residual */
body.esa-product-redesign .woocommerce-tabs ul.tabs {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Relacionados — mismas tarjetas que el catálogo                              */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign section.related.products,
body.esa-product-redesign section.upsells.products {
	margin: 0 0 1rem;
	padding: 0;
	clear: both;
}

body.esa-product-redesign section.related.products > h2,
body.esa-product-redesign section.upsells.products > h2 {
	margin: 0 0 1.15rem;
	padding: 0;
	font-family: var(--esa-p-font);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--esa-p-text);
	letter-spacing: -0.02em;
}

body.esa-product-redesign section.related.products ul.products,
body.esa-product-redesign section.upsells.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	float: none !important;
}

body.esa-product-redesign section.related.products ul.products::before,
body.esa-product-redesign section.related.products ul.products::after,
body.esa-product-redesign section.upsells.products ul.products::before,
body.esa-product-redesign section.upsells.products ul.products::after {
	display: none !important;
	content: none !important;
}

body.esa-product-redesign section.related.products ul.products li.product,
body.esa-product-redesign section.upsells.products ul.products li.product {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0.75rem !important;
	float: none !important;
	clear: none !important;
	background: var(--esa-p-white);
	border: 1px solid var(--esa-p-border);
	border-radius: var(--esa-p-radius);
	box-shadow: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.esa-product-redesign section.related.products ul.products li.product:hover,
body.esa-product-redesign section.upsells.products ul.products li.product:hover {
	border-color: rgba(116, 112, 229, 0.35);
	box-shadow: 0 6px 18px rgba(45, 42, 69, 0.05);
}

/* Tarjeta ESA reutilizada */
body.esa-product-redesign .esa-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	text-align: left;
}

body.esa-product-redesign .esa-product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background: #fbfaff;
	text-decoration: none;
	flex: 0 0 auto;
}

body.esa-product-redesign .esa-product-card__img,
body.esa-product-redesign .esa-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	padding: 0.4rem;
	transition: transform 0.35s ease;
}

body.esa-product-redesign .esa-product-card:hover .esa-product-card__img,
body.esa-product-redesign .esa-product-card:hover .esa-product-card__media img {
	transform: scale(1.03);
}

body.esa-product-redesign .esa-product-card__badge {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1;
	padding: 0.18rem 0.4rem;
	border-radius: 5px;
	background: var(--esa-p-accent);
	color: #2f220f;
	font-size: 0.66rem;
	font-weight: 700;
}

body.esa-product-redesign .esa-shop-card__stock {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	z-index: 1;
	padding: 0.18rem 0.4rem;
	border-radius: 5px;
	background: rgba(45, 42, 69, 0.78);
	color: #fff;
	font-size: 0.66rem;
	font-weight: 600;
}

body.esa-product-redesign .esa-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.65rem 0.05rem 0.05rem;
	flex: 1 1 auto;
}

body.esa-product-redesign .esa-product-card__title,
body.esa-product-redesign .thunk-woo-product-list .esa-product-card__title.woocommerce-loop-product__title {
	margin: 0;
	min-height: 0;
	max-height: none;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.esa-product-redesign .esa-product-card__title a {
	color: var(--esa-p-text);
	text-decoration: none;
}

body.esa-product-redesign .esa-product-card__title a:hover,
body.esa-product-redesign .esa-product-card__title a:focus-visible {
	color: var(--esa-p-purple-dark);
	outline: none;
}

body.esa-product-redesign .esa-product-card__meta {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

body.esa-product-redesign .esa-product-card__price {
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--esa-p-text);
	letter-spacing: -0.02em;
}

body.esa-product-redesign .esa-product-card__price del {
	margin-right: 0.3rem;
	font-size: 0.8em;
	font-weight: 500;
	color: var(--esa-p-muted);
}

body.esa-product-redesign .esa-product-card__price ins {
	text-decoration: none;
	color: var(--esa-p-purple-dark);
}

body.esa-product-redesign .esa-product-card__actions .button,
body.esa-product-redesign .esa-product-card__actions .add_to_cart_button,
body.esa-product-redesign .esa-product-card__actions a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	min-height: 34px;
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--esa-p-purple);
	border-radius: 7px;
	background: transparent;
	color: var(--esa-p-purple-dark) !important;
	font-family: var(--esa-p-font);
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.esa-product-redesign .esa-product-card__actions .button:hover,
body.esa-product-redesign .esa-product-card__actions a.button:hover,
body.esa-product-redesign .esa-product-card__actions .button:focus-visible,
body.esa-product-redesign .esa-product-card__actions a.button:focus-visible {
	background: var(--esa-p-purple);
	border-color: var(--esa-p-purple);
	color: var(--esa-p-white) !important;
	outline: none;
}

body.esa-product-redesign section.related.products .thunk-product-hover,
body.esa-product-redesign section.related.products .thunk-wishlist,
body.esa-product-redesign section.related.products .thunk-compare,
body.esa-product-redesign section.upsells.products .thunk-product-hover {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Avisos WC                                                                   */
/* -------------------------------------------------------------------------- */

body.esa-product-redesign .woocommerce-message,
body.esa-product-redesign .woocommerce-info {
	border-radius: 10px;
	border-top-color: var(--esa-p-purple);
	font-family: var(--esa-p-font);
}

/* Errores: mantienen significado (rojo WC), no el acento de marca. */
body.esa-product-redesign .woocommerce-error {
	border-radius: 10px;
	font-family: var(--esa-p-font);
}

/*
 * Open Shop Pro pinta .woocommerce-message .button con open_shop_theme_clr
 * (default del padre: #ff0052). Gana por CSS inline si el theme_mod no está.
 * Refuerzo preciso del CTA «Ver carrito» / botones de aviso (no errores).
 */
body.esa-product-redesign .woocommerce .woocommerce-message .button,
body.esa-product-redesign .woocommerce .woocommerce-info .button,
body.esa-product-redesign .woocommerce-message a.button,
body.esa-product-redesign .woocommerce-info a.button {
	color: var(--esa-p-purple);
	border-color: var(--esa-p-purple);
	background-color: transparent;
}

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

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	body.esa-product-redesign .thunk-single-product-summary-wrap {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 1.5rem;
	}

	body.esa-product-redesign .woocommerce-product-gallery__wrapper,
	body.esa-product-redesign .woocommerce-product-gallery .flex-viewport,
	body.esa-product-redesign .woocommerce-product-gallery__image,
	body.esa-product-redesign .woocommerce-product-gallery__image a {
		max-height: min(480px, 52vh);
		height: min(480px, 52vh);
	}

	body.esa-product-redesign section.related.products ul.products,
	body.esa-product-redesign section.upsells.products ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	body.esa-product-redesign .thunk-single-product-summary-wrap {
		grid-template-columns: 1fr;
		gap: 1.35rem;
	}

	body.esa-product-redesign .woocommerce-product-gallery__wrapper,
	body.esa-product-redesign .woocommerce-product-gallery .flex-viewport,
	body.esa-product-redesign .woocommerce-product-gallery__image,
	body.esa-product-redesign .woocommerce-product-gallery__image a {
		max-height: min(420px, 48vh);
		height: min(420px, 48vh);
	}

	body.esa-product-redesign section.related.products ul.products,
	body.esa-product-redesign section.upsells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	body.esa-product-redesign .woocommerce-product-gallery {
		padding: 0.55rem;
	}

	body.esa-product-redesign .woocommerce-product-gallery__wrapper,
	body.esa-product-redesign .woocommerce-product-gallery .flex-viewport,
	body.esa-product-redesign .woocommerce-product-gallery__image,
	body.esa-product-redesign .woocommerce-product-gallery__image a {
		max-height: min(340px, 42vh);
		height: min(340px, 42vh);
	}

	body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li,
	body.esa-product-redesign .woocommerce-product-gallery .flex-control-thumbs li img {
		width: 58px !important;
		height: 58px;
	}

	body.esa-product-redesign form.cart:not(.variations_form),
	body.esa-product-redesign form.cart .woocommerce-variation-add-to-cart {
		flex-direction: column;
		align-items: stretch;
	}

	body.esa-product-redesign .open-shop-quantity {
		align-self: flex-start;
	}

	body.esa-product-redesign form.cart .single_add_to_cart_button {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}

	body.esa-product-redesign .yith-wcwl-add-to-wishlist,
	body.esa-product-redesign .yith-add-to-wishlist-button-block,
	body.esa-product-redesign .yith-wcwl-add-to-wishlist a,
	body.esa-product-redesign .yith-wcwl-add-to-wishlist-button {
		width: 100% !important;
	}

	body.esa-product-redesign section.related.products ul.products,
	body.esa-product-redesign section.upsells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
	}

	body.esa-product-redesign section.related.products ul.products li.product,
	body.esa-product-redesign section.upsells.products ul.products li.product {
		padding: 0.5rem !important;
	}

	body.esa-product-redesign .esa-product-card__title,
	body.esa-product-redesign .thunk-woo-product-list .esa-product-card__title.woocommerce-loop-product__title {
		font-size: 0.82rem;
		line-height: 1.35;
		min-height: 0;
		max-height: none;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
}
