/* Tienda He-Me */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
h1, h2, h3 { letter-spacing: -.01em; line-height: 1.2; }

/* Encabezado */
.hdr { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.hdr-in { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.logo-link img { width: 50px; height: 50px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.logo-link span { font-size: 15px; line-height: 1.1; } .logo-link small { display: block; color: var(--muted); font-size: 12px; }
.menu { display: flex; gap: 4px; flex: 1; }
.menu a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.menu a:hover { background: var(--surface-2); color: var(--text); }
.menu a.on { color: var(--accent); background: var(--accent-soft); }
.hdr-acc { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hdr-search { display: flex; align-items: center; position: relative; }
.hdr-search .input { width: 200px; padding: 8px 38px 8px 12px; }
.hdr-search .btn { position: absolute; right: 2px; }
.carrito-btn { position: relative; }
.carrito-btn .cnt { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .hdr-search { display: none; }
  .menu-btn { display: inline-flex; }
  .menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; display: none; box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .logo-link span { display: none; }
}

/* Portada */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(900px 500px at 80% 20%, rgba(59,130,246,.28), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(148,163,184,.14), transparent 60%), var(--bg); }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; opacity: .25; mask-image: linear-gradient(to bottom, #000, transparent 80%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 64px 20px 72px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); margin: 0 0 16px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 560px; margin: 0 0 26px; }
.hero .logo-big { width: min(380px, 80%); justify-self: center; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); animation: flota 6s ease-in-out infinite; }
@keyframes flota { 50% { transform: translateY(-8px) rotate(-1deg); } }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero .chips span { font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }
@media (max-width: 800px) { .hero-in { grid-template-columns: minmax(0, 1fr); padding: 34px 16px 44px; gap: 18px; text-align: center; } .hero .logo-big { width: 200px; order: -1; } .hero p { margin-left: auto; margin-right: auto; } .hero .ctas, .hero .chips { justify-content: center; } }

.seccion { padding: 48px 0; }
.seccion h2 { font-size: 26px; margin: 0 0 6px; }
.seccion .sub { color: var(--muted); margin: 0 0 22px; }
.seccion-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.seccion-head .sub { margin: 0; }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cat { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: #fff; display: flex; align-items: flex-end; }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat:hover img { transform: scale(1.06); }
.cat .sin { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #1e3a8a, #0f172a); }
.cat .sin svg.i { width: 54px; height: 54px; opacity: .35; }
.cat .tx { position: relative; padding: 14px; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.cat .tx b { display: block; font-size: 16px; } .cat .tx span { font-size: 12px; opacity: .8; }

/* Tarjetas de producto */
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
@media (max-width: 560px) { .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.prod { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; }
.prod:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.prod .ph { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.prod .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, transform .4s; }
.prod .ph img.b { opacity: 0; }
.prod:hover .ph img.b { opacity: 1; }
.prod:hover .ph img.a:only-of-type { transform: scale(1.05); }
.prod .ph .sin { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.prod .ph .sin img { position: static; width: 46%; height: auto; opacity: .45; filter: grayscale(.3); }
.prod .etqs { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 1; }
.prod .etqs span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; }
.prod .etqs .of { background: var(--danger); } .prod .etqs .st { background: var(--ok); color: #04130a; } .prod .etqs .dest { background: var(--accent); }
.prod .bd { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod .cat-n { font-size: 12px; color: var(--muted); }
.prod h3 { font-size: 15px; margin: 0; font-weight: 650; }
.prod .res { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .pie { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.precio { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.precio small { font-size: 12px; font-weight: 500; color: var(--muted); }
.precio-ant { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.a-cotizar { font-weight: 700; color: var(--accent); }
.prod .prodt { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.prod .prodt svg.i { width: 14px; height: 14px; }

/* Pasos */
.pasos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: p; }
@media (max-width: 900px) { .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pasos { grid-template-columns: minmax(0, 1fr); } }
.paso { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; position: relative; }
.paso::before { counter-increment: p; content: counter(p); position: absolute; right: 14px; top: 10px; font-size: 40px; font-weight: 800; color: var(--accent); opacity: .18; }
.paso svg.i { width: 28px; height: 28px; color: var(--accent); }
.paso b { display: block; margin: 10px 0 4px; }
.paso p { margin: 0; font-size: 13px; color: var(--text-2); }
.banda { border-radius: 20px; padding: 34px; background: linear-gradient(120deg, #1d4ed8, #1e3a8a 60%, #0f172a); color: #fff; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; }
.banda h2 { margin: 0 0 6px; font-size: 26px; } .banda p { margin: 0; opacity: .85; }
.banda .btn { background: #fff; color: #1e3a8a; border-color: #fff; }
.banda img { position: absolute; right: -40px; bottom: -60px; width: 240px; opacity: .14; transform: rotate(-12deg); }

/* Catálogo */
.cat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 26px 0 50px; align-items: start; }
.filtros { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 18px; }
.filtros h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.filtros a.fc { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.filtros a.fc:hover { background: var(--surface-2); color: var(--text); } .filtros a.fc.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.filtros a.fc span { color: var(--muted); font-size: 12px; }
.btn-filtros { display: none; }
@media (max-width: 860px) { .cat-layout { grid-template-columns: minmax(0, 1fr); } .filtros { position: static; display: none; } .filtros.open { display: flex; } .btn-filtros { display: inline-flex; } }
.paginas { display: flex; gap: 6px; justify-content: center; margin-top: 26px; }

/* Ficha */
.ficha { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; padding: 26px 0 40px; align-items: start; }
@media (max-width: 900px) { .ficha { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.migas { font-size: 13px; color: var(--muted); padding-top: 18px; } .migas a { color: var(--muted); text-decoration: none; } .migas a:hover { color: var(--accent); }
.galeria { position: sticky; top: 86px; }
@media (max-width: 900px) { .galeria { position: static; } }
.g-main { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); aspect-ratio: 1; cursor: zoom-in; }
.g-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .1s; }
.g-main .lupa { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12px; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.g-main .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.5); border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; }
.g-main .nav.p { left: 10px; } .g-main .nav.n { right: 10px; }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.g-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .65; flex: none; background: var(--surface-2); }
.g-thumbs img.on { border-color: var(--accent); opacity: 1; }
.info h1 { font-size: clamp(24px, 3vw, 34px); margin: 6px 0 10px; }
.info .precio { font-size: 32px; }
.chips-info { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip-i { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.chip-i svg.i { width: 16px; height: 16px; color: var(--accent); }
.chip-i.ok svg.i { color: var(--ok); }
.compra { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.cant { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cant button { border: 0; background: var(--surface-2); width: 38px; height: 40px; cursor: pointer; font-size: 18px; }
.cant input { width: 54px; text-align: center; border: 0; background: transparent; height: 40px; outline: none; }
.tabla-car { width: 100%; border-collapse: collapse; }
.tabla-car td { padding: 9px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabla-car td:first-child { color: var(--muted); width: 42%; }
.bloque { margin-top: 26px; } .bloque h3 { font-size: 17px; margin: 0 0 10px; }
.desc { white-space: pre-line; color: var(--text-2); line-height: 1.7; }

/* Formularios / carrito */
.pagina { padding: 28px 0 60px; }
.pagina h1 { font-size: 28px; margin: 0 0 6px; }
.dos { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .dos { grid-template-columns: minmax(0, 1fr); } }
.cart-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item img, .cart-item .sinf { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.medio { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface-2); }
.medio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.medio input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; }
.medio b { display: block; }
.resumen { position: sticky; top: 86px; }
.fila-tot { display: flex; justify-content: space-between; padding: 6px 0; }
.fila-tot.big { font-size: 20px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.dz { display: block; border: 2px dashed var(--border); border-radius: 14px; padding: 24px; text-align: center; cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.dz:hover, .dz.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dz svg.i { width: 34px; height: 34px; display: block; margin: 0 auto 8px; color: var(--accent); }
.prevs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.prev { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 11px; text-align: center; padding: 4px; }
.prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prev button { position: absolute; right: 4px; top: 4px; background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 6px; padding: 3px; cursor: pointer; z-index: 1; }
.req::after { content: ' *'; color: var(--danger); }
.ok-grande { text-align: center; padding: 40px 20px; }
.ok-grande .circ { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.ok-grande .circ svg.i { width: 40px; height: 40px; }
.linea-tiempo { display: flex; gap: 0; margin: 18px 0; }
.linea-tiempo div { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 26px; }
.linea-tiempo div::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--border); z-index: 1; }
.linea-tiempo div::after { content: ''; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.linea-tiempo div:first-child::after { display: none; }
.linea-tiempo div.on { color: var(--text); font-weight: 600; } .linea-tiempo div.on::before { background: var(--accent); border-color: var(--accent); } .linea-tiempo div.on::after { background: var(--accent); }
.dato-copiar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dato-copiar b { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }

/* Pie */
.ftr { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.ftr-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 26px; padding: 36px 20px; }
@media (max-width: 760px) { .ftr-in { grid-template-columns: minmax(0, 1fr); } }
.ftr h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ftr a { color: var(--text-2); text-decoration: none; } .ftr a:hover { color: var(--accent); }
.ftr .li { display: flex; gap: 8px; align-items: center; margin: 7px 0; color: var(--text-2); font-size: 14px; }
.ftr .li svg.i { color: var(--accent); width: 16px; height: 16px; }
.ftr .copy { border-top: 1px solid var(--border); padding: 14px 20px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 90; transition: transform .15s; }
.wa-float:hover { transform: scale(1.08); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (max-width: 520px) { .txt-instalar { display: none; } }
/* Nunca más ancho que la pantalla (galerías y tablas largas se desplazan dentro de su caja) */
html, body { max-width: 100%; overflow-x: hidden; }
.ficha > *, .cat-layout > *, .dos > *, .info, .galeria, .compra, .bloque { min-width: 0; }
.tabla-car td { word-break: break-word; }
.g-thumbs { max-width: 100%; }
