{"id":11012,"date":"2026-02-27T00:26:54","date_gmt":"2026-02-26T23:26:54","guid":{"rendered":"https:\/\/tutustudio.es\/?page_id=11012"},"modified":"2026-04-18T18:05:01","modified_gmt":"2026-04-18T16:05:01","slug":"tarjeta-de-regalo-compra","status":"publish","type":"page","link":"https:\/\/tutustudio.es\/en\/tarjeta-de-regalo-compra\/","title":{"rendered":"Tarjeta de Regalo &#8211; TUTU Studio"},"content":{"rendered":"<p><script>\n(function(){\n  function fixGiftCardSizes(){\n    var grid = document.querySelector('.tutu-gc-sizes__grid');\n    if(!grid) return;\n    var btns = Array.from(grid.querySelectorAll('.tutu-gc-size-btn'));\n    if(btns.length === 0) return;\n    var order = ['30cm*30cm','50cm*50cm','70cm*70cm','90cm*90cm','100cm*130cm'];\n    btns.sort(function(a,b){\n      return order.indexOf(a.getAttribute('data-name')) - order.indexOf(b.getAttribute('data-name'));\n    });\n    btns.forEach(function(btn){ grid.appendChild(btn); });\n    btns.forEach(function(btn){ btn.classList.remove('tutu-gc-size-btn--active'); });\n    var btn50 = btns.find(function(b){ return b.getAttribute('data-name')==='50cm*50cm'; });\n    if(btn50){\n      btn50.classList.add('tutu-gc-size-btn--active');\n      btn50.click();\n    }\n  }\n  if(document.readyState==='loading'){\n    document.addEventListener('DOMContentLoaded', fixGiftCardSizes);\n  } else {\n    setTimeout(fixGiftCardSizes, 0);\n  }\n})();\n<\/script><\/p>\n<style>\n\/* Always show Apple Pay \/ Google Pay buttons *\/\n.wcpay-express-checkout-element,\n#wcpay-express-checkout-element,\n.wcpay-express-checkout-button-separator,\n#wcpay-express-checkout-button-separator {\n  filter: none !important;\n  -webkit-filter: none !important;\n  opacity: 1 !important;\n  pointer-events: auto !important;\n  visibility: visible !important;\n}\n\/* Also target any parent wrapper that WooPayments may blur *\/\n.woocommerce-checkout .blockUI,\n.wcpay-express-checkout-element + .blockUI {\n  display: none !important;\n}\n\/* Highlight missing fields *\/\n.tutu-field-missing {\n  border: 2px solid #c9302c !important;\n  box-shadow: 0 0 8px rgba(201,48,44,0.25) !important;\n  transition: all 0.3s ease;\n}\n.tutu-field-missing-label {\n  color: #c9302c !important;\n  font-weight: 600;\n}\n<\/style>\n<p><script>\n(function(){\n  var REQUIRED = [\n    {id: 'billing_first_name', label: 'Nombre'},\n    {id: 'billing_last_name', label: 'Apellidos'},\n    {id: 'billing_address_1', label: 'Direcci\u00f3n'},\n    {id: 'billing_postcode', label: 'C\u00f3digo postal'},\n    {id: 'billing_city', label: 'Poblaci\u00f3n'},\n    {id: 'billing_email', label: 'Email'}\n  ];<\/p>\n<p>  function getEmptyFields(){\n    var empty = [];\n    REQUIRED.forEach(function(f){\n      var el = document.getElementById(f.id);\n      if(el && el.value.trim() === '') empty.push({el: el, label: f.label});\n    });\n    return empty;\n  }<\/p>\n<p>  function clearHighlights(){\n    document.querySelectorAll('.tutu-field-missing').forEach(function(el){\n      el.classList.remove('tutu-field-missing');\n    });\n  }<\/p>\n<p>  function scrollToFirstEmpty(){\n    clearHighlights();\n    var empty = getEmptyFields();\n    if(empty.length === 0) return false;\n    empty.forEach(function(f){ f.el.classList.add('tutu-field-missing'); });\n    empty[0].el.scrollIntoView({behavior: 'smooth', block: 'center'});\n    setTimeout(function(){ empty[0].el.focus(); }, 400);\n    return true;\n  }<\/p>\n<p>  function initExpressFix(){\n    \/\/ Find the express checkout element container\n    var ec = document.querySelector('.wcpay-express-checkout-element, #wcpay-express-checkout-element');\n    if(!ec) return false;<\/p>\n<p>    \/\/ Remove blur\/disabled styling from element and ancestors (up to 3 levels)\n    var node = ec;\n    for(var i = 0; i < 4; i++){\n      if(!node) break;\n      node.style.cssText += ';filter:none!important;opacity:1!important;pointer-events:auto!important;';\n      node = node.parentElement;\n    }\n\n    \/\/ Watch for WooPayments re-applying blur\n    var obs = new MutationObserver(function(){\n      var n = ec;\n      for(var i = 0; i < 4; i++){\n        if(!n) break;\n        if(n.style.filter || n.style.opacity){\n          n.style.filter = 'none';\n          n.style.opacity = '1';\n          n.style.pointerEvents = 'auto';\n        }\n        n = n.parentElement;\n      }\n    });\n    obs.observe(ec.parentElement || ec, {attributes: true, subtree: true, attributeFilter: ['style','class']});\n\n    \/\/ Capture click on express buttons area: if fields missing, scroll to them\n    ec.addEventListener('click', function(e){\n      if(scrollToFirstEmpty()){\n        e.preventDefault();\n        e.stopPropagation();\n        e.stopImmediatePropagation();\n      }\n    }, true);\n\n    return true;\n  }\n\n  \/\/ Remove highlight on user input\n  document.addEventListener('input', function(e){\n    if(e.target &#038;&#038; e.target.classList.contains('tutu-field-missing') &#038;&#038; e.target.value.trim() !== ''){\n      e.target.classList.remove('tutu-field-missing');\n    }\n  });\n\n  \/\/ Poll until express checkout renders\n  var tries = 0;\n  var poll = setInterval(function(){\n    tries++;\n    if(initExpressFix() || tries > 40){\n      clearInterval(poll);\n    }\n  }, 500);\n})();\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-tarjeta-regalo.php","meta":{"_elementor_css":"","footnotes":""},"class_list":["post-11012","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/pages\/11012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/comments?post=11012"}],"version-history":[{"count":3,"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/pages\/11012\/revisions"}],"predecessor-version":[{"id":12692,"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/pages\/11012\/revisions\/12692"}],"wp:attachment":[{"href":"https:\/\/tutustudio.es\/en\/wp-json\/wp\/v2\/media?parent=11012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}