/* ==================================== */
/* === 3. هيرو صفحة المنتجات (Desktop) === */
/* ==================================== */

.page-hero {
    /* DEV-NOTE: (1) أضفنا "position: relative" 
       ليكون مرجعاً للغطاء (Overlay).
    */
    position: relative;
    padding: 11rem 0; /* (48px) - زيادة الحشوة ليتناسب مع الصورة */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    overflow: hidden; /* لإخفاء أي زوائد */
}

/* DEV-NOTE: (2) هذا هو الكود الذي يضع الصورة */
.page-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* DEV-NOTE: غيّر هذا المسار إلى صورتك */
    background-image: url('../image/hero_prod.jpg'); 
    background-size: cover;
    background-position: center;
    
    /* DEV-NOTE: (3) هذا هو الغطاء (Overlay) الداكن
       (0.5 يعني 50% شفافية). غيّر هذا الرقم للتحكم بالسطوع.
    */
    background-color: rgba(0, 0, 0, 9); 
    
    z-index: 1; /* اجعل الخلفية والغطاء في الأسفل */
}

/* DEV-NOTE: (4) يجب أن نتأكد أن المحتوى (العنوان) 
   يأتي "فوق" الغطاء.
*/
.page-hero-container {
    width: 90%;
    max-width: 75rem; 
    margin: 0 auto;
    text-align: center;
    
    /* DEV-NOTE: اجعل المحتوى فوق الخلفية */
    position: relative;
    z-index: 2; 
}

.page-hero h1 {
    text-shadow: 0rem 0rem 1rem  rgb(0, 0, 0,1);
    color: #FFF6E5 ;
    font-size: 4rem; /* (40px) */
    margin: 0;
    border: 1px solid rgb(0, 0, 0,0.7); 
    box-shadow: 0rem 0rem 1rem  rgb(0, 0, 0,0.7);
}

/* DEV-NOTE: (تعديل) نزيل الخط العلوي من الفلتر لأنه أصبح في الهيرو */
.filter-carousel {
    border-top: none; 
    padding-top: 1rem; /* إضافة مسافة بسيطة */
}


/* ==================================== */
/* === 2. كاروسيل الفلترة (Desktop) === */
/* ==================================== */

.filter-carousel {
    width: 100%;
    background-color: var(--color-background-dark);
    border: 1px solid rgb(0, 0, 0,0.15); 
    box-shadow: 0rem 0rem 1rem  rgb(0, 0, 0,0.15);
    padding: 0.75rem 0; /* (12px) */
}

.filter-container {
    width: 90%;
    margin: 0 auto;
    max-width: 75rem; /* (1200px) */
    display: flex;
    overflow-x: auto;
    gap: 0.75rem; /* (12px) */
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}
.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    display: block;
    padding: 0.5rem 1rem; 
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem; /* (24px) */
    font-size: 0.875rem; /* (14px) */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap; 
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
}

.filter-btn.active {
    background-color: var(--color-accent);
    color: var(--color-background-light);
    border-color: var(--color-accent);
}
/* ==================================== */
/* === 3. شبكة المنتجات (تصميم جديد خاص) === */
/* ==================================== */

.product-grid {
    padding: 2.5rem 0; /* (40px) */
}

.grid-container {
    width: 90%;
    max-width: 75rem; /* (1200px) */
    margin: 0 auto;
    display: grid;
    /* 4 أعمدة للحاسوب */
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; /* (24px) */
}

/* DEV-NOTE: 
   هذا هو الكلاس "الجديد" الخاص بصفحة المنتجات
   هو لا يرث أي شيء من .product-card
*/
.grid-card {
    background-color: var(--color-background-light);
    border-radius: 0.5rem; 
    box-shadow: var(--shadow-light);
    padding: 1rem; 
    text-align: center;
    width: 100%;
    border: 1px solid rgb(0, 0, 0,0.15); 
    box-shadow: 0rem 0rem 1rem  rgb(0, 0, 0,0.15);
}

/* DEV-NOTE: حاوية الصورة (الأب) */
.grid-card .product-image-container {
    width: 100%;
    height: auto; /* إلغاء الارتفاع الثابت */
    aspect-ratio: 2 / 3; /* نسبة بوستر (للحاسوب) */
    background-color: #f0f2f5; 
    border-radius: 0.3125rem; 
    margin-bottom: 1rem; 
    overflow: hidden; 
}

/* DEV-NOTE: الصورة (الابن) */
.grid-card .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 0.3125rem; 
}

/* DEV-NOTE: تنسيق النص والزر (داخل .grid-card) */
.grid-card h3 {
    font-size: 1.125rem; 
    color: var(--color-text-dark);
    margin: 0 0 1rem 0; 
}

.grid-card .add-to-cart-btn {
    width: 100%;
    background-color: var(--color-text-dark); 
    color: var(--color-background-light); 
    font-size: 1rem; 
    font-weight: bold;
    padding: 0.75rem; 
    border-radius: 0.3125rem; 
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.grid-card .add-to-cart-btn:hover {
    background-color: var(--color-accent);
}

/* ==================================== */
/* === 4. التصميم المتجاوب (Mobile) === */
/* ==================================== */

@media (max-width: 48rem) {

    /* --- 1. إصلاحات الـ Navbar (للهاتف) --- */
    
    .navbar-right.page-nav {
        margin-left: 0;
        flex-grow: 1;
        justify-content: space-around;
        gap: 0.2rem; 
    }

    .nav-icon-btn {
        padding: 0.125rem 0.25rem; 
        gap: 0;
    }

    .nav-icon-btn i {
        font-size: 1.8rem; /* (18px) */
    }

    .nav-icon-btn span {
        font-size: 0.7rem; /* (10px) */
    }

    /* --- 2. إصلاحات كاروسيل الفلترة (للهاتف) --- */
    
    .filter-carousel {
        padding: 0.5rem 0; /* (8px) */
    }

    .filter-btn {
        padding: 0.375rem 0.75rem; /* (6px 12px) */
        font-size: 0.8125rem; /* (13px) */
    }

    /* ... داخل @media (max-width: 48rem) ... */

    /* ... (بعد كود الفلترة) ... */

    /* --- إصلاحات هيرو الصفحة (للهاتف) --- */
    .page-hero {
        padding: 8rem 0; /* (24px) */
    }
    .page-hero h1 {
        font-size: 3rem; /* (32px) */
    }


/* --- 3. إصلاحات شبكة المنتجات (للهاتف - بتحكم يدوي) --- */

.product-grid {
    padding: 1rem 0; /* (24px) */
}

.grid-container {
    /* 2 أعمدة للهاتف */
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem; /* (16px) */
}

/* DEV-NOTE: 
   هذا هو "المفتاح" للتحكم بحجم "قالب" الصورة (الأب)
*/
.grid-card .product-image-container {
    /* 1. أزلنا 'aspect-ratio' */
    /* aspect-ratio: 1 / 1; */ 
    
    /* 2. أضفنا 'height' (التحكم اليدوي) */
    /* غيّر هذا الرقم للتحكم بارتفاع "قالب" الصورة.
      (12.5rem = 200px)
    */
    height: 10rem; 

    /* (هذه الخصائص موروثة من style.css لكن نؤكد عليها) */
    overflow: hidden;
    background-color: #FFFFFF;
}

/* DEV-NOTE: 
   هذا هو "المفتاح" للتحكم بـ "الصورة" نفسها (الابن)
*/
.grid-card .product-image-container img {
    width: 80%;
    height: 100;
    /* غيّر 'cover' إلى 'contain' إذا أردت أن تظهر الصورة "كاملة"
      بدون قص، حتى لو تركت فراغات.
      
      'cover' (الحالي) = يملأ المربع (مع قص).
      'contain' = يظهر الصورة كاملة (مع فراغات).
    */
    object-fit: cover; 
}

/* (باقي الكود لتنسيق النص والزر) */

.grid-card h3 {
    font-size: 1rem; /* (16px) */
}

.grid-card .add-to-cart-btn {
    font-size: 0.675rem; /* (14px) */
    padding: 0.625rem; /* (10px) */
}
}
