.sott-top5-widget,
.sott-top5-widget * {
    box-sizing: border-box;
}

.sott-top5-widget {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    font-family: inherit;
}

.sott-top5-title {
    margin: 0 0 18px;
    text-align: center;
    font-size: clamp(22px, 2.2vw, 34px);
    line-height: 1.15;
    font-weight: 700;
}

.sott-top5-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.sott-top5-card {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 0;
}

.sott-top5-card:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.sott-top5-bar {
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 700;
}

.sott-top5-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sott-top5-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f2f2f2;
}

.sott-top5-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease;
}

.sott-top5-card[href]:hover .sott-top5-image {
    transform: scale(1.025);
}

.sott-top5-loading,
.sott-top5-error {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    text-align: center;
}

.sott-top5-hidden {
    display: none !important;
}

@media (max-width: 900px) and (min-width: 651px) {
    .sott-top5-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobiel: altijd twee kaarten zichtbaar en horizontaal swipen. */
@media (max-width: 650px) {
    .sott-top5-widget {
        overflow: hidden;
    }

    .sott-top5-title {
        margin-bottom: 14px;
    }

    .sott-top5-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 10px) / 2);
        grid-template-columns: none;
        gap: 10px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 6px;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        touch-action: pan-x pan-y;
    }

    .sott-top5-grid::-webkit-scrollbar {
        display: none;
    }

    .sott-top5-card {
        width: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: normal;
    }

    .sott-top5-bar {
        min-height: 32px;
        padding: 5px 6px;
        gap: 4px;
        font-size: 12.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sott-top5-grid {
        scroll-behavior: auto;
    }

    .sott-top5-image {
        transition: none;
    }
}
