/* Vue controls position; CSS handles the measured DNS-style 300ms movement.
   The server-rendered fallback remains a usable native scrolling list. */
.home-brands-carousel { --brand-max-width: 105px; --brand-max-height: 35px; position: relative; min-width: 0; }
.home-brands-carousel__viewport {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.home-brands-carousel__viewport::-webkit-scrollbar { display: none; }
.home-brands-carousel__track {
    display: flex;
    width: max-content;
    gap: 16px;
    padding: 1px 1px 3px;
    transition: none;
}
.home-brands-carousel.is-desktop .home-brands-carousel__viewport {
    overflow: hidden;
    scroll-snap-type: none;
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}
.home-brands-carousel.is-animated .home-brands-carousel__track { transition: transform 300ms linear; }
.home-brands-carousel.is-dragging .home-brands-carousel__viewport { cursor: grabbing; }
.home-brands-carousel__card {
    box-sizing: border-box;
    flex: 0 0 132px;
    width: 132px;
    height: 69px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
    scroll-snap-align: start;
    user-select: none;
    -webkit-user-drag: none;
    transition: border-color 200ms;
}
.home-brands-carousel__card:hover { color: #333; border-color: #eee; text-decoration: none; }
.home-brands-carousel__card img {
    display: block;
    width: 105px;
    max-width: 100%;
    height: 35px;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
}
.home-brands-carousel__art {
    position: relative;
    display: block;
    flex-shrink: 0;
    overflow: hidden;
    width: var(--brand-max-width);
    height: var(--brand-max-height);
}
.home-brands-carousel__art.is-normalized {
    width: min(var(--brand-max-width), calc(var(--brand-max-height) * var(--brand-ratio)));
    height: auto;
    aspect-ratio: var(--brand-ratio);
}
.home-brands-carousel__art.is-normalized img { position: absolute; max-width: none; object-fit: fill; }
.home-brands-carousel__name {
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font: 600 16px/1.15 'PT Sans', sans-serif;
    text-align: center;
    overflow-wrap: anywhere;
}
.home-brands-carousel__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #333;
    box-shadow: 0 4px 10px rgb(0 0 0 / 10%);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 300ms, transform 200ms, box-shadow 200ms, background-color 200ms;
}
.home-brands-carousel__arrow--prev { left: 12px; }
.home-brands-carousel__arrow--next { right: 12px; }
.home-brands-carousel__arrow svg { width: 20px; height: 20px; }
.home-brands-carousel:hover .home-brands-carousel__arrow,
.home-brands-carousel:focus-within .home-brands-carousel__arrow { opacity: 1; pointer-events: auto; }
.home-brands-carousel__arrow:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgb(0 0 0 / 10%);
}
.home-brands-carousel__arrow:disabled { background: #eee; color: #aaa; cursor: default; }
.home-brands-carousel__arrow[hidden] { display: none; }
.home-brands-carousel__arrow:focus:not(:focus-visible) { outline: none; }
.home-brands-carousel__card:focus-visible,
.home-brands-carousel__arrow:focus-visible,
.home-brands-carousel__viewport:focus-visible { outline: 2px solid #f58220; outline-offset: -3px; }
@media (max-width: 991.98px) {
    .home-brands-carousel { --brand-max-width: 90px; --brand-max-height: 30px; }
    .home-brands-carousel__track { gap: 8px; }
    .home-brands-carousel__card { flex-basis: 112px; width: 112px; height: 57px; padding: 10px; }
    .home-brands-carousel__card img { width: 90px; height: 30px; }
    .home-brands-carousel__name { font-size: 14px; }
}
@media (hover: none) { .home-brands-carousel__arrow { opacity: 1; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) {
    .home-brands-carousel *, .home-brands-carousel *::before, .home-brands-carousel *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
