/* ========================================================================
   CARRITO FLOTANTE - ESTILOS
   ======================================================================== */

/* ========== BOTÓN FLOTANTE ========== */
.cart-floating-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-floating-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.5);
}

.cart-floating-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.cart-floating-btn svg {
  width: 28px;
  height: 28px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #fff;
  border-radius: 12px;
  min-width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========== MODAL DEL CARRITO ========== */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.cart-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cart-modal-content {
  position: relative;
  z-index: 1501;
  background: #fff;
  border-radius: 20px;
  width: 900px;
  max-width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: cartSlideIn 0.3s ease-out;
}

@keyframes cartSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 2px solid #f3f4f6;
}

.cart-modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: #111827;
}

.cart-close-btn {
  background: transparent;
  border: 0;
  font-size: 28px;
  color: #9ca3af;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.cart-close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Body */
.cart-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

/* Banner almacén destino */
.cart-whs-banner {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 10px;
}
.cart-whs-banner .cart-whs-label {
  color: #64748b;
  font-weight: 500;
}
.cart-whs-banner.cart-whs-df {
  background: #fef9ee;
  border-left-color: #f59e0b;
  color: #92400e;
}

/* Banner directo fábrica */
.cart-df-banner {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 16px;
}
.cart-item-price .df-price {
  color: #f59e0b;
  font-weight: 600;
  font-size: 13px;
  font-style: italic;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty p {
  font-size: 18px;
  color: #6b7280;
  margin-bottom: 24px;
}

/* Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.cart-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-code {
  font-weight: 700;
  color: #f97316;
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item-name {
  font-size: 15px;
  color: #111827;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
}

.cart-item-quantity {
  flex-shrink: 0;
}

.cart-qty-input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.cart-qty-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.cart-item-price {
  flex-shrink: 0;
  text-align: right;
  min-width: 120px;
}

.cart-item-price .unit-price {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.cart-item-price .total-price {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.cart-item-remove {
  flex-shrink: 0;
  background: transparent;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s;
}

.cart-item-remove:hover {
  background: #fee2e2;
}

/* Footer */
.cart-modal-footer {
  padding: 24px 32px;
  border-top: 2px solid #f3f4f6;
  background: #fafafa;
  border-radius: 0 0 20px 20px;
}

.cart-comment {
  margin-bottom: 14px;
}
.cart-comment label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}
.cart-comment textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  transition: border-color .2s;
}
.cart-comment textarea:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.cart-comment textarea::placeholder {
  color: #94a3b8;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-total strong {
  font-size: 28px;
  color: #f97316;
}

.cart-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ========== NOTIFICACIÓN ========== */
.cart-notification {
  position: fixed;
  bottom: 120px;
  right: 32px;
  z-index: 2000;
  background: #059669;
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s, transform 0.3s;
}

.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* ========== BOTÓN AÑADIR AL CARRITO (en tabla) ========== */
.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-add-to-cart:active {
  transform: translateY(0);
}

.btn-add-to-cart svg {
  width: 16px;
  height: 16px;
  stroke: #f97316;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .cart-floating-btn {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }

  .cart-floating-btn svg {
    width: 24px;
    height: 24px;
  }

  /* Modal fullscreen */
  .cart-modal {
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  .cart-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
  }

  /* Header compacto */
  .cart-modal-header {
    padding: 12px 14px;
    flex-shrink: 0;
  }
  .cart-modal-header h2 {
    font-size: 16px;
  }
  .cart-close-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  /* Body: scroll, compacto */
  .cart-modal-body {
    padding: 10px 12px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
  }

  /* Items: card estilo Amazon */
  .cart-items {
    gap: 10px;
  }
  .cart-item {
    display: grid !important;
    grid-template-columns: 72px 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0 10px;
    padding: 10px;
    border-radius: 10px;
    align-items: start;
  }
  /* Fila 1: imagen | info | eliminar */
  .cart-item-image {
    grid-column: 1;
    grid-row: 1;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
  }
  .cart-item-image img {
    border-radius: 8px;
  }
  .cart-item-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .cart-item-code {
    font-size: 11px;
    margin-bottom: 1px;
  }
  .cart-item-name {
    font-size: 13px;
    margin-bottom: 4px;
    white-space: normal;
    overflow: visible;
    line-height: 1.3;
  }
  .cart-item-meta {
    font-size: 10px;
    gap: 1px;
    flex-direction: column;
  }
  .cart-item-remove {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  /* Fila 2: cantidad (izq) + precio (der) */
  .cart-item-quantity {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-content: flex-start;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
  }
  .cart-qty-input {
    width: 48px;
    padding: 5px 2px;
    font-size: 14px;
    border-radius: 6px;
  }
  .cart-item-price {
    grid-column: 3;
    grid-row: 2;
    text-align: right;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
  }
  .cart-item-price .total-price {
    font-size: 16px;
    font-weight: 800;
    color: #ea580c;
  }
  .cart-item-price .unit-price {
    font-size: 10px;
    margin-bottom: 0;
    color: #6b7280;
  }
  /* Botón lotes: fila completa */
  .btn-cart-lotes {
    grid-column: 1 / -1;
    height: 32px;
    font-size: 11px;
    padding: 0 10px;
    justify-self: start;
  }

  /* Footer: siempre visible, compacto */
  .cart-modal-footer {
    padding: 10px 14px 12px;
    flex-shrink: 0;
    border-radius: 0;
  }
  .cart-total {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .cart-total strong {
    font-size: 20px;
  }
  /* Acciones: en fila, no columna */
  .cart-actions {
    flex-direction: row !important;
    gap: 8px;
  }
  .cart-actions .btn {
    flex: 1;
    width: auto !important;
    min-height: 42px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cart-notification {
    right: 20px;
    bottom: 90px;
    left: 20px;
  }

  /* Carrito vacío: menos padding */
  .cart-empty {
    padding: 30px 16px;
  }
  .cart-empty p {
    font-size: 15px;
  }

  /* Botón Añadir dentro de fichas móvil */
  .pcard-actions .btn-add-to-cart {
    padding: 6px 10px !important;
    font-size: 11px !important;
    border-radius: 8px;
    height: 36px;
    gap: 3px;
  }
  .pcard-actions .btn-add-to-cart svg {
    width: 14px;
    height: 14px;
  }
}

/* ── Botón Lotes en línea del carrito ── */
.btn-cart-lotes {
  flex-shrink: 0;
  background: #fff7ed;
  border: 1px solid #f97316;
  color: #ea6c0a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  height: 40px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  gap: 5px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-cart-lotes:hover { background: #f97316; color: #fff; }
.btn-cart-lotes.has-lotes { background: #f97316; color: #fff; }

/* ── Flechas +/- en modal de lotes ── */
.lote-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.lote-qty-wrap .lote-qty-input {
  width: 70px;
  text-align: right;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.lote-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.1s;
}
.lote-qty-btn:hover { background: #e8e8e8; }
.lote-qty-btn.plus { border-color: #f97316; color: #f97316; }
.lote-qty-btn.plus:hover { background: #f97316; color: #fff; }

/* ── Botón Lotes en línea del carrito ── */
.btn-cart-lotes {
  flex-shrink: 0;
  background: #fff7ed;
  border: 1px solid #f97316;
  color: #ea6c0a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  height: 40px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  gap: 5px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-cart-lotes:hover { background: #f97316; color: #fff; }
.btn-cart-lotes.has-lotes { background: #f97316; color: #fff; }

/* ── Flechas +/- en modal de lotes ── */
.lote-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.lote-qty-wrap .lote-qty-input {
  width: 70px;
  text-align: right;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.lote-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.1s;
}
.lote-qty-btn:hover { background: #e8e8e8; }
.lote-qty-btn.plus { border-color: #f97316; color: #f97316; }
.lote-qty-btn.plus:hover { background: #f97316; color: #fff; }
.lote-qty-btn.minus { border-color: #ddd; color: #666; }
.lote-qty-btn.minus:hover { background: #e8e8e8; color: #333; }
.lote-qty-btn { width: 24px; height: 24px; font-size: 14px; }
.lote-qty-wrap .lote-qty-input { width: 55px; font-size: 12px; }

/* Botón Añadir alineado con Alternativos */
.btn-add-to-cart {
  font-size: 11px !important;
  padding: 4px 8px !important;
  height: auto !important;
  color: #f97316 !important;
}

/* Ajuste botón Añadir para alinearse con btn-xs en col-actions */
.col-actions .btn-add-to-cart {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
  gap: 4px;
}

/* ===== Modal Lotes del Carrito ===== */
.cl-window {
  background: #fff;
  border-radius: 14px;
  max-width: 600px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  overflow: hidden;
}
.cl-header {
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, var(--brand, #f97316), #ea580c);
  color: #fff;
}
.cl-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.cl-close {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  padding: 2px 10px;
  cursor: pointer;
}
.cl-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.cl-summary {
  margin: 0 0 10px;
  color: #475569;
  font-size: 13px;
}
.cl-sep { color: #cbd5e1; margin: 0 4px; }
.cl-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: #9ca3af;
}
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cl-lote-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.cl-lote-info {
  flex: 1;
  min-width: 0;
}
.cl-lote-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
  line-height: 1.3;
}
.cl-lote-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  flex-wrap: wrap;
}
.cl-lote-disp b {
  color: #059669;
}
.cl-footer {
  padding: 10px 16px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Modal Lotes — móvil fullscreen */
@media (max-width: 768px) {
  .cl-window {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .cl-lote-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cl-lote-name {
    font-size: 14px;
  }
  .cl-lote-meta {
    font-size: 12px;
  }
  .lote-qty-wrap {
    justify-content: flex-start;
  }
  .cl-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .cl-sep { display: none; }
  .cl-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}
.col-actions .btn-add-to-cart:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.95);
}

/* ========== BOTÓN FLOTANTE "AÑADIR TODOS" (preselección) ========== */
.presel-floating-btn {
  position: fixed;
  bottom: 32px;
  right: 110px;
  z-index: 999;
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.presel-floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.5);
}
.presel-floating-btn:active {
  transform: translateY(-1px);
}
.presel-floating-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Tooltip con lista de artículos */
.presel-tooltip {
  position: absolute;
  bottom: 56px;
  right: 0;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 400;
  min-width: 200px;
  max-width: 300px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  pointer-events: none;
  white-space: normal;
}
.presel-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #1e293b;
  transform: rotate(45deg);
}
.presel-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.presel-tip-row:last-child { border-bottom: 0; }
.presel-tip-code {
  color: #fb923c;
  font-weight: 600;
  font-size: 11px;
}
.presel-tip-qty {
  color: #94a3b8;
  font-size: 11px;
  flex-shrink: 0;
}
.presel-tip-more {
  color: #94a3b8;
  font-style: italic;
  padding-top: 4px;
  font-size: 11px;
}

@media (max-width: 768px) {
  .presel-floating-btn {
    bottom: 20px;
    right: 80px;
    height: 42px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 21px;
  }
  .presel-floating-btn svg {
    width: 16px;
    height: 16px;
  }
  .presel-tooltip {
    right: -10px;
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .presel-floating-btn {
    bottom: 56px;
    right: 72px;
    height: 38px;
    padding: 0 12px;
    font-size: 11px;
  }
}

/* Evitar que col-actions se estire a toda la altura de la fila */
td.col-actions {
  vertical-align: middle;
}


/* ==========================================================
   MEJORAS ESTÉTICAS CARRITO v2.0
   ========================================================== */

/* Transiciones suaves en items del carrito */
.cart-item {
  transition: box-shadow 200ms ease, transform 150ms ease;
}

.cart-item:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

/* Botón flotante: transición mejorada */
.cart-floating-btn {
  transition: transform 200ms ease, box-shadow 200ms ease;
}

/* Notificación: más refinada */
.cart-notification {
  border-radius: 8px;
  font-size: 14px;
}

/* Modal content: sombra mejorada */
.cart-modal-content {
  box-shadow: 0 20px 60px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.08);
}

/* Scrollbar en el modal body */
.cart-modal-body::-webkit-scrollbar {
  width: 6px;
}

.cart-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.cart-modal-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.cart-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* Responsive carrito ≤480px */
@media (max-width: 480px) {
  .cart-floating-btn {
    width: 48px;
    height: 48px;
    bottom: 56px;
    right: 16px;
  }

  .cart-floating-btn svg {
    width: 20px;
    height: 20px;
  }

  .cart-notification {
    right: 12px;
    left: 12px;
    bottom: 80px;
    font-size: 13px;
    padding: 12px 16px;
  }
}

/* ========== MODO DE ENVÍO ========== */
.cart-shipping-mode {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.shipping-mode-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.shipping-cards {
  display: flex;
  gap: 12px;
}
.shipping-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}
.shipping-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.shipping-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.shipping-card-icon {
  font-size: 28px;
  line-height: 1;
}
.shipping-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1.3;
  margin-top: 4px;
}
.shipping-card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}
.shipping-card.selected {
  border-color: #f97316;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #f97316, 0 4px 12px rgba(249,115,22,.15);
}
.shipping-card.selected .shipping-card-name {
  color: #ea580c;
}
.shipping-card.selected .shipping-card-desc {
  color: #c2410c;
}

@media (max-width: 768px) {
  .cart-shipping-mode {
    margin-top: 14px;
    padding: 12px;
  }
  .shipping-cards {
    flex-direction: column;
    gap: 8px;
  }
  .shipping-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
    text-align: left;
  }
  .shipping-card-icon {
    font-size: 22px;
    flex-shrink: 0;
  }
  .shipping-card-name {
    font-size: 12px;
    margin-top: 0;
  }
  .shipping-card-desc {
    font-size: 11px;
  }
}

/* ========== MODAL DUPLICADOS ========== */
.dup-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dup-table th { background: #fef3c7; color: #92400e; padding: 8px 10px; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .3px; }
.dup-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.dup-table .dup-code { font-weight: 700; color: #ea580c; font-size: .8rem; }
.dup-table .dup-name { font-size: .78rem; color: #64748b; font-weight: 400; }
.dup-table .dup-order { font-weight: 600; color: #1e40af; font-size: .85rem; }
.dup-table .dup-days { font-size: .73rem; color: #9ca3af; }

/* ========== LÍNEAS SIN PRECIO (recalcular) ========== */
.zero-price-warn {
  color: #d97706;
  font-weight: 600;
  font-size: 13px;
  font-style: italic;
  animation: zeroPricePulse 1.5s ease-in-out infinite;
}
@keyframes zeroPricePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
.cart-zero-price-banner {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}
