/* ═════════ Hero de portada (2026-10-08) ═════════
   Igual que mercadoindustrial.pe/?p=inicio: pantalla completa, muros de fotos a los lados
   (tiendas y servicios a la izquierda, grupos de productos reales a la derecha), logo + frase + buscador + menú de
   categorías. La cabecera normal queda oculta y aparece al bajar; al bajar, el buscador y el
   menú del hero se van y queda solo la frase + botones sobre el fondo. Colores: los de la
   marca (azul oscuro #0F172A, naranja #FF5A00, verde #1FAE3A). */
:root{--hero-fondo:#0B1424;--hero-fondo2:#13213A}

body.portada .top{position:fixed;top:0;left:0;right:0;transform:translateY(-100%);opacity:0;transition:transform .32s ease,opacity .25s ease;box-shadow:0 1px 0 var(--linea)}
body.portada.cab-visible .top{transform:none;opacity:1}
body.portada main.wrap{padding-top:0}

.hp{position:relative;min-height:100vh;min-height:100svh;overflow:hidden;color:#fff;background:radial-gradient(ellipse 60% 70% at 50% 40%,var(--hero-fondo2) 0%,var(--hero-fondo) 70%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:72px 24px 110px;margin:0 -40px;perspective:1400px}
@media(max-width:1100px){.hp{margin:0 -24px}}
@media(max-width:640px){.hp{margin:0 -16px;padding:48px 16px 96px}}

/* muros de fotos: tres columnas por lado, desfasadas, con giro suave */
.hp .muro{position:absolute;top:-14%;height:128%;display:flex;gap:10px;transform-style:preserve-3d;pointer-events:none;z-index:0}
.hp .muro-izq{left:-36px;transform:rotateY(13deg) rotateZ(-2deg)}
.hp .muro-der{right:-36px;transform:rotateY(-13deg) rotateZ(2deg);flex-direction:row-reverse}
.hp .muro-col{width:172px;overflow:hidden}
.hp .muro-pista{display:flex;flex-direction:column;gap:10px;will-change:transform}
.hp .muro-pista img{width:172px;height:172px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.12);display:block;background:#fff;filter:brightness(.64) saturate(.72) contrast(.94)}
.hp .muro-izq .muro-pista img{height:230px}
.hp .muro-etiqueta{position:absolute;top:17%;z-index:3;padding:7px 12px;border-radius:999px;background:rgba(11,20,36,.82);border:1px solid rgba(255,255,255,.18);color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em;backdrop-filter:blur(7px);box-shadow:0 8px 24px rgba(0,0,0,.22)}
.hp .muro-izq .muro-etiqueta{right:18px}.hp .muro-der .muro-etiqueta{left:18px}
.hp .muro-izq .c0 .muro-pista{animation:hpSube 44s linear infinite}
.hp .muro-izq .c1 .muro-pista{animation:hpSube 61s linear infinite;animation-delay:-14s}
.hp .muro-izq .c2 .muro-pista{animation:hpSube 53s linear infinite;animation-delay:-31s}
.hp .muro-der .c0 .muro-pista{animation:hpBaja 57s linear infinite;animation-delay:-9s}
.hp .muro-der .c1 .muro-pista{animation:hpBaja 47s linear infinite;animation-delay:-26s}
.hp .muro-der .c2 .muro-pista{animation:hpBaja 64s linear infinite;animation-delay:-38s}
@keyframes hpSube{from{transform:translateY(0)}to{transform:translateY(-50%)}}
@keyframes hpBaja{from{transform:translateY(-50%)}to{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.hp .muro-pista{animation:none!important}}
/* velo: los muros se funden hacia el centro para que el texto siempre se lea */
.hp::before{content:"";position:absolute;inset:0;z-index:1;background:radial-gradient(ellipse 54% 84% at 50% 46%,rgba(11,20,36,.99) 0%,rgba(11,20,36,.94) 46%,rgba(11,20,36,.72) 72%,rgba(11,20,36,.52) 100%)}
.hp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:120px;z-index:1;background:linear-gradient(180deg,rgba(11,20,36,0),var(--hero-fondo))}

.hp .hp-cont{position:relative;z-index:2;max-width:860px;width:100%;transform:translateY(var(--hp-seguimiento,0px));transition:transform .16s linear}
.hp .hp-logo{height:64px;margin:0 auto 58px;display:block}
.hp h1{font-size:50px;line-height:1.08;letter-spacing:-.03em;font-weight:700;margin:0 0 16px;color:#fff}
.hp h1 em{font-style:normal;color:#FF8A4C}
.hp .sub{font-size:17px;line-height:1.55;color:rgba(255,255,255,.72);max-width:620px;margin:0 auto}

/* buscador + menú de categorías: se desvanecen al bajar */
.hp .hp-busca{margin:30px auto 0;max-width:680px;display:flex;background:#fff;border-radius:999px;padding:6px 6px 6px 22px;align-items:center;gap:10px;box-shadow:0 18px 40px -16px rgba(0,0,0,.5);transition:opacity .25s,transform .25s,max-height .3s,margin .3s}
.hp .hp-busca .i{width:20px;height:20px;color:#8A919C;flex:none}
.hp .hp-busca input{flex:1;border:0!important;background:transparent!important;box-shadow:none!important;height:44px;min-height:44px;font-size:15.5px;padding:0;outline:none;color:var(--tinta)}
.hp .hp-busca .btn{height:44px;min-height:44px;border-radius:999px;padding:0 24px;font-weight:600}
.hp .hp-menu{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:16px auto 0;max-width:820px;transition:opacity .25s,transform .25s}
.hp .hp-menu a{display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:999px;background:rgba(255,255,255,.08);color:#E5E7EB;font-size:13.5px;font-weight:500;border:1px solid transparent}
.hp .hp-menu a .i{width:16px;height:16px;color:#B6BEC9}
.hp .hp-menu a:hover{background:rgba(255,255,255,.16);color:#fff}
.hp .hp-menu a.todas{background:transparent;border-color:rgba(255,255,255,.22)}
.hp .hp-menu a.todas:hover{border-color:#fff}

/* accesos principales para compradores y proveedores, visibles desde el inicio */
.hp .hp-acc{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:18px;opacity:1;max-height:80px;overflow:visible;transform:none;transition:opacity .3s .05s,transform .3s .05s,max-height .3s}
.hp .hp-acc .btn{height:48px;min-height:48px;padding:0 22px;font-size:15px}
.hp .hp-acc .btn.vid{background:transparent!important;border-color:rgba(255,255,255,.3);color:#fff}
.hp .hp-acc .btn.vid:hover{border-color:#fff}
body.hero-bajado .hp .hp-busca,body.hero-bajado .hp .hp-menu{opacity:0;transform:translateY(-10px);pointer-events:none;max-height:0;margin-top:0;overflow:hidden}
body.hero-bajado .hp .hp-acc{opacity:1;max-height:80px;transform:none}

/* cifras + cintas de marca al pie */
.hp .hp-pie{position:absolute;left:0;right:0;bottom:0;z-index:2;display:flex;justify-content:center;gap:56px;padding:22px 24px 26px}
.hp .hp-pie b{display:block;font-size:26px;font-weight:700;letter-spacing:-.02em}
.hp .hp-pie span{font-size:13.5px;color:rgba(255,255,255,.62)}
.hp .cinta{position:absolute;bottom:0;height:88px;width:150px;z-index:1;opacity:.95}
.hp .cinta.na{background:var(--naranja);clip-path:polygon(0 0,70% 0,100% 100%,30% 100%)}
.hp .cinta.ve{background:var(--verde);clip-path:polygon(0 0,70% 0,100% 100%,30% 100%)}
.hp .cinta.i1{left:0}.hp .cinta.i2{left:150px}.hp .cinta.d1{right:150px;transform:scaleX(-1)}.hp .cinta.d2{right:0;transform:scaleX(-1)}

@media(max-width:900px){
  .hp .muro{display:none}.hp::before{background:none}
  .hp{background:linear-gradient(180deg,var(--hero-fondo2),var(--hero-fondo))}
  .hp h1{font-size:34px}.hp .hp-logo{height:48px}.hp .sub{font-size:15.5px}
  .hp .hp-menu a span{display:none}.hp .hp-menu a .i{width:18px;height:18px}
  .hp .hp-acc{opacity:1;max-height:none;transform:none;overflow:visible}
  .hp .hp-pie{gap:28px;padding:18px 16px 22px}.hp .hp-pie b{font-size:20px}
  .hp .cinta{display:none}
}

/* ajustes tras captura: sin hueco arriba, muros con más altura de pista, cabecera con sombra al entrar */
body.portada{padding-top:0}
body.portada .top{z-index:80}
body.portada.cab-visible .top{box-shadow:0 2px 12px rgba(15,23,42,.08)}
.hp{margin-top:0}
.hp .muro{top:-20%;height:140%}
.hp .muro-col{width:180px}.hp .muro-pista img{width:180px}

body.portada main.portada-main{padding-top:0;margin-top:0}
body.portada .top + main,body.portada .skip + .top + main{margin-top:0}
/* La portada empieza en el borde superior: anula el espacio que las otras hojas dan al <main> */
body.portada main.portada-main{margin-top:0!important;padding-top:0!important}
body.portada main.portada-main>.hp:first-child{margin-top:0!important}

/* Hero de borde a borde, independiente del ancho del contenedor */
.hp,body.portada .hp{width:100vw;margin-left:calc(50% - 50vw)!important;margin-right:0!important}
/* Con la cabecera visible: el logo y el buscador del centro desaparecen (quedan frase, botones y cifras) */
body.hero-bajado .hp .hp-logo{opacity:0;max-height:0;margin:0;overflow:hidden;transition:opacity .25s,max-height .3s,margin .3s}
.hp .hp-logo{max-height:80px;transition:opacity .25s,max-height .3s,margin .3s}
.hp .hp-busca{margin-top:34px}

/* logo del hero más arriba: bloque central un poco más alto y más aire entre logo y frase */
.hp{justify-content:flex-start;padding-top:min(14vh,130px)}
.hp .hp-logo{margin:0 auto 58px}
@media(max-width:900px){.hp{padding-top:56px}.hp .hp-logo{margin-bottom:38px}}
