/* ==================== إعدادات عامة ومتغيرات الألوان ==================== */
:root {
    --primary-color: #0a2342; /* أزرق داكن */
    --secondary-color: #f8f9fa; /* رمادي فاتح جدًا للخلفيات */
    --accent-color: #d4af37; /* ذهبي فاتح للتمييز */
    --text-color: #333; /* لون النص الأساسي */
    --light-text-color: #ffffff; /* لون النص الفاتح (للخلفيات الداكنة) */
    --border-color: #dee2e6; /* لون الحدود */
    --success-color: #28a745; /* لون للنجاح/جديد */
    --danger-color: #dc3545; /* لون للخصومات/تحذير */

    --font-family: 'Cairo', sans-serif; /* خط كايرو */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff; /* خلفية بيضاء للصفحة بشكل عام */
    direction: rtl; /* تأكيد الاتجاه لـ CSS */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

button, .cta-button {
    cursor: pointer;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: var(--font-family);
    font-weight: 700;
}

/* ==================== الهيدر ==================== */
.site-header {
    background-color: var(--light-text-color);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-navigation ul {
    display: flex;
}

.main-navigation ul li {
    margin-right: 25px; /* المسافة بين عناصر القائمة */
}

.main-navigation ul li a {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    padding-bottom: 5px;
    position: relative;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-navigation ul li a:hover::after,
.main-navigation ul li a.active::after { /* للتفعيل عند اختيار الصفحة */
    width: 100%;
}

.header-icons a {
    margin-right: 15px; /* المسافة بين الأيقونات */
    font-size: 1.2rem;
    color: var(--text-color);
}

.header-icons a:last-child {
    margin-right: 0;
}

.mobile-menu-toggle {
    display: none; /* مخفي في الشاشات الكبيرة */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* ==================== القسم الرئيسي (Hero) ==================== */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x600/0a2342/ffffff?text=Hero+Background+Image'); /* يمكنك تغيير الصورة */
    background-size: cover;
    background-position: center;
    color: var(--light-text-color);
    padding: 100px 0;
    text-align: center;
}

.hero-content-wrapper {
     max-width: 800px; /* لتحديد عرض المحتوى داخل الهيرو */
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--light-text-color);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--primary-color); /* لون نص داكن على خلفية ذهبية */
    padding: 12px 30px;
    font-size: 1.1rem;
    display: inline-block; /* ليعمل margin بشكل صحيح */
}

.cta-button:hover {
    background-color: #c09b2d; /* درجة أغمق من الذهبي عند المرور */
    color: var(--primary-color);
}

/* ==================== قسم المنتجات ==================== */
.products-section {
    padding: 60px 0;
    background-color: var(--secondary-color); /* خلفية رمادية فاتحة للقسم */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* شبكة مرنة */
    gap: 30px; /* المسافة بين المنتجات */
}

.product-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* لإخفاء أي تجاوز من الصورة أو الشارة */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px); /* تأثير رفع بسيط عند المرور */
}

.product-image {
    position: relative;
    background-color: #eee; /* لون للخلفية أثناء تحميل الصورة */
}

.product-image img {
    width: 100%;
    aspect-ratio: 1 / 1; /* للحفاظ على نسبة مربعة للصورة */
    object-fit: cover; /* لتغطية المساحة دون تشويه */
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px; /* من اليسار بسبب rtl */
    padding: 5px 10px;
    font-size: 0.8rem;
    color: var(--light-text-color);
    border-radius: 3px;
    font-weight: 700;
}

.product-badge.new {
    background-color: var(--success-color);
}

.product-badge.sale {
    background-color: var(--danger-color);
}

.product-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1; /* يسمح لهذا الجزء بالنمو لملء المساحة المتبقية */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* توزيع العناصر داخل البطاقة */
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 5px;
}

.add-to-cart-button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    width: 100%; /* يأخذ عرض البطاقة بالكامل */
    padding: 12px;
}

.add-to-cart-button:hover {
    background-color: #071a33; /* درجة أغمق من الأزرق */
    color: var(--light-text-color);
}

/* ==================== الفوتر ==================== */
.site-footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h4 {
    color: var(--accent-color); /* لون مميز لعناوين الفوتر */
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc; /* لون فاتح للروابط في الفوتر */
    transition: color 0.3s ease, padding-right 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--light-text-color);
    padding-right: 5px; /* تحريك بسيط لليمين عند المرور */
}

.footer-column p {
    color: #ccc;
    margin-bottom: 10px;
}

.social-icons a {
    color: var(--light-text-color);
    font-size: 1.3rem;
    margin-left: 15px; /* المسافة بين أيقونات التواصل */
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block; /* للسماح بالـ transform */
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: scale(1.1); /* تكبير بسيط للأيقونة */
}

.social-icons a:last-child {
     margin-left: 0;
}

.copyright {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #1a3a63; /* خط فاصل بلون أغمق قليلاً */
    font-size: 0.9rem;
    color: #aaa;
}

/* ==================== الاستجابة للشاشات الصغيرة (Responsive) ==================== */
@media (max-width: 768px) {
    .main-navigation {
        display: none; /* إخفاء القائمة الرئيسية في الموبايل (تحتاج JS لإظهارها) */
        /* يمكنك إضافة ستايل لإظهار القائمة عند الضغط على الزر */
        /* مثال:
        position: absolute;
        top: 100%;
        right: 0;
        background-color: white;
        width: 100%;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        */
    }

    .header-icons {
         margin-left: auto; /* دفع الأيقونات لأقصى اليسار */
         margin-right: 15px; /* مسافة قبل زر الموبايل */
    }

    .mobile-menu-toggle {
        display: block; /* إظهار زر القائمة في الموبايل */
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* أعمدة أصغر */
        gap: 20px;
    }

     .footer-content {
        grid-template-columns: 1fr; /* عمود واحد في الشاشات الصغيرة */
        text-align: center;
    }

    .footer-column {
        margin-bottom: 20px;
    }

    .social-icons a {
        margin: 0 10px; /* مسافات متساوية حول الأيقونات */
    }

}

@media (max-width: 480px) {
     .product-grid {
        grid-template-columns: 1fr; /* عمود واحد في الشاشات الصغيرة جداً */
    }

    .header-icons a {
        margin-right: 10px;
        font-size: 1.1rem;
    }

    .logo a {
        font-size: 1.5rem;
    }
}