    :root {
            --primary: #4a154b;       
            --primary-light: #f4eaf5; 
            --accent: #ffc107;        
            --bg: #f8f4f9;            
            --card: #ffffff;          
            --text-main: #2a162b;     
            --text-muted: #857386;    
            --border: #e6dae7;        
        }

        body {
            font-family: 'Tajawal', sans-serif; background-color: var(--bg); color: var(--text-main);
            margin: 0; padding: 0; padding-bottom: 90px; -webkit-tap-highlight-color: transparent;
        }

        /* الشريط العلوي */
        .app-header {
            background: var(--primary);
            padding: 12px 15px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 2px 10px rgba(74, 21, 75, 0.2);
            position: relative;
            z-index: 10;
        }
        .app-logo {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 2px solid var(--accent);
            object-fit: cover;
            background: white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .app-title-box h1 { margin: 0 0 3px 0; font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1.1; }
        .header-details {; display:flex; flex-direction: column; gap: 3px; margin: 0; }
        .header-details span { margin-right: auto; margin-right: 150px; font-size: 12px; color: var(--primary-light); font-weight: 500; gap: 4px; line-height: 1.2; }

        /* السلايدر المتحرك (كلاسيكي - Fade) */
        .hero-slider {
            position: relative; height: 170px; overflow: hidden; background-color: var(--primary);
        }
        .slide {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-size: cover; background-position: center;
            opacity: 0; transition: opacity 0.8s ease-in-out; z-index: 1;
        }
        .slide.active { opacity: 1; z-index: 2; }
        .slide-overlay {
            position: absolute; inset: 0;
            background: linear-gradient(to top, rgba(15, 0, 15, 0.95) 0%, rgba(15, 0, 15, 0.3) 60%, rgba(0,0,0,0) 100%);
            display: flex; flex-direction: column; justify-content: flex-end; 
            padding: 20px; text-align: right;
        }
        .slide-badge {
            background: var(--accent); color: var(--text-main); font-size: 11px; font-weight: 800;
            padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
            display: inline-table; box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3); 
        }
        .slide-title { color: #ffffff; font-size: 24px; font-weight: 800; margin: 0 0 6px 0; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
        .slide-subtitle { color: #e6dae7; font-size: 13px; margin: 0; font-weight: 500; }

        /* التبويبات العلوية (صفين) */
        .category-nav {
            position: sticky; top: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px); padding: 8px; 
            display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; /* شبكة 4 أعمدة = صفين */
            z-index: 100; border-bottom: 1px solid var(--border);
        }
        .pill {
            background: var(--card); border: 1px solid var(--border); color: var(--text-muted);
            padding: 6px 2px; border-radius: 10px; font-size: 11px; font-weight: 800;
            text-align: center; cursor: pointer; transition: all 0.3s; text-decoration: none;
            display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; line-height: 1.2;
        }
        .nav-icon { width: 20px; height: 12px; transition: all 0.3s; color: var(--text-muted); }
        .pill.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(74, 21, 75, 0.3); }
        .pill.active .nav-icon { color: var(--accent); transform: scale(1.1); } 

        /* الأقسام والكروت */
        .menu-wrapper { padding: 0 10px; }
        .section-header { margin: 20px 5px 10px; font-size: 20px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 6px; }
        .section-header .nav-icon { width: 22px; height: 22px; color: var(--primary); }
        .menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

        .menu-card {
            background: var(--card); border-radius: 10px; padding: 5px;
            display: flex; flex-direction: column; border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(74, 21, 75, 0.05);
        }
        .card-img-container { width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-bottom: 6px; background: var(--bg); }
        .card-img-container img { width: 100%; height: 100%; object-fit: cover; }
        
        .item-name { 
            font-size: 13px; font-weight: 800; margin: 0 0 4px; color: var(--text-main);
            line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; 
            -webkit-box-orient: vertical; overflow: hidden; min-height: 26px; text-align: center;
        }
        
        .variant-toggle { display: flex; background: var(--bg); border-radius: 4px; border: 1px solid var(--border); margin-bottom: 4px; overflow: hidden; }
        .var-btn { flex: 1; padding: 2px 0; font-size: 9px; font-weight: 800; border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
        .var-btn.active { background: var(--primary); color: white; }

        .item-price { font-size: 14px; font-weight: 700; color: var(--primary); text-align: center; margin-bottom: 6px; }
        
        .controls-wrapper { margin-top: auto; }
        .add-btn { background: var(--primary-light); color: var(--primary); border: none; width: 100%; padding: 6px 0; border-radius: 6px; font-size: 14px; font-weight: 800; cursor: pointer; transition: 0.2s; }
        .add-btn:active { transform: scale(0.95); background: var(--primary); color: white; }
        
        .qty-controls { display: none; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--primary); border-radius: 6px; overflow: hidden; height: 26px; width: 100%; }
        .qty-btn { background: transparent; border: none; color: var(--primary); width: 30%; height: 100%; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; padding: 0; }
        .qty-btn:active { background: var(--primary-light); }
        .qty-num { font-size: 13px; font-weight: 600; width: 40%; text-align: center; color: var(--text-main); }

        /* السلة العائمة */
        .cart-wrapper { position: fixed; bottom: 15px; left: 15px; right: 15px; z-index: 1000; display: none; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
        @keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
        .cart-btn { background: green; color: white; width: 100%; padding: 12px 18px; border-radius: 14px; border: none; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 8px 20px rgba(74, 21, 75, 0.4); cursor: pointer; font-family: inherit; }
        .cart-text{ font-size: 20px; font-weight: bold; color: white; }
        .cart-left { display: flex; align-items: center; gap: 10px; }
        .cart-count { background: var(--accent); color: var(--primary); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
        .cart-total { font-size: 20px; font-weight: 800; color:aliceblue; }

        /* نافذة الدفع */
        .modal-overlay { position: fixed; inset: 0; background: rgba(42, 22, 43, 0.7); display: none; justify-content: center; align-items: center; z-index: 2000; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
        .modal-centered { background: var(--card); width: 90%; max-width: 400px; border-radius: 20px; padding: 20px; max-height: 85vh; overflow-y: auto; transform: scale(0.9); opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 15px 30px rgba(0,0,0,0.25); }
        .modal-centered.open { transform: scale(1); opacity: 1; }
        
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
        .modal-title { font-size: 20px; font-weight: 800; margin: 0; color: var(--primary); }
        .close-modal-btn { background: var(--primary-light); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; color: var(--primary); font-size: 14px; font-weight: bold; transition: 0.2s; }
        .close-modal-btn:active { transform: scale(0.9); }
        
        .receipt-card { background: var(--bg); border-radius: 12px; padding: 12px; margin-bottom: 15px; border: 1px solid var(--border); }
        .receipt-item { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-main); align-items: center; }
        .receipt-divider { height: 1px; background: var(--border); margin: 10px 0; }
        .receipt-total { font-size: 18px; font-weight: 800; color: var(--primary); display: flex; justify-content: space-between; }

        /* أزرار السلة (الحذف، العداد، الملاحظات) */
        .delete-item-btn {
            background: #ffebee; color: #d32f2f; border: 1px solid #ffcdd2;
            border-radius: 6px; width: 26px; height: 26px;
            display: flex; justify-content: center; align-items: center;
            cursor: pointer; font-size: 14px; transition: 0.2s; padding: 0;
        }
        .delete-item-btn:active { transform: scale(0.9); }
        .receipt-item-info { display: flex; align-items: center; gap: 8px; }

        .receipt-item-right { display: flex; align-items: center; gap: 12px; }
        .receipt-qty-controls {
            display: flex; align-items: center; background: var(--card);
            border: 1px solid var(--border); border-radius: 6px;
            overflow: hidden; height: 24px;
        }
        .receipt-qty-btn {
            background: var(--primary-light); color: var(--primary);
            border: none; width: 24px; height: 100%; font-size: 16px;
            font-weight: bold; cursor: pointer; display: flex;
            justify-content: center; align-items: center; padding: 0;
            transition: 0.2s;
        }
        .receipt-qty-btn:active { background: var(--primary); color: white; }
        .receipt-qty-num { font-size: 13px; font-weight: bold; width: 20px; text-align: center; color: var(--text-main); }
        
        .add-note-btn-toggle {
            background: transparent; border: none; color: var(--primary);
            font-size: 11px; font-weight: 800; cursor: pointer; padding: 0;
            display: flex; align-items: center; gap: 4px; transition: 0.2s; margin-top: 4px;
        }
        .add-note-btn-toggle:hover { color: var(--text-main); }
        .cart-note-input {
            width: 100%; padding: 8px; margin-top: 6px; border: 1px dashed var(--border); border-radius: 6px;
            font-family: inherit; font-size: 11px; background: #ffffff; color: var(--text-main); box-sizing: border-box; outline: none;
        }
        .cart-note-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }

        .input-group { margin-bottom: 12px; }
        .input-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
        
        .modern-input { 
            width: 100%; padding: 12px; background: #ffffff; border: 1px solid var(--border); 
            border-radius: 10px; font-family: inherit; font-size: 13px; font-weight: 500; 
            box-sizing: border-box; color: var(--text-main); transition: 0.2s; 
        }
        .modern-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
        
        .checkout-btn { width: 100%; background: #25D366; color: white; border: none; padding: 14px; border-radius: 12px; font-size: 18px; font-weight: 800; display: flex; justify-content: center; align-items: center; cursor: pointer; margin-top: 10px; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3); }

        .delivery-toggle { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 5px; }
        .del-btn { flex: 1; padding: 10px 2px; border: none; background: transparent; font-family: inherit; font-size: 14px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: 0.3s; }
        .del-btn.active { background: var(--primary); color: white; }
        
        .villages-container { display: none; margin-top: 10px; }
        .village-search { width: 100%; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 700; box-sizing: border-box; margin-bottom: 8px; color: var(--text-main); }
        .village-search:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px var(--primary-light); }
        .villages-list-wrapper { max-height: 140px; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
        .villages-ul { list-style: none; padding: 0; margin: 0; }
        .village-item { padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); cursor: pointer; display: flex; justify-content: space-between; transition: 0.2s; }
        .village-item:last-child { border-bottom: none; }
        .village-item:active { background: var(--bg); }
        .village-item.selected { background: var(--primary-light); color: var(--primary); }
        
        .developer-credit { text-align: center; font-family: 'Cairo', 'Tajawal', sans-serif; color: var(--text-muted); font-size: 12px; font-weight: bold; margin-top: 10px;}
        .dev-name { font-weight: bold; color: var(--primary); text-decoration: none; }       
        .phone-link { text-decoration: none; color: var(--text-main); font-weight: bold; }