/* NEXUS MANGA – hoja de estilos principal.
 * La identidad visual (paleta crema/naranja, Manrope + DM Sans, cabecera, navegación, portada y pie)
 * sale del diseño original en docs/prototipo/. Si cambias algo de la marca, cámbialo también allí.
 * Las fuentes se cargan en templates/base.html. */
:root {
  /* Marca (mismos valores que docs/prototipo/style.css) */
  --ink: #454451;
  --muted: #88818a;
  --paper: #fffdf9;
  --cream: #f8f1e5;
  --orange: #d96b4d;
  --orange-hover: #c75e42;
  --yellow: #ffe19d;
  --line: #eae4db;

  /* Alias que usan las plantillas y el JS */
  --fondo: var(--paper);
  --tarjeta: #ffffff;
  --tarjeta-2: #faf7f2;
  --borde: var(--line);
  --texto: var(--ink);
  --tenue: var(--muted);
  --acento: var(--orange);
  --acento-hover: var(--orange-hover);
  --ok: #4f8a5b;
  --aviso: #c98a2b;
  --error: #c0453a;
  --info: #5a73a6;
  --radio: 8px;
  --sombra: 0 10px 30px rgba(69, 68, 81, .10);
  --titulos: Manrope, "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--paper);
  color: var(--ink); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; font-family: var(--titulos); color: var(--ink); }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.9px; margin: 0 0 18px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.6px; }
h3 { font-size: 15px; font-weight: 600; }
.tenue { color: var(--muted); }
.pequeno { font-size: .85rem; }
.oculto { display: none !important; }
.centro { text-align: center; }
.symbols { position: absolute; width: 0; height: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Cabecera (prototipo: header) ---------- */
.cabecera { max-width: 1320px; width: 100%; margin: auto; height: 104px; padding: 0 54px; display: flex; align-items: center; gap: 42px; }
.marca { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.marca img { height: 69px; width: 61px; object-fit: contain; }
.marca > span { font-family: Manrope, sans-serif; font-size: 20px; letter-spacing: 1px; font-weight: 800; line-height: 1.2; }
.marca b { color: var(--orange); }
.marca small { display: block; font: 8px "DM Sans", sans-serif; letter-spacing: 1.6px; margin-top: 5px; }
.acciones { display: flex; gap: 20px; align-items: center; }
.acciones > a, .acciones .cuenta { padding: 3px; display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; }
.acciones > a:hover, .acciones .cuenta:hover, .acciones > a.activo { color: var(--orange); }
.acciones > i { height: 24px; border-left: 1px solid var(--line); }
.cuenta span { font-size: 12px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.carrito { position: relative; }
.burbuja { position: absolute; top: -5px; right: -6px; font-size: 9px; background: var(--yellow); color: var(--ink); border-radius: 8px;
  height: 15px; min-width: 15px; padding: 0 4px; display: grid; place-items: center; font-weight: 600; }
.menu-usuario { position: relative; }
.menu-usuario .desplegable { position: absolute; right: 0; top: calc(100% + 12px); background: var(--tarjeta); z-index: 70;
  border: 1px solid var(--line); border-radius: 10px; min-width: 200px; padding: 6px; box-shadow: var(--sombra); display: none; }
.menu-usuario.abierto .desplegable { display: block; }
.desplegable a, .desplegable button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 6px;
  background: none; border: 0; color: var(--ink); font-size: 13px; cursor: pointer; }
.desplegable a:hover, .desplegable button:hover { background: var(--cream); color: var(--orange); }

/* ---------- Buscador (prototipo: .search) ---------- */
.buscador { position: relative; margin-left: auto; max-width: 390px; flex: 1; }
.buscador form { border: 1px solid var(--line); border-radius: 8px; background: #faf7f2; padding: 12px 15px; display: flex; gap: 10px; align-items: center; }
.buscador form:focus-within { border-color: var(--orange); }
.buscador svg { width: 18px; color: #908a89; flex: none; }
.buscador input[type=search] { width: 100%; min-width: 0; border: 0; outline: 0; background: none; padding: 0; font: 12px "DM Sans", sans-serif;
  color: var(--ink); box-shadow: none; }
.buscador input[type=search]::-webkit-search-cancel-button { display: none; }
.buscador form > span { color: #aaa29b; font-size: 13px; }
.sugerencias { position: absolute; left: 0; right: 0; min-width: 300px; top: calc(100% + 6px); background: var(--tarjeta);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sombra); overflow: hidden; z-index: 60; }
.sugerencias a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 13px; }
.sugerencias a.activa, .sugerencias a:hover { background: var(--cream); }
.sugerencias img, .sugerencias .mini { width: 32px; height: 46px; object-fit: cover; border-radius: 3px; background: var(--cream); flex: none; }
.sugerencias .datos { flex: 1; min-width: 0; }
.sugerencias .datos div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugerencias .ver-todo { justify-content: center; color: var(--orange); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- Navegación (prototipo: nav) ---------- */
.navegacion { height: 52px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 34px; padding: 0 max(54px, calc((100vw - 1212px) / 2)); font-size: 12px; overflow-x: auto; scrollbar-width: none; }
.navegacion a { height: 100%; position: relative; display: flex; align-items: center; white-space: nowrap; }
.navegacion a:hover { color: var(--orange); }
.navegacion a.activo { color: var(--orange); }
.navegacion a.activo::after { content: ""; position: absolute; height: 2px; background: var(--orange); bottom: 0; left: 0; right: 0; }
.navegacion > span { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ---------- Estructura ---------- */
main { max-width: 1320px; width: 100%; margin: 0 auto; padding: 32px 54px 56px; flex: 1; }
.angosto { max-width: 460px; margin: 0 auto; }
.medio { max-width: 760px; margin: 0 auto; }
.panel { background: var(--tarjeta); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.panel + .panel { margin-top: 16px; }
.columnas { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.lateral-izq { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.pegajoso { position: sticky; top: 20px; }
.migas { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.migas a:hover { color: var(--orange); }

/* ---------- Pie (prototipo: footer) ---------- */
.pie { max-width: 1212px; width: calc(100% - 108px); margin: 0 auto; border-top: 1px solid var(--line); padding: 24px 0 28px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pie-marca { font: 800 11px Manrope, sans-serif; letter-spacing: 1px; }
.pie-marca span { color: var(--orange); padding-left: 10px; }
.pie p { font-size: 10px; color: #9b928b; margin: 0; }
.pie-enlaces { display: flex; gap: 18px; font-size: 10px; color: #9b928b; }
.pie-enlaces a:hover { color: var(--orange); }
.pie small { margin-left: auto; font-size: 10px; color: #aaa099; }

/* ---------- Portada (prototipo: .hero) ---------- */
.hero { min-height: 435px; border-radius: 14px; background: var(--cream); position: relative; display: grid;
  grid-template-columns: 1.15fr 1fr; overflow: hidden; padding: 50px 54px; }
.eyebrow { font-size: 9px; letter-spacing: 2px; font-weight: 700; display: flex; align-items: center; gap: 9px; text-transform: uppercase; }
.eyebrow > span { width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
.hero h1 { font: 800 clamp(30px, 3.4vw, 47px)/1.2 Manrope, sans-serif; letter-spacing: -1.8px; margin: 23px 0 17px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero-copy > p { font-size: 15px; line-height: 1.65; color: #7e7370; margin: 0 0 24px; }
.primary { display: inline-flex; align-items: center; gap: 24px; background: var(--orange); color: #fff; padding: 14px 19px;
  border-radius: 6px; font-size: 11px; font-weight: 600; }
.primary:hover { color: #fff; background: var(--orange-hover); }
.primary svg { width: 17px; height: 17px; }
.smallnote { margin-top: 24px; font-size: 10px; color: #999087; display: flex; align-items: center; gap: 8px; }
.smallnote svg { height: 15px; width: 15px; }
.art { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.art img { width: 280px; max-width: 95%; position: relative; z-index: 1; mix-blend-mode: multiply; }
.halo { position: absolute; width: 290px; height: 290px; max-width: 100%; border-radius: 50%; background: #f4e4c9; }
.star { position: absolute; color: #dba65c; font-size: 33px; }
.s1 { top: 15px; right: 23px; }
.s2 { left: 16px; bottom: 66px; font-size: 40px; }
.art-note { position: absolute; bottom: -12px; font-size: 10px; color: #9e8a75; letter-spacing: .2px; }
.hero-index { position: absolute; bottom: 18px; right: 24px; font-size: 8px; letter-spacing: 1.7px; color: #aa9c88; }

/* Títulos de sección (prototipo: .section-title) */
.catalog { padding: 44px 0 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title .eyebrow { color: #a1968d; font-size: 8px; letter-spacing: 1.5px; }
.section-title h2 { font: 700 23px Manrope, sans-serif; letter-spacing: -.8px; margin: 9px 0 0; }
.coming { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #9a8270; border: 1px solid #eadfce; border-radius: 30px;
  padding: 7px 11px; white-space: nowrap; }
.coming:hover { color: var(--orange); border-color: var(--orange); }
.coming span { display: none; }

/* Estado vacío (prototipo: .empty) */
.empty { text-align: center; padding: 37px 20px 46px; margin-top: 10px; }
.book-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #f6f0e7; color: #ba9b77; margin: auto; }
.book-icon svg { width: 23px; }
.empty h3 { font-size: 13px; font-weight: 500; margin: 16px 0 8px; font-family: "DM Sans", sans-serif; }
.empty p { font-size: 11px; color: #a19890; }
.empty-line { display: block; width: 28px; height: 2px; background: #ead7ba; margin: 23px auto 0; }

/* Encabezado simple para páginas internas */
.seccion { margin: 36px 0 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.seccion h2 { margin: 0; }
.seccion a { color: var(--orange); font-size: 12px; }

/* ---------- Productos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }
.card { background: var(--tarjeta); border-radius: 12px; overflow: hidden; color: inherit; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s; border: 1px solid var(--line); }
.card:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: #dcd3c6; }
.card img, .sin-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--cream); }
.sin-img { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: #ba9b77; font-size: 11px;
  letter-spacing: .5px; padding: 12px; text-align: center; }
.sin-img svg { width: 30px; height: 30px; }
.card .info { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .titulo { font: 600 14px/1.3 Manrope, sans-serif; letter-spacing: -.2px; }
.card .autor { font-size: 12px; color: var(--muted); }
.precio { font-weight: 700; font-size: 1.05rem; font-family: var(--titulos); }
.tachado { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 13px; }
.descuento, .envio-gratis, .disponible { color: var(--ok); font-size: .8rem; font-weight: 600; }
.ultimas { color: var(--aviso); font-weight: 600; }

/* Detalle */
.detalle { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 40px; }
.galeria-principal { width: 100%; border-radius: 14px; aspect-ratio: 2/3; object-fit: cover; background: var(--cream); }
.miniaturas { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.miniaturas button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; overflow: hidden; }
.miniaturas button.activa { border-color: var(--orange); }
.miniaturas img { width: 56px; height: 80px; object-fit: cover; display: block; }
.ficha { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9rem; }
.ficha dt { color: var(--muted); }
.ficha dd { margin: 0; }
.caja-compra { background: var(--cream); border-radius: 14px; padding: 22px; margin-top: 16px; }
.caja-compra .acciones-compra { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.titulo-producto { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

/* Botón de favorito */
.btn-favorito { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--tarjeta);
  display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: color .15s, border-color .15s, background .15s; }
.btn-favorito:hover { color: var(--orange); border-color: var(--orange); }
.btn-favorito[aria-pressed=true] { color: var(--orange); border-color: #f0c7b9; background: #fdf1ec; }
.btn-favorito[aria-pressed=true] svg { fill: currentColor; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; color: #fff; font-weight: 600; }
.agotado { background: var(--error); } .bajo { background: var(--aviso); } .normal { background: var(--ok); } .exceso { background: var(--info); }
.estado-pendiente_pago { background: #8f8892; } .estado-pagado { background: var(--ok); } .estado-preparando { background: #4f8f9a; }
.estado-enviado { background: var(--info); } .estado-entregado { background: #3f7449; } .estado-cancelado { background: #a3443a; }
.estado-vencido { background: #8b8590; } .estado-revision { background: var(--aviso); } .estado-reembolsado { background: #7d66a8; }

/* ---------- Botones ---------- */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px;
  border-radius: 6px; border: 1px solid var(--orange); background: var(--orange); color: #fff; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: #fff; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn.secundario { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.secundario:hover { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn.peligro { background: transparent; color: var(--error); border-color: #e9c3bd; }
.btn.peligro:hover { background: #fbeeec; }
.btn.chico { padding: 7px 12px; font-size: 12px; }
.btn.bloque { width: 100%; }
.btn-mp { background: #009ee3; border-color: #009ee3; }
.btn-mp:hover { background: #0086c3; border-color: #0086c3; }
button.enlace { background: none; border: 0; padding: 0; color: var(--orange); cursor: pointer; font: inherit; }
button.enlace.pequeno { font-size: .82rem; }
.enlace-acento { color: var(--orange); }
.enlace-acento:hover { text-decoration: underline; }

/* ---------- Formularios ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=tel],
input[type=url], select, textarea {
  width: 100%; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 6px;
  padding: 11px 12px; font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(217, 107, 77, .15); }
input.invalido, select.invalido { border-color: var(--error); }
input.valido { border-color: var(--ok); }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); width: 16px; height: 16px; }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 12px; margin-bottom: 6px; font-weight: 500; }
.campo.check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; }
.campo .ayuda { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.campo .ayuda ul { margin: 4px 0 0; padding-left: 18px; }
.requerido { color: var(--orange); }
.errores, .error-campo { color: var(--error); font-size: .82rem; margin-top: 4px; }
.errores-form { background: #fbeeec; border: 1px solid #efcdc7; color: #9a3a30; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
.errores-form ul { margin: 0; padding-left: 18px; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tres-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.fuerza { height: 5px; background: var(--cream); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.fuerza span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.fuerza-texto { font-size: .78rem; margin-top: 3px; color: var(--muted); }
.separador-texto { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.separador-texto::before, .separador-texto::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Opciones seleccionables (domicilios, envíos) */
.opcion { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.opcion:hover { border-color: #d6cbbb; }
.opcion:has(input:checked) { border-color: var(--orange); background: #fdf4ef; }
.opcion.deshabilitada { opacity: .5; cursor: not-allowed; }
.opcion input { margin-top: 3px; flex: none; }
.opcion .cuerpo { flex: 1; }
.opcion .derecha { text-align: right; white-space: nowrap; }

/* Cantidad */
.cantidad { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.cantidad button { background: var(--tarjeta-2); border: 0; color: var(--ink); width: 34px; height: 38px; font-size: 18px; cursor: pointer; }
.cantidad button:hover { background: var(--cream); color: var(--orange); }
.cantidad input { width: 50px; text-align: center; border: 0; border-radius: 0; padding: 8px 0; -moz-appearance: textfield; }
.cantidad input:focus { box-shadow: none; }
.cantidad input::-webkit-outer-spin-button, .cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- Filtros del buscador ---------- */
.filtros-lateral h3 { font: 700 9px "DM Sans", sans-serif; margin: 20px 0 8px; color: #a1968d; text-transform: uppercase; letter-spacing: 1.5px; }
.filtros-lateral h3:first-child { margin-top: 0; }
.filtros-lateral .rango { display: flex; gap: 8px; }
.barra-resultados { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.barra-resultados select { width: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { background: var(--cream); border-radius: 14px; padding: 3px 10px; font-size: .8rem; }
.chip:hover { color: var(--orange); }
.paginacion { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.paginacion a, .paginacion span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
.paginacion a:hover { border-color: var(--orange); color: var(--orange); }
.paginacion .actual { background: var(--orange); border-color: var(--orange); color: #fff; }
.vacio { text-align: center; padding: 56px 20px; color: var(--muted); }
.vacio .icono { margin: 0 auto 12px; }
.vacio p { font-size: 14px; }

/* ---------- Colecciones ---------- */
.colecciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.coleccion { background: var(--cream); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .15s, box-shadow .15s; }
.coleccion:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.coleccion strong { font: 700 17px Manrope, sans-serif; letter-spacing: -.4px; }
.coleccion span { font-size: 12px; color: #9a8270; }

/* ---------- Carrito ---------- */
.linea-carrito { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.linea-carrito:last-child { border-bottom: 0; }
.linea-carrito img, .linea-carrito .sin-img { width: 70px; height: 100px; object-fit: cover; border-radius: 6px; }
.linea-carrito .importe { min-width: 100px; text-align: right; font-weight: 700; }
.resumen .fila { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.resumen .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 1.2rem; font-weight: 800; font-family: var(--titulos); }
.cargando { opacity: .5; pointer-events: none; }

/* ---------- Pasos del checkout ---------- */
.pasos-checkout { display: flex; gap: 8px; margin-bottom: 22px; font-size: 12px; flex-wrap: wrap; }
.pasos-checkout span { padding: 5px 13px; border-radius: 30px; border: 1px solid var(--line); color: var(--muted); }
.pasos-checkout span.activo { background: var(--orange); border-color: var(--orange); color: #fff; }
.numero-paso { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: .8rem; font-weight: 700; margin-right: 8px; }

/* ---------- Seguimiento del envío ---------- */
.linea-tiempo { display: flex; justify-content: space-between; position: relative; margin: 26px 0 10px; }
.linea-tiempo::before { content: ""; position: absolute; top: 11px; left: 6%; right: 6%; height: 3px; background: var(--line); }
.linea-tiempo .paso { position: relative; text-align: center; flex: 1; font-size: .75rem; color: var(--muted); }
.linea-tiempo .punto { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 6px; position: relative; z-index: 1; }
.linea-tiempo .hecho .punto { background: var(--ok); border-color: var(--ok); }
.linea-tiempo .hecho { color: var(--ink); }
.linea-tiempo .actual .punto { box-shadow: 0 0 0 5px rgba(79, 138, 91, .22); }
.eventos { list-style: none; padding: 0; margin: 0; }
.eventos li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; }
.eventos li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.panel.atencion { border-color: #ecc98f; background: #fffaf0; }

/* ---------- Tablas ---------- */
.tabla-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: #a1968d; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
td a:hover { color: var(--orange); }
.num { text-align: right; }

/* ---------- Tarjeta (simulador) ---------- */
.tarjeta-visual { background: linear-gradient(135deg, #5d5b6c, #3a3946); color: #fff6df; border-radius: 14px; padding: 22px; aspect-ratio: 1.586;
  max-width: 420px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 20px; font-family: ui-monospace, monospace; }
.tarjeta-visual .marca-t { align-self: flex-end; font-weight: 800; letter-spacing: 1px; font-family: Manrope, sans-serif; color: var(--yellow); }
.tarjeta-visual .numero { font-size: 1.25rem; letter-spacing: 2px; }
.tarjeta-visual .pie-t { display: flex; justify-content: space-between; font-size: .85rem; text-transform: uppercase; }
.aviso-sim { background: #fffaf0; border: 1px dashed #e2c48e; border-radius: 10px; padding: 12px 14px; font-size: .85rem; margin-bottom: 18px; }
.aviso-sim code { background: var(--cream); padding: 1px 5px; border-radius: 4px; }

/* ---------- Mensajes / toasts ---------- */
.mensajes { list-style: none; padding: 0; margin: 0 0 18px; }
.mensajes li { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; font-size: .92rem; border-left: 4px solid; background: var(--cream); }
.mensajes .success { border-color: var(--ok); } .mensajes .error { border-color: var(--error); }
.mensajes .warning { border-color: var(--aviso); } .mensajes .info { border-color: var(--info); }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff6df; border-left: 4px solid var(--yellow); padding: 12px 16px; border-radius: 8px;
  box-shadow: var(--sombra); max-width: 340px; font-size: 13px; animation: entrar .25s ease; }
.toast.error { border-color: #f09a85; }
@keyframes entrar { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Ticket ---------- */
.ticket-hoja { background: #fff; color: #111; width: 340px; max-width: 100%; margin: 0 auto; padding: 22px 20px; font-family: ui-monospace, "Courier New", monospace;
  font-size: 13px; border-radius: 4px; border: 1px solid var(--line); box-shadow: var(--sombra); }
.ticket-hoja h2 { text-align: center; margin: 0; letter-spacing: 2px; font-family: Manrope, sans-serif; }
.ticket-hoja .sep { border-top: 1px dashed #999; margin: 10px 0; }
.ticket-hoja .f { display: flex; justify-content: space-between; gap: 10px; }
.ticket-hoja .total { font-weight: 800; font-size: 16px; }
.ticket-hoja .codigo { text-align: center; font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.verificado { text-align: center; padding: 30px; }
.icono-grande { font-size: 46px; line-height: 1; margin-bottom: 8px; }

/* ---------- Responsivo (mismos cortes que el prototipo) ---------- */
@media (max-width: 1000px) {
  .cabecera { gap: 22px; padding: 0 28px; }
  .acciones { gap: 15px; }
  .cuenta span { display: none; }
  main { padding: 25px 28px 48px; }
  .navegacion { padding: 0 28px; }
  .hero { padding: 40px 32px; }
  .art img { width: 245px; }
  .halo { width: 250px; height: 250px; }
  .pie { width: calc(100% - 56px); }
  .marca > span { font-size: 17px; }
  .columnas, .detalle { grid-template-columns: 1fr; }
  .lateral-izq { grid-template-columns: 200px 1fr; gap: 20px; }
  .filtros-lateral.panel { padding: 18px; }
  .pegajoso { position: static; }
}
@media (max-width: 640px) {
  .cabecera { height: auto; flex-wrap: wrap; padding: 16px 20px; gap: 16px; }
  .marca img { height: 51px; width: 44px; }
  .marca > span { font-size: 16px; }
  .marca small { font-size: 6px; }
  .acciones { margin-left: auto; gap: 12px; }
  .acciones > i { display: none; }
  .buscador { order: 3; max-width: none; flex-basis: 100%; }
  .buscador form { padding: 10px; }
  .sugerencias { min-width: 0; }
  .navegacion { gap: 25px; padding: 0 20px; height: 46px; }
  .navegacion > span { display: none; }
  main { padding: 20px 16px 40px; }
  .hero { grid-template-columns: 1fr; padding: 32px 26px 40px; }
  .hero-copy { position: relative; z-index: 2; }
  .hero h1 { font-size: 34px; letter-spacing: -1.4px; }
  .hero-copy > p { font-size: 13px; }
  .art { height: 235px; margin-top: 14px; }
  .art img { height: 228px; width: auto; }
  .halo { width: 220px; height: 220px; }
  .s1 { right: 10%; }
  .s2 { left: 12%; bottom: 40px; }
  .art-note { bottom: -8px; }
  .hero-index { font-size: 6px; bottom: 12px; }
  .smallnote { margin-top: 16px; }
  .catalog { padding: 32px 0 0; }
  h1 { font-size: 24px; }
  .section-title h2 { font-size: 21px; }
  .empty { padding: 30px 0 32px; }
  .pie { width: calc(100% - 48px); gap: 8px; padding: 22px 0; }
  .pie p { width: 100%; order: 3; margin: 4px 0; }
  .pie small { font-size: 8px; }
  .panel { padding: 18px; }
  .dos-col, .tres-col, .lateral-izq { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .linea-carrito { grid-template-columns: 60px 1fr; }
  .linea-carrito .cantidad, .linea-carrito .importe { grid-column: 2; justify-self: start; text-align: left; }
}

/* ---------- Impresión ---------- */
@media print {
  body { background: #fff; }
  .cabecera, .navegacion, .pie, .no-imprimir, .mensajes, .toasts { display: none !important; }
  main { padding: 0; }
  .ticket-hoja { box-shadow: none; border: 0; width: 80mm; padding: 0; }
}
