.storefront-brand-rail {
    --brand-gap: 20px;
    position: relative;
    /* Keep the brand strip below the desktop menu backdrop (z-index: 9). */
    z-index: 8;
    padding: 20px 0 6px;
    overflow: hidden;
    border-bottom: 0;
    background: #fff;
}

.storefront-brand-rail__viewport {
    width: 100%;
    padding-bottom: 2px;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.storefront-brand-rail__viewport.is-dragging {
    cursor: grabbing;
}

.storefront-brand-rail__track,
.storefront-brand-rail__group {
    display: flex;
    align-items: center;
    gap: var(--brand-gap);
}

.storefront-brand-rail__track {
    width: 100%;
    will-change: transform;
}

.storefront-brand-rail__group {
    flex: 0 0 auto;
}

.storefront-brand-rail__item {
    display: flex;
    flex: 0 0 var(--brand-item-width, 140px);
    min-width: 0;
    height: 58px;
    align-items: center;
    justify-content: center;
}

.storefront-brand-rail__link {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e3e7ee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.storefront-brand-rail__logo {
    display: block;
    width: auto;
    max-width: min(120px, 88%);
    height: 40px;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    filter: none;
    opacity: 1;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.storefront-brand-rail__link:hover .storefront-brand-rail__logo,
.storefront-brand-rail__link:focus-visible .storefront-brand-rail__logo {
    transform: scale(1.04);
}

.storefront-brand-rail__link:hover,
.storefront-brand-rail__link:focus-visible {
    border-color: #cbd3df;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
}

.storefront-brand-rail__link:focus-visible {
    outline: 2px solid var(--color-primary, #215ada);
    outline-offset: -2px;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .storefront-brand-rail {
        --brand-gap: 16px;
    }

}

@media (min-width: 768px) {
    .storefront-brand-rail + .popup-mobile-menu + .theme-home-layout-instance .rbt-phone-hero-section-area {
        padding-top: 16px !important;
    }
}

@media (max-width: 767.98px) {
    .storefront-brand-rail {
        --brand-gap: 12px;
        padding: 14px 0 6px;
    }

    .storefront-brand-rail .container {
        padding-right: 14px;
        padding-left: 14px;
    }

    .storefront-brand-rail__item {
        height: 48px;
    }

    .storefront-brand-rail__logo {
        max-width: min(96px, 88%);
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .storefront-brand-rail__track {
        transform: none !important;
    }

    .storefront-brand-rail__logo {
        transition: none;
    }
}
