.home-brands {
    padding: clamp(42px, 5.2vw, 72px) 0;
    background: #fff;
}

.home-brands__header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 32px;
}

.home-brands__heading {
    min-width: 0;
    margin: 0;
    text-align: left;
}

.home-brands__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--color-body, #737373);
    font-size: var(--font-size-b1, 16px);
    font-weight: 400;
    letter-spacing: 0;
    line-height: var(--line-height-b1, 1.5);
}

.home-brands__title {
    margin: 0;
    color: var(--color-heading, #111827);
    font-size: var(--h2, 30px);
    font-weight: 700;
    line-height: 1.4;
}

.home-brands__controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
}

.home-brands__control {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--color-heading, #111827);
    background: var(--color-brand-50, #eff1f4);
    font-size: 16px;
    transition: color .2s ease, background-color .2s ease, opacity .2s ease;
}

.home-brands__control:not(:disabled):hover,
.home-brands__control:not(:disabled):focus-visible {
    color: #fff;
    background: var(--color-primary, #225cff);
}

.home-brands__control:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary, #225cff) 25%, transparent);
    outline-offset: 2px;
}

.home-brands__control:disabled {
    cursor: default;
    opacity: .38;
}

.home-brands__carousel {
    min-width: 0;
    overflow: hidden;
}

.home-brands__rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.home-brands__rail::-webkit-scrollbar {
    display: none;
}

.home-brands__card {
    position: relative;
    display: flex;
    flex: 0 0 calc((100% - 98px) / 8);
    min-width: 0;
    min-height: 152px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px 16px;
    border: 1px solid #e7eaf0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
    color: var(--color-heading, #111827);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    scroll-snap-align: start;
}

.home-brands__card:hover,
.home-brands__card:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary, #225cff) 36%, #e7eaf0);
    box-shadow: 0 15px 34px rgba(15, 23, 42, .1);
    color: var(--color-primary, #225cff);
}

.home-brands__card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary, #225cff) 28%, transparent);
    outline-offset: 3px;
}

.home-brands__logo {
    display: flex;
    width: 100%;
    height: 88px;
    align-items: center;
    justify-content: center;
}

.home-brands__logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 180px;
    padding: 7px;
    object-fit: contain;
    object-position: center;
}

.home-brands__fallback {
    display: -webkit-box;
    overflow: hidden;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.15;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (max-width: 767px) {
    .home-brands {
        padding: 34px 0;
    }

    .home-brands__header-row {
        margin-bottom: 20px;
    }

    .home-brands__title {
        font-size: 24px;
    }

    .home-brands__control {
        width: 44px;
        height: 44px;
    }

    .home-brands__rail {
        gap: 10px;
    }

    .home-brands__card {
        flex-basis: calc((100% - 20px) / 3);
        min-height: 138px;
        padding: 17px 12px;
        border-radius: 15px;
    }

    .home-brands__logo {
        height: 78px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-brands__card,
    .home-brands__control {
        transition: none;
    }

    .home-brands__rail {
        scroll-behavior: auto;
    }
}
