/**
 * UG-613 homepage supplier slider.
 * Figma: SW_EXT_the-universal-group 18537:16465 (desktop), 18808:25094 (mobile).
 */

.ug-suppliers {
    background: #fff;
    border-bottom: 1px solid #e4e4e4;
    clear: both;
    color: #000;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 32px 0 36px;
    width: 100%;
}

.ug-suppliers-inner {
    margin: 0 auto;
    max-width: 1440px;
    position: relative;
}

.ug-suppliers-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    margin: 0 auto 24px;
    max-width: 1260px;
    padding: 0 20px;
    box-sizing: border-box;
}

.ug-suppliers-slider {
    align-items: center;
    display: flex;
    gap: 20px;
    padding: 0 30px;
}

.ug-suppliers-track {
    display: flex;
    flex: 1 1 auto;
    gap: 16px;
    list-style: none;
    margin: 0 auto;
    max-width: 1260px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 6px 2px;
    scroll-padding: 0 2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ug-suppliers-track::-webkit-scrollbar {
    display: none;
}

.ug-suppliers-item {
    flex: 0 0 294px;
    margin: 0;
    /* Containing block for the visually hidden .ug-supplier-name: otherwise it is positioned against
       .ug-suppliers-inner, outside the scrolling track, and the off-screen cards' names widen the page */
    position: relative;
    scroll-snap-align: start;
}

.ug-supplier {
    background-color: #f5f5f5;
    background-origin: content-box;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: 1px solid #ebebeb;
    border-radius: 3px;
    box-sizing: border-box;
    display: block;
    height: 120px;
    padding: 24px 22px;
    transition: border-color .15s, box-shadow .15s;
}

.ug-supplier:hover,
.ug-supplier:focus-visible {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.ug-suppliers.-dragging .ug-suppliers-track {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.ug-supplier-name {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.ug-suppliers-arrow {
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.ug-suppliers-arrow::before {
    border: solid #1a1a1a;
    border-width: 0 2px 2px 0;
    content: '';
    height: 7px;
    transform: rotate(-45deg);
    margin-right: 3px;
    width: 7px;
}

.ug-suppliers-arrow.-prev::before {
    margin: 0 0 0 3px;
    transform: rotate(135deg);
}

.ug-suppliers-arrow:hover:not(:disabled) {
    background: #f5f5f5;
}

.ug-suppliers-arrow:disabled {
    cursor: default;
    opacity: .4;
}

.ug-suppliers.-static .ug-suppliers-arrow {
    visibility: hidden;
}

.ug-suppliers-indicator {
    display: none;
}

/* Tablet: desktop cards scaled down (same 294x120 proportions) so 3-4 fit instead of 2 */
@media (min-width: 768px) and (max-width: 1023px) {
    .ug-suppliers {
        padding: 28px 0 32px;
    }

    .ug-suppliers-slider {
        gap: 12px;
        padding: 0 20px;
    }

    .ug-suppliers-track {
        gap: 12px;
    }

    .ug-suppliers-item {
        flex-basis: 196px;
    }

    .ug-supplier {
        height: 80px;
        padding: 14px 16px;
    }
}

/* Mobile: swipe + segment indicator instead of arrows (Figma 375) */
@media (max-width: 767px) {
    .ug-suppliers {
        padding: 24px 0;
    }

    .ug-suppliers-title {
        margin-bottom: 16px;
        max-width: 340px;
        padding: 0 16px;
        margin-left: 0;
    }

    .ug-suppliers-slider {
        padding: 0;
    }

    .ug-suppliers-arrow {
        display: none;
    }

    .ug-suppliers-track {
        gap: 8px;
        padding: 6px 16px;
        scroll-padding: 0 16px;
    }

    .ug-suppliers-item {
        flex-basis: 124px;
    }

    .ug-supplier {
        height: 63px;
        padding: 10px 6px;
    }

    .ug-suppliers-indicator {
        display: flex;
        gap: 6px;
        justify-content: center;
        margin-top: 16px;
    }

    .ug-suppliers-segment {
        background: #dcdcdc;
        height: 4px;
        width: 26px;
    }

    .ug-suppliers-segment.-active {
        background: #c8102e;
    }
}

/* Focus: the theme outlines links on any focus, so clicking a supplier left a black border, and Magento adds a
   blue glow (._keyfocus *:focus) once the Tab key has been used. Only keyboard focus (:focus-visible) shows an
   outline; on the cards it is drawn inside, as the scrolling track clips overflow. */
.ug-suppliers a:focus,
.ug-suppliers button:focus {
    box-shadow: none;
    outline: none;
}

.ug-suppliers a.ug-supplier:focus-visible {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    outline: 2px solid #c41230;
    outline-offset: -2px;
}

.ug-suppliers .ug-suppliers-arrow:focus-visible {
    box-shadow: none;
    outline: 2px solid #c41230;
    outline-offset: 2px;
}
