/* =====================================================================
   assets/css/historias.css — Historias (ver assets/js/historias.js)
   Colores Wiime: morado #7C3AED, rosado #FE2C55, azul #2563EB
   ===================================================================== */
:root { --hi-deg: linear-gradient(45deg, #7C3AED, #FE2C55); }
html.hi-abierto, html.hi-abierto body { overflow: hidden !important; }

/* ---------- Anillo en cualquier foto/logo con data-hist-tienda ---------- */
[data-hist-tienda].hi-tiene { cursor: pointer; }
img[data-hist-tienda].hi-tiene, .hi-anillo-img.hi-tiene { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FE2C55; }
img[data-hist-tienda].hi-tiene.hi-visto, .hi-anillo-img.hi-tiene.hi-visto { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #d4d0dc; }

/* ---------- Circulitos de la fila ---------- */
.hi-c { flex: none; width: 72px; border: none; background: none; padding: 0; text-align: center; cursor: pointer; font-family: inherit; color: #161823; }
.hi-c-ani { position: relative; display: block; width: 66px; height: 66px; margin: 0 auto; border-radius: 50%; padding: 3px; background: #e4e1ea; }
.hi-c.hi-tiene .hi-c-ani { background: var(--hi-deg); }
.hi-c.hi-tiene.hi-visto .hi-c-ani { background: #d4d0dc; }
.hi-c-foto { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; overflow: hidden; background: #0b0b3b; color: #fff; }
.hi-c-foto img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.hi-c-foto b { font-size: 19px; font-weight: 900; }
.hi-c-mas { position: absolute; right: -1px; bottom: -1px; width: 23px; height: 23px; border-radius: 50%; background: #7C3AED; color: #fff; border: 2.5px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal; }
.hi-c-n { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Visor ---------- */
.hi-ver { position: fixed; inset: 0; z-index: 100100; background: #0c0912; display: flex; align-items: center; justify-content: center; animation: hiEntra .2s ease; touch-action: none; -webkit-user-select: none; user-select: none; }
.hi-ver.fuera { opacity: 0; transition: opacity .2s; }
@keyframes hiEntra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.hi-ver-caja { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.hi-ver-img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hi-ver-img img { width: 100%; height: 100%; object-fit: contain; display: block; -webkit-user-drag: none; }
.hi-ver.cargando .hi-ver-img img { opacity: .2; }
.hi-ver-img .hi-cargando { position: absolute; left: 50%; top: 50%; margin: -16px 0 0 -16px; display: none; }
.hi-ver.cargando .hi-ver-img .hi-cargando { display: block; }
.hi-ver-sa { position: absolute; left: 0; right: 0; top: 0; height: 150px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.hi-ver-sb { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.hi-barras { position: absolute; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); display: flex; gap: 4px; z-index: 3; }
.hi-barras i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.hi-barras i b { display: block; height: 100%; width: 0; background: #fff; }
.hi-barras i.llena b { width: 100% !important; }
.hi-cab { position: absolute; left: 12px; right: 56px; top: calc(24px + env(safe-area-inset-top)); z-index: 4; }
.hi-cab-t { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; max-width: 100%; }
.hi-cab-t img, .hi-cab-t > span:first-child:not(:last-child) { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; flex: none; background: #fff; }
.hi-cab-t > span:first-child:not(:last-child) { display: flex; align-items: center; justify-content: center; background: #7C3AED; font-weight: 900; }
.hi-cab-t b { display: block; font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.hi-cab-t em { font-style: normal; background: #2563EB; font-size: 9px; font-weight: 900; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.hi-cab-t small { display: block; color: #e5e5e5; font-size: 12px; }
.hi-x { position: absolute; right: 8px; top: calc(20px + env(safe-area-inset-top)); z-index: 6; width: 44px; height: 44px; border: none; background: none; color: #fff; font-size: 24px; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.hi-toque { position: absolute; top: 80px; bottom: 150px; z-index: 2; }
.hi-toque.izq { left: 0; width: 30%; } .hi-toque.der { right: 0; width: 70%; }
.hi-pie { position: absolute; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; gap: 10px; }
.hi-prod { display: flex; align-items: center; gap: 11px; background: #fff; color: #161823; border-radius: 16px; padding: 9px; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.hi-prod img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: #f3f1f6; }
.hi-prod span { flex: 1; min-width: 0; }
.hi-prod b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-prod em { font-style: normal; color: #7C3AED; font-weight: 900; font-size: 16px; }
.hi-prod i { flex: none; font-style: normal; background: #FE2C55; color: #fff; font-weight: 800; font-size: 13.5px; border-radius: 10px; padding: 10px 12px; white-space: nowrap; }
.hi-pie-fila { display: flex; align-items: center; gap: 10px; }
.hi-pie-fila .sp { flex: 1; }
.hi-msg { flex: 1; min-width: 0; height: 46px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 24px; color: #fff; display: flex; align-items: center; padding: 0 16px; font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-comp { flex: none; width: 46px; height: 46px; border: none; background: none; color: #fff; font-size: 23px; cursor: pointer; }
.hi-vistas { color: #fff; font-weight: 700; font-size: 14px; }
.hi-borrar, .hi-nueva { border: none; border-radius: 20px; padding: 10px 14px; font-weight: 800; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.hi-borrar { background: rgba(255,255,255,.18); color: #fff; }
.hi-borrar.seguro { background: #FE2C55; }
.hi-nueva { background: #fff; color: #7C3AED; }
.hi-flecha, .hi-ver-lados { display: none; }

/* Computadora: la historia al centro (9:16), las tiendas de al lado y flechas */
@media (min-width: 768px) {
  .hi-ver-caja { width: min(440px, calc((100vh - 60px) * 9 / 16)); height: calc(100vh - 60px); border-radius: 16px; }
  .hi-x { position: fixed; right: 22px; top: 18px; font-size: 30px; }
  .hi-flecha { display: flex; align-items: center; justify-content: center; position: absolute; top: 50%; margin-top: -20px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: none; background: #fff; color: #161823; cursor: pointer; }
  .hi-flecha.izq { left: calc(50% - min(440px, calc((100vh - 60px) * 9 / 16)) / 2 - 56px); }
  .hi-flecha.der { right: calc(50% - min(440px, calc((100vh - 60px) * 9 / 16)) / 2 - 56px); }
  .hi-ver-lados { display: block; position: absolute; inset: 0; pointer-events: none; }
  .hi-lado { position: absolute; top: 50%; width: 230px; height: 410px; margin-top: -205px; border-radius: 14px; overflow: hidden; pointer-events: auto; cursor: pointer; display: none; }
  .hi-lado.hay { display: block; }
  .hi-lado.izq { right: calc(50% + min(440px, calc((100vh - 60px) * 9 / 16)) / 2 + 80px); }
  .hi-lado.der { left: calc(50% + min(440px, calc((100vh - 60px) * 9 / 16)) / 2 + 80px); }
  .hi-lado-f { position: absolute; inset: 0; background: #222 center / cover; opacity: .45; }
  .hi-lado-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; gap: 4px; }
  .hi-lado-t img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FE2C55; margin-bottom: 6px; background: #fff; }
  .hi-lado-t b { font-size: 15px; } .hi-lado-t small { color: #ccc; font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 1150px) { .hi-ver-lados { display: none; } }

/* ---------- Crear historia ---------- */
.hi-crear { position: fixed; inset: 0; z-index: 100100; background: #0e0b16; color: #fff; display: flex; flex-direction: column; font-family: inherit; }
.hi-cr-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 8px 8px; }
.hi-cr-top b { font-size: 16px; }
.hi-cr-top button { width: 44px; height: 44px; border: none; background: none; color: #fff; font-size: 22px; cursor: pointer; }
.hi-cr-img { position: relative; flex: 1; min-height: 0; margin: 0 10px; border-radius: 18px; overflow: hidden; background: #1c1726; display: flex; align-items: center; justify-content: center; }
.hi-cr-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hi-cr-img .hi-cargando { position: absolute; display: none; }
.hi-crear.cargando .hi-cr-img .hi-cargando { display: block; }
.hi-cr-abajo { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
.hi-cr-prod { width: 100%; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); border: 1.5px dashed rgba(255,255,255,.35); border-radius: 14px; padding: 9px 11px; margin-bottom: 12px; color: #fff; text-align: left; cursor: pointer; font-family: inherit; }
.hi-cr-prod.con { border-style: solid; border-color: #7C3AED; background: rgba(124,58,237,.18); }
.hi-cr-prod-f { flex: none; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 17px; color: #c4b5fd; }
.hi-cr-prod-f img { width: 100%; height: 100%; object-fit: cover; }
.hi-cr-prod-t { flex: 1; min-width: 0; }
.hi-cr-prod-t b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-cr-prod-t b small { color: #a8a1b8; font-weight: 600; }
.hi-cr-prod-t > small { color: #c4b5fd; font-size: 12px; }
.hi-cr-pub { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border: none; border-radius: 14px; background: #FE2C55; color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; font-family: inherit; }
.hi-cr-pub:disabled { opacity: .7; }
.hi-cr-nota { text-align: center; color: #a8a1b8; font-size: 12px; margin-top: 9px; }
.hi-cr-lista { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; background: #fff; color: #161823; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: hiSube .2s ease-out; }
.hi-cr-lista[hidden] { display: none; }
@keyframes hiSube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.hi-cr-lista-cab { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px; }
.hi-cr-lista-cab b { font-size: 16px; }
.hi-cr-lista-cab button { border: none; background: none; height: 40px; min-width: 40px; font-size: 16px; color: #161823; cursor: pointer; font-family: inherit; }
.hi-cr-quitar { font-size: 13.5px !important; font-weight: 800; color: #FE2C55 !important; padding: 0 10px; }
.hi-cr-buscar { display: flex; align-items: center; gap: 8px; margin: 0 14px 8px; background: #F2F1F5; border-radius: 12px; padding: 0 12px; height: 42px; color: #8a8597; }
.hi-cr-buscar input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 16px; color: #161823; }
.hi-cr-items { flex: 1; overflow-y: auto; padding: 0 10px 20px; }
.hi-cr-item { width: 100%; display: flex; align-items: center; gap: 11px; border: none; background: none; padding: 8px 6px; border-radius: 12px; text-align: left; cursor: pointer; font-family: inherit; color: #161823; }
.hi-cr-item.on { background: #F3E8FF; }
.hi-cr-item img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; flex: none; background: #f3f1f6; }
.hi-cr-item span { min-width: 0; } .hi-cr-item b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-cr-item small { color: #7C3AED; font-weight: 800; font-size: 13px; }
.hi-cr-vacio { text-align: center; color: #8a8597; padding: 30px 10px; font-size: 14px; }
@media (min-width: 768px) {
  .hi-crear { left: 50%; top: 30px; bottom: 30px; right: auto; width: 440px; transform: translateX(-50%); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(10,8,18,.8); }
}

/* ---------- La hojita del ➕ ---------- */
.hi-hoja-fondo { position: fixed; inset: 0; z-index: 100090; background: rgba(14,10,28,0); transition: background .2s; display: flex; align-items: flex-end; justify-content: center; }
.hi-hoja-fondo.ver { background: rgba(14,10,28,.55); }
.hi-hoja { width: 100%; max-width: 480px; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease-out; font-family: inherit; color: #161823; }
.hi-hoja-fondo.ver .hi-hoja { transform: none; }
.hi-hoja-ag { width: 40px; height: 4px; border-radius: 3px; background: #ddd; margin: 0 auto 12px; }
.hi-hoja-t { display: block; text-align: center; font-size: 16px; margin-bottom: 12px; }
.hi-hoja button { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px; border: none; border-radius: 14px; margin-bottom: 8px; background: #F7F5FB; text-align: left; cursor: pointer; font-family: inherit; color: #161823; }
.hi-hoja button:hover { background: #F0ECF8; }
.hi-hoja .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff; flex: none; }
.hi-hoja .ic.deg { background: var(--hi-deg); } .hi-hoja .ic.azul { background: #2563EB; } .hi-hoja .ic.negro { background: #161823; }
.hi-hoja button b { display: block; font-size: 15px; }
.hi-hoja button small { color: #6b6478; font-size: 12.5px; }
.hi-hoja .hi-hoja-can { justify-content: center; background: none; font-weight: 800; color: #6b6478; margin: 4px 0 0; }
@media (min-width: 768px) { .hi-hoja-fondo { align-items: center; } .hi-hoja { border-radius: 20px; padding-bottom: 16px; } }

/* ---------- Avisos y "cargando" ---------- */
.hi-aviso { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); z-index: 100200; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; background: #161823; color: #fff; border-radius: 22px; padding: 10px 16px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .25s, opacity .25s; max-width: calc(100vw - 24px); font-family: inherit; }
.hi-aviso.ver { transform: translate(-50%, 0); opacity: 1; }
.hi-aviso i { color: #22c55e; } .hi-aviso.error i { color: #fb7185; }
.hi-cargando { display: inline-block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: hiGira .8s linear infinite; }
.hi-cargando.chico { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }
.hi-cr-vacio .hi-cargando { border-color: #e5e1ec; border-top-color: #7C3AED; }
@keyframes hiGira { to { transform: rotate(360deg); } }

/* ---------- El círculo del perfil (cuenta/perfil): foto, ➕ y anillo solo si hay historia ---------- */
.pf-av[data-hist-anillo], .pf-av { background: #e4e1ea !important; }
.pf-av.hi-tiene { background: var(--hi-deg) !important; }
.pf-av.hi-tiene.hi-visto { background: #c9c4d6 !important; }
.pf-ini.con-foto, [data-foto-yo].con-foto { padding: 0; overflow: hidden; }
.pf-ini img, [data-foto-yo] img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hi-av-pc { position: relative; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.hi-av-pc > span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.hi-av-pc.hi-tiene { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #FE2C55 !important; }
.hi-av-pc.hi-tiene.hi-visto { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #c9c4d6 !important; }
.hi-av-mas { position: absolute; right: -2px; bottom: 0; width: 28px; height: 28px; border-radius: 50%; background: #FE2C55; color: #fff; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.hi-av-pc:hover .hi-av-mas { transform: scale(1.1); }

/* ---------- Perfil público: el círculo solo lleva color si hay historia ---------- */
.pp-av { background: #e4e1ea !important; }
.pp-av.hi-tiene { background: var(--hi-deg) !important; }
.pp-av.hi-tiene.hi-visto { background: #c9c4d6 !important; }
.pp-av span.con-foto { overflow: hidden; padding: 0; }
.pp-av span img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* ---------- Inicio ---------- */
.im-hist-fotos { display: contents; }
.im-historias .hi-c { width: 66px; }
.im-historias .hi-c-ani { width: 64px; height: 64px; padding: 2.5px; }
.im-historias .hi-c-n { margin-top: 8px; font-size: 11px; font-weight: 600; }
.ic-hist.hi-vacia { display: none; }
.ic-hist-fila { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.ic-hist-fila::-webkit-scrollbar { display: none; }
.ic-hist-fila .hi-c { width: 86px; }
.ic-hist-fila .hi-c-ani { width: 80px; height: 80px; }
.ic-hist-fila .hi-c-n { font-size: 13px; }
.ic-hist-fila .hi-c:hover .hi-c-ani { transform: scale(1.04); }
.hi-c-ani { transition: transform .15s; }

/* ---------- Descubrir: el logo de la tienda con anillo abre su historia ---------- */
.dv-logo.hi-tiene img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #FE2C55; }
.dv-logo.hi-tiene.hi-visto img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9c4d6; }
.px-logo { border-color: #ece9f2 !important; }
.px-logo.hi-tiene { border: none !important; background: var(--hi-deg) !important; padding: 3px !important; }
.px-logo.hi-tiene img { border: 2px solid #fff; }
.px-logo.hi-tiene.hi-visto { background: #c9c4d6 !important; }
.px-logo.vivo { border-color: #FE2C55 !important; }

/* ---------- Descubrir (celular): la fila de historias dentro de la primera tarjeta ---------- */
.ds-hist { flex: none; margin: -4px -2px 8px; }
.ds-hist.hi-vacia { display: none; }
.ds-hist-fila { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 2px; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
.ds-hist-fila::-webkit-scrollbar { display: none; }
.ds-hist .hi-c { width: 64px; }
.ds-hist .hi-c-ani { width: 60px; height: 60px; }
.ds-hist .hi-c-n { font-size: 11px; margin-top: 4px; }
@media (min-width: 768px) { .ds-hist { display: none !important; } }

/* =====================================================================
   📸 Historias como TARJETAS en Descubrir (entre los productos)
   ===================================================================== */
.ds-historia .hcx { position: relative; overflow: hidden; background: #15111f; }
.hcx-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; -webkit-user-drag: none; user-select: none; }
.hcx-img.on { opacity: 1; }
.hcx-sa { position: absolute; left: 0; right: 0; top: 0; height: 130px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; z-index: 1; }
.hcx-sb { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none; z-index: 1; }
.hcx-bar { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 4px; z-index: 3; }
.hcx-bar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); overflow: hidden; }
.hcx-bar i b { display: block; height: 100%; width: 0; background: #fff; }
.hcx-cab { position: absolute; left: 10px; right: 96px; top: 22px; z-index: 4; display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.hcx-cab:hover { color: #fff; }
.hcx-cab .lg { width: 38px; height: 38px; border-radius: 50%; padding: 2px; background: var(--hi-deg); flex: none; }
.hcx-cab .lg img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; object-fit: cover; background: #fff; display: block; }
.hcx-cab-t { min-width: 0; }
.hcx-cab-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hcx-cab-t em { font-style: normal; background: #2563EB; font-size: 8.5px; font-weight: 900; border-radius: 4px; padding: 1px 5px; margin-left: 5px; vertical-align: 2px; }
.hcx-cab-t small { font-size: 11.5px; color: #eee; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hcx-chip { position: absolute; right: 10px; top: 26px; z-index: 4; background: var(--hi-deg); color: #fff; font-weight: 900; font-size: 10.5px; letter-spacing: .5px; border-radius: 12px; padding: 4px 9px; pointer-events: none; }
.hcx-z { position: absolute; top: 70px; bottom: 80px; z-index: 2; border: none; background: none; padding: 0; cursor: pointer; }
.hcx-z.izq { left: 0; width: 32%; } .hcx-z.der { right: 0; width: 68%; }
.hcx-prodw { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 4; }
.hcx-prod { display: flex; align-items: center; gap: 9px; background: #fff; color: #161823; border-radius: 14px; padding: 7px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.hcx-prod:hover { color: #161823; }
.hcx-prod img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; background: #f3f1f6; }
.hcx-prod span { flex: 1; min-width: 0; }
.hcx-prod b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcx-prod em { font-style: normal; color: #7C3AED; font-weight: 900; font-size: 14px; }
.hcx-prod i { flex: none; font-style: normal; background: #FE2C55; color: #fff; font-weight: 800; font-size: 12.5px; border-radius: 9px; padding: 9px 10px; white-space: nowrap; }
.hcx-linea { font-size: 12.5px; color: #4B3F66; font-weight: 700; margin-top: 4px; }
.hcx-linea i { color: #7C3AED; margin-right: 3px; }
/* Computadora: la tarjeta va a la izquierda (la foto entera, sin recortar) */
@media (min-width: 768px) {
  .ds-pc .ds-historia .hcx-img { object-fit: contain; }
  .ds-pc .hcx-prodw { display: none; }   /* en la computadora el producto sale en el panel */
  .hpx-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--hi-deg); color: #fff; font-weight: 900; font-size: 11.5px; border-radius: 12px; padding: 4px 11px; margin: 14px 0 6px; }
  .hpx-t { font-size: 19px; font-weight: 900; margin: 2px 0 4px; color: #161823; }
  .hpx-s { color: #6b6478; font-size: 13.5px; }
  .hpx-prod { display: flex; gap: 12px; align-items: center; border: 1px solid #ece9f2; border-radius: 16px; padding: 12px; margin-top: 16px; color: #161823; text-decoration: none; }
  .hpx-prod:hover { border-color: #d9d2ea; color: #161823; }
  .hpx-prod img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
  .hpx-prod b { display: block; font-size: 15px; } .hpx-prod em { font-style: normal; color: #7C3AED; font-weight: 900; font-size: 21px; }
  .hpx-mas { margin-top: 16px; font-weight: 800; font-size: 14px; color: #161823; }
  .hpx-minis { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
  .hpx-minis button { width: 58px; height: 94px; border-radius: 10px; background: #333 center / cover; border: 2px solid transparent; cursor: pointer; padding: 0; }
  .hpx-minis button.on { border-color: #7C3AED; box-shadow: 0 0 0 2px #E9DDFE; }
  .hpx-msg { margin-top: 16px; height: 44px; border-radius: 22px; background: #F2F1F5; display: flex; align-items: center; gap: 8px; padding: 0 16px; color: #6b6478; font-size: 14px; text-decoration: none; }
  .hpx-msg:hover { background: #ebe8f1; color: #161823; }
}

/* ---------- Inicio (computadora): historias mezcladas en "Más productos" ---------- */
.ich .ich-img { padding: 3px; background: var(--hi-deg); }
.ich-f { position: absolute; inset: 3px; border-radius: 13px; background: #222 center / cover no-repeat; overflow: hidden; transition: transform .25s; }
.ich-f::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.45), transparent 35%, transparent 60%, rgba(0,0,0,.5)); }
.ich:hover .ich-f { transform: scale(1.02); }
.ich-bar { position: absolute; left: 12px; right: 12px; top: 11px; display: flex; gap: 3px; z-index: 2; }
.ich-bar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.45); }
.ich-bar i.on { background: #fff; }
.ich-chip { position: absolute; right: 10px; top: 22px; z-index: 2; background: var(--hi-deg); color: #fff; font-weight: 900; font-size: 10px; letter-spacing: .5px; border-radius: 10px; padding: 3px 8px; }
.ich-lg { position: absolute; left: 10px; top: 22px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; padding: 2px; background: var(--hi-deg); }
.ich-lg img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; object-fit: cover; background: #fff; display: block; }
.ich-ver { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.95); font-weight: 800; font-size: 13px; color: #161823; }
.ich-ver i { color: #FE2C55; }
.ich:hover .ich-ver { background: #fff; }
.ich-tienda img { border: 2px solid #FE2C55 !important; }
.ich-sub { font-size: 13px; color: #6b6478; margin-top: 3px; }
.ich-sub i { color: #7C3AED; }

/* ---------- 👁 Quién vio mi historia ---------- */
button.hi-vistas { border: none; background: rgba(255,255,255,.16); border-radius: 18px; padding: 9px 13px; cursor: pointer; font-family: inherit; }
button.hi-vistas:hover { background: rgba(255,255,255,.26); }
.hi-vistas-fl { font-size: 10px; margin-left: 3px; opacity: .8; }
.hi-quienes { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: 8; background: #fff; color: #161823; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: hiSube .2s ease-out; }
.hi-q-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 16px; border-bottom: 1px solid #f0eef4; }
.hi-q-cab b { font-size: 16px; }
.hi-q-cab button { width: 38px; height: 38px; border: none; background: none; font-size: 19px; color: #6b6478; cursor: pointer; }
.hi-q-lista { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.hi-q-p { display: flex; align-items: center; gap: 11px; padding: 8px 4px; border-bottom: 1px solid #f6f4f9; }
.hi-q-f { width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden; background: #7C3AED; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; }
.hi-q-f img { width: 100%; height: 100%; object-fit: cover; }
.hi-q-p.sin .hi-q-f { background: #ece9f2; color: #8a8597; }
.hi-q-n { flex: 1; min-width: 0; }
.hi-q-n b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-q-n small { color: #8a8597; font-size: 12.5px; }
.hi-q-h { color: #8a8597; font-size: 12px; flex: none; }
.hi-q-vacio { text-align: center; color: #8a8597; padding: 30px 10px; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hi-q-vacio i { font-size: 26px; color: #c9c4d6; } .hi-q-vacio b { color: #161823; font-size: 15px; }
.hi-q-vacio .hi-cargando { border-color: #e5e1ec; border-top-color: #7C3AED; }
