/* ==============================> CARRUSEL DE TEXTOS INFINITO */

.wd-marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    opacity: 0;
    animation: wd-marquee-fadein 1.6s ease forwards;
}

/* -> ANIMACIÓN DE ENTRADA */

@keyframes wd-marquee-fadein {
    to {
        opacity: 1;
    }
}

/* -> PISTA DE DESPLAZAMIENTO */

.wd-marquee-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.wd-marquee-track:hover {
    animation-play-state: paused;
}

/* -> ITEMS INDIVIDUALES */

.wd-marquee-item {
    display: inline-block;
    color: #fff;
    opacity: 0.8;
    font-size: 14px;
    font-weight: 500;
    padding: 0 16px;
    transition: color 0.4s ease, transform 0.8s ease;
}

.wd-marquee-item:hover {
    opacity: 1; 
    transform: scale(1.05);
}

/* -> ANIMACIÓN DE SCROLL */

@keyframes wd-scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--scroll-amount));
    }
}

/* -> RESPONSIVE TABLET */

@media (max-width: 768px) {
    .wd-marquee-container {
        padding: 8px 0;
    }
    
    .wd-marquee-item {
        font-size: 13px;
        padding: 0 20px;
    }
}


/* ==============================> CARRUSEL DE CATEGORÍAS */

/* -> Contenedor principal */

.cdc-wrapper {
	width: 100%;
	overflow: hidden;
	position: relative;
}

.cdc-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	cursor: grab;
	padding-bottom: 4px;
	border-radius: 12px;
}

.cdc-track::-webkit-scrollbar {
	display: none;
}

.cdc-track.cdc-arrastrando {
	cursor: grabbing;
	scroll-snap-type: none;
}


/* -> Item — proporción 9:16 */

.cdc-item {
	position: relative;
	flex: 1 1 calc(25% - 12px);
	max-width: calc(25% - 12px);
	height: 400px;
	border-radius: 12px;
	overflow: hidden;
	scroll-snap-align: start;
	-webkit-mask-image: -webkit-radial-gradient(white, black); /* fix border-radius iOS */
	transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
	            box-shadow 0.35s ease;
}

.cdc-item:hover {
	transform: translateY(-4px) scale(1.01);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}


/* -> Enlace que cubre todo el item */

.cdc-item__enlace {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: block;
}


/* -> Imagen de fondo */

.cdc-item__fondo {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.cdc-item:hover .cdc-item__fondo {
	transform: scale(1.06);
}


/* -> Overlay */

.cdc-item__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.24);
	transition: background-color 0.35s ease;
	z-index: 2;
}

.cdc-item:hover .cdc-item__overlay {
	background-color: rgba(0, 0, 0, 0.36);
}


/* -> Contenido inferior */

.cdc-item__contenido {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 5;
	padding: 24px 18px 20px;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.72) 0%,
		rgba(0, 0, 0, 0.32) 55%,
		rgba(0, 0, 0, 0) 100%
	);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	transition: padding 0.35s ease;
}

.cdc-item:hover .cdc-item__contenido {
	padding-bottom: 26px;
}


/* -> Subtítulo "lo más nuevo en" */

.cdc-item__subtitulo {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.80);
    line-height: 18px;
}


/* -> Título de la categoría */

.cdc-item__titulo {
	margin: 0;
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	line-height: 28px;
}


/* -> Botón "Ver más" */

.cdc-item__boton {
	display: inline-block;
	margin-top: 10px;
	padding: 6px 12px;
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
	border: 1.5px solid rgba(255, 255, 255, 0.70);
	border-radius: 8px;
	background-color: transparent;
	transition: background-color 0.25s ease,
	            border-color 0.25s ease,
	            color 0.25s ease,
	            transform 0.25s ease;
	pointer-events: none; /* el clic lo maneja el enlace padre */
}

.cdc-item:hover .cdc-item__boton {
	background-color: var(--e-global-color-secondary, #ffffff);
	border-color: var(--e-global-color-primary, #ffffff);
	color: #fff;
	transform: translateY(-1px);
}


/* -> Menos de 4 items: se distribuyen en el espacio disponible */

.cdc-wrapper[data-total="1"] .cdc-item {
	max-width: calc(25% - 12px);
}

.cdc-wrapper[data-total="2"] .cdc-item {
	max-width: calc(50% - 8px);
}

.cdc-wrapper[data-total="3"] .cdc-item {
	max-width: calc(33.333% - 11px);
}


/* ==============================> RESPONSIVE */

/* -> Tablet (< 1024px) — 3 columnas */

@media (max-width: 1024px) {
	.cdc-item {
		flex: 0 0 calc(33.333% - 11px);
		max-width: calc(33.333% - 11px);
	}
}

/* -> Móvil (< 768px) — 2 columnas visibles, scroll lateral */

@media (max-width: 768px) {

	.cdc-track {
		gap: 12px;
	}

	.cdc-item {
		flex: 0 0 calc(50% - 6px);
		max-width: calc(50% - 6px);
	}

	.cdc-item__titulo {
		font-size: 14px;
	}

	.cdc-item__contenido {
		padding: 18px 14px 16px;
	}

	.cdc-item__boton {
		font-size: 11px;
		padding: 5px 13px;
	}
}

/* -> Móvil pequeño (< 420px) — tarjetas más anchas */

@media (max-width: 420px) {
	.cdc-item {
		flex: 0 0 70%;
		max-width: 70%;
	}
}