/* =============================================================================
   CHAT FLOTANTE (plugin JoinChat / creame-whatsapp-me)
   -----------------------------------------------------------------------------
   No está en ninguna maqueta y tapaba hero/tarjetas en las capturas. No se
   toca el plugin ni su configuración: joinchat.min.css expone la posición y
   el tamaño como custom properties en `.joinchat` (--sep, --s), pensadas
   justamente para que un tema las pise sin tocar el CSS del plugin. Sólo se
   ajusta separación y tamaño, nunca su comportamiento. */
.joinchat {
	--sep: 14px;
	--s: 52px;
}

@media ( max-width: 700px ) {
	.joinchat {
		/* Un poco más arriba del borde inferior en mobile, donde el botón
		   "Ver producto" de la grilla y los botones del hero quedan más cerca
		   del filo de la pantalla. */
		--sep: 12px;
		--bottom: 18px;
		--s: 46px;
	}
}

/* =============================================================================
   TIENDA — ANCHO PROPIO EN DESKTOP
   -----------------------------------------------------------------------------
   Sólo Tienda, sin tocar `wideSize` global (1200px, theme.json) ni Home: las
   tres franjas de la página (encabezado, fila filtro/orden, layout de
   sidebar+grilla) son bloques `alignwide` propios de `archive-product.html`,
   así que un override acá no alcanza a ninguna otra plantilla. A partir de
   1280px de viewport hay margen real para los ~1400px que pide la maqueta
   (tienda-pagina-wordpress.png); por debajo, 1200px ya es un ancho ajustado
   y no vale la pena estirarlo.
   ========================================================================== */
@media ( min-width: 1280px ) {
	/* Dos clases, no una: el `max-width` que genera WordPress para
	   `.alignwide` (1200px, desde `wideSize` de theme.json) tiene la misma
	   especificidad que un selector de una sola clase, y gana por venir
	   después en la hoja de estilos. `.mp-tienda-layout.alignwide` pesa más
	   sin necesitar `!important`. */
	.mp-tienda-encabezado.alignwide,
	.mp-tienda-filtro-movil.alignwide,
	.mp-tienda-layout.alignwide {
		max-width: 1400px;
	}
}


/* =============================================================================
   TIENDA — ENCABEZADO
   Referencias: tienda-pagina-wordpress.png y tienda-mobile-wordpress.png
   ========================================================================== */

.mp-tienda-encabezado { padding-block: clamp( 0.8rem, 1.6vw, 1.3rem ) 0.2rem; }


.mp-tienda-titulo-fila {
	display: grid !important;
	grid-template-columns: minmax( 0, 1fr ) auto;
	align-items: center;
	gap: 1rem;
	margin-top: 0.6rem !important;
}

.mp-tienda-titulo-grupo {
	position: relative;
	display: grid;
	grid-template-columns: auto auto 1fr;
	grid-template-areas:
		"izq titulo der"
		"bajada bajada bajada";
	align-items: center;
	justify-content: start;
	margin: 0 !important;
}
.mp-tienda-titulo-grupo > * { margin: 0 !important; }

/* "Tienda": grande, escrito a mano, sobre una pincelada coral ancha. */
.mp-tienda-titulo {
	grid-area: titulo;
	position: relative;
	isolation: isolate;
	padding: 0.02em 0.4em 0.08em;
	font-size: clamp( 3.4rem, 1.6rem + 3.6vw, 5.4rem );
	font-weight: 400;
	line-height: 1;
	transform: rotate( -2deg );
}
.mp-tienda-titulo::before {
	content: "";
	position: absolute;
	inset: 22% -0.3em 6% -0.2em;
	z-index: -1;
	background: color-mix( in srgb, var( --wp--preset--color--coral ) 78%, var( --wp--preset--color--blanco ) );
	border-radius: 8px;
	filter: url( "#mp-pincelada" );
}

.mp-deco.mp-tienda-raya {
	position: relative;
	width: clamp( 2.2rem, 3.4vw, 3.4rem );
	height: clamp( 2.2rem, 3.4vw, 3.4rem );
	color: var( --wp--preset--color--tinta );
	opacity: 1;
}
.mp-tienda-raya.es-izq { grid-area: izq; transform: rotate( 8deg ) translateY( -0.3rem ); }
.mp-tienda-raya.es-der { grid-area: der; transform: scaleX( -1 ) rotate( 4deg ) translateY( -0.8rem ); }

.mp-tienda-corazon { display: none; }

.mp-tienda-bajada {
	grid-area: bajada;
	margin-top: 0.5rem !important;
	padding-left: clamp( 2.2rem, 3.4vw, 3.4rem );
	font-size: clamp( 1.15rem, 0.8rem + 0.9vw, 1.6rem );
	letter-spacing: 0.02em;
	line-height: 1.25;
	white-space: nowrap;
}
.mp-tienda-bajada-corazon {
	position: relative;
	display: inline-block;
	vertical-align: -0.15em;
	width: 1.2em;
	height: 1.2em;
	margin-left: 0.5em;
	opacity: 1;
}

/* Racimo de Maripo: salpicaduras, Maripo grande, recorrido punteado y la
   mancha celeste "Las ideas también juegan". */
.mp-tienda-decor {
	position: relative;
	width: clamp( 26rem, 36vw, 36rem );
	height: clamp( 10rem, 13vw, 13rem );
}

.mp-tienda-salpicadura {
	position: absolute;
	left: 0;
	top: 4%;
	width: 26%;
	height: 70%;
	background: url( "../imagenes/salpicadura-dorada.webp" ) center / contain no-repeat;
	transform: rotate( 70deg );
}

.mp-tienda-maripo {
	position: absolute;
	left: 25%;
	top: -8%;
	width: 33% !important;
	max-width: none !important;
	height: auto;
	transform: rotate( 4deg );
}

.mp-tienda-punteado {
	position: absolute;
	left: 50%;
	top: 38%;
	width: 24%;
	height: auto;
	opacity: 0.85;
}

.mp-tienda-globo {
	position: absolute;
	right: -2%;
	top: -6%;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40%;
	aspect-ratio: 1.3;
	padding: 1rem;
	transform: rotate( -18deg );
	font-family: var( --wp--preset--font-family--titulo );
	font-size: clamp( 1.05rem, 0.6rem + 0.7vw, 1.45rem );
	line-height: 1.12;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: center;
	color: var( --wp--preset--color--tinta );
}

/* La acuarela celeste real de Mariposa, desenfocada hasta volverse mancha. */
.mp-tienda-globo::before,
.mp-tienda-globo::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
}
.mp-tienda-globo::before {
	inset: -16% -20%;
	background:
		url( "../imagenes/salpicadura-celeste.webp" ) 35% 40% / 105% 105% no-repeat,
		url( "../imagenes/salpicadura-celeste.webp" ) 65% 60% / 95% 95% no-repeat,
		url( "../imagenes/salpicadura-celeste.webp" ) 50% 50% / 80% 80% no-repeat;
	filter: blur( 6px ) saturate( 1.5 );
	-webkit-mask: radial-gradient( 50% 46% at 50% 50%, #000 58%, transparent 100% );
	mask: radial-gradient( 50% 46% at 50% 50%, #000 58%, transparent 100% );
}
.mp-tienda-globo::after {
	inset: -10% -14%;
	background: url( "../imagenes/salpicadura-dorada.webp" ) 88% 30% / auto 50% no-repeat;
	opacity: 0.8;
}

.mp-tienda-globo-corazon {
	position: relative;
	display: inline-block;
	vertical-align: -0.1em;
	width: 1.1em;
	height: 1.1em;
	margin-left: 0.25em;
	opacity: 1;
}

@media ( max-width: 1100px ) and ( min-width: 701px ) {
	.mp-tienda-decor { width: 20rem; }
	.mp-tienda-globo { display: none; }
	.mp-tienda-maripo { left: 32%; width: 48% !important; }
	.mp-tienda-punteado { left: 76%; width: 26%; }
}

@media ( max-width: 700px ) {
	.mp-tienda-encabezado { padding-block: 0.7rem 0; }

	.mp-tienda-titulo-fila {
		position: relative;
		grid-template-columns: minmax( 0, 1fr );
		margin-top: 0.2rem !important;
	}

	/* El padding derecho corre el título a la izquierda: el rincón es de Maripo. */
	.mp-tienda-titulo-grupo {
		justify-content: center;
		padding: 0.6rem 5.4rem 0 0;
	}

	/* A la escala de la maqueta: más grande, los rayos quedaban bajo Maripo. */
	.mp-tienda-titulo { font-size: clamp( 2.6rem, 12vw, 3.2rem ); }
	.mp-deco.mp-tienda-raya { width: 1.65rem; height: 1.65rem; }
	.mp-tienda-raya.es-izq { margin-left: 2.4rem !important; }

	.mp-tienda-corazon {
		display: block;
		color: color-mix( in srgb, var( --wp--preset--color--coral ) 80%, var( --wp--preset--color--lila ) );
		opacity: 1;
	}
	.mp-tienda-corazon.es-uno { left: -0.3rem; top: 0.4rem; width: 2.1rem; height: 2.1rem; transform: rotate( -14deg ); }
	.mp-tienda-corazon.es-dos { left: 1.6rem; top: 2.3rem; width: 1.3rem; height: 1.3rem; transform: rotate( 12deg ); }

	.mp-tienda-bajada {
		padding-left: 0;
		margin-top: 0.7rem !important;
		text-align: center;
		font-size: clamp( 1rem, 4.5vw, 1.15rem );
		letter-spacing: 0.01em;
		white-space: normal;
		text-wrap: balance;
	}
	.mp-tienda-bajada-corazon { display: none; }

	/* Simplificado, no apagado: Maripo, salpicadura y recorrido siguen. */
	.mp-tienda-decor {
		position: absolute;
		right: -0.6rem;
		top: 0.4rem;
		width: 5.4rem;
		height: 5.6rem;
		pointer-events: none;
	}
	.mp-tienda-salpicadura { left: -18%; top: 0; width: 40%; height: 60%; }
	.mp-tienda-maripo { left: 14%; top: 0; width: 76% !important; }
	.mp-tienda-punteado { left: 44%; top: 62%; width: 56%; transform: rotate( 30deg ); }
	.mp-tienda-globo { display: none; }
}


/* =============================================================================
   TIENDA — ORDENAR / FILTRAR
   ========================================================================== */

.mp-tienda-filtro-movil { display: none !important; }

.mp-orden select,
.wp-block-woocommerce-catalog-sorting select {
	-webkit-appearance: none;
	appearance: none;
	min-width: 12.5rem;
	padding: 0.55em 2.4em 0.55em 1em;
	border: 2px solid color-mix( in srgb, var( --wp--preset--color--violeta ) 70%, var( --wp--preset--color--blanco ) );
	border-radius: 13px 10px 14px 9px;
	background: var( --wp--preset--color--blanco ) url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5,8 L10,13 L15,8' fill='none' stroke='%233d3436' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) right 0.8em center / 1.1em no-repeat;
	box-shadow: 0 2px 6px rgb( 61 52 54 / 0.08 );
	color: var( --wp--preset--color--tinta );
	font-family: var( --wp--preset--font-family--texto );
	font-size: 0.98rem;
	cursor: pointer;
}

.mp-orden-desktop { margin: 0 0 0.9rem !important; }
.mp-tienda-principal > .wp-block-woocommerce-product-collection { margin-top: 0 !important; }

.mp-filtro-panel { position: relative; }
.mp-filtro-panel summary { list-style: none; cursor: pointer; }
.mp-filtro-panel summary::-webkit-details-marker { display: none; }

/* "Filtrar productos": sticker de papel verde, mismo alto que el orden. */
.mp-filtro-boton {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	height: 3.2rem;
	padding: 0 0.6rem;
	font-family: var( --wp--preset--font-family--titulo );
	font-size: 1.1rem;
	white-space: nowrap;
	color: var( --wp--preset--color--tinta );
}
.mp-filtro-boton::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix( in srgb, var( --wp--preset--color--salvia ) 80%, var( --wp--preset--color--blanco ) );
	border-radius: 8px;
	filter: url( "#mp-pincelada" );
}
.mp-filtro-boton .mp-cat-icono { width: 1.45rem; height: 1.45rem; }

.mp-filtro-panel-contenido {
	position: absolute;
	z-index: 30;
	top: calc( 100% + 0.5rem );
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: max-content;
	min-width: 100%;
	padding: 0.8rem;
	background: var( --wp--preset--color--crema );
	border-radius: 12px;
	box-shadow: var( --mp-sombra );
}

@media ( max-width: 900px ) {
	.mp-tienda-filtro-movil {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem;
		padding-block: 1rem 0.6rem;
	}
	.mp-tienda-filtro-movil > * { min-width: 0; margin: 0 !important; }
	.mp-orden-desktop { display: none !important; }

	.mp-tienda-filtro-movil select {
		width: 100%;
		min-width: 0;
		height: 3.2rem;
		font-family: var( --wp--preset--font-family--titulo );
		font-size: 1.1rem;
		border-width: 2.5px;
	}
	.mp-tienda-filtro-movil .woocommerce-ordering { margin: 0; }
}

@media ( max-width: 400px ) {
	.mp-filtro-boton,
	.mp-tienda-filtro-movil select { font-size: 1.02rem; }
	.mp-filtro-boton .mp-cat-icono { width: 1.25rem; height: 1.25rem; }
}


/* =============================================================================
   TIENDA — LAYOUT Y CATEGORÍAS
   ========================================================================== */

.mp-tienda-layout {
	display: grid;
	grid-template-columns: 240px minmax( 0, 1fr );
	gap: clamp( 1.5rem, 3.4vw, 3.4rem );
	align-items: start;
	padding-bottom: clamp( 2rem, 5vw, 4rem );
	margin-top: 0.4rem !important;
}
.mp-tienda-principal { margin-top: 0 !important; }

.mp-tienda-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.05rem;
	padding-top: 0.4rem;
}

/* Categoría: pincelada pastel con ícono de línea, no un botón. */
.mp-categoria {
	--mp-cat-color: var( --wp--preset--color--coral );
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 3.9rem;
	padding: 0.55rem 1.2rem 0.6rem 1.3rem;
	font-family: var( --wp--preset--font-family--titulo );
	font-size: 1.3rem;
	line-height: 1.05;
	color: var( --wp--preset--color--tinta );
	text-decoration: none;
}
.mp-categoria::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var( --mp-cat-color );
	border-radius: 6px;
	opacity: 0.5;
	filter: url( "#mp-pincelada" );
	transition: opacity 0.15s ease;
}
.mp-categoria:hover::before,
.mp-categoria:focus-visible::before { opacity: 0.75; }
.mp-categoria.es-actual::before { opacity: 0.95; }
.mp-categoria:focus-visible { outline: 3px solid var( --wp--preset--color--tinta ); outline-offset: 4px; }

.mp-categoria.es-coral  { --mp-cat-color: var( --wp--preset--color--coral ); }
.mp-categoria.es-lila   { --mp-cat-color: var( --wp--preset--color--lila ); transform: rotate( 0.8deg ); }
.mp-categoria.es-salvia { --mp-cat-color: var( --wp--preset--color--salvia ); transform: rotate( -0.8deg ); width: 88%; }
.mp-categoria.es-sol    { --mp-cat-color: var( --wp--preset--color--sol ); transform: rotate( 0.5deg ); width: 96%; }
.mp-categoria.es-celeste { --mp-cat-color: var( --wp--preset--color--celeste ); transform: rotate( -0.6deg ); width: 84%; }

/* Formato (etiquetas formato-digital / formato-fisico): mismo trazo, tono papel, más chico. */
.mp-categoria-grupo {
	margin: 0.8rem 0 -0.4rem !important;
	padding-left: 0.3rem;
	font-family: var( --wp--preset--font-family--titulo );
	font-size: 1.05rem;
	color: var( --wp--preset--color--tinta );
	opacity: 0.75;
}
.mp-categoria.es-formato {
	--mp-cat-color: color-mix( in srgb, var( --wp--preset--color--ocre ) 35%, var( --wp--preset--color--crema ) );
	min-height: 3.1rem;
	font-size: 1.15rem;
	width: 78%;
}
.mp-categoria.es-formato .mp-cat-icono { width: 1.6rem; height: 1.6rem; }

.mp-categoria .mp-cat-icono { flex: none; width: 2rem; height: 2rem; }

/* Frase manuscrita bajo las categorías (maqueta tienda-pagina-wordpress.png). */
.mp-tienda-frase {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 0.6rem;
	margin: 2.4rem 0 0 !important;
	padding: 0.8rem 0.4rem 0.4rem;
	font-family: var( --wp--preset--font-family--mano );
	font-size: 1.7rem;
	line-height: 1.2;
	text-align: center;
	-webkit-text-stroke: 0.025em currentColor;
	transform: rotate( -4deg );
	background: url( "../imagenes/salpicadura-dorada.webp" ) 95% 0% / auto 40% no-repeat;
}
.mp-tienda-frase-flor { flex: none; width: 3.4rem; height: auto; transform: rotate( -10deg ); }
.mp-tienda-frase > span { display: block; }
.mp-tienda-frase-corazon { position: static; display: block; width: 1.3rem; height: 1.3rem; margin: 0.4rem auto 0; background-color: var( --wp--preset--color--coral ); }

/* Lema al pie de la grilla, sólo en móvil. */
.mp-tienda-lema { display: none; }

@media ( max-width: 900px ) {
	.mp-tienda-layout { grid-template-columns: minmax( 0, 1fr ); }
	.mp-tienda-sidebar { display: none; }
	.mp-tienda-lema {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.7rem;
		margin: 1.5rem 0 0.5rem !important;
		font-family: var( --wp--preset--font-family--mano );
		font-size: 1.3rem;
		white-space: nowrap;
		-webkit-text-stroke: 0.025em currentColor;
		color: var( --wp--preset--color--violeta );
	}
	.mp-tienda-lema::before,
	.mp-tienda-lema::after {
		content: "";
		flex: 0 1 3.5rem;
		min-width: 1.8rem;
		height: 0.6rem;
		background: var( --wp--preset--color--lila );
		opacity: 0.7;
		-webkit-mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10' preserveAspectRatio='none'%3E%3Cpath d='M2,5 C8,1 12,1 17,5 C22,9 26,9 31,5 C36,1 40,1 45,5 C50,9 54,9 58,5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E" ) center / 100% 100% no-repeat;
		mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10' preserveAspectRatio='none'%3E%3Cpath d='M2,5 C8,1 12,1 17,5 C22,9 26,9 31,5 C36,1 40,1 45,5 C50,9 54,9 58,5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E" ) center / 100% 100% no-repeat;
	}
	.mp-tienda-lema::after { order: 3; }
	.mp-tienda-lema-corazon { position: static; flex: none; order: 2; width: 1.1rem; height: 1.1rem; background-color: var( --wp--preset--color--coral ); }
	.mp-filtro-panel-contenido .mp-categoria { font-size: 1.15rem; min-height: 3rem; }
	.mp-filtro-panel-contenido .mp-categoria .mp-cat-icono { width: 1.5rem; height: 1.5rem; }
}

/* Íconos de línea, dibujados como el resto de los trazos. */
.mp-cat-icono {
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: var( --mp-icono ) center / contain no-repeat;
	mask: var( --mp-icono ) center / contain no-repeat;
}
.mp-cat-icono.es-estrella {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16,3 L19.6,11.6 L28.6,12.3 L21.7,18.2 L23.9,27.2 L16,22.4 L8.1,27.2 L10.3,18.2 L3.4,12.3 L12.4,11.6 Z' fill='none' stroke='%23000' stroke-width='2.3' stroke-linejoin='round'/%3E%3C/svg%3E" );
}
.mp-cat-icono.es-lapiz {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M7,11 L10,29 L22,29 L25,11 Z'/%3E%3Cpath d='M11,11 L9,3 M16,11 L16,2 M21,11 L24,4'/%3E%3Cpath d='M12,17 C14,15 18,15 20,17'/%3E%3C/g%3E%3C/svg%3E" );
}
.mp-cat-icono.es-libro {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M16,8 C12,5 7,5 3,6.5 L3,26 C7,24.5 12,24.5 16,27 C20,24.5 25,24.5 29,26 L29,6.5 C25,5 20,5 16,8 Z'/%3E%3Cpath d='M16,8 L16,27'/%3E%3Cpath d='M7,11 C9,10.5 11,10.5 13,11.5 M7,15.5 C9,15 11,15 13,16 M19,11.5 C21,10.5 23,10.5 25,11 M19,16 C21,15 23,15 25,15.5'/%3E%3C/g%3E%3C/svg%3E" );
}
/* Manos que sostienen un corazón: Proyectos y prevención. */
.mp-cat-icono.es-manos {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M16,17 C12,14 9,11.5 9,8.5 C9,6 11.5,4.8 13.4,6 C14.6,6.7 15.4,7.8 16,8.8 C16.6,7.8 17.4,6.7 18.6,6 C20.5,4.8 23,6 23,8.5 C23,11.5 20,14 16,17 Z'/%3E%3Cpath d='M3,17 L7,21 C9,23.5 12,25 16,25 C20,25 23,23.5 25,21 L29,17'/%3E%3Cpath d='M5,27 C8,29 12,29.5 16,29.5 C20,29.5 24,29 27,27'/%3E%3C/g%3E%3C/svg%3E" );
}
/* Dado: Juegos. */
.mp-cat-icono.es-dado {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='4.5' y='4.5' width='23' height='23' rx='5' fill='none' stroke='%23000' stroke-width='2.2' transform='rotate(-6 16 16)'/%3E%3Cg fill='%23000'%3E%3Ccircle cx='11' cy='11.5' r='2'/%3E%3Ccircle cx='16' cy='16' r='2'/%3E%3Ccircle cx='21' cy='20.5' r='2'/%3E%3C/g%3E%3C/svg%3E" );
}
/* Flecha a la bandeja: formato digital. */
.mp-cat-icono.es-descarga {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16,4 L16,20 M9.5,13.5 L16,20 L22.5,13.5'/%3E%3Cpath d='M5,21 L5,27 L27,27 L27,21'/%3E%3C/g%3E%3C/svg%3E" );
}
/* Caja con moño: formato físico. */
.mp-cat-icono.es-caja {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5,13 L27,13 L27,28 L5,28 Z'/%3E%3Cpath d='M3.5,8.5 L28.5,8.5 L28.5,13 L3.5,13 Z'/%3E%3Cpath d='M16,8.5 L16,28'/%3E%3Cpath d='M16,8.5 C13,3 8,3.5 9,6.5 C10,8.5 16,8.5 16,8.5 C16,8.5 22,8.5 23,6.5 C24,3.5 19,3 16,8.5 Z'/%3E%3C/g%3E%3C/svg%3E" );
}
.mp-cat-icono.es-filtro {
	--mp-icono: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round'%3E%3Cpath d='M3,8 L29,8 M3,16 L29,16 M3,24 L29,24'/%3E%3Ccircle cx='11' cy='8' r='3.2' fill='%23fff'/%3E%3Ccircle cx='21' cy='16' r='3.2' fill='%23fff'/%3E%3Ccircle cx='9' cy='24' r='3.2' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E" );
}


/* =============================================================================
   TARJETA DE PRODUCTO
   ========================================================================== */

.wc-block-product-template,
ul.wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) ) !important;
	gap: clamp( 1.6rem, 2.6vw, 2.4rem ) clamp( 1.3rem, 2.4vw, 2.2rem ) !important;
	list-style: none;
	padding: 0;
}

.wc-block-product-template > li,
.wc-block-product-template > .wc-block-product {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column;
}
.wc-block-product-template > li > .wp-block-template-part { flex: 1; display: flex; flex-direction: column; }
.wc-block-product-template .mp-producto-tarjeta { flex: 1; height: auto; }
.wc-block-product-template > li:nth-child( 2n ) { rotate: 0.5deg; }
.wc-block-product-template > li:nth-child( 3n ) { rotate: -0.4deg; }

/* Hoja de papel recortada: el papel lo dibuja `.mp-papel` (borde irregular y
   sombra leve); acá sólo el tono y cuánto asoma por fuera del contenido. */
.mp-producto-tarjeta {
	--mp-borde-papel: 3px;
	--mp-redondeo: 6px;
	--mp-papel-fondo: color-mix( in srgb, var( --wp--preset--color--blanco ) 80%, var( --wp--preset--color--crema ) );
	display: flex !important;
	flex-direction: column;
	height: 100%;
	padding: 0.9rem 0.9rem 1.15rem;
}
.mp-producto-tarjeta > * { margin: 0 !important; max-width: none !important; }

.mp-producto-imagen { position: relative; }
.mp-producto-imagen img {
	display: block;
	width: 100% !important;
	aspect-ratio: 1;
	height: auto !important;
	object-fit: cover;
	border-radius: 3px;
}

/* Una sola categoría (ver functions.php), como etiqueta de pincel chica. */
.mp-producto-categoria {
	position: absolute;
	top: 0.5rem;
	left: 0.45rem;
	z-index: 2;
	isolation: isolate;
	margin: 0 !important;
	padding: 0.12em 0.7em 0.22em;
	font-family: var( --wp--preset--font-family--titulo );
	font-size: 0.85rem;
	line-height: 1.1;
	white-space: nowrap;
	max-width: calc( 100% - 0.9rem );
	overflow: hidden;
	text-overflow: ellipsis;
	color: var( --wp--preset--color--tinta );
}
.mp-producto-categoria::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix( in srgb, var( --wp--preset--color--lila ) 70%, var( --wp--preset--color--blanco ) );
	border-radius: 6px;
	filter: url( "#mp-acuarela-fina" );
}
.mp-producto-categoria:has( a[href*="/libros/"] )::before {
	background: color-mix( in srgb, var( --wp--preset--color--salvia ) 75%, var( --wp--preset--color--blanco ) );
}
.mp-producto-categoria:has( a[href*="/proyectos-y-prevencion/"] )::before {
	background: color-mix( in srgb, var( --wp--preset--color--sol ) 70%, var( --wp--preset--color--blanco ) );
}
.mp-producto-categoria:has( a[href*="/juegos/"] )::before {
	background: color-mix( in srgb, var( --wp--preset--color--celeste ) 75%, var( --wp--preset--color--blanco ) );
}
.mp-producto-categoria a { color: inherit; text-decoration: none; }

/* Decorativo: no hay wishlist, así que no es un botón. */
.mp-producto-corazon {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	z-index: 2;
	width: 1.9rem;
	height: 1.9rem;
	pointer-events: none;
	border-radius: 50%;
	background: color-mix( in srgb, var( --wp--preset--color--blanco ) 85%, transparent );
}
.mp-producto-corazon::after {
	content: "";
	position: absolute;
	inset: 0.35rem;
	background: var( --wp--preset--color--tinta );
	-webkit-mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20,34 C11,27 4,21 4.5,13 C5,7 10,4.5 14,5.5 C17,6.3 19,9 20,12 C21,9 23,6.3 26,5.5 C30,4.5 35,7 35.5,13 C36,21 29,27 20,34 Z' fill='none' stroke='%23000' stroke-width='3.2' stroke-linejoin='round'/%3E%3C/svg%3E" ) center / contain no-repeat;
	mask: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20,34 C11,27 4,21 4.5,13 C5,7 10,4.5 14,5.5 C17,6.3 19,9 20,12 C21,9 23,6.3 26,5.5 C30,4.5 35,7 35.5,13 C36,21 29,27 20,34 Z' fill='none' stroke='%23000' stroke-width='3.2' stroke-linejoin='round'/%3E%3C/svg%3E" ) center / contain no-repeat;
}

.mp-producto-info {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	flex: 1;
	padding-top: 0.75rem;
	text-align: center;
}
.mp-producto-info > * { margin: 0 !important; }

.mp-producto-info .wp-block-post-title {
	font-family: var( --wp--preset--font-family--titulo );
	font-size: clamp( 1.05rem, 0.95rem + 0.3vw, 1.2rem );
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
}
.mp-producto-info .wp-block-post-title a { color: var( --wp--preset--color--tinta ); text-decoration: none; }

.mp-producto-precio,
.mp-producto-precio-single,
.mp-producto-precio .wc-block-components-product-price__value,
.mp-producto-precio-single .wc-block-components-product-price__value {
	color: color-mix( in srgb, var( --wp--preset--color--coral ) 80%, var( --wp--preset--color--tinta ) );
}
.mp-producto-precio {
	margin-top: 0.3rem !important;
	margin-bottom: 0.7rem !important;
	font-family: var( --wp--preset--font-family--titulo );
	font-size: clamp( 1.1rem, 1rem + 0.3vw, 1.25rem );
	font-weight: 400;
}
.mp-producto-precio-single { font-weight: 800; font-size: var( --wp--preset--font-size--grande ); }

/* Botón violeta, ancho y amable, siempre en una línea; abajo de todo para que
   los botones de una fila queden alineados aunque los títulos no midan igual. */
.mp-producto-boton.wp-block-read-more {
	display: block;
	width: 76%;
	margin-top: auto !important;
	padding: 0.42em 0.8em 0.5em;
	box-sizing: border-box;
	background: var( --wp--preset--color--violeta );
	color: var( --wp--preset--color--tinta );
	font-family: var( --wp--preset--font-family--titulo );
	font-size: clamp( 1rem, 0.9rem + 0.3vw, 1.15rem );
	line-height: 1.1;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	border-radius: 999px;
}
.mp-producto-boton.wp-block-read-more:hover,
.mp-producto-boton.wp-block-read-more:focus-visible {
	background: var( --wp--preset--color--lila );
	color: var( --wp--preset--color--tinta );
}

@media ( max-width: 900px ) {
	.mp-producto-categoria { font-size: 0.74rem; }
	.wc-block-product-template,
	ul.wc-block-product-template {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) ) !important;
		gap: 1.1rem 0.8rem !important;
	}
}

@media ( max-width: 480px ) {
	.mp-producto-tarjeta { padding: 0.55rem 0.55rem 0.8rem; }
	.mp-producto-categoria { font-size: 0.66rem; top: 0.35rem; left: 0.3rem; max-width: calc( 100% - 0.6rem ); padding: 0.1em 0.5em 0.15em; overflow: hidden; text-overflow: ellipsis; }
	/* El corazón baja a la esquina inferior: arriba, "Materiales creativos"
	   necesita todo el ancho de la imagen para entrar en una línea. */
	.mp-producto-corazon { top: auto; bottom: 0.35rem; right: 0.35rem; width: 1.6rem; height: 1.6rem; }
	.mp-producto-info { padding-top: 0.55rem; }
	.mp-producto-info .wp-block-post-title { font-size: 1rem; }
	.mp-producto-precio { font-size: 1.08rem; margin-top: 0.15rem !important; margin-bottom: 0.5rem !important; }
	.mp-producto-boton.wp-block-read-more { width: 92%; font-size: 0.98rem; padding: 0.4em 0.4em 0.46em; }
}


/* El plugin de compra directa (wpc-buy-now-button) engancha sus botones a los
   hooks clásicos del loop de WooCommerce (`woocommerce_after_shop_loop_item`),
   y WooCommerce Blocks los sigue disparando por compatibilidad aunque la
   grilla sea el bloque Product Collection. El resultado es un "¡Lo quiero!"
   suelto, como hermano de nuestra tarjeta dentro del <li>, no adentro de ella.
   En la ficha individual el mismo plugin usa otro shortcode (`wpcbn-btn`, sin
   el sufijo `-archive`) que si queremos conservar — por eso no se apaga la
   clase base, sólo la variante de grilla. */
.wpcbn-btn-archive {
	display: none;
}

/* La ficha individual de producto vive en producto.css. */
