/* ============================================
   MARQUEE AUTO-SCROLL - Reusable Component
   Right-to-left continuous scroll (Magentrix style)
   ============================================ */

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

/* Soft fade edges */
.marquee-wrapper::before,
.marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--marquee-bg, #f8f9fa), transparent);
}

.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--marquee-bg, #f8f9fa), transparent);
}

/* The scrolling track */
.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

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

/* Individual card sizing */
.marquee-card {
    flex-shrink: 0;
    width: 300px;
}

/* Speed variants */
.marquee-track--slow {
    animation-duration: 45s;
}

.marquee-track--fast {
    animation-duration: 20s;
}

/* Keyframes */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive card widths */
@media (max-width: 767px) {
    .marquee-card {
        width: 260px;
    }

    .marquee-wrapper::before,
    .marquee-wrapper::after {
        width: 40px;
    }

    .marquee-track {
        gap: 16px;
    }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
        flex-wrap: wrap;
        width: auto;
        justify-content: center;
    }

    .marquee-card {
        width: auto;
        flex-shrink: 1;
    }
}
