/* tienda.css — carrito lateral, carrito, pago y avisos. Hereda letra y botones del tema de cada tienda. */
#tienda-panel { position: fixed; inset: 0; z-index: 99999; pointer-events: none; }
#tienda-panel .tienda-velo { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
#tienda-panel aside { position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 92vw); background: #fff; color: #222;
  transform: translateX(100%); transition: transform .25s; display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0, 0, 0, .15); }
#tienda-panel.abierto { pointer-events: auto; }
#tienda-panel.abierto .tienda-velo { opacity: 1; }
#tienda-panel.abierto aside { transform: none; }
#tienda-panel header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; font-size: 18px; }
#tienda-panel .tienda-cerrar { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: inherit; padding: 0 4px; }
#tienda-panel .tienda-cuerpo { padding: 12px 20px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.tienda-linea { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; color: inherit; text-decoration: none; }
.tienda-carrito .tienda-linea { grid-template-columns: 72px 1fr auto auto auto; }
.tienda-linea img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.tienda-linea-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tienda-linea-txt a { font-weight: 600; color: inherit; }
.tienda-res { grid-template-columns: 64px 1fr; }
.tienda-cant { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.tienda-cant button { background: #f4f4f4; border: 0; width: 30px; height: 32px; cursor: pointer; font-size: 16px; color: #222; padding: 0; }
.tienda-cant input { width: 38px; height: 32px; border: 0; text-align: center; padding: 0; min-height: 0; }
.tienda-quitar { background: none; border: 0; font-size: 22px; cursor: pointer; color: #999; padding: 0 4px; }
.tienda-total { display: flex; justify-content: space-between; padding: 12px 0; font-size: 16px; }
.tienda-total.grande { font-size: 20px; border-top: 2px solid #222; margin-top: 8px; }
.tienda-btn, .tienda-btn-sec { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 46px;
  margin-top: 6px; padding: 10px 16px !important; line-height: 1.2 !important; border-radius: 6px; font-weight: 600; text-decoration: none !important;
  background: #111 !important; color: #fff !important; border: 0 !important; cursor: pointer; }
.tienda-btn:hover { opacity: .88; }
.tienda-btn-sec { background: #f2f2f2 !important; color: #222 !important; }
.tienda-btn[disabled] { opacity: .6; cursor: wait; }
.tienda-vacio { text-align: center; padding: 30px 0; color: #666; }
#tienda-app { padding: 30px 0 60px; }
.tienda-titulo { max-width: 1200px; margin: 40px auto 0 !important; padding: 0 20px; }
#tienda-app { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.tienda-caja { max-width: 640px; margin: 0 auto; text-align: center; }
.tienda-carrito { max-width: 900px; margin: 0 auto; }
#tienda-app[data-vista="checkout"] { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.tienda-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tienda-campos label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.tienda-campos label.ancho { grid-column: 1 / -1; }
.tienda-campos input, .tienda-campos textarea { font-weight: 400; }
.tienda-check { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-weight: 400 !important; }
.tienda-check input { margin-top: 4px; width: auto; min-height: 0; }
.tienda-trampa { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.tienda-resumen { background: #f7f7f7; padding: 24px; border-radius: 8px; position: sticky; top: 100px; }
.tienda-res-fila { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5e5e5; }
.tienda-nota { background: #fff8e1; border-left: 3px solid #f0b400; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.tienda-error { color: #c62828; min-height: 1em; }
.tienda-ok { color: #2e7d32; font-weight: 600; margin-top: 10px; }
.tienda-gracias h2 { margin-bottom: 14px; }
.tienda-agotado { opacity: .55; pointer-events: none; }
.tienda-aviso { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #222; color: #fff; padding: 12px 20px; border-radius: 8px;
  z-index: 100000; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: opacity .5s; max-width: 90vw; text-align: center; }
.tienda-aviso.malo { background: #b71c1c; }
.tienda-aviso.fuera { opacity: 0; }
@media (max-width: 860px) {
  #tienda-app[data-vista="checkout"] { grid-template-columns: 1fr; }
  .tienda-resumen { position: static; }
  .tienda-campos { grid-template-columns: 1fr; }
  .tienda-carrito .tienda-linea { grid-template-columns: 56px 1fr auto; }
  .tienda-carrito .tienda-importe { display: none; }
}
