/* ═══════════════════════════════════════════
   Tema v2 — Carrito
   Prefijo: v2k-  · Mobile first
   Mantiene las clases que genera/usa js/Cart.js:
   .card-container, .card, .delete-btn, .quantity-*, .discount-row, .shipping-*,
   .modal-cupon*, .toast*, .empty-cart, .payment-reminder / .bank-*
═══════════════════════════════════════════ */

/* Los modales, avisos y la barra fija viven fuera de .v2-main */
.modal-cupon *,
.modal-cupon *::before,
.modal-cupon *::after,
.toast,
.toast *,
.v2k-sticky,
.v2k-sticky * {
  box-sizing: border-box;
}

/* Sin relleno inferior: el footer compartido ya trae 48px de margen arriba */
.v2k-main {
  padding-top: 20px;
  padding-bottom: 0;
}

/* Carrito vacío: el contenido ocupa todo el alto para que el footer quede abajo */
body.theme-v2.is-empty-cart {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-empty-cart .v2k-main {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  padding-bottom: 40px;
}

/* ── ENCABEZADO ───────────────────────────── */

.v2k-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.v2k-title {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.v2k-count {
  margin: 4px 0 0;
  color: var(--v2-muted);
  font-size: 13px;
}

/* ── DISTRIBUCIÓN ─────────────────────────── */

.v2k-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── LISTA DE PRODUCTOS ───────────────────── */

.v2k-list {
  padding: 0 16px;
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  background: #fff;
}

.v2k-item {
  position: relative;
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.v2k-item + .v2k-item {
  border-top: 1px solid var(--v2-line);
}

.v2k-item.eliminating {
  opacity: 0;
}

.v2k-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 12px;
  padding: 16px 0;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
  user-select: none;
}

.v2k-card.dragging {
  transition: none;
}

.v2k-card.eliminating {
  opacity: 0;
  transform: translateX(-100%) !important;
}

/* Botón que aparece al deslizar (móvil) */
.v2k-swipe-delete {
  position: absolute;
  top: 50%;
  right: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--v2-ink);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.v2k-swipe-delete.visible {
  opacity: 1;
  pointer-events: auto;
}

.v2k-img {
  position: relative;
  grid-row: 1 / span 2;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--v2-soft);
  overflow: hidden;
}

.v2k-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.v2k-info {
  min-width: 0;
  padding-right: 36px;
}

.v2k-name {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v2k-meta,
.v2k-unit {
  margin: 3px 0 0;
  color: var(--v2-muted);
  font-size: 12px;
}

.v2k-alert {
  display: inline-block;
  margin: 8px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fdecec;
  color: #c03636;
  font-size: 11px;
  font-weight: 600;
}

.v2k-side {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v2k-line {
  order: 2;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

/* Selector de cantidad */
.v2k-qty {
  order: 1;
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  background: #fff;
}

.v2k-qty .quantity-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  color: var(--v2-ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.v2k-qty .quantity-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.v2k-qty .quantity-value {
  min-width: 24px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* Eliminar: en móvil solo el ícono, arriba a la derecha */
.v2k-remove {
  position: absolute;
  top: 12px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--v2-muted);
  font-family: var(--v2-font);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.v2k-remove:hover {
  color: var(--v2-ink);
}

.v2k-remove span {
  display: none;
}

/* ── RESUMEN ──────────────────────────────── */

.v2k-summary {
  padding: 20px;
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  background: #fff;
}

.v2k-summary-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

/* Cupón */
.v2k-coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed #d6d6db;
  border-radius: 14px;
  font-size: 13px;
}

.v2k-coupon .discount-text {
  display: block;
  min-width: 0;
  color: var(--v2-muted);
  line-height: 1.4;
}

.v2k-coupon .discount-text strong {
  color: var(--v2-ink) !important;
  font-weight: 600;
}

.v2k-coupon .coupon-icon {
  width: 18px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--v2-accent);
}

.v2k-coupon .apply-code,
.v2k-coupon .remove-code {
  flex-shrink: 0;
  color: var(--v2-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(29, 29, 31, 0.3);
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* Envío (las opciones las arma js/Cart.js) */
.v2k-block-title {
  margin: 20px 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shipping-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 12px 14px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shipping-option:hover {
  border-color: #c9c9cf;
}

.shipping-option.selected {
  border-color: var(--v2-ink);
  box-shadow: inset 0 0 0 1px var(--v2-ink);
}

.shipping-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--v2-ink);
}

.shipping-name,
.shipping-cost {
  font-size: 13px;
  font-weight: 600;
}

.shipping-cost {
  white-space: nowrap;
}

.shipping-description {
  grid-column: 2 / -1;
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.4;
}

.shipping-group {
  padding: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
}

.shipping-group__title {
  margin: 0 0 8px 2px;
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shipping-group__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shipping-option--zone {
  padding: 10px 12px;
  background: var(--v2-soft);
  border-color: transparent;
}

.shipping-option--zone.selected {
  background: #fff;
}

.shipping-message {
  margin: 8px 0 0;
  color: var(--v2-muted);
  font-size: 12px;
}

.shipping-message.error {
  color: #c03636;
}

/* Totales */
.v2k-totals {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--v2-line);
}

.v2k-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--v2-muted);
  font-size: 14px;
}

.v2k-row span:last-child {
  color: var(--v2-ink);
  font-weight: 500;
  text-align: right;
}

.v2k-row--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--v2-line);
  color: var(--v2-ink);
  font-size: 15px;
  font-weight: 600;
}

.v2k-row--total span:last-child {
  font-size: 20px;
  font-weight: 700;
}

.v2k-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--v2-ink);
  color: #fff;
  font-family: var(--v2-font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.v2k-order:hover {
  background: #000;
}

.v2k-note {
  margin: 10px 0 0;
  color: var(--v2-muted);
  font-size: 12px;
  text-align: center;
}

/* ── SUGERENCIAS ──────────────────────────── */
/* Secundarias a propósito: recuadro gris y filas compactas, para no confundirse con lo que ya está en el carrito */

.v2k-suggest {
  padding: 18px 16px 16px;
  border-radius: 20px;
  background: var(--v2-soft);
}

.v2k-suggest-title {
  margin: 0 0 12px 2px;
  font-size: 14px;
  font-weight: 600;
}

.v2k-suggest-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v2k-sug {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 14px;
  background: #fff;
}

.v2k-sug-img {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--v2-soft);
  overflow: hidden;
}

.v2k-sug-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.v2k-sug-info {
  min-width: 0;
}

.v2k-sug-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--v2-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v2k-sug-name:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.v2k-sug-price {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
}

.v2k-sug-price small {
  margin-left: 4px;
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: line-through;
}

.v2k-sug-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d6d6db;
  border-radius: 50%;
  background: #fff;
  color: var(--v2-ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.v2k-sug-add:hover {
  border-color: var(--v2-ink);
  background: var(--v2-ink);
  color: #fff;
}

.v2k-sug-add.is-loading {
  opacity: 0.5;
  cursor: progress;
}

/* ── BARRA FIJA (móvil) ───────────────────── */

.v2k-sticky {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Margen extra a los lados: en celulares con esquinas redondeadas el contenido no queda pegado al borde */
  padding: 12px 28px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--v2-line);
  background: #fff;
  font-family: var(--v2-font);
  transition: transform 0.25s ease;
}

.v2k-sticky.is-hidden {
  transform: translateY(110%);
}

.v2k-sticky-total small {
  display: block;
  color: var(--v2-muted);
  font-size: 11px;
}

.v2k-sticky-total strong {
  font-size: 18px;
  font-weight: 700;
}

.v2k-sticky .v2-btn {
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
}

/* ── CARRITO VACÍO ────────────────────────── */

.empty-cart {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.empty-cart-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  opacity: 0.35;
}

.empty-cart h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.empty-cart p {
  margin: 0 0 24px;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.5;
}

.btn-explorar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--v2-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.btn-explorar img {
  width: 16px;
  height: 16px;
}

/* Último pedido (carrito vacío) */
.v2k-last {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  margin: 8px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--v2-line);
  border-radius: 18px;
  background: #fff;
}

.v2k-last[hidden] {
  display: none;
}

.v2k-last-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v2k-last-text small {
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 600;
}

.v2k-last-text strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.v2k-last-text span {
  color: var(--v2-muted);
  font-size: 13px;
}

.v2k-last-actions {
  display: flex;
  gap: 8px;
}

.v2k-last-actions .v2-btn {
  flex: 1;
  padding: 0 12px;
}

/* Cuando Cart.js vacía la vista sin recargar */
.v2k-layout:has(.empty-cart) {
  display: block;
}

.v2k-list:has(.empty-cart) {
  padding: 0;
  border: 0;
  background: none;
}

body:has(.v2k-list .empty-cart) .v2k-head {
  display: none;
}

/* ── MODALES ──────────────────────────────── */
/* Móvil: hoja inferior · Desktop: diálogo centrado */

.modal-cupon {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 20, 24, 0.45);
}

.modal-cupon.show {
  display: flex;
}

.modal-cupon-contenido {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  padding: 26px 20px 22px;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: var(--v2-ink);
  font-family: var(--v2-font);
  text-align: left;
}

.modal-cerrar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--v2-soft);
  color: var(--v2-ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-titulo {
  margin: 0 0 6px;
  padding-right: 44px;
  font-size: 18px;
  font-weight: 600;
}

.modal-texto {
  margin: 0 0 18px;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.5;
}

#inputCodigoCupon {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  color: var(--v2-ink);
  font-family: var(--v2-font);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: 0;
}

#inputCodigoCupon:focus {
  border-color: var(--v2-ink);
}

.modal-botones {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-modal-aplicar,
.btn-modal-cancelar {
  flex: 1;
  height: 48px;
  border-radius: 999px;
  font-family: var(--v2-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-modal-aplicar {
  border: 0;
  background: var(--v2-ink);
  color: #fff;
}

.btn-modal-aplicar:hover {
  background: #000;
}

.btn-modal-cancelar {
  border: 1px solid #d6d6db;
  background: #fff;
  color: var(--v2-ink);
}

.btn-modal-cancelar:hover {
  border-color: var(--v2-ink);
}

.modal-mensaje {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.modal-mensaje:empty {
  display: none;
}

.modal-mensaje.ok {
  color: #1f8a4c;
}

.modal-mensaje.error {
  color: #c03636;
}

/* Formulario del pedido */
.v2k-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.v2k-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 600;
}

.v2k-field em {
  font-style: normal;
  font-weight: 400;
}

.v2k-field input,
.v2k-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  color: var(--v2-ink);
  font-family: var(--v2-font);
  font-size: 14px;
  outline: 0;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.v2k-field input:focus,
.v2k-field textarea:focus {
  border-color: var(--v2-ink);
}

.check-terminos-container {
  margin-top: 16px;
}

.check-terminos-container label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}

.check-terminos-container input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--v2-ink);
}

.check-terminos-container a {
  color: var(--v2-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cuentas bancarias dentro del modal del pedido */
.payment-reminder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--v2-soft);
  font-size: 13px;
}

.payment-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.payment-instruction {
  margin: 0;
  color: var(--v2-muted);
}

.bank-accounts {
  display: grid;
  gap: 8px;
}

.bank-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: #fff;
}

.bank-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--v2-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bank-logo.ficohsa {
  background: #0054a6;
}

.bank-logo.bac {
  background: #d40628;
}

.bank-number {
  margin: 0;
  font-weight: 600;
}

.bank-owner {
  margin: 2px 0 0;
  color: var(--v2-muted);
  font-size: 12px;
}

.payment-reminder .payment-whatsapp-btn {
  height: 46px;
  border-radius: 999px;
  background: #25d366;
  box-shadow: none;
  font-family: var(--v2-font);
}

.payment-reminder .payment-whatsapp-btn img {
  width: 18px;
  height: 18px;
}

.payment-note {
  padding: 8px 10px;
  border: 1px dashed #d6d6db;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* Condiciones de compra */
.modal-terminos .modal-cupon-contenido {
  max-width: 520px;
}

.terminos-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.55;
}

.terminos-lista strong {
  color: var(--v2-ink);
}

/* ── AVISOS (toast de js/Cart.js) ─────────── */
/* Mismos colores y forma que los avisos del resto del sitio (css/Toast.css):
   éxito con el color de la tienda; error, advertencia e info con colores fijos. */

.toast {
  --toast-bg: var(--color-primario, #ff91b7);
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 9999;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px 16px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--toast-bg);
  color: #fff;
  font-family: var(--v2-font);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 120%);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast.error {
  --toast-bg: #ef476f;
}

.toast.warning {
  --toast-bg: #f6c166;
}

.toast.info {
  --toast-bg: #4a90e2;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.toast-message {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.toast-close {
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.toast-progress {
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 12px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.toast-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  transform-origin: left;
  animation: v2k-toast-progress var(--toast-duration, 2000ms) linear forwards;
}

@keyframes v2k-toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* Móvil: de borde a borde con 16px a los lados, igual que css/Toast.css */
@media (max-width: 600px) {
  .toast {
    right: 16px;
    left: 16px;
    min-width: 0;
    max-width: none;
    transform: translateY(120%);
  }

  .toast.show {
    transform: translateY(0);
  }

  .toast-message {
    font-size: 12.5px;
  }
}

@media (max-width: 1023px) {
  /* Que el aviso no quede tapado por la barra fija */
  body:not(.is-empty-cart) .toast {
    bottom: 92px;
  }
}

/* ── Tablet ───────────────────────────────── */

@media (min-width: 700px) {
  .v2k-title {
    font-size: 30px;
  }

  .v2k-list {
    padding: 0 22px;
  }

  .v2k-card {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 18px;
    padding: 20px 0;
  }

  .v2k-img {
    grid-row: auto;
    width: 88px;
    height: 88px;
  }

  .v2k-info {
    padding-right: 0;
  }

  .v2k-name {
    font-size: 15px;
  }

  .v2k-side {
    grid-column: 3;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    align-self: stretch;
  }

  .v2k-line {
    order: 0;
  }

  .v2k-qty {
    order: 0;
  }

  .v2k-remove {
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
  }

  .v2k-remove svg {
    width: 15px;
    height: 15px;
  }

  .v2k-remove span {
    display: inline;
  }

  .modal-cupon {
    align-items: center;
    padding: 20px;
  }

  .modal-cupon-contenido {
    padding: 30px 28px 26px;
    border-radius: 24px;
  }

  .modal-pedido .modal-cupon-contenido {
    max-width: 580px;
  }

  .v2k-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2k-suggest {
    padding: 20px 20px 18px;
  }

  .v2k-suggest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .v2k-field--full {
    grid-column: 1 / -1;
  }
}

/* ── Desktop: dos columnas, resumen fijo ──── */

@media (min-width: 1024px) {
  .v2k-main {
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .v2k-head {
    margin-bottom: 24px;
  }

  /* Izquierda: productos y sugerencias · Derecha: resumen fijo a lo alto de ambas filas */
  .v2k-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas:
      "list summary"
      "suggest summary";
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 32px;
  }

  .v2k-list {
    grid-area: list;
  }

  .v2k-summary {
    grid-area: summary;
    position: sticky;
    top: 86px;
    padding: 24px;
  }

  .v2k-suggest {
    grid-area: suggest;
  }

  /* En escritorio no se desliza: se elimina con el botón visible */
  .v2k-swipe-delete,
  .v2k-sticky {
    display: none;
  }

  .v2k-card {
    transform: none !important;
    user-select: auto;
  }
}
