/* Matmap UX Product - Frontend (CSS completo) */
:root{
  --mmuxp-primary:#3a3972;
  --mmuxp-secondary:#e69130;
  --mmuxp-muted:#f3f4f6;
  --mmuxp-border:#e5e7eb;
  --mmuxp-radius:16px;
}

/* ---------- Header / Precio ---------- */
.mmuxp-header{
  display:inline-flex;
  width:fit-content;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  margin-bottom:16px;
  padding-bottom:12px;
  border-bottom:1px solid var(--mmuxp-border);
}
.mmuxp-title{
  color:var(--mmuxp-primary);
  font-size:clamp(22px,2.4vw,32px);
  line-height:1.2;
  margin:0;
  font-weight:700;
  white-space:normal;
}
.mmuxp-price{
  color:var(--mmuxp-secondary) !important;
  font-weight:400;
  font-size:clamp(20px,2vw,28px);
  display:flex; align-items:baseline; gap:6px;
}
.mmuxp-price .mmuxp-vat{
  color:var(--mmuxp-secondary) !important;
  font-weight:400;
  font-size:12px;
}

/* ---------- Galería ---------- */
.mmuxp-gallery{ margin-bottom:18px; }
.mmuxp-main{
  position:relative;
  background:#fff;
  border:1px solid var(--mmuxp-border);
  border-radius:var(--mmuxp-radius);
  overflow:hidden;
}
.mmuxp-main-inner{
  position:relative;
  display:block;
  aspect-ratio:4/3;
  max-height:70vh;
  touch-action: pan-y pinch-zoom;
}
.mmuxp-main-image{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  object-fit:cover !important;
  object-position:center;
  cursor:zoom-in;
  transition:opacity .25s ease;
  opacity:1;
}
.mmuxp-main-image.-fade{ opacity:0; }

/* Flechas sobre la imagen principal */
.mmuxp-main-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:999px;
  border:1px solid var(--mmuxp-border);
  background:rgba(255,255,255,.95);
  display:grid; place-items:center; cursor:pointer;
  z-index:3;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  transition:transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  touch-action:manipulation;
}
.mmuxp-main-nav.-prev{ left:10px; }
.mmuxp-main-nav.-next{ right:10px; }
.mmuxp-main-nav:hover{
  transform:translateY(-50%) scale(1.06);
  box-shadow:0 10px 24px rgba(0,0,0,.22);
}
.mmuxp-main-nav[disabled]{ opacity:.45; cursor:default; }
.mmuxp-main-nav svg{ width:18px; height:18px; color:var(--mmuxp-primary); }

/* Botón lupa */
.mmuxp-zoom{
  position:absolute; right:10px; top:10px;
  background:transparent; color:var(--mmuxp-primary);
  border:0; padding:8px; border-radius:999px;
  line-height:0; cursor:pointer; z-index:4;
  display:grid; place-items:center;
  transition:transform .15s ease;
  touch-action:manipulation;
}
.mmuxp-zoom:hover{ transform:scale(1.06); }
.mmuxp-zoom svg{ width:22px; height:22px; }

/* ---------- CTA: Ver vídeo (inline sobre la galería) ---------- */
.mmuxp-video-cta{
  position:absolute;
  left:12px; bottom:12px;
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:0;
  background:linear-gradient(135deg, var(--mmuxp-secondary), #f2a94f);
  color:#fff;
  font-weight:700;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  cursor:pointer;
  z-index:4;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.mmuxp-video-cta:hover{ transform:translateY(-1px); box-shadow:0 12px 28px rgba(0,0,0,.22); }
.mmuxp-video-cta:active{ transform:translateY(0); }
.mmuxp-video-cta-play{
  width:18px; height:18px; position:relative; display:inline-block;
  border-radius:999px; background:rgba(255,255,255,.2);
}
.mmuxp-video-cta-play::before{
  content:''; position:absolute; left:6px; top:4px;
  border-style:solid; border-width:5px 0 5px 8px;
  border-color:transparent transparent transparent #fff;
}

/* ---------- Miniaturas ---------- */
.mmuxp-thumbs{
  display:grid;
  grid-template-columns:40px 1fr 40px;
  gap:10px; align-items:center;
  margin-top:12px;
}
.mmuxp-thumbs-track{
  display:flex;
  overflow:hidden;
  scroll-behavior:smooth;
  gap:10px;
  cursor:grab;
  user-select:none; -webkit-user-select:none;
  touch-action:pan-y;
}
.mmuxp-thumb{
  flex:0 0 calc((100% - 20px)/3);
  border:1px solid var(--mmuxp-border);
  border-radius:12px;
  padding:0; background:#fff;
  cursor:pointer; position:relative;
  aspect-ratio:1/1;
  transition:filter .15s ease, opacity .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.mmuxp-thumb img{
  width:100%; height:100%;
  display:block; border-radius:12px;
  object-fit:cover; object-position:center;
}
.mmuxp-thumb[aria-selected="false"]{ opacity:.78; filter:saturate(.46); }
.mmuxp-thumb[aria-selected="true"]{
  opacity:1; filter:none;
  border-color:transparent;
  box-shadow: inset 0 0 0 2px var(--mmuxp-primary),
              0 6px 16px rgba(58,57,114,.12);
}

/* Indicadores premium para miniaturas de vídeo: overlay + play */
.mmuxp-thumb.-video::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 55%);
  border-radius:12px;
}
.mmuxp-thumb.-video .mmuxp-thumb-play{
  position:absolute;
  left:50%; top:50%; transform:translate(-50%,-50%);
  width:56px; height:56px; border-radius:999px;
  background:rgba(0,0,0,.55);
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  pointer-events:none;
}
.mmuxp-thumb.-video .mmuxp-thumb-play::before{
  content:''; position:absolute; left:21px; top:18px; width:0; height:0;
  border-style:solid; border-width:10px 0 10px 16px; border-color:transparent transparent transparent #fff;
}
.mmuxp-thumb.-video:hover .mmuxp-thumb-play{ background:rgba(0,0,0,.68); }

/* Botones de la tira */
.mmuxp-thumbs-nav{
  width:40px; height:40px; border-radius:999px;
  border:1px solid var(--mmuxp-border);
  background:var(--mmuxp-muted);
  cursor:pointer; display:grid; place-items:center;
  touch-action:manipulation;
}
.mmuxp-thumbs-nav[disabled]{ opacity:.5; cursor:default; }

/* ---------- Dots ---------- */
.mmuxp-main .mmuxp-dots{
  position:absolute;
  left:50%;
  bottom:12px;
  transform:translateX(-50%);
  z-index:4;
  display:flex; gap:6px;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.85);
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}
.mmuxp-main .mmuxp-dot{
  width:8px; height:8px; border-radius:999px;
  background:#d1d5db; border:0; padding:0; cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.mmuxp-main .mmuxp-dot:hover{ transform:scale(1.15); }
.mmuxp-main .mmuxp-dot[aria-selected="true"]{
  background:var(--mmuxp-primary);
  box-shadow:0 0 0 2px rgba(58,57,114,.25);
}

/* ---------- Lightbox ---------- */
.mmuxp-lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.85);
  display:none; justify-content:center; align-items:center; padding:20px;
  z-index:2147483647;
}
.mmuxp-lightbox.-open{ display:flex; }
.mmuxp-lightbox-body{ max-width:95vw; max-height:90vh; }
.mmuxp-lightbox-img{ max-width:95vw; max-height:90vh; display:block; transition:transform .15s ease; }
.mmuxp-lightbox-close{
  position:absolute; top:14px; right:14px; z-index:2147483647;
  font-size:32px; color:#fff; background:transparent; border:0; cursor:pointer;
}
.mmuxp-no-scroll{ overflow:hidden !important; }

.mmuxp-lightbox-nav{
  position:fixed; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:999px;
  border:1px solid var(--mmuxp-border);
  background:rgba(255,255,255,.95);
  display:grid; place-items:center; cursor:pointer; z-index:2147483647;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  transition:transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  touch-action:manipulation;
}
.mmuxp-lightbox-nav.-prev{ left:16px; }
.mmuxp-lightbox-nav.-next{ right:16px; }
.mmuxp-lightbox-nav:hover{
  transform:translateY(-50%) scale(1.06);
  box-shadow:0 10px 24px rgba(0,0,0,.22);
}
.mmuxp-lightbox-nav[disabled]{ opacity:.45; cursor:default; }
.mmuxp-lightbox-nav svg{ width:18px; height:18px; color:var(--mmuxp-primary); }

.mmuxp-lightbox-indicator{
  position:fixed; left:50%; bottom:16px; transform:translateX(-50%);
  background:rgba(255,255,255,.9); color:#111; font-size:12px;
  padding:6px 10px; border-radius:999px; box-shadow:0 4px 10px rgba(0,0,0,.12);
}

/* ---------- Accesibilidad: foco visible ---------- */
.mmuxp-main-nav:focus-visible,
.mmuxp-thumbs-nav:focus-visible,
.mmuxp-thumb:focus-visible,
.mmuxp-video-cta:focus-visible{
  outline: 2px solid var(--mmuxp-primary);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width:768px){
  .mmuxp-header{ display:block; width:100%; }
  .mmuxp-price{ font-size:20px; }
  .mmuxp-thumbs{ grid-template-columns:32px 1fr 32px; }
  .mmuxp-thumbs-nav{ width:32px; height:32px; }
  .mmuxp-main-nav{ width:34px; height:34px; }
  .mmuxp-zoom{ padding:6px; }
  .mmuxp-main .mmuxp-dots{ bottom:10px; padding:5px 7px; }
  .mmuxp-video-cta{ left:10px; bottom:10px; padding:9px 12px; }
}

/* Seguridad clics */
.mmuxp-thumbs-track, .mmuxp-thumb, .mmuxp-thumb img { pointer-events:auto; }
