:root { --fondo:#FFFFFF; --texto:#111111; --gris:#6E6A78; --linea:#E6E5EB; --acento:#D42A61; --suave:#FBE7EE;
  --fuente:"Instrument Sans", system-ui, sans-serif; --mono:"DM Mono", ui-monospace, monospace; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--fuente); }
button, input { font: inherit; color: inherit; }
.top { position: sticky; top: 0; z-index: 10; background: var(--fondo); padding: 14px 16px; border-bottom: 1px solid var(--linea); }
.marca { max-width: 760px; margin: 0 auto; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.vivo { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--acento); }
.contenedor { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
.buscar { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tarjeta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.foto { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; }
.codigo { position: absolute; left: 8px; top: 8px; background: #FFFFFF; color: #111111; font-family: var(--mono); font-size: 12px; padding: 3px 7px; border-radius: 6px; }
.agotado { position: absolute; inset: 0; background: rgba(255,255,255,.72); display: grid; place-items: center; }
.agotado span { background: var(--texto); color: var(--fondo); font-weight: 700; font-size: 13px; letter-spacing: .12em; padding: 6px 12px; border-radius: 6px; }
.nombre { font-weight: 500; line-height: 1.25; }
.precio { font-weight: 700; }
.tallas { display: flex; flex-wrap: wrap; gap: 6px; }
.talla { min-width: 44px; min-height: 44px; border: 1px solid var(--linea); background: var(--fondo); border-radius: 8px; display: grid; place-items: center; line-height: 1.1; cursor: pointer; }
.talla small { font-size: 10px; color: var(--gris); }
.talla:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.talla.elegida { border-color: var(--acento); background: var(--suave); }
.barra { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px 20px; background: var(--fondo); border-top: 1px solid var(--linea); }
.btn { width: 100%; max-width: 728px; margin: 0 auto; display: flex; justify-content: space-between; height: 54px; align-items: center; padding: 0 18px; border: 0; border-radius: 14px; background: var(--acento); color: #FFFFFF; font-weight: 700; cursor: pointer; }
.vacio { grid-column: 1 / -1; text-align: center; color: var(--gris); padding: 30px 0; }
[hidden] { display: none !important; }
.fondo { position: fixed; inset: 0; z-index: 20; background: rgba(17,17,17,.5); display: flex; align-items: flex-end; justify-content: center; }
.panel { background: var(--fondo); width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; display: grid; gap: 14px; }
.panel-arriba { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel h2 { margin: 0; font-size: 20px; }
.btn-sec { border: 1px solid var(--linea); background: var(--fondo); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.linea { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.mini { width: 48px; height: 60px; border-radius: 8px; }
.detalle { font-size: 13px; color: var(--gris); }
.cantidad { display: flex; align-items: center; gap: 8px; }
.cantidad button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--linea); background: var(--fondo); cursor: pointer; font-size: 18px; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; }
.campo { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gris); }
.campo input { height: 46px; border: 1px solid var(--linea); border-radius: 12px; padding: 0 12px; font-size: 15px; color: var(--texto); }
.nota { margin: 0; font-size: 13px; color: var(--gris); }
/* Pantalla de pago */
.titulo { font-size: 24px; margin: 8px 0 4px; letter-spacing: -.02em; }
.subtitulo { margin: 0 0 16px; color: var(--gris); }
.seccion { font-size: 18px; margin: 24px 0 10px; }
.caja { border: 1px solid var(--linea); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.aviso-tiempo { display: flex; justify-content: space-between; align-items: center; background: var(--suave);
  color: var(--acento); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; font-weight: 600; }
.reloj { font-family: var(--mono); font-size: 26px; }
.reloj.poco { color: #B3261E; }
.items { display: grid; gap: 4px; font-size: 14px; }
.items div, .fila { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea);
  background: var(--fondo); font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--texto); color: var(--fondo); border-color: var(--texto); }
.monto { font-family: var(--mono); font-size: 24px; }
.datos { display: grid; gap: 6px; }
.datos div { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #F6F6F8; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.datos span { min-width: 0; overflow-wrap: anywhere; }
.copiar { border: 0; background: none; color: var(--acento); font-weight: 700; cursor: pointer; min-height: 32px; }
.campo textarea { border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px;
  font-size: 15px; color: var(--texto); resize: vertical; }
.vista-captura { width: 90px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linea); }
.estado { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: capitalize; }
.estado-pendiente { background: #FBF0DA; color: #8A5A0F; }
.estado-aprobado { background: #E1F3EA; color: #1F7A52; }
.estado-rechazado, .estado-vencido { background: #FBE4E2; color: #B3261E; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
#volverCatalogo { margin-top: 16px; }
.btn-ancho { width: 100%; min-height: 48px; margin-top: 20px; font-weight: 600; }
.centrada { text-align: center; margin-top: 8px; }

/* Fotos reales de las prendas */
.foto img, .mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini { overflow: hidden; }
.campo input, .campo textarea { width: 100%; min-width: 0; }
.campo { min-width: 0; }

/* Pago móvil: título y botón para copiar todo */
.titulo-datos { margin: 4px 0 0; font-weight: 700; }
.btn-copiar-todo { min-height: 46px; border-radius: 12px; border: 1px solid var(--acento);
  background: var(--suave); color: var(--acento); font-weight: 700; cursor: pointer; }

/* Mis pedidos */
.btn-historial { margin-left: auto; font-size: 14px; font-weight: 600; min-height: 40px; }
.lista-historial { display: grid; gap: 10px; margin-bottom: 16px; }
.tarjeta-pedido { display: grid; gap: 6px; width: 100%; text-align: left; padding: 14px;
  border: 1px solid var(--linea); border-radius: 14px; background: var(--fondo); cursor: pointer; }
.tarjeta-pedido:hover { border-color: var(--acento); }
.tarjeta-pedido.sin-datos { cursor: default; }
.ver-mas { color: var(--acento); font-weight: 700; font-size: 14px; }
.estado-apartado { background: var(--suave); color: var(--acento); }
.estado-cancelado { background: #F0EFF3; color: var(--gris); }
#vistaHistorial .btn { margin-top: 16px; justify-content: center; }
.estado { text-transform: none; }
.estado-entregado { background: #E3ECFA; color: #2B5BA8; }
.guia { margin: 0; background: #E3ECFA; color: #1E3F75; border-radius: 10px; padding: 10px 12px; font-size: 14px; }