{"product_id":"tacon-enredado","title":"Tacón Enredado","description":"\u003cdiv class=\"c-sw\"\u003e\n  \u003cspan class=\"sw-lbl\"\u003eColor - \u003cspan id=\"selected-color-name\"\u003eRosa\u003c\/span\u003e\u003c\/span\u003e\n  \u003cdiv class=\"sg-sw\"\u003e\n    \u003cbutton type=\"button\" class=\"sw-btn active\" data-color=\"Rosa\" data-slide-index=\"1\" style=\"--swatch-bg: #f8c8dc;\" title=\"Rosa\"\u003e\u003c\/button\u003e\n    \u003cbutton type=\"button\" class=\"sw-btn\" data-color=\"Plata\" data-slide-index=\"5\" style=\"--swatch-bg: #c0c0c0;\" title=\"Plata\"\u003e\u003c\/button\u003e\n  \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cstyle\u003e\n  .c-sw { margin: 20px 0; }\n  .sw-lbl { display: block; font-size: 14px; color: #2b2b2b; margin-bottom: 12px; font-family: sans-serif; }\n  .sg-sw { display: flex; gap: 12px; }\n  .sw-btn { width: 44px; height: 44px; border-radius: 9px; border: 1px solid transparent; background: var(--swatch-bg); cursor: pointer; padding: 0; }\n  .sw-btn.active { border: 1.5px solid #8c867a !important; box-shadow: inset 0 0 0 3px #ffffff; }\n\u003c\/style\u003e\n\n\u003cscript\u003e\n  (function() {\n    function inicializarSelectorColor() {\n      \/\/ 1. Mueve el carrusel\n      function moverCarruselPorPosicion(numeroFoto) {\n        const miniaturas = document.querySelectorAll('.product__thumbnail-item button, .thumbnail-list__item button, .product__thumb, .thumbnail-item');\n        if (miniaturas \u0026\u0026 miniaturas.length \u003e= numeroFoto) miniaturas[numeroFoto - 1].click();\n      }\n\n      \/\/ 2. Oculta el selector nativo constantemente\n      function ocultarSelectorNativoColor() {\n        const posiblesContenedores = document.querySelectorAll('.product-form__input, .variant-wrapper, fieldset, div[class*=\"variant\"]');\n        posiblesContenedores.forEach(contenedor =\u003e {\n          const texto = (contenedor.innerText || \"\").toLowerCase();\n          \/\/ Busca el contenedor que contiene la opción de color sin que sea nuestro propio contenedor\n          if ((texto.includes('color') || texto.includes('rosa') || texto.includes('plata')) \u0026\u0026 !contenedor.classList.contains('c-sw')) {\n            contenedor.style.setProperty('display', 'none', 'important');\n          }\n        });\n      }\n      setInterval(ocultarSelectorNativoColor, 100);\n\n      \/\/ 3. Lógica de clic\n      document.addEventListener('click', function(e) {\n        const boton = e.target.closest('.sw-btn');\n        if (!boton) return;\n        \n        e.preventDefault();\n        document.querySelectorAll('.sw-btn').forEach(x =\u003e x.classList.remove('active'));\n        boton.classList.add('active');\n        document.getElementById('selected-color-name').textContent = boton.dataset.color;\n        \n        moverCarruselPorPosicion(parseInt(boton.getAttribute('data-slide-index')));\n\n        \/\/ Sincronización con el selector oculto\n        const valorLimpio = boton.dataset.color.trim();\n        const inputs = document.querySelectorAll('input[type=\"radio\"], option');\n        inputs.forEach(el =\u003e {\n          const textoEl = (el.labels \u0026\u0026 el.labels[0] ? el.labels[0].innerText : (el.innerText || el.value)).trim();\n          if (textoEl.toLowerCase() === valorLimpio.toLowerCase()) {\n            if (el.tagName === 'INPUT') {\n              el.checked = true;\n              el.dispatchEvent(new Event('change', { bubbles: true }));\n            } else if (el.tagName === 'OPTION') {\n              el.selected = true;\n              el.closest('select').dispatchEvent(new Event('change', { bubbles: true }));\n            }\n          }\n        });\n      });\n    }\n\n    if (document.readyState === 'loading') {\n      document.addEventListener('DOMContentLoaded', inicializarSelectorColor);\n    } else {\n      inicializarSelectorColor();\n    }\n  })();\n\u003c\/script\u003e","brand":"Mi tienda","offers":[{"title":"35 \/ Rosa","offer_id":57680283697534,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"35 \/ Plateado","offer_id":57680398909822,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"36 \/ Rosa","offer_id":57680283730302,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"36 \/ Plateado","offer_id":57680398942590,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"37 \/ Rosa","offer_id":57680283763070,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"37 \/ Plateado","offer_id":57680398975358,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"38 \/ Rosa","offer_id":57680283795838,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"38 \/ Plateado","offer_id":57680399008126,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"39 \/ Rosa","offer_id":57680283828606,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"39 \/ Plateado","offer_id":57680399040894,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"40 \/ Rosa","offer_id":57680283861374,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":true},{"title":"40 \/ Plateado","offer_id":57680399073662,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"41 \/ Rosa","offer_id":57680283894142,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"41 \/ Plateado","offer_id":57680399106430,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"42 \/ Rosa","offer_id":57680283926910,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false},{"title":"42 \/ Plateado","offer_id":57680399139198,"sku":null,"price":44.99,"currency_code":"EUR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1008\/4804\/2366\/files\/ChatGPTImage13jul2026_17_03_34.png?v=1783955158","url":"https:\/\/luzdemoda.com\/products\/tacon-enredado","provider":"LuzDeModa","version":"1.0","type":"link"}