/* =============================================================
   تنسيقات الصفحة الرئيسية (Index Page Layout and Slides)
   ============================================================= */

/* ترويسة تصفح الأقسام */
.header { 
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); 
    color: white; 
    padding: 40px; 
    border-radius: 24px; 
    margin-bottom: 30px; 
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.15);
}
.header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 900;
}
.header p {
    margin: 0;
    font-size: 15px;
    color: #e0f2fe;
    line-height: 1.6;
}

/* الأقسام والفئات (Categories Section) */
.category-section {
    margin-bottom: 32px;
}
.category-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.category-title span {
    color: var(--primary);
}
.category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.category-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(17, 22, 37, 0.6);
    border: 1px solid var(--border);
    color: #cbd5e1;
    padding: 10px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}
.category-badge:hover {
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    background-color: rgba(30, 41, 59, 0.5);
}
.category-badge.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #090d16;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

/* شبكة المنتجات العادية (Grid) */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 24px; 
}
.product-card { 
    background: var(--card-bg); 
    border-radius: 20px; 
    padding: 16px; 
    border: 1px solid var(--border); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.product-card:hover { 
    transform: translateY(-6px); 
    border-color: var(--primary); 
    box-shadow: 0 12px 25px -8px rgba(56, 189, 248, 0.25);
}
.product-thumb { 
    width: 100%; 
    aspect-ratio: 16/10; 
    object-fit: cover; 
    border-radius: 12px; 
    background-color: #0c101d;
}
.product-title { 
    font-size: 15px; 
    font-weight: 700; 
    margin: 12px 0 6px 0; 
    color: #ffffff;
    line-height: 1.4;
}
.product-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px 0;
}
.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.price { 
    color: var(--primary); 
    font-weight: 900; 
    font-size: 18px;
}
.price span {
    font-size: 11px;
    font-weight: normal;
    color: var(--text-muted);
}
.btn-view {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-view:hover {
    background-color: var(--primary);
    color: #090d16;
    font-weight: 900;
}

/* -------------------------------------------------------------
   سلايدات نتفلكس الأنيقة والتحميل التدريجي الموفر للسرعة
   ------------------------------------------------------------- */
.netflix-row {
    margin-bottom: 45px;
    position: relative;
}
.netflix-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.netflix-row-title {
    font-size: 18px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.netflix-row-title span.badge {
    font-size: 10px;
    font-weight: bold;
    color: #f43f5e;
    background-color: rgba(244, 63, 94, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(244, 63, 94, 0.3);
}
.netflix-row-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}
.netflix-slider-container {
    position: relative;
    margin: 0 -10px;
    padding: 0 10px;
}
.netflix-slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
}
.netflix-slider-track::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.netflix-item {
    width: 240px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.netflix-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 12px 25px -10px rgba(56, 189, 248, 0.25);
}
.netflix-thumb-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    background-color: #0c101d;
}
.netflix-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s ease;
}
.netflix-item:hover .netflix-thumb {
    transform: scale(1.05);
}
.netflix-item-title {
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0 4px 0;
    color: #ffffff;
    line-clamp: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.netflix-item-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    line-clamp: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.netflix-slider-container:hover .slide-arrow {
    opacity: 1;
}
.slide-arrow:hover {
    background-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}
.slide-arrow.left {
    left: 20px;
}
.slide-arrow.right {
    right: 20px;
}
.slide-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* الجلب التدريجي للسلايدات كأنه متصفح ذكي */
.lazy-slide {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(5px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.lazy-slide.slide-visible {
    opacity: 1;
    transform: translateY(0);
    filter: none;
}

/* -------------------------------------------------------------
   Premium Hero Slider (Widescreen + Circular Thumbnails like the reference image)
   ------------------------------------------------------------- */
.premium-slider-container {
    position: relative;
    width: 100%;
    height: 85vh;
    background-color: #090d16;
    border-radius: 0 !important;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(15, 23, 42, 0.4);
}
@media (max-width: 768px) {
    .premium-slider-container {
        height: 90vh;
    }
}
.premium-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}
.premium-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
.premium-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 13, 22, 0.9) 0%, rgba(9, 13, 22, 0.15) 60%, rgba(9, 13, 22, 0.35) 100%);
    z-index: 3;
}
.premium-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.8;
    transform: scale(1);
    transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.premium-slide.active .premium-slide-img {
    transform: scale(1.08);
}
.premium-slide-content {
    position: absolute;
    right: 48px;
    left: 48px;
    bottom: 180px;
    z-index: 10;
    text-align: right;
    max-width: 750px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.15s;
}
.premium-slide.active .premium-slide-content {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 768px) {
    .premium-slide-content {
        right: 20px;
        left: 20px;
        bottom: 150px;
    }
}
.premium-slide-badge {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.premium-slide-title {
    color: white;
    font-size: 32px;
    font-weight: 950;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .premium-slide-title {
        font-size: 24px;
    }
}
.premium-slide-subtitle {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .premium-slide-subtitle {
        font-size: 12px;
    }
}
.premium-slide-btn {
    background-color: #f59e0b;
    color: #030712 !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
    transition: all 0.2s;
}
.premium-slide-btn:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

/* Horizontal Dash Indicators (شحطات صغيرة) for Slider */
.premium-thumbnails-container {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
}
.premium-thumbnail-item {
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 0;
    flex-shrink: 0;
    outline: none;
}
.premium-thumbnail-item::after {
    content: '';
    display: block;
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-thumbnail-item:hover::after {
    background-color: rgba(255, 255, 255, 0.6);
}
.premium-thumbnail-item.active::after {
    width: 44px;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* الدوائر المصغرة مع الفلاتر */
.premium-thumbnail-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.premium-thumbnail-item:hover .premium-thumbnail-circle {
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}
.premium-thumbnail-item.active .premium-thumbnail-circle {
    width: 104px;
    height: 104px;
    border: 3px solid #f59e0b;
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.25);
    transform: scale(1.08);
}
.premium-thumbnail-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
