(function(){ if(document.getElementById("my-chaty-box")) return; const chat = document.createElement("div"); chat.id = "my-chaty-box"; chat.innerHTML = ` `; const style = document.createElement("style"); style.innerHTML = ` #my-chaty-box{position:fixed;bottom:20px;left:20px;z-index:999999;display:flex;flex-direction:column;gap:10px;} #my-chaty-box a{display:flex;justify-content:center;align-items:center;padding:12px;border-radius:50px;transition:.2s;box-shadow:0 6px 20px rgba(0,0,0,0.2);} #my-chaty-box .wa{background:#25D366;} #my-chaty-box .call{background:#0088cc;} #my-chaty-box a:hover{transform:translateY(-2px);opacity:.95;} `; document.head.appendChild(style); document.body.appendChild(chat); })(); (function(){ // البحث عن أيقونة السلة في سلة const cartIcon = document.querySelector('.s-cart-summary-wrapper'); if(!cartIcon) return; // إنشاء الأيقونة الجديدة بنفس تصميم ووردبريس const newCartIcon = document.createElement('div'); newCartIcon.className = 'elementor-menu-cart__toggle elementor-button-wrapper'; newCartIcon.innerHTML = ` `; // إضافة التنسيقات const style = document.createElement("style"); style.innerHTML = ` .elementor-menu-cart__toggle { margin: 0; padding: 0; } .elementor-button { display: inline-flex; align-items: center; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 8px 12px; transition: all 0.3s ease; text-decoration: none; gap: 8px; } .elementor-button:hover { background: #f5f5f5; transform: translateY(-2px); } .elementor-button-text { font-size: 14px; font-weight: 600; color: #333; order: 2; } .elementor-button-icon { position: relative; display: inline-flex; align-items: center; order: 1; } .elementor-button-icon-qty { position: absolute; top: -10px; right: -12px; background: #82287f; color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: bold; } .e-toggle-cart-custom-icon { width: 20px; height: 20px; color: #82287f; } .woocommerce-Price-currencySymbol { font-size: 12px; } /* إخفاء الأيقونة القديمة */ .s-cart-summary-wrapper { display: none !important; } `; // استبدال الأيقونة القديمة بالأيقونة الجديدة cartIcon.parentNode.insertBefore(newCartIcon, cartIcon); cartIcon.style.display = 'none'; document.head.appendChild(style); })();