/* MobilHub · estilos del catálogo */
:root {
  --fondo: #f5f5f7; --tarjeta: #ffffff; --texto: #1d1d1f; --suave: #6e6e73; --linea: #e3e3e8;
  --naranja: #ff9000; --naranja-osc: #e07d00; --verde: #1a9f55; --wa: #25d366;
  --letra: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radio: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 15px/1.5 var(--letra); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; background: rgba(17,17,17,.94); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); color: #fff; padding: 10px 16px 10px; display: grid; gap: 10px; }
.top__fila { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; width: 100%; margin: 0 auto; }
.marca { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.marca img { width: 34px; height: 34px; object-fit: contain; }
.volver { color: #bbb; text-decoration: none; font-size: .8rem; border: 1px solid #3a3a3a; padding: 6px 12px; border-radius: 999px; }
.volver::before { content: "← "; }
.volver:hover { color: var(--naranja); border-color: var(--naranja); }
.buscar { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: #2a2a2c; border-radius: 12px; padding: 0 12px; color: #aaa; }
.buscar input { flex: 1; border: 0; background: transparent; color: #fff; padding: 11px 0; outline: none; min-width: 0; font-size: 16px; }
.chips { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid #3a3a3a; background: transparent; color: #ddd; border-radius: 999px; padding: 6px 14px; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: #777; }
.chip[aria-pressed="true"] { background: var(--naranja); border-color: var(--naranja); color: #111; font-weight: 600; }
.chips--marcas .chip { font-size: .8rem; padding: 5px 12px; }
.chips--marcas .chip[aria-pressed="true"] { background: #fff; border-color: #fff; }

/* Contenido */
.contenido { max-width: 1200px; margin: 0 auto; padding: 18px 16px 90px; }
.hero { padding: 18px 4px 22px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.hero p { color: var(--suave); margin-top: 8px; max-width: 52ch; }
.barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
#conteo { color: var(--suave); font-size: .9rem; }
#orden { border: 1px solid var(--linea); background: #fff; border-radius: 10px; padding: 7px 10px; font-size: .85rem; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--tarjeta); border-radius: var(--radio); padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s; text-align: left; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.08); border-color: var(--linea); }
.card:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
.card__img { aspect-ratio: 1; background: #fff; border-radius: 12px; display: grid; place-items: center; overflow: hidden; position: relative; }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__img .etiquetas { position: absolute; top: 6px; left: 6px; }
.card h3 { font-size: .95rem; font-weight: 600; line-height: 1.25; margin-top: 4px; }
.card .mini { color: var(--suave); font-size: .8rem; }
.card .precio { margin-top: auto; padding-top: 4px; }
.precio { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.precio--grande { font-size: 1.7rem; }
.stock { font-size: .78rem; color: var(--verde); font-weight: 500; }
.stock::before { content: "● "; }

.etiquetas { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .68rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #eee; color: #333; text-transform: uppercase; letter-spacing: .02em; }
.tag--Nuevo { background: #e6f6ec; color: #11733c; }
.tag--Usado { background: #fff1dc; color: #a35a00; }
.tag--Exhibición { background: #e8eefc; color: #2747a8; }
.tag--Openbox { background: #f1e8fb; color: #6b2fa8; }
.tag--promo { background: #c8102e; color: #fff; }

.vacio { text-align: center; color: var(--suave); padding: 40px 10px; }
.pie { margin-top: 40px; text-align: center; color: var(--suave); font-size: .8rem; display: grid; gap: 4px; }

/* Detalle */
.velo { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.detalle { position: fixed; z-index: 50; top: 0; right: 0; height: 100%; width: min(460px, 100%); background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; box-shadow: -20px 0 60px rgba(0,0,0,.2); }
.detalle.abierto { transform: none; visibility: visible; transition: transform .3s ease; }
.cerrar { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f0f0f2; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; }
.galeria { aspect-ratio: 1; display: grid; place-items: center; padding: 24px; }
.galeria img { max-height: 100%; object-fit: contain; }
.miniaturas { display: flex; gap: 8px; justify-content: center; padding: 0 16px; }
.miniaturas button { width: 54px; height: 54px; border-radius: 10px; border: 2px solid var(--linea); background: #fff; padding: 3px; cursor: pointer; }
.miniaturas button[aria-current="true"] { border-color: var(--naranja); }
.miniaturas img { width: 100%; height: 100%; object-fit: contain; }
.detalle__cuerpo { padding: 18px 20px 30px; display: grid; gap: 10px; }
.detalle h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -.01em; }
.specs { list-style: none; padding: 0; margin: 4px 0 0; border-top: 1px solid var(--linea); }
.specs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: .9rem; }
.specs li span:first-child { color: var(--suave); }
.specs li span:last-child { font-weight: 500; text-align: right; }
.avisos { display: grid; gap: 6px; }
.aviso { font-size: .85rem; background: #fff7e8; border-left: 3px solid var(--naranja); padding: 8px 10px; border-radius: 6px; }
.whatsapp { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--wa); color: #06361b; font-weight: 600; text-decoration: none; min-height: 52px; border-radius: 999px; }
.whatsapp:hover { filter: brightness(.95); }

.flotante { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0,0,0,.25); }

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