/* --- متغيرات الألوان المأخوذة من الصفحة الرئيسية --- */
:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --card-border: rgba(56, 189, 248, 0.2);
    --primary-color: #0284c7;
    --accent-color: #38bdf8;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition-speed: 0.4s ease;
}

body.dark-mode {
    --bg-color: #030712;
    --text-color: #f8fafc;
    --card-bg: rgba(15, 23, 42, 0.7);
    --card-border: rgba(56, 189, 248, 0.25);
    --primary-color: #38bdf8;
    --accent-color: #818cf8;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    min-height: 100vh;
}

[dir="ltr"] body {
    direction: ltr;
}

/* --- التحكم بظهور النصوص العربية والإنجليزية بناءً على لغة الصفحة --- */
html[dir="rtl"] .en-text,
html[dir="ltr"] .ar-text {
    display: none !important;
}

/* --- القائمة الجانبية (Side Menu) --- */
.side-info-container {
    position: fixed;
    top: 20px;
    z-index: 99999;
    font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .side-info-container {
    right: 20px;
}

html[dir="ltr"] .side-info-container {
    left: 20px;
}

/* تصميم الزر الرئيسي */
.side-main-btn {
    background: linear-gradient(135deg, #9333ea, #6b21a8);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
    transition: background 0.3s ease, transform 0.2s ease;
}

.menu-icon-symbol {
    font-size: 16px;
    font-weight: bold;
}

.side-main-btn:hover {
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    transform: scale(1.05);
}

.arrow-icon {
    font-size: 8px;
    transition: transform 0.3s ease;
}

/* القائمة المنسدلة */
.side-submenu {
    position: absolute;
    top: 125%;
    background: rgba(26, 11, 46, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    width: 190px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInSubSide 0.3s ease;
}

html[dir="rtl"] .side-submenu {
    right: 0;
    text-align: right;
}

html[dir="ltr"] .side-submenu {
    left: 0;
    text-align: left;
}

@keyframes fadeInSubSide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تنسيق عنوان القائمة في البداية */
.submenu-header-title {
    padding: 10px 15px 4px 15px;
    color: #d8b4fe;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

/* الخط الفاصل */
.submenu-divider {
    height: 1px;
    background: rgba(168, 85, 247, 0.4);
    margin: 4px 10px 8px 10px;
}

/* عناصر القائمة الرئيسية */
.side-submenu-item {
    padding: 10px 15px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.side-submenu-item:hover {
    background: rgba(147, 51, 234, 0.4);
}

/* مجموعة الرياضات المتوفرة */
.submenu-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

/* العنوان الرئيسي للرياضات */
.side-submenu-title {
    padding: 8px 15px;
    color: #c084fc;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* عناصر الرياضات الفرعية */
.side-submenu-subitem {
    padding: 6px 15px 6px 25px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 12px;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
}

html[dir="ltr"] .side-submenu-subitem {
    padding: 6px 25px 6px 15px;
}

.side-submenu-subitem:hover {
    background: rgba(147, 51, 234, 0.25);
    color: #ffffff;
}

/* تفعيل القائمة وإدارة السهم */
.side-info-container.active .side-submenu {
    display: flex;
}

.side-info-container.active .arrow-icon {
    transform: rotate(180deg);
}

/* --- تخطيط الصفحة الرئيسي --- */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-container {
    width: 100%;
}

/* --- شريط التحكم (اللغة، الثيم، الرئيسية) --- */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid var(--card-border);
}

.lang-btn, .theme-btn, .home-btn {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.home-btn {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
}

.lang-btn:hover, .theme-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.home-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #030712;
}

/* --- عنوان المتجر --- */
.shop-header-section {
    text-align: center;
    margin-bottom: 40px;
}

.shop-header-section h1 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 10px;
}

.shop-header-section p {
    font-size: 16px;
    opacity: 0.8;
}

/* --- شبكة المنتجات (Products Grid) --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* --- بطاقة المنتج الفردية --- */
.product-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: rgba(56, 189, 248, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-desc {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
    padding-top: 15px;
    margin-top: auto;
}

.price {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary-color);
}

.buy-btn {
    background-color: #25d366;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.buy-btn:hover {
    background-color: #1ebd59;
    transform: scale(1.05);
}

/* --- التصميم المتجاوب (Responsive Design) --- */
@media (max-width: 768px) {
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .lang-switch, .theme-switch, .homebtn {
        width: 100%;
    }

    .lang-btn, .theme-btn, .home-btn {
        width: 100%;
    }

    .shop-header-section h1 {
        font-size: 26px;
    }
}

footer {
    text-align: center;
    padding: 25px;
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    position: relative;
    z-index: 10;
    margin-top: auto;
    font-size: 0.95rem;
    opacity: 0.85;
}

.wave-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
    z-index: -1; /* جعلها في أعمق طبقة بالخلفية خلف كل محتوى الصفحة */
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    min-height: 100px;
    max-height: 150px;
}

.parallax > use {
    animation: move-wave 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; fill: rgba(56, 189, 248, 0.15); }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; fill: rgba(2, 132, 199, 0.2); }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; fill: rgba(56, 189, 248, 0.25); }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; fill: var(--primary-color); opacity: 0.3; }

@keyframes move-wave {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

.intro-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, #1b0c2e 0%, #0c0414 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 99999;
            transition: opacity 0.7s ease, visibility 0.7s ease;
        }

        .feedback-pulse-ring {
            position: absolute;
            width: 220px;
            height: 220px;
            border: 2px solid rgba(168, 85, 247, 0.4);
            border-radius: 50%;
            animation: pulseWave 2.5s infinite ease-out;
        }

        @keyframes pulseWave {
            0% {
                transform: scale(0.8);
                opacity: 1;
            }
            100% {
                transform: scale(1.6);
                opacity: 0;
            }
        }

        .intro-icon-box {
            position: relative;
            z-index: 2;
            width: 130px;
            height: 130px;
            background: linear-gradient(135deg, #9333ea, #6b21a8);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 25px;
            box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
            animation: cartBounce 2s ease-in-out infinite;
        }

        .intro-icon-box svg {
            width: 65px;
            height: 65px;
            fill: #ffffff;
            animation: iconWobble 2s ease-in-out infinite;
        }

        @keyframes cartBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-12px); }
        }

        @keyframes iconWobble {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-5deg); }
            75% { transform: rotate(5deg); }
        }

        .intro-content {
            position: relative;
            z-index: 2;
            text-align: center;
            padding: 0 20px;
        }

        .intro-main-title {
            font-family: 'Cairo', sans-serif;
            font-size: 2rem;
            color: #ffffff;
            margin-bottom: 8px;
            text-shadow: 0 2px 8px rgba(0,0,0,0.4);
            transition: opacity 0.3s ease;
        }

        .intro-sub-text {
            font-family: 'Cairo', sans-serif;
            font-size: 1.2rem;
            color: #d8b4fe;
            font-weight: 600;
            opacity: 0;
            transform: translateY(15px);
            animation: fadeInUpCustom 0.5s forwards 0.2s;
            transition: opacity 0.3s ease;
        }

        @keyframes fadeInUpCustom {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .sport-bg-lines {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
            opacity: 0.15;
        }
        .sport-bg-lines span {
            position: absolute;
            display: block;
            width: 200px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
            animation: sportMoveLines 6s linear infinite;
        }
        .sport-bg-lines span:nth-child(1) { left: 10%; animation-delay: 0s; }
        .sport-bg-lines span:nth-child(2) { left: 50%; animation-delay: 2s; }
        .sport-bg-lines span:nth-child(3) { left: 80%; animation-delay: 4s; }
        @keyframes sportMoveLines {
            0% { transform: translateY(-100%); }
            100% { transform: translateY(100%); }
        }