/* ==============================> 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;
}

.wd-marquee-container:before {
    background: linear-gradient(90deg,var(--e-global-color-secondary) 0,rgba(20,20,20,0));
    content: "";
    height: 100%;
    position: absolute;
    width: 12.5rem;
    z-index: 2;
    pointer-events: none;
    left: 0;
    top: 0;
}

.wd-marquee-container:after {
    background: linear-gradient(90deg,var(--e-global-color-secondary) 0,rgba(20,20,20,0));
    content: "";
    height: 100%;
    position: absolute;
    width: 12.5rem;
    z-index: 2;
    pointer-events: none;
    right: 0;
    top: 0;
    transform: rotate(180deg);
}

/* -> 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;
}

.elementor-widget-wd_product_categories .category-image img {
    transform: scale(0.8);
}

/* -> 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;
    }
}

/* ==============================> CUADRICULA DE CATEGORIAS DE PRODUCTO */

/* -> Contenedor */
.contenedor-categorias-cuadricula {
	display: grid;
	grid-template-columns: repeat(var(--columnas-categorias-cuadricula, 5), 1fr);
	gap: 12px;
	width: 100%;
}

/* -> Item de categoria */
.contenedor-categorias-cuadricula .item-categoria-cuadricula {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    gap: 8px;
    padding: 2px 6px;
    min-height: 32px;
    border-radius: 8px;
    background-color: #f5f5f5;
    border: 1px solid #dbdbdb;
    -webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contenedor-categorias-cuadricula .item-categoria-cuadricula:hover {
	-webkit-transform: translateY(-4px);
	transform: translateY(-4px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* -> Imagen de categoria */
.contenedor-categorias-cuadricula .imagen-categoria-cuadricula {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.3125rem;
    height: 3.3125rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f5f5f5;
    -webkit-transition: opacity 0.4s ease;
    transition: opacity 0.4s ease;
}

.contenedor-categorias-cuadricula .imagen-categoria-cuadricula img {
	width: 100%;
	height: 100%;
	-o-object-fit: cover;
	object-fit: cover;
	-webkit-transition: -webkit-transform 0.3s ease;
	transition: transform 0.3s ease;
}

.contenedor-categorias-cuadricula .item-categoria-cuadricula:hover .imagen-categoria-cuadricula img {
	-webkit-transform: scale(1.08);
	transform: scale(1.08);
}

/* -> Titulo de categoria */
.contenedor-categorias-cuadricula .titulo-categoria-cuadricula {
	font-size: 12px;
	line-height: 16px;
	color: inherit;
	-webkit-transition: color 0.3s ease;
	transition: color 0.3s ease;
}

.contenedor-categorias-cuadricula .item-categoria-cuadricula:hover .titulo-categoria-cuadricula {
	color: var(--e-global-color-primary);
}

/* -> Responsive */
@media (max-width: 768px) {
	.contenedor-categorias-cuadricula {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.contenedor-categorias-cuadricula .imagen-categoria-cuadricula {
		width: 70px;
		height: 70px;
	}

	.contenedor-categorias-cuadricula .titulo-categoria-cuadricula {
		font-size: 13px;
	}
}



/* ==============================> DESPLEGABLE VER MÁS */

/* -> Contenedor recortado */
.desplegable{
    position: relative;
    max-height: 100px;
    overflow: hidden;
    flex-wrap: nowrap;      /* evita que el flex column salte a columnas al limitar la altura */
    transition: max-height .45s ease;
}

/* -> Degradado inferior (solo cuando hay contenido oculto) */
.desplegable--recortado::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 90%);
    transition: opacity .3s ease;
}
.desplegable--recortado.desplegable--abierto::after{
    opacity: 0;
}

/* -> Enlace Ver más */
.desplegable__boton{
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin-top: -22px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.desplegable--abierto + .desplegable__boton{
    margin-top: 12px;
}

/* -> Pastilla */
.desplegable__boton .desplegable__pastilla{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    color: #5b6b7b;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    transition: color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.desplegable__boton:hover .desplegable__pastilla{
    color: var(--e-global-color-primary);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    transform: translateY(-1px);
}

/* -> Ícono */
.desplegable__boton i{
    font-size: 12px;
    transition: transform .3s ease;
}
.desplegable--abierto + .desplegable__boton i{
    transform: rotate(180deg);
}

/* -> Responsive 768px */
@media (max-width: 768px){
    .desplegable--recortado::after{ height: 55px; }
    .desplegable__boton .desplegable__pastilla{
        font-size: 13px;
        padding: 7px 16px;
    }
}