:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2d3436;
    --header-bg: #ffffff;
    --main-color: #ff6600;
    --dark-blue: #0984e3;
    --shadow: rgba(0,0,0,0.1);
}

.dark-theme {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #f5f5f5;
    --header-bg: #2d2d2d;
    --shadow: rgba(0,0,0,0.4);
}

body {
    margin: 0; background-color: var(--bg-color); color: var(--text-color);
    transition: 0.3s; font-family: 'Segoe UI', sans-serif; overflow-x: hidden;
}

header {
    background: var(--header-bg); padding: 15px 8%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 10px var(--shadow); position: sticky; top: 0; z-index: 1000;
}

.logo { color: var(--main-color); font-weight: bold; font-size: 26px; text-decoration: none; }

nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
nav ul li a { text-decoration: none; color: var(--text-color); font-weight: 500; }

.header-btns { display: flex; gap: 15px; align-items: center; }

.icon-btn { background: none; border: none; cursor: pointer; font-size: 20px; }

.lang-switch {
    background: var(--dark-blue); color: white; border: none;
    padding: 8px 18px; border-radius: 20px; cursor: pointer; font-weight: bold;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=1200');
    background-size: cover; height: 300px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; color: white; text-align: center;
}

.container { padding: 50px 8%; }

.section-title { text-align: center; margin-bottom: 40px; font-size: 32px; }

.products-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}

.product-card {
    background: var(--card-bg); border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow); transition: 0.3s;
}

.product-card:hover { transform: translateY(-10px); }

.img-container { position: relative; height: 280px; }
.img-container img { width: 100%; height: 100%; object-fit: cover; }

.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); display: flex; align-items: center;
    justify-content: center; opacity: 0; transition: 0.3s;
}

.product-card:hover .overlay { opacity: 1; }

.view-btn {
    background: var(--main-color); color: white; border: none;
    padding: 12px 25px; border-radius: 25px; cursor: pointer; font-weight: bold;
}

.product-info { padding: 20px; text-align: center; }

.contact-box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
    background: var(--card-bg); padding: 40px; border-radius: 20px;
}

.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea {
    padding: 12px; border: 1px solid #ddd; border-radius: 8px; background: var(--bg-color); color: var(--text-color);
}

.submit-btn {
    background: var(--main-color); color: white; border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-weight: bold;
}

footer { text-align: center; padding: 30px; background: var(--header-bg); border-top: 1px solid var(--shadow); }

@media (max-width: 992px) { .products-grid { grid-template-columns: repeat(2, 1fr); } .contact-box { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .products-grid { grid-template-columns: 1fr; } }
/* تنسيق شعار الموقع */
.logo img {
    height: 100px; /* تحكم في الارتفاع من هنا */
    width: auto;   /* يحافظ على أبعاد الصورة صحيحة */
    transition: transform 0.3s ease; /* إضافة تأثير انسيابي عند التكبير */
}

/* تأثير اختياري: يكبر اللوغو قليلاً عند مرور الماوس عليه */
.logo img:hover {
    transform: scale(1.1);
}

/* لضمان عدم تداخل اللوغو الكبير مع القائمة في الهيدر */
header {
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* تنسيق أيقونات السوشيل ميديا */
.social-links-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.social-card {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 5px 15px var(--shadow);
    transition: 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    color: white;
}

/* الألوان الرسمية للمنصات */
.facebook:hover { background-color: #1877f2; }
.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.tiktok:hover { background-color: #000000; }

/* زر الواتساب العائم */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px; /* للغة العربية */
    background-color: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

/* تعديل مكان الزر للغات اللاتينية (En, Fr) */
[dir="ltr"] .whatsapp-float {
    right: auto;
    left: 30px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* لضمان تناسق حجم الصور */
.img-container img {
    width: 100%;
    height: 300px;
    object-fit: contain; /* يحافظ على أبعاد المنتج داخل الإطار */
    background: #fff;
}
.whatsapp-order-btn {
    background-color: #25d366;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    transition: 0.3s;
}

.whatsapp-order-btn:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}
.features-container {
    display: flex;
    justify-content: space-around;
    padding: 40px 8%;
    background: var(--card-bg);
    margin-top: -30px; /* تداخل بسيط مع الـ Hero لجمالية التصميم */
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    z-index: 10;
    position: relative;
}

.feature-item {
    text-align: center;
}

.feature-item i {
    font-size: 40px;
    color: var(--main-color);
    margin-bottom: 10px;
}

.feature-item h3 {
    font-size: 18px;
    margin: 0;
}

/* للجوال */
@media (max-width: 600px) {
    .features-container {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
    }
}
/* تنسيق أيقونات السوشيل ميديا */
.social-links-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.social-card {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 5px 15px var(--shadow);
    transition: 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    color: white;
}

/* الألوان الرسمية للمنصات */
.facebook:hover { background-color: #1877f2; }
.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.tiktok:hover { background-color: #000000; }

/* زر الواتساب العائم */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px; /* للغة العربية */
    background-color: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

/* تعديل مكان الزر للغات اللاتينية (En, Fr) */
[dir="ltr"] .whatsapp-float {
    right: auto;
    left: 30px;
}
.social-section {
    text-align: center; /* لتوسيط العنوان */
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* لتوسيط الأيقونات في الوسط تماماً */
    justify-content: center;
}

.social-links-container {
    display: flex;
    gap: 20px;
    justify-content: center; /* توسيط العناصر داخل الحاوية */
    flex-wrap: wrap; /* لضمان التنسيق في الشاشات الصغيرة */
    margin-top: 20px;
}

/* تنسيق إضافي للأيقونات لتظهر بشكل دائري أنيق */
.social-card {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.3s, background 0.3s;
    text-decoration: none;
    font-size: 22px;
}

.social-card:hover {
    transform: translateY(-5px);
    color: white;
}
/* --- تكبير الشعار وتنسيقه --- */
.logo {
    display: flex;
    align-items: center;
    gap: 15px; /* مسافة بين الصورة والاسم */
    text-decoration: none;
}

.logo img {
    height: 65px; /* تكبير حجم الشعار (يمكنك زيادتها حسب الرغبة) */
    width: auto;
    transition: transform 0.3s ease;
}

.logo span {
    font-size: 26px; /* تكبير خط اسم المتجر */
    font-weight: bold;
    color: var(--main-color);
}

.logo:hover img {
    transform: scale(1.1); /* حركة خفيفة عند تمرير الماوس */
}

/* --- تأثير النبض لزر الواتساب العائم --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    z-index: 9999;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    animation: pulse-whatsapp 2s infinite; /* تشغيل التأثير */
    text-decoration: none;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- توسيط قسم التواصل الاجتماعي --- */
.social-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* التوسيط العرضي */
    justify-content: center; /* التوسيط الطولي */
    text-align: center;
    padding: 50px 0;
    background-color: var(--card-bg);
}

.social-links-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-card {
    width: 55px;
    height: 55px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: 0.3s;
    text-decoration: none;
    color: var(--text-color);
}

.social-card:hover {
    transform: translateY(-5px);
    color: white;
}
/* --- إعدادات التجاوب العامة --- */

/* 1. للشاشات المتوسطة (Tablets - أقل من 992px) */
@media (max-width: 992px) {
    .container {
        padding: 30px 5%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* عرض منتجين في الصف */
        gap: 20px;
    }

    .logo img {
        height: 55px; /* تصغير الشعار قليلاً ليناسب المساحة */
    }

    .modal-content {
        width: 85%; /* تكبير نافذة التفاصيل لتملأ الشاشة */
    }
}

/* 2. للشاشات الصغيرة (Mobile Phones - أقل من 768px) */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* وضع الشعار فوق القائمة */
        padding: 15px 20px;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        gap: 15px;
        justify-content: center;
    }

    .hero {
        height: 200px; /* تقليل ارتفاع قسم الترحيب */
    }

    .hero h1 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: 1fr; /* عرض منتج واحد فقط في الصف لسهولة الرؤية */
    }

    .features-container {
        flex-direction: column; /* وضع المميزات فوق بعضها */
        gap: 20px;
        margin-top: 20px;
    }

    .modal-body {
        grid-template-columns: 1fr; /* جعل الصورة فوق الوصف في نافذة التفاصيل */
        gap: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    /* تصغير زر الواتساب العائم قليلاً للجوال */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 20px;
        right: 20px;
    }
}

/* 3. للشاشات الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .logo span {
        font-size: 20px; /* تصغير نص الشعار */
    }

    .section-title {
        font-size: 24px;
    }

    .order-btn {
        font-size: 14px; /* تصغير أزرار الطلب لتناسب الشاشة */
    }
}