/* Shared navigation with mega-menu — used on all pages */ const { useState: useStateN, useEffect: useEffectN, useRef: useRefN } = React; /* Catálogo compartido de iconos UI — estilo outline consistente. */ const MARTZ_ICONS = { arrowRight: <>, check: , close: <>, info: <>, warning: <>, alert: <>, mail: <>, phone: , location: <>, clock: <>, shield: <>, }; const MartzIcon = ({ name, size = 18, className = '', strokeWidth = 1.8, label }) => ( {MARTZ_ICONS[name] || MARTZ_ICONS.info} ); window.MartzIcon = MartzIcon; const CONSENT_KEY = 'martz_cookie_consent'; const consentVersion = () => (window.MartzLegalConfig || {}).consentVersion || '1.0'; window.getCookieConsent = () => { try { const c=JSON.parse(localStorage.getItem(CONSENT_KEY)); return c&&c.version===consentVersion()?c:null; } catch(e){ return null; } }; window.saveCookieConsent = (choices) => { const c={necessary:true,preferences:!!choices.preferences,analytics:!!choices.analytics,marketing:!!choices.marketing,version:consentVersion(),consentedAt:new Date().toISOString()}; localStorage.setItem(CONSENT_KEY,JSON.stringify(c)); window.dispatchEvent(new CustomEvent('martz-consent-change',{detail:c})); return c; }; window.hasCookieConsent = category => category==='necessary' || !!(window.getCookieConsent()||{})[category]; window.resetCookieConsent = () => { localStorage.removeItem(CONSENT_KEY); window.dispatchEvent(new Event('martz-consent-reset')); }; window.openCookieSettings = () => window.dispatchEvent(new Event('martz-open-cookie-settings')); window.ConsentGate = ({ category, children }) => window.hasCookieConsent(category) ? children : null; const CookieConsent = () => { const existing=window.getCookieConsent(); const [show,setShow]=useStateN(!existing), [modal,setModal]=useStateN(false); const [prefs,setPrefs]=useStateN(existing||{necessary:true,preferences:false,analytics:false,marketing:false}); const dialogRef=useRefN(null), openerRef=useRefN(null); const decide=p=>{window.saveCookieConsent(p);setShow(false);setModal(false)}; const open=()=>{openerRef.current=document.activeElement;const c=window.getCookieConsent();setPrefs(c||{necessary:true,preferences:false,analytics:false,marketing:false});setModal(true)}; const close=()=>{setModal(false);setTimeout(()=>openerRef.current&&openerRef.current.focus(),0)}; useEffectN(()=>{const fn=()=>open();window.addEventListener('martz-open-cookie-settings',fn);return()=>window.removeEventListener('martz-open-cookie-settings',fn)},[]); useEffectN(()=>{const fn=()=>{setModal(false);setPrefs({necessary:true,preferences:false,analytics:false,marketing:false});setShow(true)};window.addEventListener('martz-consent-reset',fn);return()=>window.removeEventListener('martz-consent-reset',fn)},[]); useEffectN(()=>{if(!modal)return;document.body.style.overflow='hidden';const d=dialogRef.current;const focusables=()=>[...d.querySelectorAll('button,input,a[href]')].filter(x=>!x.disabled);focusables()[0]?.focus();const key=e=>{if(e.key==='Escape')close();if(e.key==='Tab'){const f=focusables(),a=f[0],z=f[f.length-1];if(e.shiftKey&&document.activeElement===a){e.preventDefault();z.focus()}else if(!e.shiftKey&&document.activeElement===z){e.preventDefault();a.focus()}}};window.addEventListener('keydown',key);return()=>{document.body.style.overflow='';window.removeEventListener('keydown',key)}},[modal]); const categories=[['necessary','Necesarias','Permiten funciones básicas y guardar tus preferencias.'],['preferences','Preferencias','Recuerdan opciones voluntarias para mejorar la experiencia.'],['analytics','Analíticas','Ayudarían a entender el uso del sitio. Actualmente no hay analítica instalada.'],['marketing','Marketing','Se usarían para publicidad. Actualmente no hay servicios publicitarios instalados.']]; return <> {show&&
Tu privacidad importa

Utilizamos almacenamiento necesario para el funcionamiento del sitio. Con tu permiso, también podemos utilizar tecnologías opcionales para analizar el uso y mejorar la experiencia.

Ver política de cookies
} {modal&&
e.target===e.currentTarget&&close()}>
{categories.map(([id,name,desc])=>