{"product_id":"papel-mural-aviones","title":"Papel Mural Aviones","description":"\u003cstyle\u003e\n.tw-calculator {\nfont-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\nwidth: 100%;\npadding: 20px;\nborder: 1px solid #e8e8e8;\nborder-radius: 4px;\nbackground-color: #fafafa;\ncolor: #333;\nmargin-bottom: 20px;\nbox-sizing: border-box;\n}\n.tw-calculator h3 {\nfont-size: 14px;\ntext-transform: uppercase;\nletter-spacing: 1px;\nmargin-top: 0;\nmargin-bottom: 20px;\n}\n.field-group {\nmargin-bottom: 15px;\n}\n.field-group label {\ndisplay: block;\nfont-size: 12px;\nmargin-bottom: 5px;\nfont-weight: bold;\n}\n.field-group select, .field-group input {\nwidth: 100%;\npadding: 10px;\nborder: 1px solid #ccc;\nborder-radius: 2px;\nbox-sizing: border-box;\nfont-size: 14px;\nbackground-color: #fff;\n}\n.info-text {\nfont-size: 11px;\ncolor: #666;\nmargin-bottom: 10px;\n}\n.area-display {\nfont-size: 13px;\ncolor: #555;\nmargin-top: 15px;\ndisplay: flex;\njustify-content: space-between;\n}\n.price-display {\nmargin-top: 15px;\npadding-top: 15px;\nborder-top: 2px solid #e8e8e8;\nfont-size: 18px;\nfont-weight: bold;\ndisplay: flex;\njustify-content: space-between;\n}\n.price-display span:last-child {\ncolor: #000;\n}\n\n```\n\/* OCULTAR ELEMENTOS NATIVOS DE SHOPIFY *\/\nproduct-info quantity-input,\n.product-form__quantity,\n.quantity-selector,\n.quantity__input,\nvariant-selects,\nvariant-radios,\n.product-form__input--dropdown,\n.product__tax,\n.price,\n.product__price,\n.price--large {\n    display: none !important;\n}\n```\n\n\u003c\/style\u003e\n\u003cdiv class=\"tw-calculator\"\u003e\n\u003ch3\u003eCalculadora de Pedido\u003c\/h3\u003e\n```\n\u003cdiv class=\"field-group\"\u003e\n\u003clabel for=\"calc-material\"\u003eSelecciona el tipo de papel\u003c\/label\u003e\u003cselect id=\"calc-material\"\u003e\n\u003coption data-name=\"Papel Mural Rustic\" data-price=\"17000\" value=\"45476208312499\"\u003ePapel Mural Rustic ($17.000 m2)\u003c\/option\u003e\n\u003coption data-name=\"Papel Mural Lino\" data-price=\"17000\" value=\"45476208345267\"\u003ePapel Mural Lino ($17.000 m2)\u003c\/option\u003e\n\u003coption data-name=\"Papel Mural Canva\" data-price=\"17000\" value=\"45476208378035\"\u003ePapel Mural Canva ($17.000 m2)\u003c\/option\u003e\n\u003coption data-name=\"Adhesivo Para Muro\" data-price=\"19000\" value=\"45476208410803\"\u003eAdhesivo Para Muro ($19.000 m2)\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003cp class=\"info-text\"\u003eSi vas a utilizar decimales, utiliza un punto (ej: 2.5)\u003c\/p\u003e\n\u003cdiv style=\"display: flex; gap: 15px;\"\u003e\n\u003cdiv style=\"flex: 1;\" class=\"field-group\"\u003e\n\u003clabel for=\"calc-width\"\u003eAncho en metros\u003c\/label\u003e \u003cinput placeholder=\"0.00\" min=\"0\" step=\"0.01\" id=\"calc-width\" type=\"number\"\u003e\n\u003c\/div\u003e\n\u003cdiv style=\"flex: 1;\" class=\"field-group\"\u003e\n\u003clabel for=\"calc-height\"\u003eAltura en metros\u003c\/label\u003e \u003cinput placeholder=\"0.00\" min=\"0\" step=\"0.01\" id=\"calc-height\" type=\"number\"\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"area-display\"\u003e\n\u003cspan\u003eM² a cobrar (redondeado):\u003c\/span\u003e \u003cstrong\u003e\u003cspan id=\"rounded-area\"\u003e0\u003c\/span\u003e m²\u003c\/strong\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"price-display\"\u003e\n\u003cspan\u003ePrecio Total:\u003c\/span\u003e \u003cspan id=\"total-price\"\u003e$0\u003c\/span\u003e\n\u003c\/div\u003e\n```\u003c\/div\u003e\n\u003ch1\u003e\n\u003cscript\u003e\ndocument.addEventListener('DOMContentLoaded', function() {\nconst materialSelect = document.getElementById('calc-material');\nconst widthInput = document.getElementById('calc-width');\nconst heightInput = document.getElementById('calc-height');\nconst roundedAreaSpan = document.getElementById('rounded-area');\nconst totalPriceSpan = document.getElementById('total-price');\n\n```\n    \/\/ Buscar el formulario EXACTO del carrito\n    const shopifyCartForm = document.querySelector('form[action*=\"\/cart\/add\"]');\n\n    function calculatePrice() {\n        const selectedOption = materialSelect.options[materialSelect.selectedIndex];\n        const variantId = selectedOption.value;\n        const materialPrice = parseFloat(selectedOption.getAttribute('data-price')) || 17000;\n        const materialName = selectedOption.getAttribute('data-name');\n\n        const width = parseFloat(widthInput.value) || 0;\n        const height = parseFloat(heightInput.value) || 0;\n\n        const exactArea = width * height;\n        const roundedArea = Math.ceil(exactArea);\n        const total = roundedArea * materialPrice;\n\n        roundedAreaSpan.textContent = roundedArea;\n        const formattedPrice = new Intl.NumberFormat('es-CL', {\n            style: 'currency', currency: 'CLP', minimumFractionDigits: 0\n        }).format(total);\n        totalPriceSpan.textContent = formattedPrice;\n\n        \/\/ INYECCIÓN BLINDADA AL CARRITO DE SHOPIFY\n        if (shopifyCartForm) {\n            \/\/ 1. INYECTAR CANTIDAD (Corrección principal)\n            \/\/ Buscamos TODOS los inputs de cantidad en toda la página, no solo en el formulario\n            let qtyInputs = document.querySelectorAll('input[name=\"quantity\"]');\n\n            if (qtyInputs.length \u003e 0 \u0026\u0026 roundedArea \u003e 0) {\n                qtyInputs.forEach(function(input) {\n                    input.value = roundedArea;\n                    \/\/ Forzamos a Shopify a \"darse cuenta\" de que cambiamos el valor\n                    input.dispatchEvent(new Event('change', { bubbles: true }));\n                });\n            } else if (roundedArea \u003e 0) {\n                \/\/ Fallback extremo: Si no hay inputs, creamos uno oculto a la fuerza\n                let newQtyInput = shopifyCartForm.querySelector('input[name=\"quantity\"][type=\"hidden\"]');\n                if (!newQtyInput) {\n                    newQtyInput = document.createElement('input');\n                    newQtyInput.type = 'hidden';\n                    newQtyInput.name = 'quantity';\n                    shopifyCartForm.appendChild(newQtyInput);\n                }\n                newQtyInput.value = roundedArea;\n            }\n\n            \/\/ 2. INYECTAR ID DE VARIANTE\n            let formVariantInput = shopifyCartForm.querySelector('[name=\"id\"]');\n            if (formVariantInput) {\n                formVariantInput.value = variantId;\n                formVariantInput.dispatchEvent(new Event('change', { bubbles: true }));\n            } else {\n                let newVariantInput = shopifyCartForm.querySelector('input[name=\"id\"][type=\"hidden\"]');\n                if (!newVariantInput) {\n                    newVariantInput = document.createElement('input');\n                    newVariantInput.type = 'hidden';\n                    newVariantInput.name = 'id';\n                    shopifyCartForm.appendChild(newVariantInput);\n                }\n                newVariantInput.value = variantId;\n            }\n\n            \/\/ 3. INYECTAR NOTAS EXACTAS\n            if (width \u003e 0 \u0026\u0026 height \u003e 0) {\n                updateHiddenProperty('Ancho exacto (m)', width);\n                updateHiddenProperty('Alto exacto (m)', height);\n                updateHiddenProperty('Material seleccionado', materialName);\n            }\n        }\n    }\n\n    function updateHiddenProperty(name, value) {\n        const inputName = `properties[${name}]`;\n        let hiddenInput = shopifyCartForm.querySelector(`input[name=\"${inputName}\"]`);\n        if (!hiddenInput) {\n            hiddenInput = document.createElement('input');\n            hiddenInput.type = 'hidden';\n            hiddenInput.name = inputName;\n            shopifyCartForm.appendChild(hiddenInput);\n        }\n        hiddenInput.value = value;\n    }\n\n    materialSelect.addEventListener('change', calculatePrice);\n    widthInput.addEventListener('input', calculatePrice);\n    heightInput.addEventListener('input', calculatePrice);\n\n    \/\/ Ejecutar con un pequeñísimo retraso para darle tiempo al tema de Shopify a cargar todo\n    setTimeout(calculatePrice, 500);\n});\n```\n\n\u003c\/script\u003e \u003cstrong\u003ePapel Mural Aviones: la forma más fácil de crear un dormitorio infantil que tu hijo va a amar.\u003c\/strong\u003e\n\u003c\/h1\u003e\n\u003cp\u003e¿Sabías qué una pared puede cambiar por completo cómo un niño vive su cuarto? Imagina esa habitación transformada en un cielo lleno de aviones, montañas y nubes, donde cada juego y cada tarde de dibujo se sienten parte de una aventura. Ese es el efecto de nuestro Papel Mural Aviones: un diseño premium pensado para dormitorios infantiles, salas de juego o rincones de lectura, con ilustraciones tipo acuarela que le dan calidez y estilo sin caer en lo infantil-genérico.\u003c\/p\u003e\n\u003ch2\u003eContamos con 3 modelos diferentes, más una versión adhesiva laminada\u003c\/h2\u003e\n\u003cp\u003eSabemos que cada pared y cada proyecto son distintos, por eso el Papel Mural Aviones está disponible en 3 modelos diferentes, cada uno con variaciones en la composición de las nubes, montañas y aviones, para que elijas el que mejor se acomode a tu espacio. Además, tenemos una versión en vinilo adhesivo para muro, ideal si buscas una instalación rápida y sin complicaciones. Este modelo adhesivo viene con una capa de laminado que protege la impresión de golpes, humedad y el desgaste diario típico de un cuarto infantil, así el color y la nitidez se mantienen intactos por mucho más tiempo.\u003c\/p\u003e\n\u003ch3\u003ePor qué comprar tu papel mural aviones con nosotros\u003c\/h3\u003e\n\u003cp\u003eEn GrafDeco trabajamos con impresión de alta calidad, lo que garantiza colores nítidos y un acabado que se ve profesional desde el primer día.\u003c\/p\u003e\n\u003cp\u003eLa instalación es fácil, rápida y sin riesgo de dañar tu muro.  Aprovecha esta oportunidad y dale a tu hijo el cuarto que va a recordar. \u003c\/p\u003e","brand":"GrafDeco","offers":[{"title":"Default Title","offer_id":45699323232435,"sku":"PMI-5","price":17000.0,"currency_code":"CLP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0707\/6469\/1635\/files\/Papelmuraldeaviones.png?v=1784332089","url":"https:\/\/grafdeco.cl\/products\/papel-mural-aviones","provider":"GrafDeco","version":"1.0","type":"link"}