.home-brands {
    --home-brand-item-width: 168px;
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 48%, #fef8f8 100%);
}

.home-brands__track {
    position: relative;
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.home-brands__marquee {
    display: flex;
    align-items: center;
    width: max-content;
    animation: home-brands-scroll calc(var(--brand-count, 1) * 3s) linear infinite;
}

.home-brands__marquee:hover {
    animation-play-state: paused;
}

.home-brands__item {
    flex: 0 0 var(--home-brand-item-width);
    padding: 0 0.625rem;
}

.home-brands__card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    padding: 0.875rem 1.125rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    box-shadow: 0 2px 8px rgb(15 23 42 / 0.05);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-brands__card:hover {
    border-color: rgb(175 62 62 / 0.4);
    box-shadow: 0 12px 28px rgb(175 62 62 / 0.14);
    transform: translateY(-3px) scale(1.02);
}

.home-brands__card:focus-visible {
    outline: 2px solid rgb(175 62 62 / 0.65);
    outline-offset: 2px;
}

.home-brands__logo {
    max-width: 120px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.85);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.home-brands__card:hover .home-brands__logo {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.04);
}

@keyframes home-brands-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-1 * var(--home-brand-item-width) * var(--brand-count, 1)));
    }
}

@media (max-width: 768px) {
    .home-brands {
        --home-brand-item-width: 140px;
    }

    .home-brands__card {
        height: 76px;
    }

    .home-brands__logo {
        max-width: 100px;
        max-height: 40px;
    }

    .home-brands__marquee {
        animation-duration: calc(var(--brand-count, 1) * 2.4s);
    }
}
