/* =============================================================================
   MEGAZONIX DIRECT — capa compartida (estilos)  ·  v2.0
   Todo lleva el prefijo "mzx-" para NO chocar con los estilos propios de cada página.
   No se modifica ninguna regla existente de tus HTML: esta hoja solo AGREGA
   (dock, carrito, favoritos, cuenta, editor, neón, ambiente, videos).
   ============================================================================= */

:root{
  --mzx-bg: #070d18;
  --mzx-panel: rgba(10,18,32,.94);
  --mzx-line: rgba(120,170,255,.22);
  --mzx-text: #eaf2ff;
  --mzx-muted: #93a4bd;
  --mzx-blue: #168bff;
  --mzx-cyan: #48c7ff;
  --mzx-yellow: #ffc72c;
  --mzx-red: #ef3d3d;
  --mzx-green: #2ecc71;
  --mzx-pink: #ff4fa3;
  --mzx-glow: 0 0 6px rgba(22,139,255,.65), 0 0 18px rgba(22,139,255,.35);
  --mzx-radius: 16px;
  --mzx-font: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mzx-z: 2147483000;
}

.mzx-ui, .mzx-ui *{ box-sizing: border-box; }
.mzx-ui{ font-family: var(--mzx-font); color: var(--mzx-text); line-height: 1.35; -webkit-tap-highlight-color: transparent; }
.mzx-ui button, .mzx-ui input, .mzx-ui select, .mzx-ui textarea{ font: inherit; color: inherit; }
.mzx-ui button{ cursor: pointer; }
.mzx-hide{ display:none !important; }
.mzx-sr{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- Dock flotante ---------- */
.mzx-dock{
  position: fixed; left: 12px; bottom: 12px; z-index: var(--mzx-z);
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: var(--mzx-panel); border: 1px solid var(--mzx-line);
  box-shadow: 0 8px 28px rgba(0,0,0,.45), var(--mzx-glow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mzx-dock button{
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid transparent; background: rgba(255,255,255,.04);
  font-size: 20px; line-height: 1; display:grid; place-items:center;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.mzx-dock button:hover, .mzx-dock button:focus-visible{
  transform: translateY(-2px); background: rgba(22,139,255,.16);
  border-color: var(--mzx-blue); box-shadow: var(--mzx-glow); outline: none;
}
.mzx-dock .mzx-badge{
  position:absolute; top:-3px; right:-3px; min-width:19px; height:19px; padding:0 5px;
  border-radius: 999px; background: var(--mzx-yellow); color:#111; font-size: 11px; font-weight: 700;
  display:grid; place-items:center; box-shadow: 0 0 10px rgba(255,199,44,.7);
}
.mzx-dock .mzx-badge:empty{ display:none; }
.mzx-dock .mzx-edit-btn{ background: linear-gradient(135deg, rgba(255,199,44,.25), rgba(22,139,255,.25)); }
@media (max-width: 520px){
  .mzx-dock{ left: 8px; bottom: 8px; gap: 4px; padding: 5px; }
  .mzx-dock button{ width: 42px; height: 42px; font-size: 18px; }
}

/* ---------- Cajón lateral (carrito / favoritos / cuenta) ---------- */
.mzx-overlay{
  position: fixed; inset: 0; z-index: calc(var(--mzx-z) + 1);
  background: rgba(2,6,14,.62); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mzx-overlay.mzx-open{ opacity: 1; pointer-events: auto; }
.mzx-drawer{
  position: fixed; top: 0; bottom: 0; right: 0; width: min(430px, 100vw); z-index: calc(var(--mzx-z) + 2);
  background: linear-gradient(180deg, #0a1424, #070d18); border-left: 1px solid var(--mzx-line);
  box-shadow: -10px 0 40px rgba(0,0,0,.55), -2px 0 18px rgba(22,139,255,.25);
  transform: translateX(104%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.mzx-drawer.mzx-open{ transform: none; }
.mzx-drawer header{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 14px 16px; border-bottom: 1px solid var(--mzx-line);
}
.mzx-drawer h2{ margin:0; font-size: 18px; letter-spacing:.04em; text-transform: uppercase; text-shadow: 0 0 12px rgba(22,139,255,.8); }
.mzx-x{ width:38px; height:38px; border-radius:50%; border:1px solid var(--mzx-line); background: transparent; font-size:18px; }
.mzx-x:hover{ border-color: var(--mzx-red); box-shadow: 0 0 12px rgba(239,61,61,.5); }
.mzx-body{ flex:1; overflow:auto; padding: 14px 16px 20px; -webkit-overflow-scrolling: touch; }
.mzx-foot{ padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--mzx-line); }
.mzx-empty{ text-align:center; color: var(--mzx-muted); padding: 36px 10px; }
.mzx-empty b{ display:block; font-size: 44px; margin-bottom: 8px; filter: drop-shadow(0 0 10px rgba(22,139,255,.6)); }

.mzx-group{ border:1px solid var(--mzx-line); border-radius: var(--mzx-radius); margin-bottom: 14px; overflow:hidden; background: rgba(255,255,255,.02); }
.mzx-group > h3{ margin:0; padding: 10px 12px; font-size: 14px; letter-spacing:.05em; text-transform: uppercase;
  background: linear-gradient(90deg, rgba(22,139,255,.22), transparent); border-bottom:1px solid var(--mzx-line); }
.mzx-item{ display:grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items:center; padding: 10px 12px; border-bottom: 1px dashed rgba(120,170,255,.14); }
.mzx-item:last-child{ border-bottom: 0; }
.mzx-item img{ width:54px; height:54px; object-fit:cover; border-radius: 10px; background:#0f1b30; border:1px solid var(--mzx-line); }
.mzx-item .mzx-ph{ width:54px; height:54px; border-radius:10px; background:#0f1b30; border:1px solid var(--mzx-line); display:grid; place-items:center; font-size:22px; }
.mzx-item .mzx-n{ font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mzx-item .mzx-p{ font-size: 12.5px; color: var(--mzx-yellow); margin-top: 2px; }
.mzx-item .mzx-p.mzx-tbd{ color: var(--mzx-muted); font-style: italic; }
.mzx-qty{ display:flex; align-items:center; gap:4px; }
.mzx-qty button{ width:28px; height:28px; border-radius: 8px; border:1px solid var(--mzx-line); background: rgba(255,255,255,.05); font-size: 16px; line-height:1; }
.mzx-qty button:hover{ border-color: var(--mzx-blue); box-shadow: var(--mzx-glow); }
.mzx-qty span{ min-width: 24px; text-align:center; font-weight:700; }
.mzx-rm{ background:none; border:0; color: var(--mzx-muted); font-size: 12px; text-decoration: underline; padding: 2px 0; }
.mzx-rm:hover{ color: var(--mzx-red); }
.mzx-sub{ display:flex; justify-content: space-between; padding: 10px 12px; font-weight: 700; background: rgba(255,199,44,.07); }
.mzx-sub small{ font-weight: 400; color: var(--mzx-muted); display:block; }
.mzx-form{ display:grid; gap: 8px; padding: 10px 12px 12px; }
.mzx-field{ display:grid; gap: 4px; font-size: 12.5px; color: var(--mzx-muted); }
.mzx-ui input[type=text], .mzx-ui input[type=email], .mzx-ui input[type=password], .mzx-ui input[type=tel], .mzx-ui input[type=url], .mzx-ui input[type=number], .mzx-ui input[type=datetime-local], .mzx-ui input[type=date], .mzx-ui select, .mzx-ui textarea{
  width:100%; padding: 10px 12px; border-radius: 12px; background: #0b1424; border:1px solid var(--mzx-line); color: var(--mzx-text); outline:none;
}
.mzx-ui input:focus, .mzx-ui select:focus, .mzx-ui textarea:focus{ border-color: var(--mzx-blue); box-shadow: var(--mzx-glow); }
.mzx-ui textarea{ min-height: 70px; resize: vertical; }

/* botones del sistema */
.mzx-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; padding: 11px 16px; border-radius: 12px;
  border: 1px solid var(--mzx-blue); background: linear-gradient(135deg, rgba(22,139,255,.35), rgba(22,139,255,.12));
  font-weight: 700; letter-spacing:.02em; text-decoration:none; transition: transform .12s, box-shadow .15s;
  color: var(--mzx-text);
}
.mzx-btn:hover{ transform: translateY(-1px); box-shadow: var(--mzx-glow); }
.mzx-btn:disabled{ opacity:.5; cursor: not-allowed; transform:none; box-shadow:none; }
.mzx-btn.mzx-wa{ border-color:#25d366; background: linear-gradient(135deg, rgba(37,211,102,.4), rgba(37,211,102,.12)); }
.mzx-btn.mzx-wa:hover{ box-shadow: 0 0 6px rgba(37,211,102,.7), 0 0 18px rgba(37,211,102,.4); }
.mzx-btn.mzx-gold{ border-color: var(--mzx-yellow); background: linear-gradient(135deg, rgba(255,199,44,.35), rgba(255,199,44,.1)); }
.mzx-btn.mzx-ghost{ background: transparent; border-color: var(--mzx-line); }
.mzx-btn.mzx-danger{ border-color: var(--mzx-red); background: rgba(239,61,61,.15); }
.mzx-btn.mzx-block{ width:100%; }
.mzx-btn.mzx-sm{ padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.mzx-note{ font-size: 12px; color: var(--mzx-muted); margin: 8px 0 0; }
.mzx-msg{ padding: 10px 12px; border-radius: 12px; font-size: 13.5px; margin: 8px 0; border:1px solid var(--mzx-line); }
.mzx-msg.mzx-err{ border-color: var(--mzx-red); background: rgba(239,61,61,.12); }
.mzx-msg.mzx-ok{ border-color: var(--mzx-green); background: rgba(46,204,113,.12); }
.mzx-msg.mzx-warn{ border-color: var(--mzx-yellow); background: rgba(255,199,44,.1); }

/* pestañas */
.mzx-tabs{ display:flex; gap:6px; margin-bottom: 12px; }
.mzx-tabs button{ flex:1; padding: 9px; border-radius: 10px; border:1px solid var(--mzx-line); background: transparent; font-weight:700; }
.mzx-tabs button[aria-selected=true]{ border-color: var(--mzx-blue); background: rgba(22,139,255,.18); box-shadow: var(--mzx-glow); }

/* ---------- Botones agregados a cada producto ---------- */
.mzx-actions{
  display:flex; gap:8px; align-items:center; flex-wrap: wrap; margin-top: 10px;
  font-family: var(--mzx-font);
}
.mzx-actions button{
  display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius: 12px; font-weight: 700; font-size: 14px;
  padding: 9px 13px; border:1px solid rgba(22,139,255,.8); background: linear-gradient(135deg, #0f3d78, #0a2447); color:#eaf2ff;
  box-shadow: 0 0 0 rgba(22,139,255,0); transition: transform .12s, box-shadow .15s, background .15s; cursor:pointer;
  min-height: 40px; line-height:1.1;
}
.mzx-actions button:hover{ transform: translateY(-1px); box-shadow: 0 0 6px rgba(22,139,255,.8), 0 0 16px rgba(22,139,255,.4); }
.mzx-actions .mzx-fav{ width: 44px; padding: 0; font-size: 20px; background: rgba(255,255,255,.92); color:#c9214f; border-color: rgba(201,33,79,.5); }
.mzx-actions .mzx-fav[aria-pressed=true]{ background:#c9214f; color:#fff; border-color:#ff6b93; box-shadow: 0 0 8px rgba(255,79,115,.7); }
.mzx-actions .mzx-add.mzx-added{ background: linear-gradient(135deg,#127a43,#0b4f2c); border-color:#2ecc71; }
.product-card.sold-out .mzx-add{ opacity:.45; pointer-events:none; }

/* aviso temporal (toast) */
.mzx-toast{
  position: fixed; left:50%; bottom: 84px; transform: translate(-50%, 20px); z-index: calc(var(--mzx-z) + 5);
  padding: 11px 16px; border-radius: 12px; background: var(--mzx-panel); border:1px solid var(--mzx-blue);
  box-shadow: var(--mzx-glow); color: var(--mzx-text); opacity:0; pointer-events:none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 24px); text-align:center; font-size:14px;
}
.mzx-toast.mzx-open{ opacity:1; transform: translate(-50%,0); }

/* ---------- Modal (login, mejora de plan, confirmaciones) ---------- */
.mzx-modal-wrap{ position: fixed; inset:0; z-index: calc(var(--mzx-z) + 6); display:grid; place-items:center; padding: 14px; background: rgba(2,6,14,.7); }
.mzx-modal{
  width: min(440px, 100%); max-height: 92vh; overflow:auto; padding: 18px; border-radius: 20px;
  background: linear-gradient(180deg,#0b1628,#070d18); border:1px solid var(--mzx-blue);
  box-shadow: 0 20px 70px rgba(0,0,0,.65), var(--mzx-glow);
}
.mzx-modal h2{ margin: 0 0 6px; font-size: 20px; }
.mzx-modal p{ margin: 6px 0; color: var(--mzx-muted); font-size: 14px; }

/* ---------- Etiquetas de plan ---------- */
.mzx-tier{ display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing:.08em; border:1px solid currentColor; vertical-align: middle; }
.mzx-tier.gratis{ color:#9aa6b5; }
.mzx-tier.pro{ color:#3a9bff; box-shadow: 0 0 8px rgba(58,155,255,.5); }
.mzx-tier.premium{ color:#ffc72c; box-shadow: 0 0 8px rgba(255,199,44,.55); }

/* =============================================================================
   TEMA APLICADO A LAS PÁGINAS (lo genera MZX.theme.css a partir de la configuración).
   Solo se activa si el negocio guardó un tema; si no, la página queda EXACTAMENTE como estaba.
   ============================================================================= */
@keyframes mzx-enter-fade{ from{opacity:0} to{opacity:1} }
@keyframes mzx-enter-slide{ from{opacity:0; transform: translateY(22px)} to{opacity:1; transform:none} }
@keyframes mzx-enter-zoom{ from{opacity:0; transform: scale(.94)} to{opacity:1; transform:none} }
@keyframes mzx-shine{ 0%{ background-position: -200% 0 } 100%{ background-position: 200% 0 } }
@keyframes mzx-pulse{ 0%,100%{ box-shadow: 0 0 0 0 var(--mzx-btn-glow, rgba(22,139,255,.6)) } 50%{ box-shadow: 0 0 0 10px transparent } }
@keyframes mzx-twinkle{ 0%,100%{ opacity:.35 } 50%{ opacity:1 } }
@keyframes mzx-float{ 0%{ transform: translateY(105vh) } 100%{ transform: translateY(-10vh) } }
@keyframes mzx-aurora{ 0%{ transform: translate(-10%,-6%) rotate(0deg) } 50%{ transform: translate(8%,6%) rotate(14deg) } 100%{ transform: translate(-10%,-6%) rotate(0deg) } }
@keyframes mzx-rgb{ 0%{ filter: hue-rotate(0deg) } 100%{ filter: hue-rotate(360deg) } }

.mzx-ambient{ position: fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.mzx-ambient.mzx-stars i{ position:absolute; width:2px; height:2px; border-radius:50%; background:#fff; box-shadow:0 0 6px #fff; animation: mzx-twinkle 3s ease-in-out infinite; }
.mzx-ambient.mzx-particles i{ position:absolute; bottom:0; width:6px; height:6px; border-radius:50%; background: var(--mzx-amb, #48c7ff); box-shadow: 0 0 12px var(--mzx-amb, #48c7ff); opacity:.7; animation: mzx-float linear infinite; }
.mzx-ambient.mzx-aurora::before, .mzx-ambient.mzx-aurora::after{
  content:""; position:absolute; width:90vw; height:90vh; left:-20vw; top:-20vh; filter: blur(70px); opacity:.45;
  background: radial-gradient(closest-side, var(--mzx-amb, #168bff), transparent 70%); animation: mzx-aurora 16s ease-in-out infinite;
}
.mzx-ambient.mzx-aurora::after{ left:auto; right:-25vw; top:auto; bottom:-25vh; background: radial-gradient(closest-side, #ff4fa3, transparent 70%); animation-duration: 22s; animation-direction: reverse; }
body.mzx-has-ambient > *:not(.mzx-ambient):not(.mzx-ui){ position: relative; z-index: 1; }

/* bloques añadidos por el negocio */
.mzx-blocks{ max-width: 1100px; margin: 18px auto; padding: 0 16px; display:grid; gap: 14px; }
.mzx-blocks .mzx-b-title{ font-size: clamp(24px, 4.4vw, 38px); font-weight: 800; margin:0; }
.mzx-blocks .mzx-b-subtitle{ font-size: clamp(18px, 3vw, 24px); font-weight: 600; margin:0; opacity:.9; }
.mzx-blocks .mzx-b-paragraph{ font-size: 1rem; margin:0; line-height: 1.6; opacity:.92; white-space: pre-line; }
.mzx-blocks .mzx-b-btn{ display:inline-block; padding: 13px 22px; border-radius: var(--mzx-t-radius, 14px); font-weight: 800; text-decoration:none; text-align:center; justify-self:center; }
.mzx-blocks .mzx-b-div{ height: 0; border:0; margin: 6px 0; }
.mzx-blocks .mzx-b-video{ position:relative; width:100%; max-width: 860px; margin-inline:auto; aspect-ratio: 16/9; border-radius: var(--mzx-t-radius,14px); overflow:hidden; background:#000; border:1px solid var(--mzx-line); }
.mzx-blocks .mzx-b-video iframe, .mzx-blocks .mzx-b-video video{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* videos del inicio de MEGAZONIX */
.mzx-videos{ max-width: 1180px; margin: 26px auto; padding: 0 16px; }
.mzx-videos h2{ text-align:center; font-family: var(--mzx-font); text-transform: uppercase; letter-spacing:.06em; text-shadow: 0 0 14px rgba(22,139,255,.8); margin: 0 0 14px; }
.mzx-videos .mzx-vgrid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mzx-vcard{ position:relative; aspect-ratio:16/9; border-radius: 16px; overflow:hidden; background:#000; border:1px solid var(--mzx-line); box-shadow: 0 0 16px rgba(22,139,255,.25); }
.mzx-vcard iframe, .mzx-vcard video{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.mzx-vcap{ margin: 6px 4px 0; font-size: 13px; color: var(--mzx-muted); font-family: var(--mzx-font); }

/* modo ligero: sin animaciones pesadas */
.mzx-lite *, .mzx-lite *::before, .mzx-lite *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.mzx-lite .mzx-ambient{ display:none !important; }
@media (prefers-reduced-motion: reduce){
  .mzx-ambient{ display:none !important; }
  .mzx-ui *, .mzx-actions *{ transition: none !important; }
}

/* ---------- Editor ---------- */
body.mzx-editing{ overflow:hidden; }
.mzx-ed{ position: fixed; inset:0; z-index: calc(var(--mzx-z) + 3); display:grid; grid-template-columns: 380px 1fr; background: #050a14; }
.mzx-ed-side{ display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--mzx-line); background: linear-gradient(180deg,#0a1424,#070d18); }
.mzx-ed-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding: 10px 12px; border-bottom:1px solid var(--mzx-line); }
.mzx-ed-top h2{ margin:0; font-size: 15px; letter-spacing:.05em; text-transform: uppercase; }
.mzx-ed-nav{ display:flex; gap:4px; padding: 8px; overflow-x:auto; border-bottom:1px solid var(--mzx-line); scrollbar-width: thin; }
.mzx-ed-nav button{ flex: 0 0 auto; padding: 7px 11px; border-radius: 10px; border:1px solid var(--mzx-line); background:transparent; font-size: 13px; font-weight:700; white-space:nowrap; }
.mzx-ed-nav button[aria-selected=true]{ border-color: var(--mzx-blue); background: rgba(22,139,255,.2); box-shadow: var(--mzx-glow); }
.mzx-ed-body{ flex:1; overflow:auto; padding: 12px; min-height:0; }
.mzx-ed-foot{ padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--mzx-line); display:grid; gap:8px; }
.mzx-ed-foot .mzx-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mzx-ed-stage{ display:flex; flex-direction:column; min-width:0; min-height:0; }
.mzx-ed-bar{ display:flex; align-items:center; justify-content:center; gap:8px; padding: 8px; border-bottom:1px solid var(--mzx-line); background:#0a1424; }
.mzx-ed-bar button{ padding: 7px 14px; border-radius: 10px; border:1px solid var(--mzx-line); background:transparent; font-weight:700; }
.mzx-ed-bar button[aria-pressed=true]{ border-color: var(--mzx-yellow); background: rgba(255,199,44,.14); }
.mzx-ed-frame-wrap{ flex:1; min-height:0; display:grid; place-items:center; padding: 12px; overflow:auto; background:
  radial-gradient(circle at 20% 10%, rgba(22,139,255,.15), transparent 40%), #050a14; }
.mzx-ed-frame{ border:1px solid var(--mzx-line); border-radius: 14px; background:#fff; width:100%; height:100%; transition: width .25s, height .25s; }
.mzx-ed-frame.mzx-mobile{ width: 390px; height: min(844px, 100%); border-radius: 28px; border: 8px solid #1b2a44; box-shadow: var(--mzx-glow); }
.mzx-sec{ margin-bottom: 16px; }
.mzx-sec > h4{ margin: 0 0 8px; font-size: 12.5px; letter-spacing:.08em; text-transform: uppercase; color: var(--mzx-cyan); }
.mzx-row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mzx-swatches{ display:flex; flex-wrap:wrap; gap:6px; margin: 6px 0; }
.mzx-sw{ width:30px; height:30px; border-radius: 9px; border:2px solid rgba(255,255,255,.2); padding:0; }
.mzx-sw[aria-pressed=true]{ border-color:#fff; box-shadow: 0 0 10px rgba(255,255,255,.6); }
.mzx-color{ display:flex; align-items:center; gap:8px; }
.mzx-color input[type=color]{ width: 44px; height: 34px; padding:0; border:1px solid var(--mzx-line); border-radius:8px; background:none; }
.mzx-color input[type=text]{ flex:1; }
.mzx-chips{ display:flex; flex-wrap: wrap; gap: 6px; }
.mzx-chip{ padding: 7px 11px; border-radius: 10px; border:1px solid var(--mzx-line); background: rgba(255,255,255,.03); font-size: 13px; font-weight: 600; position:relative; }
.mzx-chip[aria-pressed=true]{ border-color: var(--mzx-blue); background: rgba(22,139,255,.22); box-shadow: var(--mzx-glow); }
.mzx-chip.mzx-lock{ border-style: dashed; opacity: .92; }
.mzx-chip.mzx-lock::after{ content:" 🔒"; font-size: 11px; }
.mzx-range{ display:grid; grid-template-columns: 1fr 54px; gap:8px; align-items:center; }
.mzx-range input[type=range]{ width:100%; accent-color: var(--mzx-blue); }
.mzx-lockbar{ display:flex; align-items:flex-start; gap:8px; padding: 9px 11px; border-radius: 12px; border:1px dashed var(--mzx-yellow); background: rgba(255,199,44,.07); font-size: 12.5px; margin-bottom: 12px; }
.mzx-seclist{ display:grid; gap:6px; }
.mzx-secrow{ display:grid; grid-template-columns: 1fr auto auto auto; gap:6px; align-items:center; padding: 8px 10px; border-radius: 12px; border:1px solid var(--mzx-line); background: rgba(255,255,255,.03); }
.mzx-secrow button{ width:32px; height:32px; border-radius:8px; border:1px solid var(--mzx-line); background:transparent; }
.mzx-secrow button:disabled{ opacity:.35; }
.mzx-blockrow{ padding: 10px; border-radius: 12px; border:1px solid var(--mzx-line); margin-bottom: 8px; background: rgba(255,255,255,.03); display:grid; gap:6px; }
@media (max-width: 860px){
  .mzx-ed{ grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 42vh) minmax(0, 1fr); width:100%; max-width:100vw; overflow:hidden; }
  .mzx-ed > *{ min-width:0; max-width:100%; }
  .mzx-ed-side, .mzx-ed-stage, .mzx-ed-body, .mzx-ed-foot, .mzx-ed-top, .mzx-ed-frame-wrap{ min-width:0; max-width:100%; }
  .mzx-ed-body{ overflow-x:hidden; overflow-wrap:anywhere; }
  .mzx-ed-body *{ max-width:100%; }
  .mzx-ed-foot .mzx-row{ grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .mzx-ed-foot button, .mzx-ed-foot .mzx-btn{ white-space:normal; min-width:0; }
  .mzx-ed-bar{ flex-wrap:wrap; }
  .mzx-ed-frame-wrap{ padding: 6px; }
  .mzx-ed-frame{ width:100%; }
  .mzx-ed-side{ order: 2; border-right:0; border-top: 1px solid var(--mzx-line); }
  .mzx-ed-stage{ order: 1; }
  .mzx-ed-frame.mzx-mobile{ width: min(360px, 94%); border-width: 6px; }
}

/* ---------- Aislamiento: el tema de un negocio NUNCA cambia el carrito, el editor ni el dock ---------- */
html:root .mzx-ui, html:root .mzx-ui *{ font-family: var(--mzx-font) !important; }
html:root .mzx-ui h1, html:root .mzx-ui h2, html:root .mzx-ui h3, html:root .mzx-ui h4{
  color: var(--mzx-text) !important; text-shadow: none !important; text-align: left !important; animation: none !important;
}
html:root .mzx-drawer h2{ text-shadow: 0 0 12px rgba(22,139,255,.8) !important; }
html:root .mzx-ui h4{ color: var(--mzx-cyan) !important; }
html:root .mzx-ui .mzx-empty, html:root .mzx-ui .mzx-empty *{ text-align: center; }

/* ---------- Editor 2.5.4: más cómodo ---------- */
.mzx-ed{ --sheet-h: 46vh; transition: grid-template-columns .25s ease, grid-template-rows .25s ease; }
.mzx-ed.collapsed{ grid-template-columns: 0 1fr; }
.mzx-ed.collapsed .mzx-ed-side{ visibility:hidden; overflow:hidden; border:0; }
.mzx-ed-top .mzx-planbtn{ padding:6px 10px; border-radius:10px; border:1px solid var(--mzx-line); background:transparent; font-size:12.5px; font-weight:800; white-space:nowrap; }
.mzx-ed-top .mzx-planbtn[aria-pressed=true]{ border-color: var(--mzx-yellow); background: rgba(255,199,44,.16); }
.mzx-ed-nav{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:6px; padding:8px; overflow:visible; }
.mzx-ed-nav button{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:9px 4px; min-height:62px; white-space:normal; text-align:center; line-height:1.1; }
.mzx-ed-nav .ti{ font-size:22px; line-height:1; }
.mzx-ed-nav .tl{ font-size:11.5px; font-weight:800; }
.mzx-tabtitle{ font-size:16px; font-weight:900; margin: 0 0 10px; letter-spacing:.02em; }
.mzx-handle{ position:absolute; z-index:6; top:50%; left:380px; transform:translateY(-50%); width:22px; height:64px; border-radius:0 12px 12px 0; border:1px solid var(--mzx-line); border-left:0; background:#0e1b31; color:#fff; font-size:16px; font-weight:900; padding:0; cursor:pointer; box-shadow:0 0 14px rgba(22,139,255,.35); transition:left .25s ease; }
.mzx-ed.collapsed .mzx-handle{ left:0; background:#12305c; }
.mzx-fold{ margin:0 0 12px; border:1px solid var(--mzx-line); border-radius:12px; background:rgba(255,255,255,.025); }
.mzx-fold > summary{ cursor:pointer; padding:10px 12px; font-weight:800; font-size:13.5px; list-style:none; }
.mzx-fold > summary::-webkit-details-marker{ display:none; }
.mzx-fold > summary::after{ content:"▸"; float:right; opacity:.7; }
.mzx-fold[open] > summary::after{ content:"▾"; }
.mzx-fold[open] > summary{ border-bottom:1px solid var(--mzx-line); }
.mzx-fold > *:not(summary){ margin:10px 12px; }
.mzx-prodcard{ margin:8px 0; border:1px solid var(--mzx-line); border-radius:12px; background:rgba(255,255,255,.03); overflow:hidden; }
.mzx-prodcard.open{ border-color: var(--mzx-blue); box-shadow: var(--mzx-glow); }
.mzx-prodrow{ display:grid; grid-template-columns:44px minmax(0,1fr) 18px; gap:10px; align-items:center; width:100%; padding:8px 10px; border:0; background:transparent; text-align:left; color:inherit; cursor:pointer; }
.mzx-prodrow img,.mzx-prodrow .mzx-ph0{ width:44px; height:44px; object-fit:cover; border-radius:9px; display:grid; place-items:center; background:rgba(255,255,255,.06); }
.mzx-pn{ display:grid; min-width:0; } .mzx-pn strong{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .mzx-pn small{ opacity:.7; }
.mzx-prodform{ display:grid; gap:8px; padding:10px; }
.mzx-prodcard .mzx-prodform{ border-top:1px solid var(--mzx-line); }
.mzx-imggrid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin:8px 0; }
.mzx-imgcell{ aspect-ratio:1/1; padding:0; border-radius:10px; border:2px solid var(--mzx-line); background:rgba(255,255,255,.05); overflow:hidden; cursor:pointer; display:grid; place-items:center; }
.mzx-imgcell img{ width:100%; height:100%; object-fit:cover; display:block; }
.mzx-imgcell.on{ border-color: var(--mzx-yellow); box-shadow:0 0 12px rgba(255,199,44,.6); }
.mzx-editlist{ display:grid; gap:4px; max-height:260px; overflow:auto; }
.mzx-editrow{ text-align:left; padding:7px 10px; border-radius:9px; border:1px solid var(--mzx-line); background:transparent; color:inherit; font-size:12.5px; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mzx-editrow.on{ border-color:var(--mzx-yellow); background:rgba(255,199,44,.12); }
.mzx-pulse{ animation: mzxFocus 1.6s ease-out 1; border-radius:12px; }
@keyframes mzxFocus{ 0%{ box-shadow:0 0 0 0 rgba(255,199,44,.9), 0 0 0 3px rgba(255,199,44,.9) } 100%{ box-shadow:0 0 0 14px rgba(255,199,44,0), 0 0 0 3px rgba(255,199,44,0) } }
.mzx-ftb{ position:absolute; z-index:5; display:flex; gap:4px; padding:5px; border-radius:14px; background:#0b1730f2; border:1px solid var(--mzx-yellow); box-shadow:0 6px 24px rgba(0,0,0,.55), 0 0 14px rgba(255,199,44,.35); max-width:calc(100% - 8px); flex-wrap:wrap; }
.mzx-ftb button{ min-height:34px; padding:0 10px; border-radius:10px; border:1px solid var(--mzx-line); background:rgba(255,255,255,.06); color:#fff; font-size:12.5px; font-weight:800; cursor:pointer; white-space:nowrap; }
.mzx-ftb button:last-child{ background:transparent; }
.mzx-ed-stage{ position:relative; }
@media (prefers-reduced-motion: reduce){ .mzx-ed, .mzx-handle{ transition:none; } .mzx-pulse{ animation:none; outline:3px solid var(--mzx-yellow); } }
@media (max-width: 860px){
  /* celular: la vista previa ocupa casi todo y las herramientas son una hoja inferior que se baja con la flecha */
  .mzx-ed{ grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) var(--sheet-h); }
  .mzx-ed.collapsed{ grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) 0; }
  .mzx-ed.collapsed .mzx-ed-side{ visibility:hidden; }
  .mzx-ed-side{ border-radius:18px 18px 0 0; box-shadow:0 -10px 30px rgba(0,0,0,.5); }
  .mzx-ed-nav{ display:flex; overflow-x:auto; gap:6px; }
  .mzx-ed-nav button{ flex:0 0 auto; min-width:74px; min-height:56px; }
  .mzx-ed-nav .ti{ font-size:19px; }
  .mzx-handle{ top:auto; left:50%; transform:translateX(-50%); bottom:var(--sheet-h); width:64px; height:22px; border-radius:12px 12px 0 0; border:1px solid var(--mzx-line); border-bottom:0; font-size:14px; transition:bottom .25s ease; }
  .mzx-handle{ font-size:0; }
  .mzx-handle::after{ content:"▾"; font-size:15px; }
  .mzx-ed.collapsed .mzx-handle::after{ content:"▴"; }
  .mzx-ed.collapsed .mzx-handle{ left:50%; bottom:0; }
  .mzx-imggrid{ grid-template-columns:repeat(5,minmax(0,1fr)); }
}

/* =================== ZONIX CDR 2.6.4: espacio, avisos, herramientas masivas, historial =================== */
.mzx-cap{ position:relative; margin:0 0 12px; padding:12px 14px 12px; border-radius:16px; border:1px solid rgba(72,199,255,.35);
  background:linear-gradient(135deg, rgba(22,139,255,.16), rgba(72,199,255,.05) 55%, rgba(255,199,44,.05));
  box-shadow:0 0 0 1px rgba(22,139,255,.12) inset, 0 6px 22px rgba(22,139,255,.16); overflow:hidden; }
.mzx-cap::before{ content:""; position:absolute; inset:-40% -20% auto auto; width:160px; height:160px; border-radius:50%; background:radial-gradient(circle, rgba(72,199,255,.22), transparent 65%); pointer-events:none; }
.mzx-cap-top{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px; position:relative; }
.mzx-cap-top strong{ font-size:15px; letter-spacing:.01em; text-shadow:0 0 12px rgba(72,199,255,.5); }
.mzx-cap-left{ font-size:12px; font-weight:800; color:var(--mzx-cyan); text-transform:uppercase; letter-spacing:.06em; }
.mzx-cap-bar{ height:10px; margin:9px 0 7px; border-radius:99px; background:rgba(255,255,255,.09); overflow:hidden; position:relative; box-shadow:inset 0 1px 3px rgba(0,0,0,.45); }
.mzx-cap-bar > i{ display:block; height:100%; min-width:6px; border-radius:99px; background:linear-gradient(90deg,#168bff,#48c7ff,#7dffb0); background-size:200% 100%; box-shadow:0 0 12px rgba(72,199,255,.75); transition:width .6s cubic-bezier(.2,.8,.2,1); animation:mzxCapFlow 3.2s linear infinite; }
.mzx-cap.warn .mzx-cap-bar > i{ background:linear-gradient(90deg,#ffc72c,#ff9d2c); box-shadow:0 0 12px rgba(255,199,44,.8); }
.mzx-cap.warn .mzx-cap-left{ color:var(--mzx-yellow); }
.mzx-cap.full{ border-color:rgba(255,80,80,.55); background:linear-gradient(135deg, rgba(255,60,60,.16), rgba(255,199,44,.06)); box-shadow:0 0 0 1px rgba(255,80,80,.18) inset, 0 6px 22px rgba(255,60,60,.2); }
.mzx-cap.full .mzx-cap-bar > i{ background:linear-gradient(90deg,#ff3b3b,#ff7a3b); box-shadow:0 0 14px rgba(255,60,60,.9); animation:none; }
.mzx-cap.full .mzx-cap-left{ color:#ff8f8f; }
@keyframes mzxCapFlow{ to{ background-position:200% 0; } }
.mzx-cap-sub{ font-size:12px; color:var(--mzx-muted); position:relative; }
.mzx-cap-buy{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:9px; font-size:13px; font-weight:700; position:relative; }
.mzx-buy{ text-decoration:none; display:inline-flex; align-items:center; gap:6px; }
.mzx-limit{ display:grid; grid-template-columns:auto 1fr; gap:6px 12px; align-items:center; padding:12px 14px; margin:6px 0; border-radius:16px; border:1px solid rgba(255,199,44,.55);
  background:linear-gradient(135deg, rgba(255,199,44,.14), rgba(255,80,80,.08)); box-shadow:0 0 22px rgba(255,199,44,.18); }
.mzx-limit-ic{ font-size:26px; filter:drop-shadow(0 0 8px rgba(255,199,44,.7)); }
.mzx-limit-tx{ display:grid; gap:2px; font-size:13px; } .mzx-limit-tx strong{ font-size:14.5px; } .mzx-limit-tx span{ color:var(--mzx-muted); }
.mzx-limit .mzx-buy{ grid-column:1 / -1; justify-content:center; }
.mzx-prog{ padding:12px 14px; border-radius:16px; border:1px solid rgba(72,199,255,.4); background:rgba(22,139,255,.1); }
.mzx-prog-tx{ font-size:13.5px; font-weight:800; }
.mzx-tools{ display:grid; gap:8px; } .mzx-tools .mzx-btn{ justify-content:center; text-align:center; }
.mzx-imp-modal{ max-width:560px; width:100%; max-height:88vh; overflow:auto; }
.mzx-imp-btns{ display:grid; gap:8px; margin:10px 0; }
.mzx-imp-sum{ display:grid; gap:2px; padding:10px 12px; border-radius:14px; border:1px solid rgba(46,204,113,.45); background:rgba(46,204,113,.08); margin-bottom:8px; }
.mzx-imp-sum span{ font-size:12.5px; color:#9dffc4; }
.mzx-imp-tbw{ overflow-x:auto; border:1px solid var(--mzx-line); border-radius:12px; margin:6px 0; }
.mzx-imp-tb{ width:100%; border-collapse:collapse; font-size:12.5px; }
.mzx-imp-tb th{ text-align:left; padding:7px 10px; background:rgba(22,139,255,.22); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; }
.mzx-imp-tb td{ padding:6px 10px; border-top:1px solid rgba(120,170,255,.14); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mzx-histrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; margin:6px 0; border-radius:14px; border:1px solid var(--mzx-line); background:rgba(255,255,255,.03); }
.mzx-histrow.now{ border-color:rgba(255,199,44,.5); box-shadow:0 0 14px rgba(255,199,44,.14); }
.mzx-histtx{ display:grid; gap:2px; min-width:0; } .mzx-histtx small{ color:var(--mzx-muted); font-size:12px; }
@media (prefers-reduced-motion: reduce){ .mzx-cap-bar > i{ animation:none; transition:none; } }
