/* ==========================================================================
   شريط ريلز الواجهة الرئيسية (Front Home Reels Strip - Isolated Styles)
   Prefix: .rls-* (Zero collision with front-style.css & front-reels.css)
   ========================================================================== */

.rls-section {
    --rls-primary: #19a59b;
    --rls-primary-dark: #148a81;
    margin-top: 4px;
    margin-bottom: 14px;
    position: relative;
}

/* ترويسة الشريط المتطابقة مع عناوين أقسام home.blade.php */
.rls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.rls-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rls-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    border-right: 3px solid var(--rls-primary);
    padding-right: 8px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rls-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: var(--rls-primary);
    box-shadow: 0 0 0 3px rgba(25, 165, 155, 0.18);
    flex-shrink: 0;
}

.rls-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rls-all-link:hover {
    background: #f0fdfa;
    border-color: rgba(25, 165, 155, 0.45);
    color: var(--rls-primary);
}

/* منع أي قفزة أو قصّ للبطاقات داخل حاوية Swiper (Zero CLS) */
.rls-swiper {
    position: relative;
    padding-top: 2px;
    padding-bottom: 4px;
}

.rls-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    gap: 10px;
    overflow: hidden;
}

.rls-swiper:not(.swiper-initialized) .swiper-slide {
    width: 136px;
    flex-shrink: 0;
}

/* بطاقة الريل العمودية النظيفة بدون إطار أو ظل */
.rls-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 15;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    border: none;
    box-shadow: none;
    text-decoration: none;
    transform: translateZ(0);
}

.rls-card:hover {
    border: none;
    box-shadow: none;
}

.rls-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.38s ease, filter 0.3s ease;
}

.rls-card:hover .rls-cover {
    transform: scale(1.015);
    filter: brightness(1.04);
}

/* تدرج ناعم يضمن وضوح النص بالأسفل مع إبقاء المعاينة مضيئة */
.rls-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 11, 18, 0.18) 0%,
        rgba(7, 11, 18, 0.02) 38%,
        rgba(7, 11, 18, 0.30) 68%,
        rgba(7, 11, 18, 0.80) 100%
    );
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.25s ease;
}

.rls-card:hover .rls-overlay {
    opacity: 0.85;
}

/* طبقة العناصر العلوية والوسطى (زر التشغيل بالمنتصف + عداد المشاهدات بالزاوية) */
.rls-top-meta {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.rls-play-pill {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.30); /* ← عدّل هذا السطر (أو #000000 لأسود مصمت تماماً) */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.24s ease, background-color 0.24s ease, border-color 0.24s ease;
}

.rls-play-pill svg {
    width: 17px;
    height: 17px;
    margin: 0;
    transform: translateX(1px);
}

.rls-card:hover .rls-play-pill {
    transform: translate(-50%, -50%) scale(1.05); /* كانت 1.12 — اجعلها 1.05 لبروز خفيف أو 1 لإلغائه */
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.5);
}

.rls-views-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 9999px;
    background: rgba(7, 11, 18, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* معلومات المنتج المختصرة أسفل البطاقة */
.rls-bottom-info {
    position: absolute;
    left: 12px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.rls-name {
    margin: 0;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rls-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
}

.rls-price {
    font-size: 12px;
    font-weight: 700;
    color: #5eead4;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    font-variant-numeric: tabular-nums;
}

.rls-currency {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

/* أزرار التنقل للكمبيوتر */
.rls-nav-btn {
    display: none;
}

@media (min-width: 768px) {
    .rls-section {
        margin-bottom: 18px;
    }

    .rls-title {
        font-size: 18px;
    }

    .rls-all-link {
        font-size: 12px;
        padding: 6px 14px;
    }

    .rls-swiper:not(.swiper-initialized) .swiper-slide {
        width: 172px;
    }

    .rls-play-pill {
        width: 42px;
        height: 42px;
    }

    .rls-play-pill svg {
        width: 19px;
        height: 19px;
    }

    .rls-name {
        font-size: 11px;
    }

    .rls-price {
        font-size: 12px;
    }

    .rls-nav-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(25, 165, 155, 0.85);
        backdrop-filter: blur(4px);
        color: #ffffff;
        border: none;
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.2s ease, background-color 0.2s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    }

    .rls-swiper:hover .rls-nav-btn {
        opacity: 1;
    }

    .rls-nav-btn:hover {
        background: var(--rls-primary);
    }

    .rls-nav-btn.swiper-button-disabled {
        opacity: 0 !important;
        pointer-events: none;
    }

    .rls-nav-prev {
        right: 8px;
    }

    .rls-nav-next {
        left: 8px;
    }
}