.barra { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; position: sticky; top: 0; z-index: 5;
  padding: 12px 0; background: linear-gradient(var(--fondo) 80%, transparent); }
.barra input[type=search] { flex: 1; min-width: 220px; height: 48px; border-radius: 99px; padding: 0 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-f { height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--borde); background: none;
  color: var(--texto); font: inherit; cursor: pointer; transition: background .2s; }
.chip-f:hover { background: rgba(0,180,255,.15); } .chip-f.act { background: var(--azul2); border-color: var(--azul); }
.btn-carrito { position: relative; width: 52px; height: 48px; border-radius: 12px; border: 1px solid var(--azul);
  background: none; cursor: pointer; } .btn-carrito svg { width: 26px; height: 26px; fill: var(--azul); }
#badge { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; border-radius: 99px; padding: 0 6px;
  background: var(--azul2); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.pulso { animation: pulso .35s; }

.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.prod { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--borde); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.prod[hidden] { display: none; }
.prod:hover, .prod:focus-visible { transform: translateY(-5px); border-color: var(--azul); box-shadow: 0 0 28px rgba(0,160,255,.4); outline: 0; }
.foto { height: 150px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, hsl(var(--h) 70% 32%), hsl(var(--h) 60% 12%)); }
.foto span { font-size: 3.4rem; font-weight: 600; color: hsl(var(--h) 90% 80%); text-shadow: 0 0 22px hsl(var(--h) 90% 60%); }
.info { padding: 14px 16px 6px; flex: 1; }
.precio { font-size: 1.6rem; font-weight: 500; } .info h3 { font-weight: 400; font-size: 1rem; margin: 6px 0; color: var(--suave); }
.stk { font-size: .85rem; color: var(--verde); } .prod .agregar { margin: 10px 16px 16px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 600; background: linear-gradient(180deg, #19c3ff, var(--azul2)); color: #fff; }
.prod.sin { opacity: .5; cursor: not-allowed; } .prod.sin .agregar { background: #12335b; } .prod.sin .stk { color: var(--rojo); }
.rebote { animation: rebote .35s; }

#carrito { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 30; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--azul); box-shadow: -10px 0 40px rgba(0,120,255,.35);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
#carrito.abierto { transform: none; }
#carrito header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--borde); }
#carrito header h2 { margin: 0; } #cerrar-carrito { background: none; border: 0; color: var(--texto); font-size: 2rem; cursor: pointer; }
#lista-carrito { list-style: none; padding: 8px 20px; margin: 0; flex: 1; overflow-y: auto; }
#lista-carrito li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #12335b; }
#lista-carrito small { display: block; color: var(--suave); }
.cant { display: flex; align-items: center; gap: 10px; }
.cant button, .quitar { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--borde); background: none; color: var(--texto); cursor: pointer; }
.quitar { border-color: var(--rojo); color: var(--rojo); }
#carrito footer { padding: 20px; border-top: 1px solid var(--borde); display: grid; gap: 14px; }
.total { display: flex; justify-content: space-between; font-size: 1.3rem; } .total b { color: var(--azul); }
#carrito footer .btn-pri:disabled { opacity: .4; cursor: not-allowed; }
#velo { position: fixed; inset: 0; background: rgba(0,5,15,.6); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 20; }
#velo.ver { opacity: 1; pointer-events: auto; }
#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); }

#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; }
#paso-qr, #paso-ok { text-align: center; display: grid; gap: 16px; justify-items: center; }
#qr-caja { background: #fff; padding: 14px; border-radius: 14px; min-width: 120px; min-height: 120px; }

.pedido p { margin: 8px 0; } .ped-cab { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ped-total { margin-left: auto; color: var(--azul); font-size: 1.2rem; } .fecha, .detalle { color: var(--suave); }
.est { padding: 4px 12px; border-radius: 99px; font-size: .85rem; text-transform: capitalize; border: 1px solid; }
.est-pendiente { color: #ffc857; } .est-pagado { color: var(--azul); } .est-entregado { color: var(--verde); } .est-cancelado { color: var(--rojo); }
.ped-acc { display: flex; gap: 10px; flex-wrap: wrap; } .ped-acc form { display: inline; }
.peligro { border-color: var(--rojo); color: var(--rojo); }
.pedido { animation: entra .4s ease both; animation-delay: calc(var(--i) * 40ms); }

@keyframes pulso { 50% { transform: scale(1.4); } }
@keyframes rebote { 40% { transform: scale(.96); } 70% { transform: scale(1.03); } }

/* La imagen queda contenida dentro de su recuadro y nunca tapa el precio, el nombre ni el botón */
.foto { position: relative; flex: 0 0 150px; height: 150px; overflow: hidden; }
.foto.con-img { background: #fff; }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: contain; padding: 10px; box-sizing: border-box; transition: transform .3s; }
.prod:hover .foto img { transform: scale(1.06); }
.prod .info, .prod .agregar { position: relative; z-index: 1; }
.prod .info { background: var(--panel); }

/* Inicio del cliente */
.nota-cliente { color: var(--suave); margin: -6px 0 18px; }
.grilla-top .prod { position: relative; }
.medalla { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 12px; border-radius: 99px; font-size: .78rem; font-weight: 600;
  background: linear-gradient(180deg, #ffd45c, #ff9f1c); color: #2a1a00; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
