{"product_id":"blanditos-porto-rosa","title":"Soft Pink Porto","description":"\u003cdiv id=\"ruut-calculator-container\" style=\"max-width: 420px; margin: 20px auto; padding: 25px; border: 1px solid #e6e3dd; border-radius: 16px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: #faf9f6; box-sizing: border-box; color: #333; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: left;\"\u003e\n  \n  \u003ch3 style=\"text-align: center; color: #1a1a1a; margin-top: 0; margin-bottom: 8px; font-size: 1.3em; font-weight: bold; border: none; padding: 0;\"\u003eCalculadora de Tamanhos\u003c\/h3\u003e\n  \u003cp style=\"text-align: center; color: #666; font-size: 0.88em; margin-bottom: 25px; line-height: 1.4; padding: 0; margin-top: 0;\"\u003eInsere as medidas em milímetros (mm) para ver o tamanho ideal.\u003c\/p\u003e\n\n  \u003cdiv style=\"display: flex; gap: 12px; margin-bottom: 25px; box-sizing: border-box; width: 100%; align-items: flex-start; justify-content: space-between;\"\u003e\n    \u003cdiv style=\"flex: 1; min-width: 0; box-sizing: border-box; display: block; margin: 0; padding: 0;\"\u003e\n      \u003clabel for=\"foot-length\" style=\"display: block; font-weight: bold; font-size: 0.78em; color: #444; margin-top: 0; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; height: 16px; overflow: hidden; white-space: nowrap;\"\u003eComprimento (mm):\u003c\/label\u003e\n      \u003cinput type=\"number\" id=\"foot-length\" placeholder=\"Ex: 140\" oninput=\"calculateRuutSizeInstant()\" style=\"width: 100%; height: 42px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 0.95em; box-sizing: border-box; outline: none; background: #fff; margin: 0; -webkit-appearance: none; -moz-appearance: textfield;\"\u003e\n    \u003c\/div\u003e\n    \u003cdiv style=\"flex: 1; min-width: 0; box-sizing: border-box; display: block; margin: 0; padding: 0;\"\u003e\n      \u003clabel for=\"foot-width\" style=\"display: block; font-weight: bold; font-size: 0.78em; color: #444; margin-top: 0; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; height: 16px; overflow: hidden; white-space: nowrap;\"\u003eLargura (mm):\u003c\/label\u003e\n      \u003cinput type=\"number\" id=\"foot-width\" placeholder=\"Ex: 60 (Opcional)\" oninput=\"calculateRuutSizeInstant()\" style=\"width: 100%; height: 42px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 0.95em; box-sizing: border-box; outline: none; background: #fff; margin: 0; -webkit-appearance: none; -moz-appearance: textfield;\"\u003e\n    \u003c\/div\u003e\n  \u003c\/div\u003e\n\n  \u003cdiv id=\"calculator-result-box\" style=\"background: #ffffff; padding: 20px; border-radius: 12px; border: 1px solid #eaeaea; box-sizing: border-box; min-height: 100px; display: block;\"\u003e\n    \n    \u003cdiv style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; box-sizing: border-box;\"\u003e\n      \u003cdiv style=\"flex: 1; box-sizing: border-box;\"\u003e\n        \u003cspan style=\"font-size: 0.8em; color: #777; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 4px; font-weight: bold;\"\u003eTamanho Recomendado:\u003c\/span\u003e\n        \u003cdiv id=\"calc_result_details\" style=\"font-size: 0.9em; color: #555; line-height: 1.4;\"\u003e\n          Introduz as medidas do pezinho para calcular.\n        \u003c\/div\u003e\n      \u003c\/div\u003e\n      \u003cdiv id=\"calc_result_size\" style=\"font-size: 2.8em; font-weight: bold; color: #ddd; line-height: 1; text-align: right; min-width: 60px; box-sizing: border-box;\"\u003e--\u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv id=\"ruut-ruler-wrapper\" style=\"display: none; margin-top: 15px; border-top: 1px solid #eee; padding-top: 15px; box-sizing: border-box;\"\u003e\n      \u003cdiv style=\"font-size: 0.78em; font-weight: bold; color: #555; margin-bottom: 12px; text-align: center; text-transform: uppercase; letter-spacing: 0.5px;\"\u003eEspaço Livre no Sapato (Folga)\u003c\/div\u003e\n      \n      \u003cdiv style=\"position: relative; width: 100%; height: 20px; border-radius: 10px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); box-sizing: border-box;\n                  background: linear-gradient(to right, \n                    #e74c3c 0%, #e74c3c 40%, \n                    #2ecc71 40%, #2ecc71 60%, \n                    #e74c3c 60%, #e74c3c 100%\n                  );\"\u003e\n        \n        \u003cspan style=\"position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: white; font-size: 0.7em; font-weight: bold; pointer-events: none; letter-spacing: 1px;\"\u003eIDEAL (8-12mm)\u003c\/span\u003e\n\n        \u003cdiv id=\"ruler-marker\" style=\"position: absolute; top: -4px; left: 0%; width: 4px; height: 28px; background: #000; border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 3px rgba(255,255,255,0.9); transition: left 0.3s ease-out; z-index: 10;\"\u003e\u003c\/div\u003e\n      \u003c\/div\u003e\n      \n      \u003cdiv style=\"position: relative; width: 100%; height: 16px; margin-top: 2px; box-sizing: border-box;\"\u003e\n        \u003cspan id=\"ruler-arrow\" style=\"position: absolute; left: 0%; transform: translateX(-50%); font-size: 14px; color: #333; transition: left 0.3s ease-out; line-height: 1;\"\u003e▲\u003c\/span\u003e\n      \u003c\/div\u003e\n      \n      \u003cdiv style=\"position: relative; width: 100%; height: 16px; margin-top: 2px; font-size: 0.72em; color: #777; font-family: monospace; box-sizing: border-box; display: flex; justify-content: space-between;\"\u003e\n        \u003cspan\u003ePequeno\u003c\/span\u003e\n        \u003cspan\u003eGrande\u003c\/span\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n\n  \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cscript\u003e\n  \/\/ Tabela de medidas oficial do modelo Blanditos Caicos (Tamanhos 20 ao 26)\n  const currentShoeData = [\n    { size: 21, length: 133, width: 61 },\n    { size: 22, length: 141, width: 63 },\n    { size: 23, length: 147, width: 65 },\n    { size: 24, length: 154, width: 66 },\n    { size: 25, length: 161, width: 68 },\n    { size: 26, length: 168, width: 69 },\n    { size: 27, length: 173, width: 72 }\n  ];\n\n  function calculateRuutSizeInstant() {\n    const footLenInput = document.getElementById('foot-length').value;\n    const footWidthInput = document.getElementById('foot-width').value;\n    \n    const sizeDisplay = document.getElementById('calc_result_size');\n    const detailsDisplay = document.getElementById('calc_result_details');\n    const resultBox = document.getElementById('calculator-result-box');\n    const rulerWrapper = document.getElementById('ruut-ruler-wrapper');\n    const rulerMarker = document.getElementById('ruler-marker');\n    const rulerArrow = document.getElementById('ruler-arrow');\n\n    if (!footLenInput || parseFloat(footLenInput) \u003c= 0) {\n      sizeDisplay.innerText = \"--\";\n      sizeDisplay.style.color = \"#ddd\";\n      detailsDisplay.innerHTML = \"Introduz as medidas do pezinho para calcular.\";\n      detailsDisplay.style.color = \"#555\";\n      resultBox.style.borderColor = \"#eaeaea\";\n      resultBox.style.background = \"#ffffff\";\n      rulerWrapper.style.display = \"none\";\n      return;\n    }\n\n    const footLength = parseFloat(footLenInput);\n    const footWidth = footWidthInput ? parseFloat(footWidthInput) : null;\n\n    let recommendedSize = null;\n    let widthWarning = false;\n    let cFolga = 0;\n\n    \/\/ Regra da Ruut: Folga ideal de +8mm a +12mm\n    for (let i = 0; i \u003c currentShoeData.length; i++) {\n      const shoe = currentShoeData[i];\n      if (shoe.length \u003e= footLength + 8 \u0026\u0026 shoe.length \u003c= footLength + 12) {\n        recommendedSize = shoe;\n        if (footWidth \u0026\u0026 shoe.width !== null \u0026\u0026 footWidth \u003e shoe.width) widthWarning = true;\n        break;\n      } else if (shoe.length \u003e footLength + 12 \u0026\u0026 i === 0) {\n        recommendedSize = \"Abaixo do 20\";\n        break;\n      } else if (shoe.length \u003e footLength + 12) {\n        const prevShoe = currentShoeData[i - 1];\n        if (prevShoe.length \u003e= footLength + 8) {\n          recommendedSize = prevShoe;\n          if (footWidth \u0026\u0026 prevShoe.width !== null \u0026\u0026 footWidth \u003e prevShoe.width) widthWarning = true;\n        } else {\n          recommendedSize = shoe;\n          if (footWidth \u0026\u0026 shoe.width !== null \u0026\u0026 footWidth \u003e shoe.width) widthWarning = true;\n        }\n        break;\n      }\n    }\n\n    if (recommendedSize === null \u0026\u0026 footLength \u003e (currentShoeData[currentShoeData.length - 1].length - 8)) {\n      recommendedSize = \"Acima do 26\";\n    }\n\n    rulerWrapper.style.display = \"block\";\n\n    if (recommendedSize === \"Abaixo do 20\" || recommendedSize === \"Acima do 26\") {\n      sizeDisplay.innerText = \"❌\";\n      sizeDisplay.style.color = \"#e74c3c\";\n      resultBox.style.borderColor = \"#ffcccc\";\n      resultBox.style.background = \"#fff5f5\";\n      detailsDisplay.style.color = \"#555\";\n      \n      if (recommendedSize === \"Abaixo do 20\") {\n        const folgaMax = currentShoeData[0].length - footLength;\n        detailsDisplay.innerHTML = `Pé pequeno para o tamanho mínimo (20).\u003cbr\u003e\u003cspan style=\"color:#888; font-size:0.9em;\"\u003eFolga de ${folgaMax}mm no Tam. 20 (máx. ideal: 12mm).\u003c\/span\u003e`;\n        updateIndicators(folgaMax);\n      } else {\n        const folgaMin = currentShoeData[currentShoeData.length - 1].length - footLength;\n        detailsDisplay.innerHTML = `Pé ultrapassa o tamanho máximo disponível (26).\u003cbr\u003e\u003cspan style=\"color:#888; font-size:0.9em;\"\u003eFolga de apenas ${folgaMin}mm no Tam. 26.\u003c\/span\u003e`;\n        updateIndicators(folgaMin);\n      }\n    } else {\n      sizeDisplay.innerText = recommendedSize.size;\n      cFolga = recommendedSize.length - footLength;\n      \n      if (cFolga \u003e= 8 \u0026\u0026 cFolga \u003c= 12) {\n        sizeDisplay.style.color = \"#2ecc71\"; \/\/ Verde Ideal\n        resultBox.style.borderColor = \"#bbf7d0\";\n        resultBox.style.background = \"#f0fdf4\";\n      } else {\n        sizeDisplay.style.color = \"#e74c3c\"; \/\/ Vermelho fora da folga ideal\n        resultBox.style.borderColor = \"#ffcccc\";\n        resultBox.style.background = \"#fff5f5\";\n      }\n\n      let text = `Fica com \u003cstrong\u003e+${cFolga}mm\u003c\/strong\u003e de folga no comprimento.`;\n      \n      if (footWidth \u0026\u0026 recommendedSize.width !== null) {\n        const lFolga = recommendedSize.width - footWidth;\n        if (widthWarning) {\n          text += `\u003cbr\u003e\u003cspan style=\"color: #c2410c; font-weight: bold;\"\u003e⚠️ Ajuste lateral justo (${lFolga}mm de folga).\u003c\/span\u003e`;\n        } else {\n          text += `\u003cbr\u003eE \u003cstrong\u003e+${lFolga}mm\u003c\/strong\u003e de folga na largura.`;\n        }\n      }\n      detailsDisplay.innerHTML = text;\n      detailsDisplay.style.color = \"#333\";\n\n      updateIndicators(cFolga);\n    }\n  }\n\n  function updateIndicators(folgaMm) {\n    const marker = document.getElementById('ruler-marker');\n    const arrow = document.getElementById('ruler-arrow');\n    let percentage = 0;\n    \n    if (folgaMm \u003c= 8) {\n      percentage = (folgaMm \/ 8) * 40;\n    } else if (folgaMm \u003c= 12) {\n      percentage = 40 + ((folgaMm - 8) \/ 4) * 20;\n    } else {\n      percentage = 60 + ((folgaMm - 12) \/ 8) * 40;\n    }\n\n    if (percentage \u003c 0) percentage = 0;\n    if (percentage \u003e 100) percentage = 100;\n    \n    marker.style.left = percentage + \"%\";\n    arrow.style.left = percentage + \"%\";\n  }\n\u003c\/script\u003e","brand":"Blanditos","offers":[{"title":"21","offer_id":58421406859589,"sku":"PortoRosa27-7","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"22","offer_id":58421406892357,"sku":"PortoRosa27-1","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"23","offer_id":58421406925125,"sku":"PortoRosa27-2","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"24","offer_id":58421406957893,"sku":"PortoRosa27-3","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"25","offer_id":58421406990661,"sku":"PortoRosa27-4","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"26","offer_id":58421407023429,"sku":"PortoRosa27-5","price":52.9,"currency_code":"EUR","in_stock":true},{"title":"27","offer_id":58421407056197,"sku":"PortoRosa27-6","price":52.9,"currency_code":"EUR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0926\/4283\/6805\/files\/PORTO-ROSA_1.jpg?v=1782832803","url":"https:\/\/www.ruut.pt\/en\/products\/blanditos-porto-rosa","provider":"ruut","version":"1.0","type":"link"}