  /* ==========================================
           1. المتغيرات والأساسيات
        ========================================== */
        :root {
            --primary: #2C5F2D; --primary-light: #97BC62; --accent: #D4A373;
            --bg-color: #F8F9FA; --card-bg: #FFFFFF; --text-main: #2D3748;
            --text-muted: #718096; --danger: #E53E3E; --whatsapp: #25D366;
            --shadow: 0 10px 20px rgba(0,0,0,0.05); --border-radius: 16px;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; -webkit-tap-highlight-color: transparent; }
        body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; padding-bottom: 0; }
        
        /* ==========================================
           2. الهيدر الموحد
        ========================================== */
        .header { background: var(--card-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
        .nav-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }
        
        .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
        .brand-icon { background: var(--primary); color: white; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
        .brand-text h1 { font-size: 18px; color: var(--primary); font-weight: 900; line-height: 1.1; }
        .brand-text span { font-size: 11px; color: var(--text-muted); }
        
        .desktop-nav { display: flex; gap: 20px; list-style: none; }
        .desktop-nav a { text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 15px; transition: 0.3s; }
        .desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }
        
        .search-bar-desktop { flex: 1; min-width: 200px; position: relative; }
        .search-bar-desktop input { width: 100%; padding: 10px 35px 10px 15px; border: 1px solid #e2e8f0; border-radius: 30px; font-size: 14px; background: #f1f5f9; transition: 0.3s; }
        .search-bar-desktop input:focus { background: #fff; border-color: var(--primary); outline: none; }
        .search-bar-desktop i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
        
        .nav-actions { display: flex; gap: 10px; align-items: center; }
        .header-icon-btn, .cart-btn { position: relative; background: #f1f5f9; color: var(--text-main); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; border: none; transition: 0.3s; }
        .header-icon-btn:hover, .cart-btn:hover { background: #e2e8f0; color: var(--primary); }
        .icon-badge, .cart-badge { position: absolute; top: -2px; right: -2px; background: var(--danger); color: white; font-size: 10px; font-weight: bold; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
        .cart-badge { background: var(--accent); }

        /* ==========================================
           3. قائمة الإشعارات
        ========================================== */
        .notifications-dropdown {
            display: none; position: absolute; top: 65px; left: 20px;
            background: var(--card-bg); width: 320px; max-height: 400px; overflow-y: auto;
            border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; z-index: 9999;
        }
        .notifications-dropdown.active { display: block; }
        .notif-header { padding: 15px; font-weight: 800; border-bottom: 1px solid #e2e8f0; color: var(--primary); }
        .notif-item { padding: 15px; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: var(--text-main); }
        .notif-item:last-child { border-bottom: none; }
        .notif-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

        /* ==========================================
           4. المنتجات والبطاقات الموحدة
        ========================================== */
        .hero { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

        .mobile-search-container { display: none; max-width: 1200px; margin: 0 auto 20px auto; padding: 0 20px; }
        .mobile-search-box { position: relative; width: 100%; }
        .mobile-search-box input { width: 100%; padding: 15px 45px 15px 15px; border: 1px solid #e2e8f0; border-radius: 12px; font-size: 15px; background: var(--card-bg); box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: 0.3s; }
        .mobile-search-box input:focus { border-color: var(--primary); outline: none; }
        .mobile-search-box i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 18px; }

        .container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
        .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
        .section-title { font-size: 20px; font-weight: 800; color: var(--text-main); }
        .view-all { color: var(--primary); font-weight: 700; text-decoration: none; font-size: 13px; }
        
        .products-scroll { 
            display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory;
            scrollbar-width: none; -ms-overflow-style: none; 
        }
        .products-scroll::-webkit-scrollbar { display: none; }

        .product-card { 
            background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; 
            box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.03); transition: 0.3s; 
            position: relative; display: flex; flex-direction: column; 
            width: 240px; flex: 0 0 240px; scroll-snap-align: start; 
        }
        .product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
        
        .product-img { 
            width: 100%; height: 160px; object-fit: contain; background-color: #ffffff; padding: 10px; 
        }
        
        .product-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.95); color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; z-index: 2; }
        
        .product-info { padding: 15px; display: flex; flex-direction: column; flex: 1; }
        .product-info h3 { 
            font-size: 14px; font-weight: 800; margin-bottom: 5px; color: var(--text-main); 
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
            overflow: hidden; white-space: normal; height: 40px;
        }
        .product-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; white-space: normal; }
        
        .min-order-badge { font-size: 11px; font-weight: 700; color: #DD6B20; background: rgba(221, 107, 32, 0.08); padding: 5px 10px; border-radius: 6px; margin-bottom: 10px; display: inline-flex; align-items: center; gap: 5px; width: max-content; }
        .price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
        .product-price { font-weight: 900; color: var(--accent); font-size: 16px; }
        .btn-add-cart { background: var(--primary); color: white; border: none; width: 35px; height: 35px; border-radius: 10px; font-size: 16px; cursor: pointer; transition: 0.3s; }
        .btn-add-cart:hover { background: #214822; transform: scale(1.05); }

        .btn-wishlist { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.9); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text-muted); cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10; }
        .btn-wishlist:hover { transform: scale(1.1); color: var(--danger); }
        .btn-wishlist.active i { font-weight: 900; color: var(--danger); }

        /* ==========================================
           5. شريط التنقل السفلي
        ========================================== */
        .mobile-bottom-nav { display: none; }
        .nav-item-container { position: relative; }
        .icon-badge-nav { position: absolute; top: -5px; right: 15px; background: var(--accent); color: white; font-size: 10px; font-weight: bold; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

        /* ==========================================
           6. التصميم المتجاوب للموبايل
        ========================================== */
        @media (max-width: 768px) {
            body { padding-bottom: 70px; }
            .desktop-nav { display: none; }
            .nav-container { padding: 10px 15px; }
            .search-bar-desktop { order: 3; width: 100%; margin: 10px 0 0 0; }
            .notifications-dropdown { left: 50%; transform: translateX(-50%); width: 90vw; top: 70px; }
            
            .product-card { width: 170px; flex: 0 0 170px; } 
            .product-img { height: 130px; }
            .product-info { padding: 10px; }
            .product-info h3 { font-size: 13px; height: 36px; }

            .mobile-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--card-bg); justify-content: space-around; padding: 10px 5px; box-shadow: 0 -5px 20px rgba(0,0,0,0.05); border-top: 1px solid #edf2f7; z-index: 1000; }
            .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: 10px; font-weight: 700; flex: 1; text-align: center; }
            .nav-item i { font-size: 18px; }
            .nav-item.active { color: var(--primary); }
        }

        /* ==========================================
           7. سلة المشتريات
        ========================================== */
        .cart-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; }
        .cart-overlay.active { display: block; }
        .cart-sidebar { position: fixed; top: 0; left: -100%; width: 350px; height: 100%; background: var(--card-bg); z-index: 2001; transition: 0.4s; display: flex; flex-direction: column; box-shadow: 5px 0 20px rgba(0,0,0,0.1); }
        .cart-sidebar.active { left: 0; }
        @media (max-width: 400px) { .cart-sidebar { width: 85%; } }
        
        .cart-header { padding: 15px 20px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
        .cart-header h2 { font-size: 18px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
        .close-cart { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; transition: 0.3s; }
        .close-cart:hover { color: var(--danger); }
        
        .cart-items { flex: 1; overflow-y: auto; padding: 15px; }
        .cart-item { display: flex; gap: 12px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; position: relative; align-items: center; }
        .cart-item img { width: 55px; height: 55px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid #eee; }
        .cart-item-info { flex: 1; }
        .cart-item-title { font-size: 13px; font-weight: 800; margin-bottom: 4px; color: var(--text-main); }
        .cart-item-price { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
        
        .quantity-control { display: flex; align-items: center; gap: 8px; }
        .quantity-btn { background: #f1f5f9; border: none; width: 24px; height: 24px; border-radius: 6px; font-weight: bold; cursor: pointer; color: var(--primary); }
        
        .remove-item { position: absolute; left: 0; top: 15px; background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; }
        
        .cart-footer { padding: 15px 20px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
        .cart-total-row { display: flex; justify-content: space-between; font-size: 16px; font-weight: 900; margin-bottom: 12px; color: var(--text-main); }
        .btn-whatsapp { width: 100%; background: var(--whatsapp); color: white; padding: 12px; border: none; border-radius: 10px; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s; text-decoration: none;}

        /* ==========================================
           8. نافذة تفاصيل المنتج الكامله (Bottom Sheet)
        ========================================== */
        .product-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 3000; opacity: 0; transition: opacity 0.3s; }
        .product-modal-overlay.active { display: block; opacity: 1; }
        
        .product-modal { 
            position: fixed; bottom: -100%; left: 50%; transform: translateX(-50%); 
            width: 100%; max-width: 500px; background: var(--card-bg); z-index: 3001; 
            border-radius: 24px 24px 0 0; transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
            display: flex; flex-direction: column; max-height: 85vh; 
        }
        .product-modal.active { bottom: 0; }
        
        .close-modal-btn { position: absolute; top: 15px; left: 15px; background: rgba(255,255,255,0.9); border: none; width: 35px; height: 35px; border-radius: 50%; font-size: 18px; color: var(--text-main); cursor: pointer; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        
        .modal-img-container { width: 100%; height: 260px; background-color: #ffffff; display: flex; justify-content: center; align-items: center; border-radius: 24px 24px 0 0; border-bottom: 1px solid #f1f5f9; }
        .modal-img-container img { width: 100%; height: 100%; object-fit: contain; padding: 15px; }
        
        .modal-product-details { padding: 20px; overflow-y: auto; flex: 1; }
        .modal-product-details h2 { font-size: 20px; font-weight: 900; color: var(--primary); margin-bottom: 10px; line-height: 1.4; }
        .modal-product-details p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 15px; white-space: pre-line; }
        
        .modal-price-row { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: #f8fafc; border-radius: 12px; margin-bottom: 15px; }
        .price-label { font-size: 14px; font-weight: 700; color: var(--text-muted); }
        .price-value { font-size: 18px; font-weight: 900; color: var(--accent); }
        
        .modal-bottom-action { padding: 20px; border-top: 1px solid #e2e8f0; display: flex; gap: 15px; background: var(--card-bg); align-items: center; }
        .modal-qty-control { display: flex; align-items: center; justify-content: space-between; background: #f1f5f9; border-radius: 12px; padding: 5px; width: 120px; }
        .modal-qty-control button { background: white; border: none; width: 35px; height: 35px; border-radius: 8px; font-size: 16px; font-weight: bold; color: var(--primary); cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .modal-qty-control span { font-size: 18px; font-weight: 900; color: var(--text-main); }
        
        .modal-add-btn { flex: 1; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 800; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 5px; }
        .modal-add-btn:active { transform: scale(0.98); }
        