/* Estilo oscuro tipo gamer. Colores en variables: cambiar acá y cambia toda la web. */
:root {
  --fondo: #0a0c11;
  --superficie: #12161e;
  --superficie-2: #191e29;
  --borde: #252c3a;
  --texto: #e9edf5;
  --suave: #8d97aa;
  --acento: #22e1ff;          /* cian eléctrico: color de la marca */
  --acento-oscuro: #0aa9c4;
  --acento-texto: #04141a;    /* texto sobre el cian */
  --wa: #25d366;
  --wa-oscuro: #1eb257;
  --nuevo: #ffb020;
  --oferta: #ff3d6e;
  --foto: #eef1f6;            /* recuadro claro: las fotos vienen con fondo blanco */
  --radio: 14px;
  --brillo: 0 0 0 1px rgba(34, 225, 255, .35), 0 0 22px rgba(34, 225, 255, .18);
  --titulos: "Chakra Petch", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0; overflow-x: clip; background: var(--fondo); color: var(--texto);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 12, 17, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
.barra::after {   /* línea de luz debajo */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--acento), transparent); opacity: .6;
}
.marca {
  font-family: var(--titulos); font-weight: 700; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.marca::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 2px; background: var(--acento); box-shadow: 0 0 10px var(--acento); transform: rotate(45deg) translateY(-2px); }
.buscador { flex: 1; min-width: 0; }
.buscador input {
  width: 100%; height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); font: inherit;
}
.buscador input::placeholder { color: var(--suave); }
.buscador input:focus { outline: none; border-color: var(--acento); box-shadow: var(--brillo); }
.btn-carrito {
  position: relative; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie);
  display: grid; place-items: center;
}
.btn-carrito:hover { border-color: var(--acento); }
.btn-carrito svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn-carrito svg circle { fill: currentColor; stroke: none; }
.contador {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--acento); color: var(--acento-texto);
  font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 10px rgba(34,225,255,.6);
}
.contador.vacio { display: none; }
@media (max-width: 520px) {
  .barra { flex-wrap: wrap; }
  .buscador { order: 3; flex-basis: 100%; }
  .marca { flex: 1; }
}

main { max-width: 1120px; margin: 0 auto; padding: 16px; min-height: 70vh; }
h1, h2 { font-family: var(--titulos); letter-spacing: .02em; }
h1 { font-size: 24px; margin: 4px 0 12px; }
h2 { font-size: 19px; margin: 26px 0 12px; text-transform: uppercase; }
h2::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--acento); }

/* Portada */
/* Portada: el nombre entero, el lema, los botones y los datos. */
.portada { padding: 14px 0 30px; border-bottom: 1px solid var(--borde); margin-bottom: 8px; }
.portada h1 { margin: 0 0 10px; font: 700 clamp(46px, 12vw, 108px)/.95 var(--titulos); letter-spacing: -.015em; }
.portada .lema { margin: 0 0 8px; font: 600 clamp(20px, 3.6vw, 27px)/1.2 var(--titulos); }
.portada .detalle { margin: 0; max-width: 480px; color: var(--suave); }
.portada .acciones-portada { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn-claro {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px;
  border: 0; border-radius: 10px; background: var(--acento); color: var(--acento-texto); font-weight: 800;
}
.btn-claro:hover { background: #6aeeff; }
.hechos { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--suave); }
.hechos b { color: var(--texto); }

/* Categorías */
.categorias { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .categorias { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat:hover { border-color: var(--acento); box-shadow: var(--brillo); transform: translateY(-2px); }
.cat svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--acento); stroke-width: 1.6; filter: drop-shadow(0 0 6px rgba(34,225,255,.5)); }
.cat span { min-width: 0; }
.cat b { display: block; font-family: var(--titulos); font-size: 16px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.cat small { color: var(--suave); }
@media (max-width: 400px) { .cat { gap: 8px; padding: 12px 10px; } .cat svg { width: 28px; height: 28px; } .cat b { font-size: 14px; } }

/* Filtros */
.migas { font-size: 13px; color: var(--suave); margin-bottom: 4px; }
.migas a { color: var(--acento); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--borde); background: var(--superficie); font-size: 14px;
}
.chip:hover { border-color: var(--acento); }
.chip.activo { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); font-weight: 700; }
.chips.marcas { margin-top: -4px; }
.chips.marcas:empty { display: none; }
.chips.marcas .chip { height: 30px; padding: 0 12px; font-size: 12px; letter-spacing: .03em; }
.resumen { color: var(--suave); font-size: 13px; margin: 0 0 10px; }

/* Grilla de productos */
.grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 960px) { .grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.prod {
  position: relative; display: flex; flex-direction: column;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.prod:hover { border-color: rgba(34, 225, 255, .6); box-shadow: var(--brillo); transform: translateY(-2px); }
.prod .foto { aspect-ratio: 1; margin: 8px 8px 0; border-radius: 10px; background: var(--foto); display: grid; place-items: center; padding: 10px; }
.prod .foto img { width: 100%; height: 100%; object-fit: contain; }
.sin-foto svg { width: 46%; fill: none; stroke: #a8b0bf; stroke-width: 1.4; }
.prod .info { padding: 10px 10px 0; flex: 1; }
.prod .marca-p { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--acento); text-transform: uppercase; }
.prod .nombre {
  font-size: 13.5px; font-weight: 500; margin: 3px 0 0; color: var(--texto);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.etiqueta {
  position: absolute; top: 14px; left: 14px; z-index: 1; padding: 3px 9px; border-radius: 6px;
  background: var(--nuevo); color: #1a1200; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.etiqueta.oferta { background: var(--oferta); color: #fff; box-shadow: 0 0 12px rgba(255, 61, 110, .55); }
.agregar {
  margin: 10px; height: 38px; border-radius: 9px;
  border: 1px solid var(--acento); background: transparent; color: var(--acento); font-weight: 700; font-size: 14px;
  transition: background .15s, color .15s;
}
.agregar:hover { background: rgba(34, 225, 255, .1); }
.agregar.en-carrito { background: var(--acento); color: var(--acento-texto); }
.mas { display: block; margin: 18px auto 0; height: 42px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--borde); background: var(--superficie); }

/* Tarjeta "no encontrás" */
.consulta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; padding: 18px; border-radius: var(--radio);
  background: linear-gradient(135deg, rgba(37, 211, 102, .1), transparent 60%), var(--superficie);
  border: 1px solid var(--borde);
}
.consulta p { margin: 0; }
.btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--wa); color: #052e16; font-weight: 800;
}
.btn-wa:hover { background: var(--wa-oscuro); }
.btn-wa:disabled { opacity: .5; cursor: not-allowed; }

/* Ficha de producto */
.ficha { display: grid; gap: 18px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 18px; padding: 16px; }
@media (min-width: 760px) { .ficha { grid-template-columns: 360px 1fr; align-items: start; padding: 22px; } }
.ficha .foto { aspect-ratio: 1; display: grid; place-items: center; background: var(--foto); border-radius: 12px; padding: 18px; }
.ficha .foto img { width: 100%; height: 100%; object-fit: contain; }
.ficha h1 { font-size: 22px; line-height: 1.2; }
.ficha .datos { color: var(--suave); margin: 0 0 16px; }
.ficha .acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.ficha .agregar { margin: 0; height: 44px; padding: 0 18px; }
.ficha .nota { color: var(--suave); font-size: 13px; margin-top: 16px; }
.compartir { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--borde); background: var(--superficie-2); }
.compartir:hover { border-color: var(--acento); }

/* Carrito */
.velo { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); }
.carrito {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  display: flex; flex-direction: column; background: var(--superficie); border-left: 1px solid var(--borde);
}
.carrito-cab { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--borde); }
.carrito-cab h2 { margin: 0; }
.carrito-cab h2::after { display: none; }
.cerrar { width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--suave); }
.carrito-lista { list-style: none; margin: 0; padding: 8px 16px; overflow-y: auto; flex: 1; }
.carrito-lista li { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.carrito-lista img, .carrito-lista .sin-foto { width: 58px; height: 58px; object-fit: contain; display: grid; place-items: center; background: var(--foto); border-radius: 8px; padding: 4px; }
.carrito-lista .n { font-size: 13.5px; }
.cant { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cant button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--borde); background: var(--superficie-2); }
.cant span { min-width: 22px; text-align: center; font-weight: 700; }
.cant .quitar { margin-left: auto; width: auto; padding: 0 10px; color: var(--suave); }
.vacio-msg { color: var(--suave); text-align: center; padding: 30px 0; }
.carrito-pie { padding: 14px 16px 18px; border-top: 1px solid var(--borde); }
.carrito-pie .nota { margin: 0 0 10px; color: var(--suave); font-size: 13px; }
.carrito-pie .btn-wa { width: 100%; }

/* WhatsApp flotante, pie y avisos */
.wa-flotante {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .18), 0 6px 18px rgba(0,0,0,.5);
}
.wa-flotante svg { width: 30px; height: 30px; fill: #052e16; }
.pie { text-align: center; color: var(--suave); font-size: 13px; padding: 28px 16px 92px; border-top: 1px solid var(--borde); margin-top: 24px; }
.pie p { margin: 4px 0; }
.aviso {
  position: fixed; left: 50%; bottom: 86px; z-index: 60; transform: translateX(-50%) translateY(20px);
  padding: 10px 16px; border-radius: 10px; background: var(--acento); color: var(--acento-texto); font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.aviso.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
