{"product_id":"aaa","title":"aaa","description":"\u003cbody\u003e\n\n\n    \n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003cstyle\u003e\n        :root { --gold: #AA771C; --bg: #f8f9fa; }\n        body { font-family: 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: #333; line-height: 1.4; }\n        \n        .calc-trigger { \n            position: fixed; top: 20px; right: 20px; z-index: 1000;\n            background: var(--gold); color: #fff; border: none; padding: 12px 25px;\n            font-weight: bold; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2);\n        }\n\n        .modal-overlay { \n            display: none; position: fixed; z-index: 1001; left: 0; top: 0; \n            width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); \n        }\n\n        .modal-content { \n            background: #fff; margin: 2vh auto; padding: 20px; width: 90%; \n            max-width: 480px; border-radius: 12px; max-height: 95vh; overflow-y: auto;\n        }\n\n        .section { margin-bottom: 15px; padding: 12px; border-radius: 8px; border: 1px solid #eee; background: #fff; }\n        .section-gold { border: 1px solid #e9d7a5; background: #fffdf5; }\n        .title { color: var(--gold); font-size: 11px; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; border-bottom: 1px solid #eee; display: block; }\n\n        input[type=\"number\"], select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 5px; margin: 4px 0; font-size: 14px; }\n        input[type=\"range\"] { width: 100%; accent-color: var(--gold); cursor: pointer; }\n        \n        .tiraj-display { text-align: center; font-size: 24px; font-weight: bold; color: var(--gold); margin-bottom: 5px; }\n\n        .results { background: #1a1a1a; color: #fff; padding: 20px; border-radius: 10px; text-align: center; margin-top: 15px; }\n        .price-main { font-size: 32px; font-weight: bold; color: #e9d7a5; display: block; }\n        .price-sub { font-size: 13px; color: #aaa; }\n        \n        .info-box { background: #e7f3ff; color: #004085; padding: 10px; border-radius: 6px; font-size: 13px; font-weight: bold; margin-top: 10px; text-align: center; }\n        .error-msg { color: #ff4d4d; font-size: 11px; font-weight: bold; margin-top: 5px; display: none; }\n        \n        .close-btn { float: right; cursor: pointer; font-size: 24px; color: #999; }\n    \u003c\/style\u003e\n\n\n\n\u003cbutton class=\"calc-trigger\" onclick=\"toggleModal(true)\"\u003e📐 CONFIGURATOR TIPAR\u003c\/button\u003e\n\n\u003cdiv class=\"modal-overlay\" id=\"modal\"\u003e\n    \u003cdiv class=\"modal-content\"\u003e\n        \u003cspan class=\"close-btn\" onclick=\"toggleModal(false)\"\u003e×\u003c\/span\u003e\n        \u003ch3 style=\"text-align:center; margin-top:0; color:var(--gold);\"\u003eConfigurator Profesional\u003c\/h3\u003e\n\n        \u003cdiv class=\"section\"\u003e\n            \u003cspan class=\"title\"\u003e1. Tiraj Produse Finite\u003c\/span\u003e\n            \u003cdiv class=\"tiraj-display\" id=\"tirajVal\"\u003e100\u003c\/div\u003e\n            \u003cinput type=\"range\" id=\"tirajRange\" min=\"1\" max=\"10000\" value=\"100\"\u003e\n            \u003cinput type=\"number\" id=\"tirajInput\" value=\"100\" style=\"text-align:center; font-weight:bold;\"\u003e\n        \u003c\/div\u003e\n\n        \u003cdiv class=\"section\"\u003e\n            \u003cspan class=\"title\"\u003e2. Dimensiuni Produs (cm)\u003c\/span\u003e\n            \u003cdiv style=\"display:flex; gap:10px;\"\u003e\n                \u003cinput type=\"number\" id=\"width\" value=\"21\" placeholder=\"Lățime\"\u003e\n                \u003cinput type=\"number\" id=\"height\" value=\"29.7\" placeholder=\"Înălțime\"\u003e\n            \u003c\/div\u003e\n        \u003c\/div\u003e\n\n        \u003cdiv class=\"section\"\u003e\n            \u003cspan class=\"title\"\u003e3. Configurație Interior\u003c\/span\u003e\n            \u003cselect id=\"matInt\"\u003e\u003c\/select\u003e\n            \u003cdiv style=\"display:flex; gap:10px; margin-top:8px;\"\u003e\n                \u003cdiv style=\"flex:1;\"\u003e\n                    \u003clabel style=\"font-size:10px;\"\u003ePAGINI:\u003c\/label\u003e\n                    \u003cinput type=\"number\" id=\"pagInt\" value=\"1\" min=\"1\"\u003e\n                \u003c\/div\u003e\n                \u003cdiv style=\"flex:1;\"\u003e\n                    \u003clabel style=\"font-size:10px;\"\u003eTIPAR:\u003c\/label\u003e\n                    \u003cselect id=\"typeInt\"\u003e\n                        \u003coption value=\"1\"\u003eDoar Față\u003c\/option\u003e\n                        \u003coption value=\"1.5\"\u003eFață-Verso\u003c\/option\u003e\n                    \u003c\/select\u003e\n                \u003c\/div\u003e\n            \u003c\/div\u003e\n        \u003c\/div\u003e\n\n        \u003cdiv class=\"section section-gold\"\u003e\n            \u003cspan class=\"title\"\u003e4. Configurație Copertă\u003c\/span\u003e\n            \u003cselect id=\"hasCop\" onchange=\"updateUI()\"\u003e\n                \u003coption value=\"no\"\u003eFără copertă separată\u003c\/option\u003e\n                \u003coption value=\"yes\"\u003eCu copertă separată\u003c\/option\u003e\n            \u003c\/select\u003e\n            \u003cdiv id=\"copArea\" style=\"display:none; margin-top:10px;\"\u003e\n                \u003cselect id=\"matCop\"\u003e\u003c\/select\u003e\n                \u003cselect id=\"typeCop\" style=\"margin-top:5px;\"\u003e\n                    \u003coption value=\"1\"\u003eDoar Față\u003c\/option\u003e\n                    \u003coption value=\"1.5\"\u003eFață-Verso\u003c\/option\u003e\n                \u003c\/select\u003e\n            \u003c\/div\u003e\n        \u003c\/div\u003e\n\n        \u003cdiv class=\"results\"\u003e\n            \u003cdiv id=\"warning\" class=\"error-msg\"\u003e\u003c\/div\u003e\n            \u003cspan class=\"price-main\" id=\"totalPrice\"\u003e0.00 RON\u003c\/span\u003e\n            \u003cspan class=\"price-sub\" id=\"unitPrice\"\u003e0.00 RON \/ buc\u003c\/span\u003e\n            \u003cdiv class=\"info-box\" id=\"timeOutput\"\u003e⏱️ Timp producție: 1 zi\u003c\/div\u003e\n        \u003c\/div\u003e\n        \u003cp style=\"font-size:9px; color:#777; text-align:center; margin-top:10px;\"\u003e*Timpul de producție depinde de comenzile aflate deja în lucru.\u003c\/p\u003e\n    \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cscript\u003e\n    \/\/ 1. DATELE DE BAZ\u0026#258; (9 Materiale unificate)\n    const materials = {\n        h80: { name: \"H\u0026acirc;rtie 80g\", cap: 20000, grid: [1.5, 1.2, 0.9, 0.6, 0.4, 0.3, 0.25, 0.2, 0.18, 0.16, 0.14, 0.12, 0.1, 0.09, 0.08, 0.07, 0.06, 0.05] },\n        h100: { name: \"H\u0026acirc;rtie 100g\", cap: 16000, grid: [1.8, 1.5, 1.1, 0.8, 0.6, 0.45, 0.35, 0.3, 0.25, 0.22, 0.2, 0.18, 0.16, 0.14, 0.12, 0.1, 0.09, 0.08] },\n        h130: { name: \"H\u0026acirc;rtie 130g\", cap: 12000, grid: [2.2, 1.9, 1.4, 1.1, 0.9, 0.7, 0.55, 0.45, 0.4, 0.35, 0.3, 0.28, 0.25, 0.22, 0.2, 0.18, 0.16, 0.14] },\n        c250: { name: \"Carton 250g\", cap: 8000, grid: [2.8, 2.4, 1.9, 1.6, 1.3, 1.1, 1.0, 0.9, 0.8, 0.75, 0.7, 0.65, 0.6, 0.55, 0.5, 0.45, 0.4, 0.38] },\n        c300: { name: \"Carton 300g\", cap: 6000, grid: [3.2, 2.8, 2.2, 1.9, 1.6, 1.4, 1.3, 1.2, 1.1, 1.0, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.65, 0.6] },\n        sidefat: { name: \"Carton Sidefat\", cap: 4000, grid: [6, 5.5, 5, 4.5, 4, 3.8, 3.5, 3.3, 3.1, 2.9, 2.7, 2.5, 2.3, 2.2, 2.1, 2, 1.9, 1.8] },\n        auto: { name: \"Autocopiativ\u0026#259;\", cap: 10000, grid: [2, 1.7, 1.3, 1, 0.8, 0.6, 0.5, 0.4, 0.35, 0.3, 0.28, 0.25, 0.22, 0.2, 0.18, 0.16, 0.14, 0.12] },\n        autocolant: { name: \"Autocolant\", cap: 5000, grid: [5, 4.5, 4, 3.5, 3, 2.5, 2.2, 2, 1.8, 1.7, 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1, 0.9] },\n        scoarta: { name: \"Scoar\u0026#539;\u0026#259; Tare\", cap: 200, grid: [45, 40, 35, 30, 25, 22, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9] }\n    };\n\n    const intervals = [1, 5, 10, 20, 50, 100, 200, 300, 500, 800, 1000, 1500, 2000, 3000, 5000, 8000, 10000, 20000];\n\n    \/\/ Populate Selects\n    function populate() {\n        const selects = [document.getElementById('matInt'), document.getElementById('matCop')];\n        selects.forEach(s =\u003e {\n            for (let key in materials) {\n                let opt = document.createElement('option');\n                opt.value = key;\n                opt.innerText = materials[key].name;\n                s.appendChild(opt);\n            }\n        });\n        document.getElementById('matCop').value = 'c300';\n    }\n\n    function toggleModal(show) { document.getElementById('modal').style.display = show ? 'block' : 'none'; }\n\n    function updateUI() {\n        document.getElementById('copArea').style.display = document.getElementById('hasCop').value === 'yes' ? 'block' : 'none';\n        calculate();\n    }\n\n    function getPriceFromGrid(materialKey, clicks) {\n        const grid = materials[materialKey].grid;\n        let price = grid[0];\n        for (let i = 0; i \u003c intervals.length; i++) {\n            if (clicks \u003e= intervals[i]) price = grid[i];\n        }\n        return price;\n    }\n\n    function calculate() {\n        const tiraj = parseInt(document.getElementById('tirajInput').value) || 1;\n        const w = parseFloat(document.getElementById('width').value) || 1;\n        const h = parseFloat(document.getElementById('height').value) || 1;\n        const pInt = parseInt(document.getElementById('pagInt').value) || 1;\n        const area = w * h;\n\n        \/\/ Click-uri Interior (Tiraj x Pagini)\n        const clicksInt = tiraj * pInt;\n        \/\/ Click-uri Coperta (Tiraj)\n        const clicksCop = tiraj;\n\n        \/\/ Raport Format (bazat pe A4 = 623cm2)\n        let ratio = 1;\n        if (area \u003c= 50) ratio = 0.1;\n        else if (area \u003c= 170) ratio = 0.25;\n        else if (area \u003c= 341) ratio = 0.5;\n        else if (area \u003c= 682) ratio = 1;\n        else ratio = Math.ceil(area \/ 623);\n\n        \/\/ Protec\u0026#539;ii Tiraj Mic\n        let finalRatio = ratio;\n        if (tiraj \u003c 10 \u0026\u0026 ratio \u003c 1) finalRatio = 1;\n        else if (tiraj \u003c 50 \u0026\u0026 area \u003c 341) finalRatio = 1;\n\n        \/\/ 1. CALCUL INTERIOR\n        const mIntKey = document.getElementById('matInt').value;\n        const typeInt = parseFloat(document.getElementById('typeInt').value);\n        const basePriceInt = getPriceFromGrid(mIntKey, clicksInt);\n        const costInt = (basePriceInt * finalRatio) * pInt * typeInt;\n\n        \/\/ 2. CALCUL COPERT\u0026#258;\n        let costCop = 0;\n        let mCopKey = null;\n        if (document.getElementById('hasCop').value === 'yes') {\n            mCopKey = document.getElementById('matCop').value;\n            const typeCop = parseFloat(document.getElementById('typeCop').value);\n            const basePriceCop = getPriceFromGrid(mCopKey, clicksCop);\n            costCop = (basePriceCop * finalRatio) * typeCop;\n        }\n\n        let unitPrice = costInt + costCop;\n\n        \/\/ 3. REGULA 0.5 RON (Sub A6, Sub 490 buc)\n        const warn = document.getElementById('warning');\n        if (area \u003c 170 \u0026\u0026 tiraj \u003c 490 \u0026\u0026 unitPrice \u003c 0.5) {\n            unitPrice = 0.5;\n            warn.innerText = \"\u0026#9888;\u0026#65039; Tarif minim 0.50 RON\/buc aplicat.\";\n            warn.style.display = \"block\";\n        } else {\n            warn.style.display = \"none\";\n        }\n\n        \/\/ 4. TIMP PRODUC\u0026#538;IE\n        let capZilnica = materials[mIntKey].cap;\n        if (mCopKey) capZilnica = Math.min(capZilnica, materials[mCopKey].cap);\n        \n        let zile = Math.ceil(tiraj \/ capZilnica);\n        if (mIntKey === 'scoarta' || mCopKey === 'scoarta') zile += 1;\n\n        \/\/ AFI\u0026#536;ARE\n        const total = unitPrice * tiraj;\n        document.getElementById('totalPrice').innerText = total.toLocaleString('ro-RO', {minimumFractionDigits: 2}) + \" RON\";\n        document.getElementById('unitPrice').innerText = unitPrice.toFixed(2) + \" RON \/ buc\";\n        document.getElementById('timeOutput').innerText = `\u0026#9201;\u0026#65039; Produc\u0026#539;ie: ${zile} ${zile === 1 ? 'zi lucr\u0026#259;toare' : 'zile lucr\u0026#259;toare'}`;\n        document.getElementById('tirajVal').innerText = tiraj;\n    }\n\n    \/\/ Event Listeners\n    const tR = document.getElementById('tirajRange');\n    const tI = document.getElementById('tirajInput');\n    tR.oninput = () =\u003e { tI.value = tR.value; calculate(); };\n    tI.oninput = () =\u003e { tR.value = tI.value; calculate(); };\n    \n    document.querySelectorAll('input, select').forEach(el =\u003e el.addEventListener('input', calculate));\n\n    window.onload = () =\u003e {\n        populate();\n        calculate();\n    };\n\u003c\/script\u003e\n\n\u003c\/body\u003e","brand":"ANDOR TIPO","offers":[{"title":"Default Title","offer_id":52913371906395,"sku":null,"price":0.0,"currency_code":"RON","in_stock":false}],"url":"https:\/\/www.andortipo.ro\/en\/products\/aaa","provider":"ANDOR TIPO","version":"1.0","type":"link"}