<!DOCTYPE html>
<html lang="ar">

    <head>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>متجر اوليفر</title>
    <style>
        body {
            margin: 0;
            font-family: 'Arial', sans-serif;
            background-color: #000; /* الخلفية سوداء */
            color: white; /* النصوص باللون الأبيض */
            overflow: auto;
            height: 100%;
        }

        .black-page {
            position: relative;
            width: 100%;
            height: auto;
            background-color: #000; /* الخلفية سوداء */>
            overflow-y: scroll;
        }

.header {
    display: flex; /* استخدام Flexbox للتوسيط */
    justify-content: center; /* توسيط أفقي */
    align-items: center; /* توسيط عمودي */
    position: relative; /* تحديد مكان العنصر */
    width: 100%; /* عرض كامل للحاوية */
    height: 150px; /* ارتفاع مناسب */
    background-color: black; /* لون الخلفية */
}
@media (max-width: 768px) {
    .header h1 {
        position: relative; /* تمكين التحريك باستخدام position */
        top: 50px; /* تحريك النص إلى الأسفل */
        font-size: 4rem; /* تقليل حجم النص للشاشات الصغيرة */
        transform: translateY(-10%);
    }
}

.header h1 {
    font-size: 4rem; /* حجم النص */
    color: red; /* لون النص */
    margin: 20px; /* إزالة المسافات */
    text-align: center; /* توسيط النص داخل العنصر */
    width: max-content; /* يجعل العرض حسب النص */
}

@media (max-width: 768px) {
    .header {
        height: 120px; /* تقليل ارتفاع الحاوية */
    }

    .header h1 {
        font-size: 3rem; /* تقليل حجم النص للشاشات الصغيرة */
    }
}

@media (min-width: 1024px) {
    .header h1 {
        font-size: 7rem; /* حجم النص */
        width: auto; /* عرض تلقائي */
        top: 50px; /* تنزيل النص بمقدار 50 بكسل */
        position: relative; /* تمكين خاصية التحريك */
    }
}

.neon-text {
    font-size: 32px; /* حجم النص */
    font-weight: bold; /* جعل النص عريض */
    color: red; /* لون النص */
    text-align: center; /* توسيط النص */
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.7), 
                 0 0 10px rgba(255, 0, 0, 0.6),
                 0 0 20px rgba(255, 0, 0, 0.5); /* تأثير النيون */
    animation: neonEffect 2s infinite; /* إضافة حركة النيون */
}

@keyframes neonEffect {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.7), 
                     0 0 10px rgba(255, 0, 0, 0.6),
                     0 0 20px rgba(255, 0, 0, 0.5); /* تأثير النيون الأولي */
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.9), 
                     0 0 20px rgba(255, 0, 0, 0.8),
                     0 0 30px rgba(255, 0, 0, 0.7); /* تأثير النيون المضاعف */
    }
}

        .store {
    text-align: center;
    padding: 20px;
    color: white;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0; /* تقليل المسافة العلوية */
}

/* الكود الأساسي لجميع الأجهزة */
.store {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 10px; /* مساحة صغيرة بين المنتجات */
}

.product {
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* تأثير بسيط */
}

.product img {
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.product-name {
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
}

.product-price {
    font-size: 16px;
    color: #888;
    margin-top: 5px;
}

/* الأجهزة المتوسطة (التابلت) */
@media (min-width: 768px) {
    .store {
        padding: 50px;
        margin-top: 20px;
        gap: 15px; /* زيادة المسافات */
    }

    .product {
        width: calc(50% - 15px); /* عرض كل منتجين في الصف */
        padding: 20px;
    }

    .product-name {
        font-size: 18px;
    }

    .product-price {
        font-size: 20px;
    }
}

/* شاشات الكمبيوتر (الأكبر من 1200px) */
@media (min-width: 1200px) {
    .store {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 منتجات في الصف */
        gap: 20px; /* مساحة كبيرة بين الأعمدة */
    }

    .product {
        padding: 25px;
        text-align: left; /* محاذاة النص لليسار */
    }

    .product-name {
        font-size: 20px;
    }

    .product-price {
        font-size: 22px;
        font-weight: bold;
    }
}

.product {
    background-color: #000;
    margin: 5px; /* تقليل المسافة بين المنتجات */
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    text-align: center;
    border: 3px solid red;
}


.footer-section {
    margin-top: 40px; /* تحريك المربع لأسفل */

    position: relative; /* تأكد من وجود العنصر بعد المحتوى */
    margin-top: 50px; /* مسافة بين المربع وأي عنصر فوقه */
    display: flex;
    justify-content: center; /* توسيط أفقي */
    align-items: center;
    gap: 10px;
    background-color: #000; /* خلفية سوداء */
    padding: 10px 15px;
    border: 2px solid red; /* حواف باللون الأحمر */
    border-radius: 8px; /* زوايا مستديرة */
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); /* ظل خفيف باللون الأحمر */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.footer-section span {
    font-size: 14px;
    color: white;
    font-family: Arial, sans-serif;
}

.twitter-icon {
    width: 24px; /* حجم الأيقونة */
    height: 24px; /* حجم الأيقونة */
    cursor: pointer; /* مؤشر عند التمرير */
    transition: transform 0.3s ease;
    fill: white; /* لون الأيقونة */
}

.twitter-icon:hover {
    transform: scale(1.1); /* تكبير عند التمرير */
}

/* إضافة مساحة كبيرة أسفل الصفحة */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* الصفحة تغطي الشاشة بالكامل */
    margin: 0;
}

.container {
    flex: 1; /* المحتوى الأساسي */
}

.footer-section-wrapper {
    margin-top: auto; /* ضع العنصر في نهاية الصفحة */
    text-align: center;
    padding-bottom: 20px; /* مسافة إضافية من الأسفل */
}

/* إضافة مسافة بين آخر منتج والمربع */
.store {
    margin-bottom: 20px; /* مسافة أصغر أسفل المنتجات */
}

body {
    position: relative;
    min-height: 100vh; /* لضمان تغطية الشاشة */
    margin: 0;
}

/* إضافة مسافة بين آخر منتج والمربع */
.store {
    margin-bottom: 20px; /* مسافة أصغر أسفل المنتجات */
}

body {
    position: relative;
    min-height: 100vh; /* لضمان تغطية الشاشة */
    margin: 0;
}

body {
    position: relative;
    min-height: 100vh; /* لضمان تغطية الشاشة */
    margin: 0;
}

body {
    position: relative;
    min-height: 100vh; /* لضمان تغطية الصفحة */
    margin: 0;
}

/* تأكيد أن العنصر في أسفل الصفحة */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* ضمان أن الصفحة تغطي كامل الشاشة */
}


.footer-section {
    margin-top: 40px; /* تحريك المربع لأسفل */

    margin-top: auto; /* دفع العنصر إلى أسفل الصفحة */
}

        .product:hover {
            transform: scale(1.05);
        }

        .product img {
            width: 100%;
            height: auto;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }

        .product-info {
            margin-top: 15px;
        }

        .product-name {
            font-family: 'Arial', sans-serif;  /* تحديد الخط */
            font-size: 16px;                  /* تصغير حجم الخط */
            font-weight: bold;                /* تحديد سمك الخط */
            color: white;                     /* تغيير اللون إلى الاحمر  */
            margin-bottom: 10px;              /* المسافة بين النصوص */
            transition: color 0.3s ease;      /* تأثير التغيير عند التمرير */
        }

        .product-name:hover {
            color: white;
        }

        .product-price {
            font-size: 18px; /* تم تكبير الخط قليلاً */
            color: red;
            margin-bottom: 15px;
        }

        .product-price span {
            font-size: 18px; /* تم تكبير الرقم */
            color: white; /* جعل الرقم أبيض */
            font-weight: bold;
        }

        .product button {
            background-color: red; /* خلفية الزر باللون الأحمر */
            color: white;
            border: none;
            padding: 12px 25px; /* تكبير الزر */
            margin-top: 10px;
            cursor: pointer;
            border-radius: 5px;
            transition: background-color 0.3s ease;
            font-size: 18px; /* تكبير النص */
        }

        .product button:hover {
            background-color: #FF0000;
        }

        .cart-icon {
            position: fixed;
            top: 20px;
            left: 20px;
            background-color: #d32f2f;
            color: white;
            border-radius: 5px;
            padding: 10px 20px;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            font-size: 20px;
        }

        .cart-popup, .payment-popup, .email-popup, .error-popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #222; /* الخلفية داكنة قليلاً */
            color: red;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
            border: 3px solid red;
        }

        .cart-item {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #555;
        }

        .cart-total {
            font-size: 20px;
            margin-top: 10px;
        }

.code-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #222;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    border: 3px solid red;
    width: 300px; /* عرض النافذة */
    max-width: 90%;
}

.code-popup h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.code-popup p {
    font-weight: bold; /* جعل النص عريض */
    margin: 10px 0;
    font-size: 16px;
}

.code-popup a {
    font-size: 18px; /* تكبير حجم النص */
    color: white; /* تغيير اللون */
    text-decoration: none; /* إزالة الخط السفلي */
    font-weight: bold; /* جعل النص عريضًا */
}

.code-popup a:hover {
    color: #FF0000; /* تغيير اللون عند التمرير */
}

.small-button {
    background-color: #FF0000 !important; /* لون الخلفية */
    color: white !important; /* لون النص */
    border: none !important; /* إزالة الحدود */
    padding: 2px 5px !important; /* تصغير الحشو */
    font-size: 14px !important; /* حجم النص */
    border-radius: 3px !important; /* حواف مستديرة */
    width: auto !important; /* العرض ديناميكي */
    height: auto !important; /* الارتفاع ديناميكي */
    text-align: center !important; /* محاذاة النص */
    display: inline-block !important; /* الزر يظهر كعنصر خطي */
    box-sizing: border-box !important; /* الحشو لا يؤثر على الحجم */
    cursor: pointer !important; /* تغيير المؤشر عند التمرير */
    margin: 5px !important; /* تقليل المسافات الخارجية */
}

.small-button:hover {
    background-color: #CC0000;
}

.long-button {
    background-color: #FF0000; /* لون الخلفية */
    color: white; /* لون النص */
    border: none; /* إزالة الحدود */
    padding: 10px 20px; /* تكبير المساحة الداخلية */
    font-size: 16px; /* تكبير حجم النص */
    border-radius: 5px; /* حواف مستديرة */
    width: 100%; /* عرض الزر كامل */
    text-align: center; /* محاذاة النص وسط الزر */
    display: inline-block; /* السماح للزر بالظهور كعنصر خطي */
    box-sizing: border-box; /* لضمان أن الحشو لا يؤثر على الحجم */
    cursor: pointer; /* تغيير المؤشر عند التمرير */
    margin: 5px 0; /* إضافة مسافة خارجية صغيرة */
}

.long-button:hover {
    background-color: #CC0000; /* لون مختلف عند التمرير */
}

.code-popup button {
    background-color: #FF0000; /* لون الخلفية */
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px 0;
    width: 100%; /* ليكون الزر متناسق */
}

.code-popup button:last-of-type {
    margin-top: 20px; /* مسافة أعلى زر الإغلاق */
}

.order-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #222;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    border: 3px solid red;
    width: 300px;
    font-size: 16px;
}

.order-popup button {
    margin-top: 10px;
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}

.order-popup button:hover {
    background-color: #FF0000;
}

       h1 {
    color: red;
    font-size: 4rem; /* زيادة حجم الخط */
}
  
        .error-popup button {
            background-color: #FF0000;
            color: white;
            border: none;
            padding: 10px;
            cursor: pointer;
            border-radius: 5px;
        }

        .error-popup button:hover {
            background-color: #FF0000;
        }

        .email-popup input {
            padding: 10px;
            margin-top: 10px;
            width: 200px;
            border-radius: 5px;
            border: none;
            background-color: #333;
            color: white;
        }

        .email-popup button {
            padding: 10px;
            margin-top: 10px;
            border-radius: 5px;
            background-color: #FF0000;
            color: white;
            border: none;
        }

        .email-popup button:hover {
            background-color: #FF0000;
        }

.flags-container {
    position: fixed;
    top: 20px;
    right: 20px;  /* تغيير left إلى right */
    display: flex;
    gap: 10px;
    z-index: 1000; /* لضمان ظهور الأيقونات فوق المحتوى */
}

/* تحديد حجم الأيقونات */
.flag-icon {
    width: 30px;
    height: 20px;
    border-radius: 5px; /* لجعل الأيقونات مربعة الحواف */
}

.language-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 10px;
    font-size: 35px !important; 
    font-family: Arial, sans-serif; /* تأكد من تحديد الخط */
}

.flags {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.flags img {
    width: 30px;
    height: auto;
}

.language-text {
    color: red;
    font-family: Arial, sans-serif; /* تأكد من أن الخط يدعم الأحجام الكبيرة */
    font-weight: bold; /* جعل النص أكثر سماكة */
    font-size: 13px !important; /* فرض حجم الخط */
    margin-top: 5px;
    text-align: right;
    position: fixed;
    top: 40px;
    right: 20px;
    z-index: 1001;
}

#send-request {
    background-color: #D60000 !important; /* نفس لون جملة طريقة الدفع */
    color: white !important; /* لون النص أبيض */
    border: none !important; /* إزالة الإطار */
    padding: 10px !important; /* المسافة الداخلية */
    border-radius: 5px !important; /* حواف مستديرة */
    cursor: pointer !important; /* تغيير المؤشر إلى يد عند التمرير */
    font-size: 16px !important; /* حجم النص */
}

#send-request:hover {
    background-color: #CC0000; /* لون أحمر داكن عند التمرير */
}

#payment-popup button:last-of-type {
    background-color: red; /* خلفية حمراء */
    color: white; /* نص أبيض */
    border: none; /* إزالة الإطار */
    padding: 5px 10px; /* تصغير المساحة الداخلية */
    font-size: 14px; /* تصغير حجم النص */
    cursor: pointer; /* تغيير شكل المؤشر عند التمرير */
    border-radius: 3px; /* جعل الحواف مستديرة */
}

#payment-popup button:last-of-type:hover {
    background-color: darkred; /* لون عند التمرير */
}

/* تخصيص أزرار "التالي" و"إغلاق" في نافذة سلة التسوق */
#cart-popup button {
    background-color: red; /* خلفية حمراء */
    color: white; /* نص أبيض */
    border: none; /* إزالة الإطار */
    padding: 5px 10px; /* تصغير المساحة الداخلية */
    font-size: 14px; /* تصغير حجم النص */
    cursor: pointer; /* تغيير شكل المؤشر عند التمرير */
    border-radius: 3px; /* جعل الحواف مستديرة */
}

#cart-popup button:hover {
    background-color: darkred; /* لون عند التمرير */
}

    
    /* تحسين الألوان والخطوط */
    body {
        font-family: 'Poppins', sans-serif; /* خط حديث */
        background-color: #f4f4f9; /* خلفية رمادية فاتحة */
        color: #333; /* لون نص متوازن */
    }

    .product {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .product:hover {
        transform: scale(1.05); /* تكبير خفيف */
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* إضافة ظل */
    }

    /* صفحة تفاصيل المنتج */
    .product-details {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        color: #fff;
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }

    .details-container {
        background: #fff;
        color: #333;
        padding: 20px;
        border-radius: 10px;
        max-width: 500px;
        text-align: center;
    }

    .details-container img {
        max-width: 100%;
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .close-button {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        cursor: pointer;
        color: #fff;
        background: #f00;
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .close-button:hover {
        background: #c00;
    }

</style>

<script>
    // تعطيل الزر الأيمن على الماوس
    document.addEventListener('contextmenu', function(e) {
        e.preventDefault();
    });

    // منع استخدام F12 أو اختصارات فحص العناصر
    document.addEventListener('keydown', function(e) {
        if (e.key === "F12" || (e.ctrlKey && (e.key === "U" || e.key === "Shift"))) {
            e.preventDefault();
        }
    });


    function changeLanguage(language) {
        const productImages = document.querySelectorAll('.product img');
        productImages.forEach(img => {
            
    if (language === 'ru') {
        img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
    } else if (language === 'ar') {
                img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            } else if (language === 'ar') {
                img.src = img.dataset.originalSrc; // إعادة الصورة الأصلية عند اختيار اللغة العربية
            }
        });
    }

    document.addEventListener('DOMContentLoaded', () => {
        const productImages = document.querySelectorAll('.product img');
        productImages.forEach(img => {
            img.dataset.originalSrc = img.src; // تخزين الرابط الأصلي للصورة
        });
    });

    function changeLanguage(language) {
    currentLanguage = language; // تحديث اللغة الحالية

    const texts = languageTexts[language];

    // تحديث نصوص الأسعار
    const productPriceLabels = document.querySelectorAll('.product-price');
    productPriceLabels.forEach(label => {
        const span = label.querySelector('span');
        if (span) {
            label.innerHTML = `${texts.productPriceLabel}: <span>${span.innerText}</span>`;
        }
    });

    // تحديث صور المنتجات
    const productImages = document.querySelectorAll('.product img');
    productImages.forEach(img => {
        const alt = img.alt; // استخدام نص الـ "alt" كمعرّف
        
      if (language === 'ru') {
        img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
    } else if (language === 'ar') {
            if (alt === 'CraxRat V7.6') img.src = 'https://example.com/russian_image1.jpg';
            else if (alt === 'DarkGPT') img.src = 'https://example.com/russian_image2.jpg';
            else if (alt === 'Burp Suite Professional') img.src = 'https://example.com/russian_image3.jpg';
            else if (alt === 'Skip 2-step verification') img.src = 'https://example.com/russian_image4.jpg';
            else if (alt === 'iplayer-tera-link') img.src = 'https://example.com/russian_image5.jpg';
            else if (alt === 'Hacking and Cybersecurity') img.src = 'https://example.com/russian_image6.jpg';
            else if (alt === '10K Kick Views') img.src = 'https://example.com/russian_image7.jpg';
            else if (alt === '40K Kick Views') img.src = 'https://example.com/russian_image8.jpg';
            else if (alt === '70K Kick Views') img.src = 'https://example.com/russian_image9.jpg';
            else if (alt === '50K Kick Views ( 3 Streams )') img.src = 'https://example.com/russian_image10.jpg';
            else if (alt === 'SOON') img.src = 'https://example.com/russian_image11.jpg';
        } else if (language === 'ar') {
            if (alt === 'CraxRat V7.6') img.src = 'https://c.top4top.io/p_3279flh7c4.jpg';
            else if (alt === 'DarkGPT') img.src = 'https://b.top4top.io/p_32794n9d83.jpg';
            else if (alt === 'Burp Suite Professional') img.src = 'https://a.top4top.io/p_3279wriqz2.jpg';
            else if (alt === 'Skip 2-step verification') img.src = 'https://b.top4top.io/p_32807d7zx0.jpg';
            else if (alt === 'iplayer-tera-link') img.src = 'https://j.top4top.io/p_3279pjxbs0.jpg';
            else if (alt === 'Hacking and Cybersecurity') img.src = 'https://l.top4top.io/p_3279u14i61.jpg';
            else if (alt === '10K Kick Views') img.src = 'https://g.top4top.io/p_3279v59r78.jpg';
            else if (alt === '40K Kick Views') img.src = 'https://e.top4top.io/p_3279e9pv06.jpg';
            else if (alt === '70K Kick Views') img.src = 'https://f.top4top.io/p_3279wmg607.jpg';
            else if (alt === '50K Kick Views ( 3 Streams )') img.src = 'https://g.top4top.io/p_32792hm0r0.jpg';
            else if (alt === 'SOON') img.src = 'https://c.top4top.io/p_328025xaj1.jpg';
        }
    });

    // تحديث باقي النصوص
    const productButtons = document.querySelectorAll('.product button');
    productButtons.forEach(button => {
        button.innerText = texts.addToCart;
    });

    const cartHeader = document.querySelector('.cart-popup h2');
    if (cartHeader) {
        cartHeader.innerText = texts.cartLabel;
    }

    const proceedButton = document.querySelector('#cart-popup button:nth-of-type(1)');
    if (proceedButton) {
        proceedButton.innerText = texts.proceedToPayment;
    }

    const closeButtons = document.querySelectorAll('button[onclick^="close"]');
    closeButtons.forEach(button => {
        button.innerText = texts.close;
    });

    const paymentHeader = document.querySelector('.payment-popup h2');
    if (paymentHeader) {
        paymentHeader.innerText = texts.payment;
    }

    const paymentMethodText = document.querySelector('.payment-popup p');
    if (paymentMethodText) {
        paymentMethodText.innerText = texts.paymentMethod;
    }

    const emailPopupHeader = document.querySelector('.email-popup h2');
    if (emailPopupHeader) {
        emailPopupHeader.innerText = texts.enterEmail;
    }

    const paymentCodeLabel = document.querySelector('.code-popup h2');
    if (paymentCodeLabel) {
        paymentCodeLabel.innerText = texts.paymentCode;
    }

    const copyCodeButton = document.querySelector('.code-popup button.long-button');
    if (copyCodeButton) {
        copyCodeButton.innerText = texts.copyCode;
    }

    const copyInstructionText = document.querySelector('.code-popup p:nth-of-type(2)');
    if (copyInstructionText) {
        copyInstructionText.firstChild.nodeValue = texts.copyInstruction;
    }

    const clickHereLink = document.querySelector('.code-popup a');
    if (clickHereLink) {
        clickHereLink.innerText = texts.clickHere;
    }
}


    // عرض تفاصيل المنتج
    function showProductDetails(name, price, image) {
        const details = document.getElementById('product-details');
        document.getElementById('details-name').innerText = name;
        document.getElementById('details-price').innerText = 'السعر: ' + price;
        document.getElementById('details-image').src = image;
        details.style.display = 'flex';
    }

    // إغلاق نافذة التفاصيل
    function closeProductDetails() {
        document.getElementById('product-details').style.display = 'none';
    }

    // إضافة المنتج من نافذة التفاصيل إلى السلة
    function addToCartFromDetails() {
        const name = document.getElementById('details-name').innerText;
        const price = parseFloat(document.getElementById('details-price').innerText.replace('السعر: $', ''));
        addToCart(name, price);
        closeProductDetails();
    }

</script>
</head>
<body>

       <div class="flags-container" style="position: absolute; top: 10px; right: 20px;">
    <img src="https://upload.wikimedia.org/wikipedia/commons/f/f3/Flag_of_Russia.svg" alt="علم روسيا" class="flag-icon" style="width: 40px; height: 25px; margin-left: 5px;" onclick="changeLanguage('ru')">
    <img src="https://upload.wikimedia.org/wikipedia/commons/0/0d/Flag_of_Saudi_Arabia.svg" alt="علم السعودية" class="flag-icon" style="width: 40px; height: 25px; margin-left: 5px;" onclick="changeLanguage('ar')">
</div>
<div class="language-text" style="color: red; text-align: right; position: absolute; top: 40px; right: 20px; font-size: 12px;">
    اختر اللغة - и выберите язык
</div>
        </div>
             <div class="black-page">
                <div class="header">
                 <h1>𝗢𝗟𝗜𝗩𝗘𝗥</h1>
               </div>
          <div class="store">
            <div class="product">
                <img src="https://c.top4top.io/p_3279flh7c4.jpg" alt="CraxRat V7.6">
                <div class="product-info">
                    <h3 class="product-name">CraxRat V7.6</h3>
                    <p class="product-price">السعر: <span>$120</span></p>
                    <button onclick="addToCart('CraxRat V7.6', 120)">إضافة إلى السلة</button>
                </div>
            </div>
            <div class="product">
                <img src="https://b.top4top.io/p_32794n9d83.jpg" alt="DarkGPT">
                <div class="product-info">
                    <h3 class="product-name">DarkGPT</h3>
                    <p class="product-price">السعر: <span>$99</span></p>
                    <button onclick="addToCart('DarkGPT', 99)">إضافة إلى السلة</button>
                </div>
            </div>
            <div class="product">
                <img src="https://a.top4top.io/p_3279wriqz2.jpg" alt="Burp Suite Professional">
                <div class="product-info">
                    <h3 class="product-name">Burp Suite Professional</h3>
                    <p class="product-price">السعر: <span>$299</span></p>
                    <button onclick="addToCart('Burp Suite Professional', 299)">إضافة إلى السلة</button>
                </div>
              </div>
            <div class="product">
                <img src="https://b.top4top.io/p_32807d7zx0.jpg" alt="skip">
                <div class="product-info">
                    <h3 class="product-name">Skip 2-step verification</h3>
                    <p class="product-price" data-lang="productPriceLabel">السعر: <span>$99</span></p>
                    <button onclick="addToCart('Skip 2-step verification', 99)">إضافة إلى السلة</button>
                </div>
              </div>
            <div class="product">
                <img src="https://j.top4top.io/p_3279pjxbs0.jpg" alt="ip-tp_lp">
                <div class="product-info">
                    <h3 class="product-name">iplayer-tera-link</h3>
                    <p class="product-price">السعر: <span>$49</span></p>
                    <button onclick="addToCart('iplayer-tera-link', 49)">إضافة إلى السلة</button>
                </div>
             </div>
            <div class="product">
                <img src="https://l.top4top.io/p_3279u14i61.jpg" alt="Hacking and Cybersecurity">
                <div class="product-info">
                    <h3 class="product-name">Hacking and Cybersecurity</h3>
                    <p class="product-price">السعر: <span>$29</span></p>
                    <button onclick="addToCart('Hacking and Cybersecurity', 29)">إضافة إلى السلة</button>
                </div>
              </div>
            <div class="product">
                <img src="https://g.top4top.io/p_3279v59r78.jpg" alt="Kick">
                <div class="product-info">
                    <h3 class="product-name">10K Kick Views</h3>
                    <p class="product-price">السعر: <span>$115</span></p>
                    <button onclick="addToCart('10K Kick Views', 115)">إضافة إلى السلة</button>
                </div>
            </div>
            <div class="product">
                <img src="https://e.top4top.io/p_3279e9pv06.jpg" alt="Kick">
                <div class="product-info">
                    <h3 class="product-name">40K Kick Views</h3>
                    <p class="product-price">السعر: <span>$499</span></p>
                    <button onclick="addToCart('40K Kick Views', 499)">إضافة إلى السلة</button>
                </div>
             </div>
            <div class="product">
                <img src="https://f.top4top.io/p_3279wmg607.jpg" alt="Kick">
                <div class="product-info">
                    <h3 class="product-name">70K Kick Views</h3>
                    <p class="product-price">السعر: <span>$799</span></p>
                    <button onclick="addToCart('70K Kick Views', 799)">إضافة إلى السلة</button>
                </div>
             </div>
            <div class="product">
                <img src="https://g.top4top.io/p_32792hm0r0.jpg" alt="Kick">
                <div class="product-info">
                    <h3 class="product-name">50K Kick Views ( 3 Streams )</h3>
                    <p class="product-price">السعر: <span>$1299</span></p>
                    <button onclick="addToCart('50K Kick Views', 1299)">إضافة إلى السلة</button>
                </div>
              </div>
             <div class="product">
                <img src="https://c.top4top.io/p_328025xaj1.jpg" alt="DDoSهجمات ">
                <div class="product-info">
                    <h3 class="product-name">SOON</h3>
             </div>
          </div>

    <div class="cart-icon" id="cart-icon" onclick="showCart()">🛒</div>

    <div class="cart-popup" id="cart-popup">
    <h2>سلة التسوق</h2>
    <div id="cart-items"></div>
    <div class="cart-total" id="cart-total">المجموع: $0</div>
    <button onclick="goToPayment()">التالي</button> <!-- زر "التالي" هنا -->
    <button onclick="closeCart()">إغلاق</button> <!-- زر "إغلاق" -->
</div>

 <div class="payment-popup" id="payment-popup">
    <h2 class="neon-text">BITCOIN</h2>
    <p style="font-size: 20px; font-weight: bold; text-align: center;">
    طريقة الدفع المتاحة حاليًا هي البيتكوين فقط، وذلك منعًا للترصد
</p>
    <img src="https://a.top4top.io/p_3279zn2q30.png" alt="Bitcoin" class="bitcoin-icon" style="width: 50px; height: 50px;">
    <p>
   <button id="send-request" onclick="handleRequest()">اضغط هنا لإرسال طلب شراء</button>
</p>
    </p>
    <button onclick="closePayment()">إغلاق</button> <!-- فقط زر إغلاق -->
</div>

<div class="code-popup" id="code-popup" style="display: none;">
    <h2>كود الدفع</h2>
    <p id="generated-code" style="font-size: 25px; margin: 20px 0;">1234567890</p>
    <button onclick="copyCode()" class="long-button">نسخ الكود</button>
    <p style="font-size: 16px; color: red; font-weight: bold; text-align: center; margin-top: 20px;">
    قم بنسخ الكود والتوجه إلى التويتر للتواصل معنا
</p>
<p style="text-align: center; margin-top: 10px;">
    <a href="https://x.com/x2_oliver?t=5V0wMT9BxKXvU9PBuJRSaA&s=09" target="_blank" style="font-size: 20px; font-weight: bold; color: white;">اضغط هنا</a>
</p>
    <button onclick="closeCodePopup()" class="small-button">إغلاق</button>
</div>

    <div class="email-popup" id="email-popup">
        <h2>أدخل بريدك الإلكتروني</h2>
        <input type="email" id="email" placeholder="البريد الإلكتروني" required>
        <button onclick="submitEmail()">إرسال</button>
        <button onclick="closeEmail()">إغلاق</button>
    </div>

<div class="order-popup" id="order-popup">
    <p id="order-message"></p>
    <button onclick="closeOrderPopup()">إغلاق</button>
</div>

    <div class="error-popup" id="error-popup">
        <h2>يجب إضافة منتج أولًا</h2>
        <button onclick="closeErrorPopup()">إغلاق</button>
    </div>
<div class="footer-section">
    <span>Made by OLIVER</span>
    <a href="https://x.com/x2_oliver?t=5BpjnDA2XIVfqy3jPvAlnA&s=09" target="_blank">
        <!-- أيقونة X -->
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" class="twitter-icon">
            <path fill="#ffffff" d="M10 0h16c5.523 0 10 4.477 10 10v16c0 5.523-4.477 10-10 10H10C4.477 36 0 31.523 0 26V10C0 4.477 4.477 0 10 0zm18.97 7.648h-2.984l-6.747 7.234-6.59-7.233h-3.078L16.838 18 9.57 28.352h2.983l6.747-7.234 6.589 7.234h3.078L19.158 18z"/>
        </svg>
    </a>
</div>

    <script>
        let cart = []; // السلة
    let totalAmount = 0; // المجموع الإجمالي
    let currentLanguage = 'ar'; // اللغة الافتراضية

    const languageTexts = {
    ar: {
        tax: "ضريبة",
        productPriceLabel: "السعر",
        addToCart: "إضافة إلى السلة",
        cartLabel: "سلة التسوق",
        total: "المجموع",
        proceedToPayment: "التالي",
        payment: "الدفع",
        paymentMethod: "طريقة الدفع المتاحة حاليًا هي البيتكوين فقط، وذلك منعا للترصد.",
        enterEmail: "أدخل بريدك الإلكتروني",
        sendRequest: "اضغط هنا لإرسال طلب شراء",
        delete: "حذف",
        addProductFirst: "يجب إضافة منتج أولاً",
        paymentCode: "كود الدفع", // النص الجديد
        copyCode: "نسخ الكود", // النص الجديد
        copyInstruction: "قم بنسخ الكود والتوجه إلى التويتر للتواصل معنا،", // النص الجديد
        clickHere: "اضغط هنا", // النص الجديد
        close: "إغلاق"
    },
    ru: {
        tax: "Налог",
        productPriceLabel: "Цена",
        addToCart: "Добавить в корзину",
        cartLabel: "Корзина",
        total: "Итого",
        proceedToPayment: "Далее",
        payment: "Оплата",
        paymentMethod: "Доступный способ оплаты в настоящее время — только биткоин, чтобы избежать слежки.",
        enterEmail: "Введите ваш email",
        sendRequest: "Отправить запрос для получения адреса для оплаты", // النص الروسي
        delete: "Удалить",
        addProductFirst: "Сначала добавьте продукт",
        paymentCode: "Код оплаты", // النص الجديد
        copyCode: "Копировать код", // النص الجديد
        copyInstruction: "Скопируйте код и перейдите в Twitter для связи с нами,", // النص الجديد
        clickHere: "нажмите здесь", // النص الجديد
        close: "Закрыть"
    }
};

    function addToCart(productName, productPrice) {
        const tax = productPrice * 0.05; // حساب الضريبة
        const totalPrice = productPrice + tax; // المجموع النهائي
        cart.push({ name: productName, price: productPrice, tax: tax, total: totalPrice }); // إضافة المنتج للسلة
        updateCart(); // تحديث السلة
    }

    function updateCart() {
    const cartItemsContainer = document.getElementById('cart-items');
    const cartTotal = document.getElementById('cart-total');
    const cartIcon = document.getElementById('cart-icon');

    cartItemsContainer.innerHTML = ''; // تفريغ محتوى السلة القديمة

    // عرض العناصر في السلة
    cart.forEach(item => {
        const cartItem = document.createElement('div');
        cartItem.classList.add('cart-item');
        cartItem.innerHTML = `
            ${item.name} - $${item.price.toFixed(2)} + ${languageTexts[currentLanguage].tax} $${item.tax.toFixed(2)} = $${item.total.toFixed(2)}
            <button onclick="removeFromCart('${item.name}')">${languageTexts[currentLanguage].delete}</button>
        `;
        cartItemsContainer.appendChild(cartItem);
    });

    // تحديث المجموع
    totalAmount = cart.reduce((sum, item) => sum + item.total, 0);
    cartTotal.innerText = `${languageTexts[currentLanguage].total}: $${totalAmount.toFixed(2)}`;

    // تحديث أيقونة السلة
    cartIcon.innerText = `🛒 ${cart.length}`;

    // إغلاق نافذة السلة إذا كانت فارغة
    if (cart.length === 0) {
        closeCart(); // استدعاء دالة إغلاق نافذة السلة
    }
}

function handleRequest() {
    // توليد الكود العشوائي
    const code = generateRandomCode(); 

    // جمع المنتجات من السلة
    const products = cart.map(item => `${item.name} - $${item.price.toFixed(2)}`).join(', ');

    // إرسال البيانات إلى Formspree
    sendToFormspree(code, products);

    // عرض نافذة الكود
    document.getElementById('code-popup').style.display = 'block';
}

function sendToFormspree(code, products) {
    const formData = new FormData();
    formData.append('code', code);
    formData.append('products', products);

    console.log('Preparing to send data:', { code, products }); // تأكيد البيانات المُرسلة

    fetch('https://formspree.io/f/xyzyrvjd', {
        method: 'POST',
        body: formData,
    })
    .then(response => {
        if (response.ok) {
            console.log('Data sent successfully!');
        } else {
            console.error('Error in response:', response.status, response.statusText);
        }
    })
    .catch(error => {
        console.error('Fetch error:', error);
    });
}

    function showCart() {
        if (cart.length === 0) {
            showErrorPopup(); // عرض نافذة الخطأ إذا كانت السلة فارغة
        } else {
            document.getElementById('cart-popup').style.display = 'block'; // إظهار نافذة السلة
        }
    }

function goToPayment() {
    document.getElementById('cart-popup').style.display = 'none'; // إخفاء نافذة السلة
    const paymentPopup = document.getElementById('payment-popup');
    if (paymentPopup) {
        paymentPopup.style.display = 'block'; // إظهار نافذة الدفع
    } else {
        console.error("Payment popup element not found.");
    }
}

function generateRandomCode() {
    const code = Math.floor(1000000000 + Math.random() * 9000000000); // كود عشوائي من 10 أرقام
    document.getElementById('generated-code').innerText = code; // عرض الكود في النافذة
    return code;
}

function showCodePopup() {
    generateRandomCode(); // توليد الكود
    document.getElementById('code-popup').style.display = 'block'; // عرض النافذة
}

function closeCodePopup() {
    document.getElementById('code-popup').style.display = 'none'; // إخفاء النافذة
}

function copyCode() {
    const code = document.getElementById('generated-code').innerText; // الحصول على الكود
    
    try {
        // استخدام طريقة النسخ الحديثة
        navigator.clipboard.writeText(code).catch(() => {
            // إذا فشل النسخ بطريقة حديثة، ننتقل للطريقة التقليدية
            fallbackCopyCode(code);
        });
    } catch (err) {
        fallbackCopyCode(code); // استخدام النسخ التقليدي عند حدوث خطأ
    }
}

// دالة النسخ التقليدية
function fallbackCopyCode(text) {
    const tempInput = document.createElement('textarea');
    tempInput.value = text; // وضع النص في الحقل المؤقت
    document.body.appendChild(tempInput);
    tempInput.select();
    try {
        document.execCommand('copy');
    } catch (err) {
        console.error('خطأ أثناء النسخ بالطريقة التقليدية:', err);
    }
    document.body.removeChild(tempInput); // إزالة الحقل المؤقت
}

function closePayment() {
    const paymentPopup = document.getElementById('payment-popup');
    if (paymentPopup) {
        paymentPopup.style.display = 'none'; // إخفاء نافذة الدفع
    }
}

function removeFromCart(productName) {
    // تصفية السلة لإزالة المنتج المطلوب
    cart = cart.filter(item => item.name !== productName);
    updateCart(); // تحديث السلة بعد الحذف
}

    function closeCart() {
        document.getElementById('cart-popup').style.display = 'none'; // إغلاق نافذة السلة
    }

    function showErrorPopup() {
        const errorPopup = document.getElementById('error-popup');
        if (errorPopup) {
            errorPopup.querySelector('h2').innerText = languageTexts[currentLanguage].addProductFirst;
            errorPopup.style.display = 'block'; // إظهار النافذة
        } else {
            console.error("Error popup element not found.");
        }
    }

    function closeErrorPopup() {
        const errorPopup = document.getElementById('error-popup');
        if (errorPopup) {
            errorPopup.style.display = 'none'; // إخفاء النافذة
        }
    }

function closePayment() {
    const paymentPopup = document.getElementById('payment-popup');
    if (paymentPopup) {
        paymentPopup.style.display = 'none';
    } else {
        console.error("Payment popup element not found.");
    }
}

    
    function changeLanguage(language) {
        const productImages = document.querySelectorAll('.product img');
        productImages.forEach(img => {
            
    if (language === 'ru') {
        img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
    } else if (language === 'ar') {
                img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            } else if (language === 'ar') {
                img.src = img.dataset.originalSrc; // إعادة الصورة الأصلية عند اختيار اللغة العربية
            }
        });
    }

    document.addEventListener('DOMContentLoaded', () => {
    const productImages = document.querySelectorAll('.product img');
    productImages.forEach(img => {
        img.dataset.originalSrc = img.src; // تخزين الرابط الأصلي للصورة
    });
});

    function changeLanguage(language) {
    currentLanguage = language; // تحديث اللغة الحالية

    const texts = languageTexts[language];

    // تحديث نصوص الأسعار
    const productPriceLabels = document.querySelectorAll('.product-price');
    productPriceLabels.forEach(label => {
        const span = label.querySelector('span');
        if (span) {
            label.innerHTML = `${texts.productPriceLabel}: <span>${span.innerText}</span>`;
        }
    });

    // تحديث نصوص "إضافة إلى السلة"
    const productButtons = document.querySelectorAll('.product button');
    productButtons.forEach(button => {
        button.innerText = texts.addToCart;
    });

    // تحديث زر "التالي" في نافذة السلة فقط
    const cartNextButton = document.querySelector('#cart-popup button:nth-of-type(1)');
    if (cartNextButton) {
        cartNextButton.innerText = texts.proceedToPayment;
    }

    // تحديث نصوص "إغلاق" في جميع النوافذ
    const closeButtons = document.querySelectorAll('button[onclick^="close"]');
    closeButtons.forEach(button => {
        button.innerText = texts.close;
    });

    // تحديث زر "إرسل طلب" في نافذة الدفع
    const sendRequestButton = document.querySelector('#send-request');
    if (sendRequestButton) {
        sendRequestButton.innerText = texts.sendRequest;
    }

    // تحديث جملة "طريقة الدفع المتاحة"
    const paymentMethodText = document.querySelector('.payment-popup p');
    if (paymentMethodText) {
        paymentMethodText.innerText = texts.paymentMethod;
    }

    // تحديث نص "أدخل بريدك الإلكتروني"
    const emailPopupHeader = document.querySelector('.email-popup h2');
    if (emailPopupHeader) {
        emailPopupHeader.innerText = texts.enterEmail;
    }

    // تحديث عنوان "الدفع"
    const paymentHeader = document.querySelector('.payment-popup h2');
    if (paymentHeader) {
        paymentHeader.innerText = texts.payment;
    }

    // تحديث عنوان "سلة التسوق"
    const cartHeader = document.querySelector('.cart-popup h2');
    if (cartHeader) {
        cartHeader.innerText = texts.cartLabel;
    }

    // تحديث نص "كود الدفع"
    const paymentCodeLabel = document.querySelector('.code-popup h2');
    if (paymentCodeLabel) {
        paymentCodeLabel.innerText = texts.paymentCode;
    }

    // تحديث نص "نسخ الكود"
    const copyCodeButton = document.querySelector('.code-popup button.long-button');
    if (copyCodeButton) {
        copyCodeButton.innerText = texts.copyCode;
    }

    // تحديث جملة "قم بنسخ الكود"
    const copyInstructionText = document.querySelector('.code-popup p:nth-of-type(2)');
    if (copyInstructionText) {
        copyInstructionText.firstChild.nodeValue = texts.copyInstruction; // تحديث النص فقط
    }

    // تحديث كلمة "اضغط هنا"
    const clickHereLink = document.querySelector('.code-popup a');
    if (clickHereLink) {
        clickHereLink.innerText = texts.clickHere;
    }
}


    function changeLanguage(language) {
        const productImages = document.querySelectorAll('.product img');
        productImages.forEach(img => {
            
    if (language === 'ru') {
        img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
    } else if (language === 'ar') {
                img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            } else if (language === 'ar') {
                img.src = img.dataset.originalSrc; // إعادة الصورة الأصلية عند اختيار اللغة العربية
            }
        });
    }

    document.addEventListener('DOMContentLoaded', () => {
        const productImages = document.querySelectorAll('.product img');
        productImages.forEach(img => {
            img.dataset.originalSrc = img.src; // تخزين الرابط الأصلي للصورة
        });
    });

    function changeLanguage(language) {
    currentLanguage = language; // تحديث اللغة الحالية

    const texts = languageTexts[language];

    // تحديث نصوص الأسعار
    const productPriceLabels = document.querySelectorAll('.product-price');
    productPriceLabels.forEach(label => {
        const span = label.querySelector('span');
        if (span) {
            label.innerHTML = `${texts.productPriceLabel}: <span>${span.innerText}</span>`;
        }
    });

    // تحديث صور المنتجات
    const productImages = document.querySelectorAll('.product img');
        productImages.forEach((img, index) => {
            if (language === 'ru') {
                // تغيير الصور لكل المنتجات ما عدا المنتج الأخير
                if (index !== productImages.length - 1) {
                    if (index === 0) img.src = "https://a.top4top.io/p_3280x9etu3.jpg";
                    else if (index === 1) img.src = "https://k.top4top.io/p_32804wnxv1.jpg";
                    else if (index === 2) img.src = "https://j.top4top.io/p_3280d43lr0.jpg";
                    else if (index === 3) img.src = "https://c.top4top.io/p_3280okpe85.jpg";
                    else if (index === 4) img.src = "https://b.top4top.io/p_3280uy12h4.jpg";
                    else if (index === 5) img.src = "https://l.top4top.io/p_3280m80t52.jpg";
                    else if (index === 6) img.src = "https://f.top4top.io/p_32809qa848.jpg";
                    else if (index === 7) img.src = "https://g.top4top.io/p_328049hvl9.jpg";
                    else if (index === 8) img.src = "https://e.top4top.io/p_3280f9m5f7.jpg";
                    else if (index === 9) img.src = "https://d.top4top.io/p_3280mvyar6.jpg";
                }
        } else if (language === 'ar') {
            // إعادة الصور الأصلية عند اختيار اللغة العربية
            img.src = img.dataset.originalSrc;
    } else if (language === 'ar') {
            if (alt === 'CraxRat V7.6') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'DarkGPT') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'Burp Suite Professional') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'Skip 2-step verification') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'iplayer-tera-link') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'Hacking and Cybersecurity') img.src = 'https://l.top4top.io/p_3280m80t52.jpg';
            else if (alt === '10K Kick Views') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === '40K Kick Views') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === '70K Kick Views') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === '50K Kick Views ( 3 Streams )') img.src = 'https://b.top4top.io/p_3280uh4jz0.png';
            else if (alt === 'SOON') img.src = 'https://c.top4top.io/p_328025xaj1.jpg';
        } else if (language === 'ar') {
            if (alt === 'CraxRat V7.6') img.src = 'https://c.top4top.io/p_3279flh7c4.jpg';
            else if (alt === 'DarkGPT') img.src = 'https://b.top4top.io/p_32794n9d83.jpg';
            else if (alt === 'Burp Suite Professional') img.src = 'https://a.top4top.io/p_3279wriqz2.jpg';
            else if (alt === 'Skip 2-step verification') img.src = 'https://b.top4top.io/p_32807d7zx0.jpg';
            else if (alt === 'iplayer-tera-link') img.src = 'https://j.top4top.io/p_3279pjxbs0.jpg';
            else if (alt === 'Hacking and Cybersecurity') img.src = 'https://l.top4top.io/p_3279u14i61.jpg';
            else if (alt === '10K Kick Views') img.src = 'https://g.top4top.io/p_3279v59r78.jpg';
            else if (alt === '40K Kick Views') img.src = 'https://e.top4top.io/p_3279e9pv06.jpg';
            else if (alt === '70K Kick Views') img.src = 'https://f.top4top.io/p_3279wmg607.jpg';
            else if (alt === '50K Kick Views ( 3 Streams )') img.src = 'https://g.top4top.io/p_32792hm0r0.jpg';
            else if (alt === 'SOON') img.src = 'https://c.top4top.io/p_328025xaj1.jpg';
        }
    });

    // تحديث باقي النصوص
    const productButtons = document.querySelectorAll('.product button');
    productButtons.forEach(button => {
        button.innerText = texts.addToCart;
    });

    const cartHeader = document.querySelector('.cart-popup h2');
    if (cartHeader) {
        cartHeader.innerText = texts.cartLabel;
    }

    const proceedButton = document.querySelector('#cart-popup button:nth-of-type(1)');
    if (proceedButton) {
        proceedButton.innerText = texts.proceedToPayment;
    }

    const closeButtons = document.querySelectorAll('button[onclick^="close"]');
    closeButtons.forEach(button => {
        button.innerText = texts.close;
    });

    const paymentHeader = document.querySelector('.payment-popup h2');
    if (paymentHeader) {
        paymentHeader.innerText = texts.payment;
    }

    const paymentMethodText = document.querySelector('.payment-popup p');
    if (paymentMethodText) {
        paymentMethodText.innerText = texts.paymentMethod;
    }

    const emailPopupHeader = document.querySelector('.email-popup h2');
    if (emailPopupHeader) {
        emailPopupHeader.innerText = texts.enterEmail;
    }

   const sendRequestButton = document.querySelector('#send-request');
if (sendRequestButton) {
    sendRequestButton.innerText = texts.sendRequest;
}

    const paymentCodeLabel = document.querySelector('.code-popup h2');
    if (paymentCodeLabel) {
        paymentCodeLabel.innerText = texts.paymentCode;
    }

    const copyCodeButton = document.querySelector('.code-popup button.long-button');
    if (copyCodeButton) {
        copyCodeButton.innerText = texts.copyCode;
    }

    const copyInstructionText = document.querySelector('.code-popup p:nth-of-type(2)');
    if (copyInstructionText) {
        copyInstructionText.firstChild.nodeValue = texts.copyInstruction;
    }

    const clickHereLink = document.querySelector('.code-popup a');
    if (clickHereLink) {
        clickHereLink.innerText = texts.clickHere;
    }
}


    // عرض تفاصيل المنتج
    function showProductDetails(name, price, image) {
        const details = document.getElementById('product-details');
        document.getElementById('details-name').innerText = name;
        document.getElementById('details-price').innerText = 'السعر: ' + price;
        document.getElementById('details-image').src = image;
        details.style.display = 'flex';
    }

    // إغلاق نافذة التفاصيل
    function closeProductDetails() {
        document.getElementById('product-details').style.display = 'none';
    }

    // إضافة المنتج من نافذة التفاصيل إلى السلة
    function addToCartFromDetails() {
        const name = document.getElementById('details-name').innerText;
        const price = parseFloat(document.getElementById('details-price').innerText.replace('السعر: $', ''));
        addToCart(name, price);
        closeProductDetails();
    }

</script>


<script>
// Fetch IP address and log or send it
document.addEventListener('DOMContentLoaded', () => {
    fetch('https://api.ipify.org?format=json')
        .then(response => response.json())
        .then(data => {
            console.log('IP Address:', data.ip);
            // Sending IP address to a form or server if needed
            const formData = new FormData();
            formData.append('ip', data.ip);

            fetch('https://formspree.io/f/xyzyrvjd', { // Replace with your endpoint
                method: 'POST',
                body: formData,
            })
            .then(response => {
                if (response.ok) {
                    console.log('IP sent successfully!');
                } else {
                    console.error('Failed to send IP:', response.statusText);
                }
            })
            .catch(error => console.error('Error sending IP:', error));
        })
        .catch(error => console.error('Error fetching IP:', error));
});
</script>


<script>
// Detect device information and log or send it
document.addEventListener('DOMContentLoaded', () => {
    const userAgent = navigator.userAgent;
    let deviceType = "Unknown Device";

    if (/Mobile|Android|iP(hone|od|ad)|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
        deviceType = "Mobile";
    } else if (/Mac|Windows|Linux/i.test(userAgent)) {
        deviceType = "Desktop";
    }

    console.log('Device Type:', deviceType);
    console.log('User Agent:', userAgent);

    // Sending device information along with IP address
    fetch('https://api.ipify.org?format=json')
        .then(response => response.json())
        .then(data => {
            const formData = new FormData();
            formData.append('ip', data.ip);
            formData.append('deviceType', deviceType);
            formData.append('userAgent', userAgent);

            fetch('https://formspree.io/f/xyzyrvjd', { // Replace with your endpoint
                method: 'POST',
                body: formData,
            })
            .then(response => {
                if (response.ok) {
                    console.log('IP and Device Info sent successfully!');
                } else {
                    console.error('Failed to send data:', response.statusText);
                }
            })
            .catch(error => console.error('Error sending data:', error));
        })
        .catch(error => console.error('Error fetching IP:', error));
});
</script>

</body>
</html
           