/* ==========================================================================
   CATÁLOGO KOM — estilos
   Catálogo móvil-first estilo "mini tienda" (redes sociales).
   ========================================================================== */

:root{
  --bg:        #f3f3f5;
  --card:      #ffffff;
  --ink:       #101014;
  --muted:     #6c6c74;
  --line:      #e6e6ea;
  --thumb:     #ececec;
  --accent:    #ffc400;
  --accent-d:  #f0b400;
  --green:     #25d366;
  --green-d:   #1eb356;
  --danger:    #e5484d;
  --r:         16px;
  --shadow:    0 1px 2px rgba(16,16,20,.06), 0 8px 24px rgba(16,16,20,.06);
  --hdr:       64px;
}

*{ box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }

html{ scroll-behavior:smooth; }

body{
  font-family:'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.4;
  -webkit-font-smoothing:antialiased;
}
body.has-bar{ padding-bottom:calc(92px + env(safe-area-inset-bottom)); }

img{ display:block; }
button{ font:inherit; cursor:pointer; border:none; background:none; color:inherit; }
input,textarea{ font:inherit; }
[hidden]{ display:none !important; }
.muted{ color:var(--muted); }

.skip{ position:absolute; left:-999px; top:0; background:#111; color:#fff; padding:8px 14px; z-index:999; border-radius:0 0 8px 0;}
.skip:focus{ left:0; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.hdr{
  position:sticky; top:0; z-index:60;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.promo{
  background:#0e0e13; color:#fff;
  text-align:center; font-size:11.5px; font-weight:700; letter-spacing:.2px;
  padding:6px 12px; line-height:1.4;
}
@media (max-width:430px){
  .promo{ font-size:11px; padding:5px 10px; }
}
.hdr-row{
  max-width:1180px; margin:0 auto;
  height:var(--hdr);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 16px; gap:10px;
}
.brand{ display:flex; align-items:center; gap:10px; text-align:left; }
.brand-mark{
  width:40px;height:40px;flex:0 0 auto;
  display:grid;place-items:center;
}
.brand-mark img{
  width:auto;height:auto;max-height:38px;max-width:44px;object-fit:contain;
}
.brand-txt{ display:flex; flex-direction:column; line-height:1.1; }
.brand-txt strong{ font-size:18px; letter-spacing:-.4px; }
.brand-txt small{ font-size:10.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.6px; }

.hdr-actions{ display:flex; gap:6px; }
.iconbtn{
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;color:var(--ink);
  transition:background .15s;
}
.iconbtn:hover{ background:#f0f0f3; }
.cartbtn{ position:relative; }
.badge{
  position:absolute; top:2px; right:2px; min-width:18px; height:18px; padding:0 4px;
  border-radius:999px; background:var(--accent); color:#111;
  font-size:11px; font-weight:800; display:grid; place-items:center;
  border:2px solid #fff;
}

.searchwrap{
  display:flex; align-items:center; gap:8px;
  max-width:1180px; margin:0 auto; padding:2px 16px 12px; color:var(--muted);
  animation:slideDown .2s ease;
}
@keyframes slideDown{ from{opacity:0; transform:translateY(-6px);} to{opacity:1; transform:none;} }
.searchwrap input{
  flex:1; min-width:0; border:1px solid var(--line); border-radius:12px;
  height:42px; padding:0 12px; outline:none; background:#f6f6f8;
  color:var(--ink); font-size:15px;
}
.searchwrap input:focus{ border-color:#b9b9c2; background:#fff; }
.searchwrap .clr{ width:30px;height:30px;border-radius:8px;color:var(--muted);}
.searchwrap .clr:hover{ background:#eee; color:#111; }

/* ── Página ─────────────────────────────────────────────────────────────── */
.page{ max-width:1180px; margin:0 auto; padding:18px 12px 8px; }
.intro{ padding:4px 4px 14px; display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.slogan{ font-weight:800; letter-spacing:-.4px; font-size:clamp(20px, 4.6vw, 30px);}
.count{ color:var(--muted); font-size:12.5px; font-weight:600; }

/* ── Grid de tarjetas ───────────────────────────────────────────────────── */
.grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px 10px;
}
@media (min-width:600px){ .grid{ grid-template-columns:repeat(3,1fr); gap:16px; } }
@media (min-width:920px){ .grid{ grid-template-columns:repeat(4,1fr); gap:20px; } }
@media (min-width:1220px){ .grid{ grid-template-columns:repeat(5,1fr); gap:22px; } }

.prod{
  background:var(--card); border-radius:var(--r); overflow:hidden;
  box-shadow:var(--shadow); border:1px solid var(--line);
  display:flex; flex-direction:column;
  animation:fadeUp .35s ease both;
}
@keyframes fadeUp{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

/* miniatura */
.thumb{
  position:relative; aspect-ratio:3/4; background:var(--thumb);
  overflow:hidden; cursor:zoom-in;
}
.thumb img{
  width:100%; height:100%; object-fit:contain;
  transition:transform .35s ease;
}
@media (hover:hover){
  .thumb img:hover{ transform:scale(1.05); }
}
.thumb .soldout{
  position:absolute; top:10px; left:10px; z-index:2;
  background:rgba(16,16,20,.85); color:#fff; font-size:10px; font-weight:800;
  letter-spacing:.6px; text-transform:uppercase; padding:5px 9px; border-radius:999px;
}
.thumb .zoom-hint{
  position:absolute; inset:auto 0 0 0; padding:8px;
  background:linear-gradient(transparent, rgba(16,16,20,.45));
  color:#fff; display:none; align-items:center; justify-content:center; gap:6px;
  font-size:11px; font-weight:700; letter-spacing:.3px;
}
@media (hover:hover){
  .thumb:hover .zoom-hint{ display:flex; }
}

/* cuerpo */
.prod-body{ display:flex; flex-direction:column; flex:1; padding:11px 11px 12px; }
.prod-name{
  font-size:12.5px; font-weight:600; line-height:1.25; letter-spacing:-.1px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height:2.6em; /* reserva 2 líneas */
  cursor:pointer; transition:color .15s;
}
.prod-name:hover{ color:var(--muted); }
.prod-name small{ display:block; color:var(--muted); font-weight:600; font-size:10.5px; margin-bottom:2px; text-transform:uppercase; letter-spacing:.4px;}
.prod-ref{ color:var(--muted); font-size:10px; margin-top:2px; }

.price{ margin-top:7px; display:flex; align-items:baseline; gap:7px; flex-wrap:wrap; }
.price .usd{ font-weight:800; font-size:15px; letter-spacing:-.3px; }
.price .bs{ font-size:11px; color:var(--muted); font-weight:600; }

.sizes{ margin-top:9px; }
.sizes .s-label{
  display:block; font-size:9.5px; font-weight:800; letter-spacing:.7px;
  color:var(--muted); text-transform:uppercase; margin-bottom:5px;
}
.pills{ display:flex; flex-wrap:wrap; gap:5px; }
.pill{
  min-width:34px; height:29px; padding:0 8px;
  border-radius:999px; border:1px solid #d9d9df;
  background:#fff; color:var(--ink);
  font-size:12px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
  transition:all .15s;
}
.pill:hover:not(.disabled){ border-color:#0e0e13; }
.pill.sel{ background:#0e0e13; color:#fff; border-color:#0e0e13; }
.pill.disabled{
  background:#ececec; border-color:transparent; color:#a2a2aa;
  text-decoration:line-through; text-decoration-thickness:1px;
  cursor:not-allowed; opacity:.8;
}
.pill .qdot{ font-size:10px; color:#fff; margin-left:3px; }
.pill.sel .qdot{ color:var(--accent); }

.addbtn{
  margin-top:10px; width:100%; height:40px; border-radius:12px;
  background:var(--accent); color:#16160f; font-size:11.5px; font-weight:800;
  text-transform:uppercase; letter-spacing:.5px;
  display:flex; align-items:center; justify-content:center; gap:7px;
  transition:transform .05s, background .15s;
}
.addbtn:active{ transform:scale(.97); }
.addbtn:hover:not(:disabled){ background:var(--accent-d); }
.addbtn:disabled{ background:#e3e3e7; color:#9a9aa3; cursor:not-allowed; }
.addbtn.ok{ background:var(--green); color:#fff; }
.addbtn.pulse{ animation:pulse .5s ease 1; }
@keyframes pulse{ 0%{transform:scale(1);} 40%{transform:scale(.95);} 100%{transform:scale(1);} }

.noresults{ text-align:center; padding:48px 20px; color:var(--muted); }

/* ── Barra inferior de pedido ───────────────────────────────────────────── */
.cbar{
  position:fixed; left:0; right:0; bottom:0; z-index:70;
  padding:0 12px calc(12px + env(safe-area-inset-bottom));
  pointer-events:none;
}
.cbar-in{
  pointer-events:auto; display:flex; align-items:center; gap:12px;
  width:100%; max-width:560px; margin:0 auto;
  background:#0e0e13; color:#fff; border-radius:18px; padding:10px 10px 10px 12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  animation:fadeUp .25s ease both;
}
.cbar-bag{ display:flex; align-items:center; gap:8px; }
.cbar-n{
  min-width:24px; height:24px; border-radius:999px; background:var(--accent); color:#16160f;
  font-size:12px; font-weight:800; display:grid; place-items:center; padding:0 6px;
}
.cbar-t{ flex:1; text-align:left; min-width:0; display:flex; flex-direction:column; line-height:1.15;}
.cbar-lbl{ font-size:11px; color:#b9b9c2; font-weight:600; letter-spacing:.4px;}
.cbar-price{ font-size:15px; font-weight:800; letter-spacing:-.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cbar-arrow{ font-size:22px; font-weight:400; color:var(--accent); margin-right:6px;}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot{
  max-width:1180px; margin:0 auto; padding:26px 16px calc(20px + env(safe-area-inset-bottom));
  color:var(--muted); font-size:11.5px; text-align:center; line-height:1.8;
}

/* ── Visor de fotos ─────────────────────────────────────────────────────── */
.ovl{
  position:fixed; inset:0; z-index:200; background:rgba(6,6,8,.95);
  display:flex; flex-direction:column; color:#fff;
  animation:fade .2s ease both;
}
@keyframes fade{ from{opacity:0;} to{opacity:1;} }
.viewer-top{ display:flex; align-items:center; gap:8px; padding:12px 12px 4px; }
.viewer-top .iconbtn{ color:#fff; }
.viewer-name{ font-size:12.5px; font-weight:700; opacity:.85; padding-left:4px; }
.viewer-stage{ position:relative; flex:1; display:grid; place-items:center; padding:8px; min-height:0;}
.viewer-stage img{ max-width:100%; max-height:100%; object-fit:contain; }
.nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,.12); color:#fff; font-size:26px; line-height:1;
  display:grid; place-items:center;
}
.nav.prev{ left:8px; } .nav.next{ right:8px; }
.nav:hover{ background:rgba(255,255,255,.25); }
.dots{ display:flex; gap:5px; justify-content:center; padding:8px 0 16px; flex-wrap:wrap;}
.dots i{ width:7px; height:7px; border-radius:999px; background:#555; }
.dots i.on{ background:var(--accent); width:18px; }

/* ── Drawer (carrito/pedido) ────────────────────────────────────────────── */
.drawer-ovl{
  position:fixed; inset:0; z-index:120; background:rgba(10,10,12,.5);
  animation:fade .2s ease both;
}
.drawer{
  position:fixed; z-index:130;
  left:50%; bottom:0; transform:translateX(-50%);
  width:min(560px, 100vw);
  max-height:min(92dvh, 820px);
  background:#fff; border-radius:20px 20px 0 0;
  display:flex; flex-direction:column;
  box-shadow:0 -10px 40px rgba(0,0,0,.25);
  animation:sheetUp .28s cubic-bezier(.2,.8,.3,1) both;
  overflow:hidden;
}
@keyframes sheetUp{ from{ transform:translate(-50%, 100%);} to{ transform:translate(-50%,0);} }
.drawer-h{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px 10px;
}
.drawer-h strong{ font-size:17px; letter-spacing:-.3px; }
.drawer-h .iconbtn{ color:var(--muted); width:34px;height:34px; }
.drawer-h .iconbtn:hover{ background:#f0f0f3; color:#111; }

.pane{ overflow-y:auto; padding:6px 18px 20px; -webkit-overflow-scrolling:touch; }
.pane::-webkit-scrollbar{ width:6px;} .pane::-webkit-scrollbar-thumb{ background:#d8d8de; border-radius:4px;}

/* items del carrito */
.cartitems{ list-style:none; }
.citem{ display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.citem:last-child{ border-bottom:none; }
.citem .ci-img{
  width:64px; height:80px; flex:0 0 auto; border-radius:12px; background:var(--thumb);
  overflow:hidden; display:grid; place-items:center;
}
.citem .ci-img img{ width:100%; height:100%; object-fit:contain; }
.citem .ci-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.citem .ci-name{ font-size:12.5px; font-weight:700; line-height:1.25; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.citem .ci-meta{ margin-top:3px; font-size:11px; color:var(--muted); font-weight:600; }
.citem .ci-size{ display:inline-block; background:#f0f0f3; border-radius:6px; padding:1px 7px; margin-top:4px; font-size:10.5px; font-weight:800; width:max-content;}
.citem .ci-bottom{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:8px;}
.citem .ci-price{ font-size:13px; font-weight:800; }
.citem .ci-price small{ display:block; font-size:10.5px; color:var(--muted); font-weight:600;}
.stepper{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; overflow:hidden;}
.stepper button{ width:30px; height:30px; font-size:17px; font-weight:700; color:var(--ink); display:grid; place-items:center;}
.stepper button:active{ background:#f0f0f3; }
.stepper button:disabled{ color:#c9c9d0; }
.stepper .qty{ min-width:26px; text-align:center; font-size:13px; font-weight:800; }
.ci-del{ width:28px; height:28px; border-radius:8px; color:var(--muted); font-size:14px; display:grid; place-items:center;}
.ci-del:hover{ background:#fbecec; color:var(--danger); }

.cartempty{ text-align:center; padding:44px 10px 30px; color:var(--ink); }
.cartempty p{ font-size:16px; font-weight:700; }
.cartempty .muted{ font-size:12.5px; font-weight:500; margin-top:6px; }

.totals{ border-top:1px dashed var(--line); margin-top:6px; padding-top:12px; }
.totals-row{ display:flex; justify-content:space-between; font-size:14px; font-weight:700; padding:2px 0;}
.totals-row.bs{ color:var(--muted); font-size:12.5px; font-weight:600;}

/* botones */
.btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; height:50px; border-radius:14px;
  font-size:14.5px; font-weight:800; letter-spacing:-.1px;
  margin-top:12px; transition:filter .15s, opacity .15s;
}
.btn:active{ transform:scale(.985); }
.btn-wa{ background:var(--green); color:#fff; }
.btn-wa:hover{ filter:brightness(1.05); }
.btn-wa:disabled{ background:#e0e0e4; color:#a0a0a8; cursor:not-allowed; }
.btn-big{ height:52px; }
.btn-ghost{ background:#f2f2f5; color:var(--ink); }
.btn-ghost:hover{ background:#e9e9ee; }
.btn-small{ height:38px; width:auto; padding:0 16px; margin-top:8px; font-size:13px; }
.hint{ font-size:11.5px; text-align:center; margin-top:10px; }

/* formulario */
.pane form .fld{ display:flex; flex-direction:column; gap:6px; margin-top:14px; }
.fld .lbl, .fld > span:first-child{ font-size:12.5px; font-weight:700; }
.fld input[type=text], .fld input[type=tel], .fld input[type=email], .fld textarea{
  border:1.5px solid var(--line); border-radius:12px; padding:12px 13px; font-size:15px;
  outline:none; background:#fff; color:var(--ink); width:100%;
}
.fld textarea{ resize:vertical; min-height:70px; }
.fld input:focus, .fld textarea:focus{ border-color:#0e0e13; }
.fld .err-msg, .form-err{ color:var(--danger); font-size:12px; font-weight:600;}
.seg{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.seg-opt{ position:relative; }
.seg-opt input{ position:absolute; opacity:0; pointer-events:none; }
.seg-opt span{
  display:flex; align-items:center; justify-content:center; gap:6px;
  border:1.5px solid var(--line); border-radius:12px; padding:12px 8px;
  font-size:12.5px; font-weight:700; text-align:center; cursor:pointer; transition:all .15s;
}
.seg-opt input:checked + span{ border-color:#0e0e13; background:#0e0e13; color:#fff; }
.seg-opt input:focus-visible + span{ outline:2px solid var(--accent); }
.fld-note{ font-size:12px; color:var(--muted); }
.fld-note small{ display:block; margin-top:2px; font-weight:500; }
.fld-note b{ color:var(--ink); font-weight:700; }
.err{ background:#fdecec; color:var(--danger); border-radius:10px; padding:10px 12px; font-size:13px; font-weight:600; margin-top:14px;}

/* enviado */
.done{ text-align:center; padding:20px 6px 10px; }
.done-ico{ font-size:48px; }
.done h3{ font-size:20px; margin:10px 0 6px; letter-spacing:-.4px;}
.done p{ font-size:13.5px; color:var(--muted); max-width:380px; margin:0 auto 6px;}
.copybox{ text-align:left; margin-top:16px; }
.copybox summary{ cursor:pointer; font-size:12.5px; font-weight:700; color:var(--muted); }
.copybox textarea{ width:100%; margin-top:8px; border:1px solid var(--line); border-radius:10px; padding:10px; font-size:12px; }

/* toast */
.toast{
  position:fixed; left:50%; bottom:calc(96px + env(safe-area-inset-bottom)); transform:translateX(-50%);
  z-index:150; background:#0e0e13; color:#fff; font-size:13px; font-weight:700;
  padding:11px 18px; border-radius:999px; box-shadow:0 8px 24px rgba(0,0,0,.3);
  animation:fadeUp .2s ease both; max-width:86vw; text-align:center;
}
body:not(.has-bar) .toast{ bottom:calc(20px + env(safe-area-inset-bottom)); }

/* ── Filtro por etiquetas (customflags) ─────────────────────────────────── */
/* En pantallas pequeñas las etiquetas saltan de línea (sin scroll) para que
   siempre se vea que hay más opciones. */
.tagsbar{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:2px 4px 14px;
}
.tagchip{
  flex:0 0 auto;
  border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:999px; padding:8px 14px; font-size:12.5px; font-weight:700;
  transition:all .15s;
}
.tagchip:hover{ border-color:#c4c4cc; }
.tagchip.on{ background:#0e0e13; color:#fff; border-color:#0e0e13; }
.tagchip.on[data-t="all"]{ background:var(--accent); color:#16160f; border-color:var(--accent); }
@media (max-width:430px){
  .tagsbar{ gap:6px; }
  .tagchip{ padding:7px 12px; font-size:12px; }
}

/* etiquetas sobre la foto */
.flags{
  position:absolute; top:8px; left:8px; z-index:3;
  display:flex; flex-wrap:wrap; gap:4px; max-width:calc(100% - 60px);
}
.flagchip{
  color:#fff; font-size:8.5px; font-weight:800; letter-spacing:.7px;
  text-transform:uppercase; padding:3px 7px; border-radius:4px; line-height:1.1;
  box-shadow:0 1px 2px rgba(0,0,0,.15);
}
.prod .soldout{ top:8px; right:8px; left:auto; }

/* ── Notas informativas (envío/pago) en el carrito ─────────────────────── */
.note-lines{
  margin-top:12px; border-top:1px dashed var(--line); padding-top:10px;
  display:flex; flex-direction:column; gap:7px;
}
.note-line{ font-size:11.5px; color:var(--muted); line-height:1.5; }

/* ── Método de pago ────────────────────────────────────────────────────── */
.pay-seg .seg-opt:first-child{ grid-column:1 / -1; }
.pay-seg .seg-opt span{
  justify-content:flex-start; align-items:flex-start;
  flex-direction:column; gap:2px; text-align:left;
}
.pay-seg .seg-opt small{ font-weight:600; opacity:.8; font-size:10.5px; line-height:1.3; }
@media (max-width:430px){
  .pay-seg{ grid-template-columns:1fr; }
  .pay-seg .seg-opt:first-child{ grid-column:auto; }
}

/* ── Resumen del pedido (subtotal / envío / total) ─────────────────────── */
.sum{
  background:#f7f7f9; border:1px solid var(--line); border-radius:14px;
  padding:13px 14px; margin-top:16px;
  display:flex; flex-direction:column; gap:7px;
}
.sum-row{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:13px; font-weight:600; }
.sum-row .bs{ color:var(--muted); }
.sum-row .free-msg{ color:var(--green); font-weight:800; font-size:12.5px; }
.sum-row .free-msg small{ display:block; color:var(--muted); font-weight:600; font-size:11px; }
.sum-bs{ color:var(--muted); font-size:12px; }
.sum-total{ border-top:1px solid var(--line); margin-top:4px; padding-top:9px; font-size:16px; font-weight:800; letter-spacing:-.3px; }
.sum s{ color:var(--muted); opacity:.8; font-weight:600; }

/* ── Resumen de entrega en el formulario ───────────────────────────────── */
.recap{
  background:#f7f7f9; border:1px solid var(--line); border-radius:12px;
  padding:11px 13px; margin-top:16px; display:flex; flex-direction:column; gap:4px;
}
.recap-h{ display:flex; justify-content:space-between; align-items:center; }
.linkbtn{ color:var(--green-d); font-weight:800; font-size:12.5px; padding:2px; }
.linkbtn:hover{ text-decoration:underline; }
.recap-total{ margin-top:6px; padding-top:6px; border-top:1px dashed var(--line); font-weight:700; color:var(--ink); }

/* ── Dirección de envío (MRW) en el formulario ─────────────────────────── */
.addr{ margin-top:4px; padding-top:14px; border-top:1px dashed var(--line); }
.addr-title{ font-size:12.5px; font-weight:700; margin-bottom:2px; }

/* ── Modal de detalle (galería + nombre + descripción) ─────────────────── */
.pmodal-ovl{
  position:fixed; inset:0; z-index:140; background:rgba(10,10,12,.55);
  animation:fade .2s ease both;
}
.pmodal{
  position:fixed; z-index:150; inset:0; margin:auto;
  width:min(920px, 96vw); height:min(86vh, 720px);
  background:#fff; border-radius:20px; overflow:hidden;
  box-shadow:0 24px 80px rgba(0,0,0,.35);
  display:flex; flex-direction:column;
  animation:zoomIn .22s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes zoomIn{ from{ opacity:0; transform:scale(.95);} to{ opacity:1; transform:none;} }
.pm-x{
  position:absolute; top:12px; right:12px; z-index:5;
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,.92); color:#111; font-size:15px;
  display:grid; place-items:center; box-shadow:0 2px 10px rgba(0,0,0,.18);
}
.pm-x:hover{ background:#fff; }
.pm-grid{
  flex:1; min-height:0; display:grid;
  grid-template-columns:minmax(0,46%) minmax(0,54%);
}
.pm-media{ display:flex; flex-direction:column; background:#f0f0f3; min-height:0; overflow:hidden; }
.pm-stage{
  position:relative; flex:1; min-height:0;
  display:grid; place-items:center; background:var(--thumb);
  overflow:hidden;
}
.pm-stage img{
  position:absolute; inset:0; margin:auto;
  max-width:100%; max-height:100%;
  width:auto; height:auto; object-fit:contain; cursor:zoom-in;
}
.pmodal .nav{ background:rgba(16,16,20,.35); color:#fff; }
.pmodal .nav:hover{ background:rgba(16,16,20,.55); }
.pm-bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:8px 12px; min-height:34px;
}
.pm-counter{ font-size:11.5px; font-weight:700; color:var(--muted); }
.pm-dots{ display:flex; gap:5px; }
.pm-dots i{ width:7px; height:7px; border-radius:999px; background:#c6c6cd; }
.pm-dots i.on{ background:#0e0e13; width:16px; }
.pm-info{ overflow-y:auto; padding:20px 22px 26px; -webkit-overflow-scrolling:touch; }
.pm-info::-webkit-scrollbar{ width:6px; } .pm-info::-webkit-scrollbar-thumb{ background:#d8d8de; border-radius:4px;}
.pm-name{ font-size:19px; font-weight:800; letter-spacing:-.4px; line-height:1.25; }
.pm-desc{
  margin-top:12px; font-size:13.5px; line-height:1.6; color:#2b2b31;
}
.pm-desc p{ margin:.65em 0; }
.pm-desc ul, .pm-desc ol{ margin:.6em 0; padding-left:20px; }
.pm-desc li{ margin:.18em 0; }
.pm-desc b, .pm-desc strong{ font-weight:800; }
.pm-desc img{ max-width:100%; height:auto; border-radius:8px; margin:.4em 0; }
.pm-desc a{ color:var(--green-d); }
.pm-desc.loading{ color:var(--muted); }

@media (max-width:767px){
  .pmodal{ width:100vw; height:100dvh; height:100vh; border-radius:0; inset:0; }
  .pm-grid{ grid-template-columns:none; grid-template-rows:minmax(0,45%) minmax(0,1fr); }
  .pm-info{ padding:16px 16px 22px; }
}

/* accesibilidad :focus */
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
