/**
 * MSL Core — Carrusel de Marcas (Infinite Loop + Fade Edges).
 */

.msl-brands {
	padding: 80px 0 48px;
	overflow: hidden;
	background: var(--msl-surface, #fff);
	border-top: 1px solid var(--msl-border-light, #e8e8e8);
}

.msl-brands__inner {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 60px;
}

/* Fade edges con máscaras */
.msl-brands__inner::before,
.msl-brands__inner::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 60px;
	z-index: 2;
	pointer-events: none;
}

.msl-brands__inner::before {
	left: 0;
	background: linear-gradient(to right, var(--msl-surface, #fff) 0%, transparent 100%);
}

.msl-brands__inner::after {
	right: 0;
	background: linear-gradient(to left, var(--msl-surface, #fff) 0%, transparent 100%);
}

/* Track animado */
.msl-brands__track {
	display: flex;
	gap: 48px;
	align-items: center;
	animation: msl-brands-scroll 30s linear infinite;
	width: max-content;
}

.msl-brands__track:hover {
	animation-play-state: paused;
}

/* Slide */
.msl-brands__slide {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 202px;
	height: 86px;
}

.msl-brands__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.55;
	transition: filter 0.3s, opacity 0.3s;
}

.msl-brands__slide:hover .msl-brands__img {
	filter: grayscale(0%);
	opacity: 1;
}

/* Animación infinite loop */
@keyframes msl-brands-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.msl-brands {
		padding: 60px 0 32px;
	}
	.msl-brands__inner {
		padding: 0 40px;
	}
	.msl-brands__inner::before,
	.msl-brands__inner::after {
		width: 40px;
	}
	.msl-brands__track {
		gap: 32px;
	}
	.msl-brands__slide {
		width: 158px;
		height: 69px;
	}
}

@media (max-width: 480px) {
	.msl-brands__slide {
		width: 130px;
		height: 58px;
	}
	.msl-brands__track {
		gap: 24px;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.msl-brands__track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
		gap: 24px;
	}
	.msl-brands__inner::before,
	.msl-brands__inner::after {
		display: none;
	}
	.msl-brands__inner {
		padding: 0 24px;
	}
}
