.moviesho-smart-related,
.moviesho-latest-updated {
    position: relative;
}

.moviesho-latest-updated__head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
    direction: rtl;
}

.moviesho-latest-updated__head h3 {
    margin: 0;
    color: #f6f7fb;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.7;
}

.moviesho-smart-related__head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    direction: rtl;
}

.moviesho-smart-related__tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    direction: rtl;
}

.moviesho-smart-related__tab {
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    color: #f6f7fb !important;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.moviesho-smart-related__tab:hover,
.moviesho-smart-related__tab.is-active {
    background: rgba(33, 208, 122, .16);
    border-color: rgba(33, 208, 122, .55);
    color: #21d07a !important;
    box-shadow: 0 0 0 1px rgba(33, 208, 122, .12) inset;
}

.moviesho-smart-related__body {
    position: relative;
    min-height: 260px;
}

.moviesho-smart-related__content[hidden] {
    display: none !important;
}

/*
 * Native related slider: no Owl markup, no cloned slides and no transform loop.
 * Touch scrolling is handled by the browser; JavaScript only adds mouse dragging.
 */
.moviesho-related-slider {
    --moviesho-related-gap: 15px;
    --moviesho-related-card-width: calc(12.5% - 13.125px);
    display: flex;
    flex-flow: row nowrap !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--moviesho-related-gap);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 8px;
    margin: 0;
    direction: rtl;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    overflow-anchor: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    scrollbar-width: none;
    cursor: grab;
}

.moviesho-related-slider::-webkit-scrollbar {
    display: none;
}

.moviesho-related-slider.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.moviesho-related-slider > .section-items-2 {
    flex: 0 0 var(--moviesho-related-card-width) !important;
    width: var(--moviesho-related-card-width) !important;
    min-width: var(--moviesho-related-card-width) !important;
    max-width: var(--moviesho-related-card-width) !important;
    margin: 0 !important;
    float: none !important;
    display: block;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-anchor: none;
    -webkit-user-drag: none;
}

.moviesho-related-slider .section-item-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
}

.moviesho-related-slider .section-item-img,
.moviesho-related-slider .section-item-img a,
.moviesho-latest-updated-slider .section-item-img,
.moviesho-latest-updated-slider .section-item-img a {
    display: block;
    width: 100%;
}

.moviesho-related-slider .section-item-img img,
.moviesho-latest-updated-slider .section-item-img img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.moviesho-related-slider .section-item-title,
.moviesho-latest-updated-slider .section-item-title {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}

.moviesho-related-slider .section-item-title h2,
.moviesho-latest-updated-slider .section-item-title h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    line-height: 1.45;
}

@media (max-width: 1199px) {
    .moviesho-related-slider {
        --moviesho-related-card-width: calc(16.6667% - 12.5px);
    }
}

@media (max-width: 991px) {
    .moviesho-related-slider {
        --moviesho-related-card-width: calc(25% - 11.25px);
    }
}

@media (max-width: 599px) {
    .moviesho-related-slider {
        --moviesho-related-gap: 10px;
        /* About 2.3 visible cards, without fractional Owl calculations. */
        --moviesho-related-card-width: calc(43.4783% - 5.65px);
        padding-bottom: 6px;
    }
}

@media (max-width: 767px) {
    .moviesho-smart-related__head {
        align-items: flex-start;
    }

    .moviesho-smart-related__tabs {
        width: 100%;
    }

    .moviesho-smart-related__tab {
        padding: 7px 12px;
        font-size: 12px;
    }
}

@media (hover: none), (pointer: coarse) {
    .moviesho-related-slider {
        cursor: auto;
    }
}
