
    <style>
        /* تأمين أن الأزرار تعرض السهم بجانب النص */
        #cooling, #heating, #lighting, #security, #audio {
            display: inline-flex !important;
            align-items: center !important;
            cursor: pointer;
            white-space: nowrap;
        }

        /* إخفاء القوائم بشكل افتراضي */
        #cooling_menu, #heating_menu, #lighting_menu, #security_menu, #audio_menu {
            display: none;
            position: absolute;
            z-index: 9999;
            /* أضف تنسيقات المنيو الخاصة بك هنا (background, padding, etc.) */
        }

        /* كلاس التدوير */
        .arrow-rotate {
            transform: rotate(180deg) !important;
        }
    </style>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const menuPairs = [
                { id: 'cooling', menu: 'cooling_menu' },
                { id: 'heating', menu: 'heating_menu' },
                { id: 'lighting', menu: 'lighting_menu' },
                { id: 'security', menu: 'security_menu' },
                { id: 'audio',    menu: 'audio_menu' }
            ];

            const arrowSvg = '<svg class="menu-arrow" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="transition: transform 0.3s; margin-left: 8px; display: inline-block;">        <path d="M7 10L12 15L17 10" stroke="#793B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>    </svg>';

            menuPairs.forEach(pair => {
                const btn = document.getElementById(pair.id);
                const menu = document.getElementById(pair.menu);

                if (btn && menu) {
                    // إضافة السهم بجانب النص
                    btn.insertAdjacentHTML('beforeend', arrowSvg);
                    const arrow = btn.querySelector('.menu-arrow');

                    // عند الضغط على الزرار
                    btn.addEventListener('click', function(e) {
                        e.stopPropagation();
                        
                        // هل المنيو الحالية مفتوحة؟
                        const isOpen = menu.style.display === 'block';

                        // إغلاق كل شيء أولاً
                        closeAllMenus();

                        // لو كانت مقفولة، افتحها واقلب السهم
                        if (!isOpen) {
                            menu.style.display = 'block';
                            arrow.classList.add('arrow-rotate');
                        }
                    });

                    // إخفاء المنيو عند خروج الماوس منها
                    menu.addEventListener('mouseleave', function() {
                        menu.style.display = 'none';
                        arrow.classList.remove('arrow-rotate');
                    });
                }
            });

            // فنكشن إغلاق الكل
            function closeAllMenus() {
                menuPairs.forEach(p => {
                    const m = document.getElementById(p.menu);
                    const b = document.getElementById(p.id);
                    if (m) m.style.display = 'none';
                    if (b) {
                        const a = b.querySelector('.menu-arrow');
                        if (a) a.classList.remove('arrow-rotate');
                    }
                });
            }

            // إغلاق المنيوهات عند الضغط في أي مكان خارجها
            document.addEventListener('click', closeAllMenus);
        });
    </script>
    <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://ebdaashamel.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://ebdaashamel.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-posts-equipments-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://ebdaashamel.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
