/* assets/css/style.css - النسخة الاحترافية (Game Store Design) */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --bg-body: #09090b;       /* أسود فحمي */
    --bg-card: #18181b;       /* رمادي غامق جداً للكروت */
    --primary: #7c3aed;       /* بنفسجي قوي */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass: rgba(24, 24, 27, 0.6);
    --border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding-bottom: 100px;
    /* خلفية ناعمة جداً */
    background-image: 
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.15), transparent 40%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.1), transparent 40%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
* { box-sizing: border-box; }

/* --- 1. الهيدر الاحترافي (Pro Header) --- */
.pro-header {
    background: rgba(9, 9, 11, 0.85); /* شبه شفاف */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 1000;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}

.user-info h5 { margin: 0; font-weight: 800; font-size: 1.1rem; }
.user-info p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }

.wallet-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    color: #4ade80; /* لون أخضر للرصيد */
    display: flex; align-items: center; gap: 8px;
}

/* شريط البحث */
.search-bar-pro {
    margin: 15px 20px;
    position: relative;
}
.search-bar-pro input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px 45px 14px 15px;
    border-radius: 14px;
    color: #fff;
    font-family: 'Tajawal';
    font-size: 0.95rem;
    transition: 0.3s;
}
.search-bar-pro input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}
.search-bar-pro i {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}

/* --- 2. السلايدر --- */
.hero-wrapper {
    margin: 0 20px 25px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}
.swiper-slide img {
    width: 100%; height: 180px; object-fit: cover;
}

/* --- 3. تصميم البطاقة الجديد (صورة كاملة) --- */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden; /* مهم جداً لقص الصورة */
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:active { transform: scale(0.97); }

/* الصورة: تملأ العرض كاملاً */
.game-card-img-wrapper {
    width: 100%;
    height: 130px; /* ارتفاع ثابت للصورة */
    position: relative;
    background: #202025; /* لون خلفية في حال تأخر التحميل */
}

.game-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* تملأ المساحة بدون تمطيط */
    display: block;
}

/* تدرج لوني فوق الصورة ليجعل النص مقروءاً */
.img-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(24, 24, 27, 1), transparent);
}

/* محتوى البطاقة (النص) */
.game-card-body {
    padding: 12px 10px;
    text-align: center;
    flex-grow: 1; /* يأخذ باقي المساحة */
    display: flex; flex-direction: column; justify-content: center;
}

.game-title {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 4px;
}

/* --- 4. البار السفلي --- */
.nav-bar {
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    position: fixed; bottom: 0; width: 100%;
    padding: 10px 0 25px;
    display: flex; justify-content: space-around; align-items: center;
    z-index: 9999;
}
.nav-btn {
    display: flex; flex-direction: column; align-items: center;
    color: #71717a; font-size: 0.7rem; gap: 4px;
}
.nav-btn i { font-size: 1.4rem; transition: 0.2s; }
.nav-btn.active { color: var(--primary); }
.nav-btn.active i { transform: translateY(-2px); }

/* زر عائم */
.fab-btn {
    width: 54px; height: 54px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    margin-top: -30px;
    border: 4px solid var(--bg-body);
}

.section-title {
    padding: 0 20px; margin-bottom: 15px;
    font-size: 1.1rem; font-weight: 800; color: #fff;
    border-right: 4px solid var(--primary);
    line-height: 1;
}
/* --- تنسيقات صفحة الخدمات (Products List) --- */

/* هيدر الصفحة الداخلية */
.page-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(to bottom, rgba(124, 58, 237, 0.2), transparent);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    border-radius: 0 0 30px 30px;
}
.page-header img {
    width: 80px; height: 80px; object-fit: contain;
    filter: drop-shadow(0 0 15px var(--primary));
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* كرت الخدمة (المنتج) */
.service-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary);
    transform: translateX(-5px);
}

/* خط جانبي ملون */
.service-card::before {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
    background: var(--primary); border-radius: 4px 0 0 4px;
}

/* معلومات الخدمة */
.service-info h5 {
    color: #fff; font-weight: 700; font-size: 0.95rem; margin: 0 0 5px;
}
.service-info p {
    color: var(--text-muted); font-size: 0.75rem; margin: 0;
    display: flex; align-items: center; gap: 5px;
}

/* السعر وزر الشراء */
.service-action {
    text-align: left;
    min-width: 80px;
}
.price-tag {
    display: block;
    color: #4ade80; /* لون أخضر للربح */
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.btn-buy-sm {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    width: 100%;
    transition: 0.2s;
}
.btn-buy-sm:hover { background: var(--accent); }

/* زر الرجوع العائم */
.back-btn-floating {
    position: fixed; top: 20px; right: 20px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; z-index: 1001;
    border: 1px solid var(--border);
}
/* --- تصميم شبكة المنتجات (Cover Style) --- */

.product-card {
    background: var(--bg-card); /* رمادي غامق */
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden; /* مهم جداً لقص الصورة مع الزوايا */
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    /* ألغينا الـ padding من هنا لنسمح للصورة بأخذ العرض الكامل */
    padding: 0; 
}

.product-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

/* 1. منطقة الغلاف (الصورة) */
.product-cover-wrapper {
    width: 100%;
    height: 110px; /* ارتفاع الغلاف */
    position: relative;
    background: #202025; /* لون خلفية احتياطي */
}

.product-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* الصورة تملأ المساحة بالكامل كغلاف */
    display: block;
}

/* ظل خفيف أسفل الصورة لدمجها مع المحتوى */
.product-cover-wrapper::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 40%;
    background: linear-gradient(to top, rgba(24, 24, 27, 1), transparent);
}

/* 2. منطقة المحتوى (النص والزر) */
.product-body {
    padding: 10px;
    flex-grow: 1; /* يأخذ باقي المساحة */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* العنوان */
.product-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em; /* ارتفاع ثابت لسطرين */
}

/* السعر */
.product-price {
    font-size: 1rem;
    font-weight: 800;
    color: #fbbf24; /* ذهبي */
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* زر الشراء */
.btn-product-buy {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 0;
    font-size: 0.85rem;
    width: 100%;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}