/* Product Collections for Elementor — estilos base.
   La mayoría de valores (color, tamaño, espaciado) se sobrescriben con los
   controles de Elementor. Aquí solo va la maquetación estructural imprescindible. */

.epc {
	position: relative;
	width: 100%;
}

/* Título propio del componente (se oculta con él cuando no hay productos). */
.epc-heading {
	margin: 0 0 16px;
}

.epc-stage {
	position: relative;
	width: 100%;
}

.epc-viewport {
	overflow: hidden;
	width: 100%;
}

/* Cuadrícula responsive por defecto (sin JS = filas envueltas).
   El carrusel (con JS) fija anchos y desactiva el wrap. */
.epc-track {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	--epc-cols: 4;
	--epc-gap: 20px;
	gap: var(--epc-gap);
	will-change: transform;
}

.epc-track.epc-animate {
	transition: transform var(--epc-speed, 400ms) ease;
}

.epc-card {
	box-sizing: border-box;
	flex: 0 0 calc((100% - (var(--epc-cols) - 1) * var(--epc-gap)) / var(--epc-cols));
	display: flex;
	flex-direction: column;
	background-color: #fff;
}

/* En modo carrusel el track no envuelve; el JS asigna el ancho de cada tarjeta. */
.epc.epc-ready .epc-track {
	flex-wrap: nowrap;
}

/* ----- Media / imagen ----- */
.epc-card__media {
	position: relative;
	display: block;
	line-height: 0;
	margin-bottom: 12px;
}

.epc-card__media img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

/* ----- Badge de oferta ----- */
.epc-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	display: inline-block;
	line-height: 1.2;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background-color: #d6001c;
	padding: 3px 8px;
	border-radius: 4px;
}

/* ----- Cuerpo ----- */
.epc-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	text-align: center;
}

.epc-card__title {
	margin: 0 0 6px;
	font-size: 1rem;
	line-height: 1.3;
}

.epc-card__title a {
	text-decoration: none;
	color: inherit;
}

.epc-card__rating {
	margin: 0 0 8px;
}

/* Centrar la calificación según la alineación del cuerpo. */
.epc-card__rating .star-rating {
	display: inline-block;
	margin: 0;
}

.epc-card__price {
	margin: 0 0 10px;
}

.epc-card__price del {
	opacity: 1;
	margin-right: 6px;
}

/* Empuja el botón al fondo para tarjetas de altura uniforme. */
.epc-card__cart {
	margin-top: auto;
}

.epc-card__cart .button {
	display: inline-block;
	cursor: pointer;
	text-decoration: none;
}

/* ----- Flechas ----- */
.epc-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background-color: #fff;
	color: #1f1f1f;
	cursor: pointer;
	z-index: 5;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.epc-arrow svg {
	width: 48%;
	height: 48%;
	display: block;
	fill: currentColor;
	pointer-events: none;
}

.epc-arrow.epc-prev {
	left: -8px;
}

.epc-arrow.epc-next {
	right: -8px;
}

.epc-arrow[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.epc-arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ----- Puntos ----- */
.epc-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

.epc-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.epc-dot:hover {
	transform: scale(1.15);
}

.epc-dot.is-active {
	background-color: #1f1f1f;
}

/* Evita el "salto" mientras el JS no ha inicializado las flechas/puntos. */
.epc:not(.epc-ready) .epc-arrow,
.epc:not(.epc-ready) .epc-dots {
	display: none;
}

/* Aviso en el editor cuando no hay productos. */
.epc-empty {
	padding: 16px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	color: #6b7280;
	text-align: center;
	font-size: 14px;
}
