{"id":8452,"date":"2025-12-18T04:58:09","date_gmt":"2025-12-18T04:58:09","guid":{"rendered":"https:\/\/elinformatico.cat\/?post_type=product&#038;p=8452"},"modified":"2026-05-29T04:21:57","modified_gmt":"2026-05-29T04:21:57","slug":"descuento-automatico","status":"publish","type":"product","link":"https:\/\/elinformatico.cat\/ca\/producte\/descuento-automatico\/","title":{"rendered":"COMBINA APPS A TU GUSTO"},"content":{"rendered":"    <style>\n      .app-selector-wrapper {\n        background: #fff; border: 1px solid #e1e1e1; border-radius: 12px;\n        padding: 20px; font-family: 'Segoe UI', sans-serif;\n        box-shadow: 0 10px 30px rgba(0,0,0,0.05);\n      }\n      .section-heading {\n        font-size: 1.1em; font-weight: 700; margin-bottom: 15px;\n        color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 8px;\n      }\n      \/* Selector SO *\/\n      .os-options { display: flex; gap: 10px; margin-bottom: 25px; }\n      .os-btn {\n        flex: 1; padding: 12px; border: 2px solid #eee; border-radius: 8px;\n        text-align: center; cursor: pointer; font-weight: 600; transition: 0.2s;\n        opacity: 0.6; \/* Por defecto semitransparente *\/\n      }\n      .os-btn:hover { opacity: 1; border-color: #ccc; }\n      \n      .os-btn.active { \n          border-color: #0073aa; background: #eef9fd; color: #0073aa; \n          opacity: 1; box-shadow: 0 2px 5px rgba(0,115,170,0.1);\n      }\n\n      \/* Grid Apps *\/\n      .apps-grid {\n        display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); \/* Un poco m\u00e1s ancho *\/\n        gap: 15px; margin-bottom: 25px; max-height: 500px; overflow-y: auto; padding-right: 5px;\n      }\n      .app-card {\n        background: #fff; border: 1px solid #eee; padding: 10px 15px;\n        border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);\n        display: flex; flex-direction: row; align-items: center; justify-content: space-between;\n      }\n      \n      .app-info { \n          display: flex; align-items: center; gap: 10px; \n          font-size: 0.95em; font-weight: 600; flex: 1;\n      }\n      .app-icon { font-size: 1.4em; }\n      \n      \/* Contenedor de Controles (Derecha) *\/\n      .controls-wrapper {\n          display: flex; flex-direction: column; gap: 5px; align-items: flex-end;\n      }\n\n      \/* Fila de control individual *\/\n      .qty-row { \n          display: none; \/* Oculto por defecto *\/\n          align-items: center; gap: 6px; \n          background: #f8f9fa; padding: 2px 6px; border-radius: 20px; \n          font-size: 0.85em; border: 1px solid #eee;\n      }\n      \n      .qty-row.visible { display: flex; animation: fadeIn 0.3s ease; }\n      @keyframes fadeIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }\n\n      .os-tag { font-size: 0.8em; font-weight: 900; text-transform: uppercase; width: 30px; }\n      .tag-win { color: #0078d7; }\n      .tag-mac { color: #999; }\n\n      .btn-qty {\n        width: 24px; height: 24px; border-radius: 50%; border: none;\n        background: #fff; color: #333; font-weight: bold; cursor: pointer;\n        box-shadow: 0 1px 2px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;\n      }\n      .btn-qty:hover { background: #0073aa; color: #fff; }\n      \n      .count-display { font-weight: bold; min-width: 15px; text-align: center; }\n      .count-display.has-items { color: #0073aa; }\n\n      \/* Footer *\/\n      .action-area { text-align: center; background: #fdfdfd; padding: 15px; border-top: 1px solid #eee; }\n      \n      .info-instructions {\n          background: #eef9fd; border-left: 4px solid #0073aa; \n          padding: 12px; margin-bottom: 20px; font-size: 0.9em; \n          text-align: left; color: #444; border-radius: 4px;\n      }\n\n      .wa-button {\n        background: #25D366; color: #fff; padding: 15px 30px;\n        border-radius: 50px; text-decoration: none; display: block;\n        font-weight: 800; font-size: 1.1em; border: none; cursor: pointer;\n        width: 100%; transition: 0.2s;\n      }\n      .wa-button:hover { background: #1ebc57; transform: scale(1.02); }\n      #wa-error { color: #d63638; font-size: 0.9em; margin-top: 10px; display: none; font-weight: bold; }\n      \n      .total-price-tag { color: #0073aa; font-size: 1.2em; margin-left: 10px; }\n    <\/style>\n\n    <div class=\"app-selector-wrapper\">\n      <div class=\"section-heading\">1. \u00bfPara qu\u00e9 sistema las quieres? (Puedes marcar ambos)<\/div>\n      <div class=\"os-options\">\n        <div class=\"os-btn active\" id=\"btn-win\" onclick=\"toggleOS('win')\">\ud83e\ude9f Windows<\/div>\n        <div class=\"os-btn\" id=\"btn-mac\" onclick=\"toggleOS('mac')\">\ud83c\udf4e Mac \/ Apple<\/div>\n      <\/div>\n\n      <div class=\"section-heading\">2. A\u00f1ade Apps al Pack (M\u00ednimo 5 en total):<\/div>\n      <div class=\"apps-grid\" id=\"appsGrid_v3\"><\/div>\n\n      <div class=\"action-area\">\n        <p style=\"font-size:1.1em; margin-bottom:15px;\">\n           Total: <strong id=\"totalCount\">0<\/strong> apps \n           <strong class=\"total-price-tag\" id=\"totalPriceDisplay\">0,00\u20ac<\/strong>\n        <\/p>\n\n        <div class=\"info-instructions\">\n            <strong>\u2139\ufe0f IMPORTANTE:<\/strong> Despu\u00e9s de confirmar por WhatsApp, vuelve aqu\u00ed.<br>\n            <strong>NO tienes que volver a pinchar las apps<\/strong>, ya est\u00e1n gestionadas en el chat.<br>\n            Simplemente en el bot\u00f3n de sumar <strong>(+)<\/strong> del carrito en el <strong>art\u00edculo ahorro<\/strong>, pon el n\u00famero total de apps (<span id=\"ref-total-count\">0<\/span>) y pulsa comprar.\n        <\/div>\n\n        <button onclick=\"sendWA_v3()\" class=\"wa-button\">\ud83d\udcf2 VERIFICAR PACK EN WHATSAPP<\/button>\n        <div id=\"wa-error\">\u26a0\ufe0f Debes seleccionar al menos 5 aplicaciones en total.<\/div>\n      <\/div>\n    <\/div>\n\n    <script>\n      \/\/ \u26a0\ufe0f TU N\u00daMERO CONFIGURADO\n      const telefonoWA = \"34630264609\"; \n      \n      \/\/ PRECIOS BASE\n      const precioNormal = 19.00;\n      const precioOferta = 11.80; \n\n      const apps = [\n        { i: \"\ud83d\udcc5\", n: \"Office 2025\/26\" }, { i: \"\ud83c\udfa8\", n: \"Photoshop\" }, { i: \"\u2712\ufe0f\", n: \"Illustrator\" },\n        { i: \"\ud83d\udcd6\", n: \"InDesign\" }, { i: \"\ud83d\udcf7\", n: \"Lightroom\" }, { i: \"\ud83c\udfac\", n: \"Premiere Pro\" },\n        { i: \"\ud83d\udca5\", n: \"After Effects\" }, { i: \"\ud83c\udfa7\", n: \"Audition\" }, { i: \"\u2699\ufe0f\", n: \"Media Encoder\" },\n        { i: \"\ud83d\udcc4\", n: \"Acrobat Pro\" }, { i: \"\ud83d\udcd0\", n: \"AutoCAD\" }, { i: \"\ud83c\udfd7\ufe0f\", n: \"Revit\" },\n        { i: \"\ud83d\udee3\ufe0f\", n: \"Civil 3D\" }, { i: \"\ud83e\uddca\", n: \"3ds Max\" }, { i: \"\ud83c\udfe0\", n: \"SketchUp\" },\n        { i: \"\u270f\ufe0f\", n: \"CorelDRAW\" }, { i: \"\ud83c\udf9e\ufe0f\", n: \"Final Cut Pro\" }, { i: \"\ud83d\udcf8\", n: \"Capture One\" },\n        { i: \"\ud83c\udfdb\ufe0f\", n: \"Archicad 2026\" }, { i: \"\ud83d\udcf9\", n: \"Camtasia\" }, { i: \"\ud83d\udca1\", n: \"V-Ray\" },\n        { i: \"\ud83e\uddca\", n: \"Cinema 4D\" }, { i: \"\ud83e\uddf9\", n: \"CleanMyMac X\" }, { i: \"\ud83c\udf9e\ufe0f\", n: \"DaVinci Resolve\" },\n        { i: \"\ud83c\udfb5\", n: \"Logic Pro\" }, { i: \"\ud83d\udcfc\", n: \"Vegas Pro\" }, { i: \"\ud83e\udd84\", n: \"Filmora\" },\n        { i: \"\u2699\ufe0f\", n: \"SolidWorks\" }, { i: \"\ud83d\udcd0\", n: \"Vectorworks\" }\n      ];\n\n      \/\/ ESTADO DEL SISTEMA (Empezamos con Windows activo por defecto, o ninguno)\n      let activeSystems = { win: true, mac: false };\n      \n      \/\/ ALMAC\u00c9N DE CANTIDADES (Objeto: {w: 0, m: 0})\n      let appRows = apps.map(() => ({ w: 0, m: 0 }));\n\n      function renderApps() {\n        const container = document.getElementById('appsGrid_v3');\n        if(!container) return;\n        container.innerHTML = \"\";\n\n        apps.forEach((app, index) => {\n          const card = document.createElement('div');\n          card.className = 'app-card';\n          \n          const data = appRows[index];\n          const styleW = data.w > 0 ? \"color:#0078d7; transform:scale(1.1)\" : \"color:#ccc\";\n          const styleM = data.m > 0 ? \"color:#555; transform:scale(1.1)\" : \"color:#ccc\";\n\n          \/\/ L\u00f3gica de visibilidad\n          const classWin = activeSystems.win ? 'qty-row visible' : 'qty-row';\n          const classMac = activeSystems.mac ? 'qty-row visible' : 'qty-row';\n\n          card.innerHTML = `\n            <div class=\"app-info\"><span class=\"app-icon\">${app.i}<\/span> ${app.n}<\/div>\n            \n            <div class=\"controls-wrapper\">\n                <div class=\"${classWin}\" id=\"row-win-${index}\">\n                    <span class=\"os-tag tag-win\">WIN<\/span>\n                    <button class=\"btn-qty\" onclick=\"changeQty(${index}, 'w', -1)\">-<\/button>\n                    <span class=\"count-display\" style=\"${styleW}\">${data.w}<\/span>\n                    <button class=\"btn-qty\" onclick=\"changeQty(${index}, 'w', 1)\">+<\/button>\n                <\/div>\n\n                <div class=\"${classMac}\" id=\"row-mac-${index}\">\n                    <span class=\"os-tag tag-mac\">MAC<\/span>\n                    <button class=\"btn-qty\" onclick=\"changeQty(${index}, 'm', -1)\">-<\/button>\n                    <span class=\"count-display\" style=\"${styleM}\">${data.m}<\/span>\n                    <button class=\"btn-qty\" onclick=\"changeQty(${index}, 'm', 1)\">+<\/button>\n                <\/div>\n            <\/div>\n          `;\n          container.appendChild(card);\n        });\n        updateTotal();\n      }\n\n      function changeQty(index, type, delta) {\n        if (appRows[index][type] + delta >= 0) {\n            appRows[index][type] += delta;\n            renderApps(); \/\/ Re-renderizar para actualizar estilos y totales\n        }\n      }\n\n      function toggleOS(os) {\n          \/\/ Cambiar estado\n          activeSystems[os] = !activeSystems[os];\n          \n          \/\/ Actualizar botones visualmente\n          const btn = document.getElementById('btn-' + os);\n          if(activeSystems[os]) btn.classList.add('active');\n          else btn.classList.remove('active');\n\n          \/\/ Re-renderizar grid para mostrar\/ocultar filas\n          renderApps();\n      }\n\n      function updateTotal() {\n        let total = 0;\n        appRows.forEach(row => {\n            total += (row.w + row.m);\n        });\n\n        document.getElementById('totalCount').innerText = total;\n        document.getElementById('ref-total-count').innerText = total; \n\n        \/\/ Precio\n        let precioFinal = 0;\n        if (total >= 5) {\n            precioFinal = total * precioOferta;\n        } else {\n            precioFinal = total * precioNormal;\n        }\n        \n        document.getElementById('totalPriceDisplay').innerText = precioFinal.toFixed(2).replace('.', ',') + \"\u20ac\";\n        \n        \/\/ Ocultar error si ya hay 5\n        if(total >= 5) document.getElementById('wa-error').style.display = 'none';\n      }\n\n      function sendWA_v3() {\n        let total = 0;\n        let lista = \"\";\n        \n        appRows.forEach((row, index) => {\n            if(row.w > 0) {\n                lista += `\u2022 ${apps[index].n} (Win) x${row.w}\\n`;\n                total += row.w;\n            }\n            if(row.m > 0) {\n                lista += `\u2022 ${apps[index].n} (Mac) x${row.m}\\n`;\n                total += row.m;\n            }\n        });\n\n        const errorMsg = document.getElementById('wa-error');\n\n        \/\/ VALIDACI\u00d3N\n        if (total < 5) {\n            errorMsg.style.display = 'block';\n            return;\n        }\n\n        let precioFinal = (total * precioOferta).toFixed(2).replace('.', ',');\n\n        let msg = `Hola \ud83d\udc4b. Quiero confirmar mi Pack Mixto de ${total} apps (Total: ${precioFinal}\u20ac).\\n\\n`;\n        msg += `\ud83d\udccb *Mi Selecci\u00f3n Detallada:*\\n${lista}\\n`;\n        msg += `Voy a realizar el pago del art\u00edculo ahorro por ${total} unidades ahora.`;\n\n        window.open(`https:\/\/wa.me\/${telefonoWA}?text=${encodeURIComponent(msg)}`, '_blank');\n      }\n\n      document.addEventListener(\"DOMContentLoaded\", renderApps);\n    <\/script>\n    \n<p style=\"text-align:center; font-weight:bold; font-size:1.2rem; margin-top:40px; color:#333;\">\n    \u00bfTe la juegas a ciegas o inviertes en tranquilidad?\n  <\/p>\n<div style=\"margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; font-size: 0.75rem; color: #888; text-align: justify; line-height: 1.4;\">\n    \u26a0\ufe0f <strong>NOTA LEGAL:<\/strong> Este producto es un servicio de soporte t\u00e9cnico, auditor\u00eda de ciberseguridad y optimizaci\u00f3n de hardware. 1nformatik0 no vende licencias de software, claves de producto (keys) ni aloja archivos protegidos por derechos de autor. Nuestra misi\u00f3n es asegurar que tu hardware est\u00e9 protegido y optimizado, independientemente del software que el usuario decida utilizar bajo su propia responsabilidad.\n  <\/div>\n","protected":false},"excerpt":{"rendered":"<div style=\"background: #eef9fd; border-left: 4px solid #0073aa; padding: 15px; border-radius: 4px; font-size: 0.95em; margin-bottom: 20px;\">\n    <strong>\ud83d\ude80 C\u00d3MO CREAR TU PACK PERSONALIZADO:<\/strong><\/p>\n<ul style=\"margin: 10px 0 10px 20px; padding: 0; list-style: none;\">\n<li style=\"margin-bottom: 8px;\">1\ufe0f\u20e3 <strong>Selecciona:<\/strong> Marca las apps y sistema operativo en la lista de abajo.<\/li>\n<li style=\"margin-bottom: 8px;\">2\ufe0f\u20e3 <strong>Verifica:<\/strong> Pulsa el bot\u00f3n verde para enviarnos tu lista por WhatsApp y confirmar compatibilidad.<\/li>\n<li style=\"margin-bottom: 0;\">3\ufe0f\u20e3 <strong>Compra:<\/strong> Tras nuestro OK, vuelve aqu\u00ed e indica la <strong>CANTIDAD TOTAL<\/strong> de apps en el carrito.<\/li>\n<\/ul>\n<p>    <small style=\"color: #d63638; display: block; margin-top: 10px;\"><br \/>\n        \ud83d\udca1 <em>El descuento por volumen se aplicar\u00e1 autom\u00e1ticamente al a\u00f1adir las unidades.<\/em><br \/>\n    <\/small>\n<\/div>","protected":false},"featured_media":8961,"comment_status":"open","ping_status":"closed","template":"","meta":{"_joinchat":[]},"product_brand":[],"product_cat":[15,91],"product_tag":[],"class_list":["post-8452","product","type-product","status-publish","has-post-thumbnail","product_cat-todas-soluciones","product_cat-combo-ofertas","first","instock","virtual","purchasable","product-type-simple"],"_links":{"self":[{"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/product\/8452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/comments?post=8452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/media\/8961"}],"wp:attachment":[{"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/media?parent=8452"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/product_brand?post=8452"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/product_cat?post=8452"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/elinformatico.cat\/ca\/wp-json\/wp\/v2\/product_tag?post=8452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}