{"id":10320,"date":"2026-04-25T13:26:45","date_gmt":"2026-04-25T13:26:45","guid":{"rendered":"https:\/\/aitstores.com\/?page_id=10320"},"modified":"2026-04-25T13:31:44","modified_gmt":"2026-04-25T13:31:44","slug":"compare","status":"publish","type":"page","link":"https:\/\/aitstores.com\/ar\/compare\/","title":{"rendered":"Compare"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"10320\" class=\"elementor elementor-10320\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f5fec0b e-con-full e-flex e-con e-parent\" data-id=\"f5fec0b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-af9a6a8 elementor-widget elementor-widget-shortcode\" data-id=\"af9a6a8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">        <style>\n            .devaura-compare-wrapper {\n                max-width: 1200px;\n                margin: 40px auto;\n                padding: 0 16px;\n                font-family: inherit;\n                direction: ltr;\n            }\n\n            html[lang^=\"ar\"] .devaura-compare-wrapper,\n            body[class*=\"translatepress-ar\"] .devaura-compare-wrapper {\n                direction: rtl;\n                text-align: right;\n                font-family: 'Cairo', sans-serif !important;\n            }\n\n            .devaura-compare-header {\n                text-align: center;\n                margin-bottom: 32px;\n            }\n\n            .devaura-compare-title {\n                font-size: 32px;\n                font-weight: 800;\n                color: #1A1408;\n                margin-bottom: 8px;\n            }\n\n            .devaura-compare-subtitle {\n                font-size: 15px;\n                color: #888;\n                max-width: 500px;\n                margin: 0 auto;\n            }\n\n            \/* \u2500\u2500 Table Container \u2500\u2500 *\/\n            .devaura-compare-table-container {\n                overflow-x: auto;\n                background: #fff;\n                border-radius: 16px;\n                box-shadow: 0 4px 24px rgba(0,0,0,0.04);\n                border: 1px solid rgba(0,0,0,0.06);\n                -webkit-overflow-scrolling: touch;\n            }\n\n            .devaura-compare-table {\n                width: 100%;\n                border-collapse: collapse;\n                min-width: 600px;\n            }\n\n            .devaura-compare-table th, \n            .devaura-compare-table td {\n                padding: 16px 14px;\n                text-align: center;\n                vertical-align: middle;\n                border-bottom: 1px solid rgba(0,0,0,0.04);\n                font-size: 14px;\n            }\n\n            .devaura-compare-table th {\n                vertical-align: top;\n                padding: 20px 14px 16px;\n            }\n\n            .devaura-compare-table tr:last-child td,\n            .devaura-compare-table tr:last-child th {\n                border-bottom: none;\n            }\n\n            \/* \u2500\u2500 Row Titles \u2500\u2500 *\/\n            .devaura-compare-row-title {\n                background: #faf9f7;\n                font-weight: 700;\n                color: #b48c50;\n                text-transform: uppercase;\n                letter-spacing: 0.8px;\n                font-size: 11px;\n                width: 120px;\n                min-width: 120px;\n                max-width: 140px;\n                vertical-align: middle !important;\n                text-align: left !important;\n                padding: 12px 14px !important;\n                white-space: nowrap;\n            }\n\n            html[lang^=\"ar\"] .devaura-compare-row-title,\n            body[class*=\"translatepress-ar\"] .devaura-compare-row-title {\n                text-align: right !important;\n            }\n\n            \/* \u2500\u2500 Product Header Cell \u2500\u2500 *\/\n            .devaura-compare-product-img {\n                width: 100px;\n                height: 120px;\n                object-fit: contain;\n                margin: 0 auto 10px auto;\n                display: block;\n            }\n\n            .devaura-compare-product-name {\n                font-size: 13px;\n                font-weight: 700;\n                color: #1A1408;\n                line-height: 1.3;\n                max-width: 160px;\n                margin: 0 auto;\n                overflow: hidden;\n                display: -webkit-box;\n                -webkit-line-clamp: 2;\n                -webkit-box-orient: vertical;\n            }\n\n            .devaura-compare-remove-btn {\n                color: #ccc;\n                font-size: 11px;\n                cursor: pointer;\n                display: inline-flex;\n                align-items: center;\n                gap: 4px;\n                margin-top: 8px;\n                font-weight: 500;\n                transition: color 0.2s;\n            }\n\n            .devaura-compare-remove-btn:hover {\n                color: #ff4b4b;\n            }\n\n            \/* \u2500\u2500 Price Row \u2500\u2500 *\/\n            .devaura-compare-price-cell {\n                font-size: 15px;\n                color: #1A1408;\n                font-weight: 700;\n            }\n\n            .devaura-compare-price-cell del {\n                color: #bbb;\n                font-weight: 400;\n                font-size: 12px;\n            }\n\n            .devaura-compare-price-cell ins {\n                text-decoration: none;\n                color: #b48c50;\n            }\n\n            \/* \u2500\u2500 Add to Cart Row \u2500\u2500 *\/\n            .devaura-compare-cart-btn {\n                display: inline-block;\n                padding: 8px 20px;\n                background: #1A1408;\n                color: #fff !important;\n                border-radius: 50px;\n                text-decoration: none;\n                font-size: 12px;\n                font-weight: 600;\n                transition: all 0.3s ease;\n                letter-spacing: 0.3px;\n                border: none;\n                cursor: pointer;\n                font-family: inherit;\n            }\n\n            .devaura-compare-cart-btn:hover {\n                background: #b48c50;\n                color: #fff !important;\n            }\n\n            .devaura-compare-cart-btn:disabled {\n                opacity: 0.6;\n                cursor: wait;\n            }\n\n            \/* \u2500\u2500 Stock Status \u2500\u2500 *\/\n            .devaura-stock-badge {\n                display: inline-flex;\n                align-items: center;\n                gap: 5px;\n                font-size: 12px;\n                font-weight: 600;\n                padding: 4px 12px;\n                border-radius: 20px;\n            }\n\n            .devaura-stock-badge.in-stock {\n                background: rgba(40, 167, 69, 0.08);\n                color: #28a745;\n            }\n\n            .devaura-stock-badge.out-of-stock {\n                background: rgba(220, 53, 69, 0.08);\n                color: #dc3545;\n            }\n\n            .devaura-stock-dot {\n                width: 6px;\n                height: 6px;\n                border-radius: 50%;\n                display: inline-block;\n            }\n\n            .in-stock .devaura-stock-dot { background: #28a745; }\n            .out-of-stock .devaura-stock-dot { background: #dc3545; }\n\n            \/* \u2500\u2500 Notes Grid \u2500\u2500 *\/\n            .devaura-compare-notes-grid {\n                display: flex;\n                flex-wrap: wrap;\n                gap: 8px;\n                justify-content: center;\n            }\n\n            .devaura-compare-note-tag {\n                display: flex;\n                flex-direction: column;\n                align-items: center;\n                gap: 3px;\n            }\n\n            .devaura-compare-note-tag img {\n                width: 32px;\n                height: 32px;\n                border-radius: 50%;\n                object-fit: cover;\n                border: 1px solid #eee;\n            }\n\n            .devaura-compare-note-tag span {\n                font-size: 10px;\n                color: #666;\n                max-width: 60px;\n                overflow: hidden;\n                text-overflow: ellipsis;\n                white-space: nowrap;\n            }\n\n            .devaura-compare-inspired {\n                display: flex;\n                flex-direction: column;\n                align-items: center;\n                gap: 6px;\n            }\n\n            .devaura-compare-inspired img {\n                width: 50px;\n                height: 65px;\n                object-fit: contain;\n                border-radius: 6px;\n                box-shadow: 0 2px 8px rgba(0,0,0,0.08);\n            }\n\n            .devaura-compare-inspired span {\n                font-size: 12px;\n                font-weight: 600;\n                color: #1A1408;\n            }\n\n            .devaura-compare-family {\n                display: inline-block;\n                padding: 4px 10px;\n                background: rgba(180, 140, 80, 0.08);\n                color: #b48c50;\n                border-radius: 16px;\n                font-size: 12px;\n                font-weight: 600;\n            }\n\n            \/* \u2500\u2500 Empty State \u2500\u2500 *\/\n            .devaura-empty-state {\n                text-align: center;\n                padding: 60px 20px;\n            }\n\n            .devaura-empty-state h3 {\n                font-size: 22px;\n                color: #1A1408;\n                margin-bottom: 10px;\n            }\n\n            .devaura-empty-state p {\n                color: #888;\n                margin-bottom: 20px;\n            }\n\n            .devaura-empty-state a {\n                display: inline-block;\n                padding: 10px 28px;\n                background: #b48c50;\n                color: #fff;\n                border-radius: 50px;\n                text-decoration: none;\n                font-weight: 600;\n                font-size: 14px;\n            }\n            \n            .devaura-compare-loader {\n                text-align: center;\n                padding: 50px;\n                font-size: 16px;\n                color: #b48c50;\n                font-weight: 600;\n            }\n            \n            .devaura-spinner {\n                border: 3px solid rgba(180, 140, 80, 0.15);\n                border-left-color: #b48c50;\n                border-radius: 50%;\n                width: 32px;\n                height: 32px;\n                animation: spin 1s linear infinite;\n                margin: 0 auto 16px auto;\n            }\n            \n            @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n\n            \/* \u2500\u2500 Responsive: Mobile \u2500\u2500 *\/\n            @media (max-width: 768px) {\n                .devaura-compare-wrapper {\n                    margin: 20px auto;\n                    padding: 0 10px;\n                }\n                .devaura-compare-header {\n                    margin-bottom: 20px;\n                }\n                .devaura-compare-title {\n                    font-size: 24px;\n                }\n                .devaura-compare-subtitle {\n                    font-size: 13px;\n                }\n                .devaura-compare-table-container {\n                    border-radius: 10px;\n                }\n                .devaura-compare-table {\n                    min-width: 500px;\n                }\n                .devaura-compare-table th, \n                .devaura-compare-table td {\n                    padding: 10px 8px;\n                    font-size: 12px;\n                }\n                .devaura-compare-row-title {\n                    width: 80px;\n                    min-width: 80px;\n                    font-size: 9px;\n                    padding: 8px !important;\n                    letter-spacing: 0.5px;\n                }\n                .devaura-compare-product-img {\n                    width: 70px;\n                    height: 80px;\n                }\n                .devaura-compare-product-name {\n                    font-size: 11px;\n                    max-width: 100px;\n                }\n                .devaura-compare-cart-btn {\n                    padding: 6px 12px;\n                    font-size: 10px;\n                }\n                .devaura-compare-note-tag img {\n                    width: 24px;\n                    height: 24px;\n                }\n                .devaura-compare-note-tag span {\n                    font-size: 8px;\n                    max-width: 45px;\n                }\n                .devaura-compare-price-cell {\n                    font-size: 12px;\n                }\n                .devaura-compare-price-cell del {\n                    font-size: 10px;\n                }\n                .devaura-stock-badge {\n                    font-size: 10px;\n                    padding: 3px 8px;\n                }\n                .devaura-compare-family {\n                    font-size: 10px;\n                    padding: 3px 8px;\n                }\n                .devaura-compare-inspired img {\n                    width: 36px;\n                    height: 48px;\n                }\n                .devaura-compare-inspired span {\n                    font-size: 10px;\n                }\n            }\n\n            @media (max-width: 400px) {\n                .devaura-compare-table {\n                    min-width: 400px;\n                }\n                .devaura-compare-row-title {\n                    width: 60px;\n                    min-width: 60px;\n                    font-size: 8px;\n                }\n            }\n        <\/style>\n\n        <div class=\"devaura-compare-wrapper\" id=\"devaura-compare-app\">\n            <div class=\"devaura-compare-header\">\n                <h1 class=\"devaura-compare-title\" data-en=\"Product Comparison\" data-ar=\"\u0645\u0642\u0627\u0631\u0646\u0629 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a\">Product Comparison<\/h1>\n                <p class=\"devaura-compare-subtitle\" data-en=\"Compare products side-by-side to find the perfect match.\" data-ar=\"\u0642\u0627\u0631\u0646 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u062c\u0646\u0628\u0627\u064b \u0625\u0644\u0649 \u062c\u0646\u0628 \u0644\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0627\u0644\u062e\u064a\u0627\u0631 \u0627\u0644\u0645\u062b\u0627\u0644\u064a.\">Compare products side-by-side to find the perfect match.<\/p>\n            <\/div>\n            \n            <div id=\"devaura-compare-content\">\n                <div class=\"devaura-compare-loader\">\n                    <div class=\"devaura-spinner\"><\/div>\n                    <span data-en=\"Loading comparison...\" data-ar=\"\u062c\u0627\u0631\u064a \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0642\u0627\u0631\u0646\u0629...\">Loading comparison...<\/span>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <script>\n            document.addEventListener(\"DOMContentLoaded\", function() {\n                const isRTL = document.documentElement.lang.startsWith('ar') || document.body.classList.contains('translatepress-ar');\n                const app = document.getElementById('devaura-compare-app');\n                const content = document.getElementById('devaura-compare-content');\n                const MAX_TITLE_LEN = 45;\n                \n                \/\/ Translate Static Text\n                app.querySelectorAll('[data-en]').forEach(el => {\n                    el.textContent = isRTL ? el.getAttribute('data-ar') : el.getAttribute('data-en');\n                });\n\n                \/\/ Cookie helper\n                function getCookie(name) {\n                    const match = document.cookie.match(new RegExp('(?:^|;\\\\s*)' + name + '=([^;]*)'));\n                    return match ? decodeURIComponent(match[1]) : null;\n                }\n\n                \/\/ Get Blocksy Compare List from cookie: blc_products_compare_list\n                let compareIds = [];\n                try {\n                    let raw = getCookie('blc_products_compare_list');\n                    if (!raw) raw = localStorage.getItem('ct_compare_list');\n                    if (!raw) raw = localStorage.getItem('ct_compare');\n                    if (!raw) raw = getCookie('ct_compare_list');\n\n                    if (raw) {\n                        const parsed = JSON.parse(raw);\n                        if (Array.isArray(parsed)) {\n                            parsed.forEach(item => {\n                                if (typeof item === 'object' && item !== null && item.id) {\n                                    compareIds.push(parseInt(item.id));\n                                } else if (typeof item === 'number' || typeof item === 'string') {\n                                    compareIds.push(parseInt(item));\n                                }\n                            });\n                        }\n                    }\n                } catch(e) {\n                    console.error(\"[DevAura Compare] Could not parse compare list:\", e);\n                }\n\n                console.log('[DevAura Compare] Found product IDs:', compareIds);\n\n                if (compareIds.length === 0) {\n                    renderEmptyState();\n                    return;\n                }\n\n                \/\/ Fetch Data via AJAX\n                fetch('https:\/\/aitstores.com\/wp-admin\/admin-ajax.php', {\n                    method: 'POST',\n                    headers: { 'Content-Type': 'application\/x-www-form-urlencoded' },\n                    body: new URLSearchParams({\n                        action: 'devaura_get_compare_data',\n                        product_ids: compareIds.join(',')\n                    })\n                })\n                .then(res => res.json())\n                .then(data => {\n                    if (data.success && data.data.length > 0) {\n                        renderTable(data.data);\n                    } else {\n                        renderEmptyState();\n                    }\n                })\n                .catch(() => {\n                    content.innerHTML = '<div class=\"devaura-empty-state\"><h3>' + (isRTL ? '\u062d\u062f\u062b \u062e\u0637\u0623' : 'An error occurred') + '<\/h3><\/div>';\n                });\n\n                function renderEmptyState() {\n                    const title = isRTL ? '\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0645\u0642\u0627\u0631\u0646\u0629 \u0641\u0627\u0631\u063a\u0629' : 'Your Compare List is Empty';\n                    const desc = isRTL ? '\u0623\u0636\u0641 \u0628\u0639\u0636 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0644\u0644\u0645\u0642\u0627\u0631\u0646\u0629 \u0628\u064a\u0646\u0647\u0627.' : 'Add some products to compare them.';\n                    const btn = isRTL ? '\u0627\u0644\u0639\u0648\u062f\u0629 \u0644\u0644\u0645\u062a\u062c\u0631' : 'Return to Shop';\n                    content.innerHTML = `\n                        <div class=\"devaura-empty-state\">\n                            <h3>${title}<\/h3>\n                            <p>${desc}<\/p>\n                            <a href=\"\/shop\">${btn}<\/a>\n                        <\/div>\n                    `;\n                }\n\n                function truncate(str, max) {\n                    if (!str) return '';\n                    return str.length > max ? str.substring(0, max) + '\u2026' : str;\n                }\n\n                function renderTable(products) {\n                    \/\/ Check if ANY product is a fragrance (has notes data)\n                    const hasAnyFragrance = products.some(p => \n                        (p.top_notes && p.top_notes.length > 0) || \n                        (p.mid_notes && p.mid_notes.length > 0) || \n                        (p.base_notes && p.base_notes.length > 0) ||\n                        p.family || p.inspired_by_name\n                    );\n\n                    const t = {\n                        product: isRTL ? '\u0627\u0644\u0645\u0646\u062a\u062c' : 'Product',\n                        price: isRTL ? '\u0627\u0644\u0633\u0639\u0631' : 'Price',\n                        cart: isRTL ? '\u0625\u0636\u0627\u0641\u0629 \u0644\u0644\u0633\u0644\u0629' : 'Add to Cart',\n                        addCart: isRTL ? '\u0625\u0636\u0627\u0641\u0629 \u0644\u0644\u0633\u0644\u0629' : 'Add to Cart',\n                        stock: isRTL ? '\u0627\u0644\u062a\u0648\u0641\u0631' : 'Availability',\n                        bottleSize: isRTL ? '\u062d\u062c\u0645 \u0627\u0644\u0632\u062c\u0627\u062c\u0629' : 'Bottle Size',\n                        top: isRTL ? '\u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a \u0627\u0644\u0639\u0644\u064a\u0627' : 'Top Notes',\n                        mid: isRTL ? '\u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a \u0627\u0644\u0648\u0633\u0637\u0649' : 'Middle Notes',\n                        base: isRTL ? '\u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a \u0627\u0644\u0623\u0633\u0627\u0633\u064a\u0629' : 'Base Notes',\n                        family: isRTL ? '\u0627\u0644\u0639\u0627\u0626\u0644\u0629 \u0627\u0644\u0639\u0637\u0631\u064a\u0629' : 'Scent Family',\n                        inspired: isRTL ? '\u0645\u0633\u062a\u0648\u062d\u0649 \u0645\u0646' : 'Inspired By',\n                        remove: isRTL ? '\u0625\u0632\u0627\u0644\u0629' : 'Remove',\n                        inStock: isRTL ? '\u0645\u062a\u0648\u0641\u0631' : 'In Stock',\n                        outStock: isRTL ? '\u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631' : 'Out of Stock',\n                        samples: isRTL ? '\u0627\u0644\u0639\u064a\u0646\u0627\u062a' : 'Samples'\n                    };\n\n                    let html = `<div class=\"devaura-compare-table-container\">\n                                <table class=\"devaura-compare-table\">`;\n\n                    \/\/ \u2500\u2500 Row 1: Product (Image + Name) \u2500\u2500\n                    html += `<thead><tr><th class=\"devaura-compare-row-title\">${t.product}<\/th>`;\n                    products.forEach(p => {\n                        html += `<th>\n                            <a href=\"${p.url}\" style=\"text-decoration:none;color:inherit;\">\n                                <img decoding=\"async\" src=\"${p.image}\" class=\"devaura-compare-product-img\" alt=\"${truncate(p.name, MAX_TITLE_LEN)}\">\n                            <\/a>\n                            <div class=\"devaura-compare-product-name\" title=\"${p.name}\">${truncate(p.name, MAX_TITLE_LEN)}<\/div>\n                            <div class=\"devaura-compare-remove-btn\" data-id=\"${p.id}\">\n                                <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"\/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"\/><\/svg>\n                                ${t.remove}\n                            <\/div>\n                        <\/th>`;\n                    });\n                    html += `<\/tr><\/thead><tbody>`;\n\n                    \/\/ \u2500\u2500 Row 2: Price \u2500\u2500\n                    html += `<tr><td class=\"devaura-compare-row-title\">${t.price}<\/td>`;\n                    products.forEach(p => html += `<td class=\"devaura-compare-price-cell\">${p.price}<\/td>`);\n                    html += `<\/tr>`;\n\n                    \/\/ \u2500\u2500 Row 3: Availability \u2500\u2500\n                    html += `<tr><td class=\"devaura-compare-row-title\">${t.stock}<\/td>`;\n                    products.forEach(p => {\n                        const inStock = p.in_stock !== false;\n                        const noPrice = p.no_price;\n                        if (noPrice) {\n                            html += `<td><span class=\"devaura-stock-badge\" style=\"background:rgba(180,140,80,0.08);color:#b48c50;\"><span class=\"devaura-stock-dot\" style=\"background:#b48c50;\"><\/span>${isRTL ? '\u0627\u0633\u0623\u0644 \u0639\u0646 \u0627\u0644\u0633\u0639\u0631' : 'Ask for Price'}<\/span><\/td>`;\n                        } else {\n                            const cls = inStock ? 'in-stock' : 'out-of-stock';\n                            const label = inStock ? t.inStock : t.outStock;\n                            html += `<td><span class=\"devaura-stock-badge ${cls}\"><span class=\"devaura-stock-dot\"><\/span>${label}<\/span><\/td>`;\n                        }\n                    });\n                    html += `<\/tr>`;\n\n                    \/\/ \u2500\u2500 Row: Bottle Size \u2500\u2500\n                    html += `<tr><td class=\"devaura-compare-row-title\">${t.bottleSize}<\/td>`;\n                    products.forEach(p => {\n                        html += `<td><span style=\"font-weight:700;color:#1A1408;\">${p.bottle_size ? p.bottle_size + 'ml' : '-'}<\/span><\/td>`;\n                    });\n                    html += `<\/tr>`;\n\n                    \/\/ \u2500\u2500 Row: Samples Available \u2500\u2500\n                    html += `<tr><td class=\"devaura-compare-row-title\">${t.samples}<\/td>`;\n                    products.forEach(p => {\n                        const cls = p.samples_enabled ? 'in-stock' : 'out-of-stock';\n                        const label = p.samples_enabled ? (isRTL ? '\u0646\u0639\u0645' : 'Yes') : (isRTL ? '\u0644\u0627' : 'No');\n                        html += `<td><span class=\"devaura-stock-badge ${cls}\"><span class=\"devaura-stock-dot\"><\/span>${label}<\/span><\/td>`;\n                    });\n                    html += `<\/tr>`;\n\n                    \/\/ \u2500\u2500 Row 4: Add to Cart \u2500\u2500\n                    html += `<tr><td class=\"devaura-compare-row-title\">${t.cart}<\/td>`;\n                    products.forEach(p => {\n                        html += `<td><button type=\"button\" class=\"devaura-compare-cart-btn\" data-product-id=\"${p.id}\">${t.addCart}<\/button><\/td>`;\n                    });\n                    html += `<\/tr>`;\n\n                    \/\/ \u2500\u2500 Fragrance-only rows (only if ANY product has fragrance data) \u2500\u2500\n                    if (hasAnyFragrance) {\n                        \/\/ Top Notes\n                        html += `<tr><td class=\"devaura-compare-row-title\">${t.top}<\/td>`;\n                        products.forEach(p => html += `<td>${renderNotes(p.top_notes)}<\/td>`);\n                        html += `<\/tr>`;\n\n                        \/\/ Middle Notes\n                        html += `<tr><td class=\"devaura-compare-row-title\">${t.mid}<\/td>`;\n                        products.forEach(p => html += `<td>${renderNotes(p.mid_notes)}<\/td>`);\n                        html += `<\/tr>`;\n\n                        \/\/ Base Notes\n                        html += `<tr><td class=\"devaura-compare-row-title\">${t.base}<\/td>`;\n                        products.forEach(p => html += `<td>${renderNotes(p.base_notes)}<\/td>`);\n                        html += `<\/tr>`;\n\n                        \/\/ Scent Family\n                        html += `<tr><td class=\"devaura-compare-row-title\">${t.family}<\/td>`;\n                        products.forEach(p => html += `<td>${p.family ? '<span class=\"devaura-compare-family\">'+p.family+'<\/span>' : '-'}<\/td>`);\n                        html += `<\/tr>`;\n\n                        \/\/ Inspired By\n                        html += `<tr><td class=\"devaura-compare-row-title\">${t.inspired}<\/td>`;\n                        products.forEach(p => html += `<td>${renderInspired(p)}<\/td>`);\n                        html += `<\/tr>`;\n                    }\n\n                    html += `<\/tbody><\/table><\/div>`;\n                    content.innerHTML = html;\n\n                    \/\/ Attach Remove Events\n                    document.querySelectorAll('.devaura-compare-remove-btn').forEach(btn => {\n                        btn.addEventListener('click', function() {\n                            const id = parseInt(this.getAttribute('data-id'));\n                            let raw = getCookie('blc_products_compare_list') || '[]';\n                            let currentList = JSON.parse(raw);\n                            currentList = currentList.filter(item => {\n                                if (typeof item === 'object' && item.id) return parseInt(item.id) !== id;\n                                return parseInt(item) !== id;\n                            });\n                            document.cookie = 'blc_products_compare_list=' + encodeURIComponent(JSON.stringify(currentList)) + ';path=\/;max-age=31536000';\n                            location.reload();\n                        });\n                    });\n\n                    \/\/ Attach AJAX Add to Cart + Open Sidebar\n                    document.querySelectorAll('.devaura-compare-cart-btn').forEach(btn => {\n                        btn.addEventListener('click', function() {\n                            const productId = this.getAttribute('data-product-id');\n                            const origText = this.textContent;\n                            this.textContent = isRTL ? '\u062c\u0627\u0631\u064a \u0627\u0644\u0625\u0636\u0627\u0641\u0629...' : 'Adding...';\n                            this.disabled = true;\n\n                            fetch('https:\/\/aitstores.com\/wp-admin\/admin-ajax.php', {\n                                method: 'POST',\n                                headers: { 'Content-Type': 'application\/x-www-form-urlencoded' },\n                                body: 'action=woocommerce_add_to_cart&product_id=' + productId + '&quantity=1'\n                            })\n                            .then(r => r.json())\n                            .then(data => {\n                                this.textContent = isRTL ? '\u062a\u0645\u062a \u0627\u0644\u0625\u0636\u0627\u0641\u0629' : 'Added';\n                                \/\/ Refresh cart fragments\n                                if (typeof jQuery !== 'undefined') {\n                                    jQuery(document.body).trigger('wc_fragment_refresh');\n                                }\n                                \/\/ Open cart sidebar panel\n                                setTimeout(() => {\n                                    var cartTrigger = document.querySelector('[data-id=\"cart\"] a, [data-id=\"cart\"], .ct-header-cart a');\n                                    if (cartTrigger) { cartTrigger.click(); }\n                                }, 400);\n                                setTimeout(() => { this.textContent = origText; this.disabled = false; }, 2000);\n                            })\n                            .catch(() => {\n                                this.textContent = origText;\n                                this.disabled = false;\n                            });\n                        });\n                    });\n                }\n\n                function renderNotes(notes) {\n                    if (!notes || notes.length === 0) return '<span style=\"color:#ccc;\">-<\/span>';\n                    let h = '<div class=\"devaura-compare-notes-grid\">';\n                    notes.forEach(n => {\n                        const img = n.image ? `<img decoding=\"async\" src=\"${n.image}\" alt=\"${n.name}\">` : '';\n                        h += `<div class=\"devaura-compare-note-tag\">${img}<span>${n.name}<\/span><\/div>`;\n                    });\n                    h += '<\/div>';\n                    return h;\n                }\n\n                function renderInspired(p) {\n                    if (!p.inspired_by_name) return '<span style=\"color:#ccc;\">-<\/span>';\n                    const img = p.inspired_by_image ? `<img decoding=\"async\" src=\"${p.inspired_by_image}\" alt=\"${p.inspired_by_name}\">` : '';\n                    return `<div class=\"devaura-compare-inspired\">${img}<span>${p.inspired_by_name}<\/span><\/div>`;\n                }\n            });\n        <\/script>\n        <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-10320","page","type-page","status-publish","hentry"],"blocksy_meta":[],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/pages\/10320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/comments?post=10320"}],"version-history":[{"count":7,"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/pages\/10320\/revisions"}],"predecessor-version":[{"id":10328,"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/pages\/10320\/revisions\/10328"}],"wp:attachment":[{"href":"https:\/\/aitstores.com\/ar\/wp-json\/wp\/v2\/media?parent=10320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}