/* Pestaña Carrito */
#pagina-carrito { display: grid; gap: 18px; }
.aviso-carrito { padding: 12px 16px; border-radius: 12px; background: rgba(255,200,87,.12); border: 1px solid #ffc857; color: #ffc857; }
.vacio-caja { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 40px 20px; color: var(--suave); }
.carrito-cols { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }

.lista-carrito { list-style: none; padding: 0; display: grid; gap: 12px; }
.item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: start; padding: 14px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; }
.foto-i { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, hsl(var(--h) 70% 32%), hsl(var(--h) 60% 12%)); }
.foto-i span { font-size: 2.2rem; font-weight: 600; color: hsl(var(--h) 90% 80%); }
.foto-i.con-img { background: #fff; }
.foto-i img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.datos-i { display: grid; gap: 8px; min-width: 0; }
.datos-i h3 { font-weight: 500; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.precio-i { color: var(--suave); font-size: .9rem; }
.sub-i { font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.cant { display: inline-flex; align-items: center; border: 1px solid var(--borde); border-radius: 10px; width: max-content; }
.cant button { width: 38px; height: 38px; border: 0; background: none; color: var(--azul); font-size: 1.3rem; cursor: pointer; }
.cant span { min-width: 34px; text-align: center; }
.quitar { background: none; border: 0; color: var(--rojo); font: inherit; font-size: .9rem; cursor: pointer; justify-self: start; padding: 4px 0; }

.resumen-carrito { background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; padding: 22px; display: grid; gap: 14px;
  position: sticky; top: 16px; }
.resumen-carrito .fila { display: flex; justify-content: space-between; color: var(--suave); }
.resumen-carrito .total { color: var(--texto); font-size: 1.3rem; padding-top: 12px; border-top: 1px solid #12335b; }
.resumen-carrito .total b { color: var(--azul); }
.enlace-seguir { text-align: center; color: var(--azul); text-decoration: none; }

#dlg-compra .pagos { grid-column: 1 / -1; display: grid; gap: 10px; }
#dlg-compra .resumen-compra, .error-compra { grid-column: 1 / -1; }
.resumen-compra b { color: var(--azul); } .error-compra { color: var(--rojo); }
.enlace { background: none; border: 0; color: var(--suave); cursor: pointer; font: inherit; padding: 8px; }
#paso-qr, #paso-ok { text-align: center; display: grid; gap: 16px; justify-items: center; }
.nota-qr { color: var(--suave); font-size: .9rem; }
#qr-caja { background: #fff; padding: 14px; border-radius: 14px; min-width: 120px; min-height: 120px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; z-index: 40; padding: 12px 22px;
  border-radius: 99px; background: var(--azul2); color: #fff; transition: .3s; pointer-events: none; }
#toast.ver { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .carrito-cols { grid-template-columns: 1fr; }
  .resumen-carrito { position: static; }
}
