/* assets/css/pos.css - Estilos modernos para BasicPOS */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --dark: #0f172a;
  --surface: #ffffff;
  --background: #f8fafc;
  --border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
}

body {
  background-color: var(--background);
  color: var(--text-main);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar-pos {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link-pos {
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.nav-link-pos:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link-pos.active {
  color: #ffffff;
  background-color: var(--primary);
}

/* Estado de Caja */
.badge-caja {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-caja.abierta {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-caja.cerrada {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* POS Layout */
.pos-wrapper {
  flex: 1;
  padding: 1.5rem 0;
}

.catalog-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.product-grid-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

/* Product Card */
.product-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.product-card:active {
  transform: scale(0.98);
}

.product-card .img-container {
  height: 130px;
  width: 100%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card .img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background-color: #f8fafc;
  transition: transform 0.3s ease;
}

.product-card:hover .img-container img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.5rem;
}

/* Cart Panel */
.cart-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.cart-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  border-radius: var(--radius) var(--radius) 0 0;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
  transition: background-color 0.15s;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background-color: #f8fafc;
}

.cart-item-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

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

.cart-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.cart-qty-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
}

.cart-qty-btn:hover {
  background: #f1f5f9;
}

.cart-qty-input {
  width: 36px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  background: transparent;
  padding: 0;
}

.cart-item-subtotal {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  min-width: 65px;
  text-align: right;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: #ffffff;
  border-radius: 0 0 var(--radius) var(--radius);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.cart-total-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-total-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.btn-checkout {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.9rem;
  border-radius: 10px;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-checkout:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4);
  color: #fff;
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modals & Forms */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* Payment Quick Cash Buttons */
.quick-cash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.btn-quick-cash {
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s;
}

.btn-quick-cash:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Printable Ticket Styles */
.ticket-wrapper {
  background: #ffffff;
  padding: 15px;
  margin: 0 auto;
  max-width: 320px;
  border: 1px dashed #cbd5e1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #000000;
  line-height: 1.3;
}

.ticket-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.ticket-store-name {
  font-size: 16px;
  font-weight: bold;
}

.ticket-table {
  width: 100%;
  margin-bottom: 8px;
}

.ticket-table th, .ticket-table td {
  padding: 3px 0;
}

.ticket-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.ticket-totals {
  width: 100%;
  font-size: 13px;
}

.ticket-totals td {
  padding: 2px 0;
}

.ticket-footer {
  text-align: center;
  border-top: 1px dashed #000;
  padding-top: 8px;
  margin-top: 8px;
  font-size: 11px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printableTicket, #printableTicket * {
    visibility: visible;
  }
  #printableTicket {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
  }
  .no-print {
    display: none !important;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Filtro de Categorías en POS */
.pos-category-scroll-container {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.pos-category-scroll-container::-webkit-scrollbar {
  height: 4px;
}

.cat-pill-btn {
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background-color: #ffffff;
  color: var(--text-main);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-pill-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.cat-pill-btn.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Indicador de cuentas múltiples */
#selectCuentaActiva {
  font-size: 0.9rem;
  border-radius: 8px;
}

/* Modal Facturas y Cuentas por Cobrar */
.orden-caja-row:hover {
  background-color: #f8fafc;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (Smartphones, Tablets, Laptops, PCs)
   ========================================================================== */

/* Barra de Navegación */
.navbar-pos .navbar-brand {
  min-width: 0;
}

/* Botón Hamburguesa y Menú Desplegable */
.btn-nav-hamburguesa {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  transition: all 0.15s ease-in-out;
}

.btn-nav-hamburguesa:hover,
.btn-nav-hamburguesa:focus,
.btn-nav-hamburguesa[aria-expanded="true"] {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.dropdown-menu-pos {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0;
  min-width: 250px;
}

.dropdown-menu-pos .dropdown-item {
  padding: 0.6rem 1rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-menu-pos .dropdown-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.dropdown-menu-pos .dropdown-item.active {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  font-weight: 700;
}

.dropdown-menu-pos .dropdown-item.active i {
  color: #2563eb !important;
}

/* Selector de Vista Móvil para POS (Retirado para maximizar espacio vertical) */
.pos-view-switcher {
  display: none !important;
}

/* Barra Rápida de Cuentas Móvil en Catálogo (Cta 1, Cta 2, + Cta) */
.pos-mobile-cuentas-bar {
  background: #ffffff;
  border-radius: 50rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pos-btn-cta-mobile {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 50rem;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  color: #334155;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
}

.pos-btn-cta-mobile.active {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

.pos-btn-cta-mobile:not(.active):hover {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.pos-btn-cta-mobile .btn-close-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 2px;
  opacity: 0.75;
  transition: opacity 0.15s;
  font-size: 0.82rem;
  font-weight: bold;
}

.pos-btn-cta-mobile .btn-close-cta:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.12);
}

/* Barra Fija Inferior en Móvil para Acceso Inmediato al Carrito / Cobro */
.pos-mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  z-index: 1040;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem 1rem;
}

body.has-mobile-bottom-bar {
  padding-bottom: 76px !important;
}

/* Tablas Responsivas con scroll suave en pantallas táctiles */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table th, .table td {
  vertical-align: middle;
}

/* Ajustes para Dispositivos Móviles y Tablets Pequeñas (< 992px) */
@media (max-width: 991.98px) {
  .pos-wrapper {
    padding: 0.75rem 0;
  }

  .pos-col-catalogo.mobile-hidden,
  .pos-col-carrito.mobile-hidden {
    display: none !important;
  }

  .catalog-panel {
    height: auto !important;
    min-height: auto;
    max-height: none;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .cart-panel {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 85px) !important;
    height: calc(100dvh - 85px) !important;
    min-height: 380px;
    max-height: calc(100dvh - 85px) !important;
    padding: 0 !important;
    margin-bottom: 0.25rem;
    overflow: hidden;
  }

  .cart-header {
    padding: 0.65rem 0.85rem !important;
    flex-shrink: 0;
  }

  .product-grid-container {
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0;
  }

  .cart-items-container {
    flex: 1 1 auto;
    max-height: none !important;
    overflow-y: auto;
    padding: 0.4rem 0.75rem;
  }

  .cart-footer {
    flex-shrink: 0;
    padding: 0.65rem 0.85rem 0.75rem !important;
    background: #f8fafc;
    border-top: 1px solid var(--border);
  }

  .cart-total-row {
    margin-bottom: 0.35rem !important;
  }

  .cart-total-amount {
    font-size: 1.55rem !important;
  }

  .cart-total-label {
    font-size: 1rem !important;
  }

  /* Ajuste de navegación al desplegarse en móvil */
  .navbar-collapse {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
  }

  .nav-link-pos {
    padding: 10px 14px;
    margin-bottom: 3px;
  }
}

/* En pantallas de escritorio (>= 992px) ambas columnas siempre visibles lado a lado */
@media (min-width: 992px) {
  .pos-col-catalogo,
  .pos-col-carrito {
    display: flex !important;
  }
}

/* Ajustes Finos para Teléfonos Móviles (< 768px) */
@media (max-width: 767.98px) {
  .brand-title {
    font-size: 1.15rem;
  }

  .badge-caja {
    font-size: 0.75rem;
    padding: 4px 8px;
    gap: 4px;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Tarjetas de Producto táctiles y compactas */
  .product-card .img-container {
    height: 105px;
  }

  .product-card .card-body {
    padding: 0.6rem;
  }

  .product-title {
    font-size: 0.85rem;
    min-height: 2.1em;
  }

  .product-price {
    font-size: 1rem;
    margin-top: 0.35rem;
  }

  /* Carrito Móvil: Layout de 2 filas con espaciado amplio para que los nombres de los productos sean 100% legibles */
  .cart-item {
    display: grid !important;
    grid-template-columns: 46px 1fr auto !important;
    grid-template-areas:
      "img info del"
      "img qty subtotal" !important;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.35rem;
    padding: 0.75rem 0.35rem;
  }

  .cart-item-img {
    grid-area: img;
    width: 46px;
    height: 46px;
    object-fit: contain;
    background-color: #f8fafc;
    padding: 2px;
    align-self: start;
    margin-top: 2px;
  }

  .cart-item-info {
    grid-area: info;
    min-width: 0;
    width: 100%;
  }

  .cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.25;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cart-item-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
  }

  .cart-item-del-btn {
    grid-area: del;
    justify-self: end;
    align-self: start;
    font-size: 1.15rem;
    padding: 2px 6px !important;
    color: #ef4444;
  }

  .cart-qty-ctrl {
    grid-area: qty;
    justify-self: start;
    border-radius: 8px;
    margin-top: 2px;
  }

  .cart-qty-btn {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .cart-qty-input {
    width: 36px;
    height: 34px;
    font-size: 0.95rem;
  }

  .cart-item-subtotal {
    grid-area: subtotal;
    justify-self: end;
    text-align: right;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
  }

  /* Selector de cuentas en cabecera del carrito */
  #selectCuentaActiva {
    font-size: 0.82rem;
    padding-left: 0.4rem;
    padding-right: 1.4rem;
  }

  /* Botones de Cobro Rápido en Modal de Pago */
  .btn-quick-cash {
    min-height: 44px;
    font-size: 1rem;
    padding: 10px 8px;
  }

  .btn-checkout {
    padding: 0.65rem 0.85rem;
    font-size: 1.05rem;
  }

  /* Modales optimizados para móviles */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header,
  .modal-footer {
    padding: 0.85rem 1rem;
  }
}

/* Botones de cantidades rápidas en modal de cantidad */
.btn-quick-qty {
  min-width: 38px;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.btn-quick-qty:hover,
.btn-quick-qty:active {
  background-color: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Modales desplazables con formulario: garantizar pie de modal y botón de guardar siempre visibles */
.modal-dialog-scrollable .modal-content > form,
.modal-dialog-scrollable form.modal-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  max-height: 100% !important;
  overflow: hidden !important;
  min-height: 0 !important;
}

.modal-dialog-scrollable .modal-content > form > .modal-body,
.modal-dialog-scrollable form.modal-content > .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
}

.modal-dialog-scrollable .modal-content > form > .modal-footer,
.modal-dialog-scrollable form.modal-content > .modal-footer {
  flex-shrink: 0 !important;
}

/* ==========================================================================
   ANIMACIÓN: VUELO DE IMAGEN AL CARRITO Y EFECTO ZOOM
   ========================================================================== */
.pos-flying-img {
  position: fixed !important;
  z-index: 100050 !important;
  pointer-events: none !important;
  border-radius: 12px;
  object-fit: cover;
  background: #ffffff;
  border: 2px solid var(--primary, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: left 0.58s cubic-bezier(0.2, 0.85, 0.25, 1),
              top 0.58s cubic-bezier(0.2, 0.85, 0.25, 1),
              width 0.58s cubic-bezier(0.2, 0.85, 0.25, 1),
              height 0.58s cubic-bezier(0.2, 0.85, 0.25, 1),
              transform 0.58s cubic-bezier(0.2, 0.85, 0.25, 1),
              opacity 0.58s ease-in,
              border-radius 0.58s ease !important;
  will-change: left, top, width, height, transform, opacity;
}

/* Efecto Zoom y Rebote en el Panel del Carrito (Escritorio) */
@keyframes posCartZoomPulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.045);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25), 0 16px 32px rgba(37, 99, 235, 0.2);
  }
  70% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-sm);
  }
}

.pos-cart-zooming {
  animation: posCartZoomPulse 0.55s cubic-bezier(0.25, 1, 0.5, 1) !important;
  transform-origin: center right !important;
}

/* Efecto Zoom en el botón del Carrito en vista Móvil */
@keyframes posBtnCartZoomPulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.35), 0 8px 20px rgba(0, 0, 0, 0.18);
    background-color: #eff6ff;
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.pos-btn-cart-zooming {
  animation: posBtnCartZoomPulse 0.55s cubic-bezier(0.25, 1, 0.5, 1) !important;
  transform-origin: center center !important;
  position: relative;
  z-index: 10;
}

/* Rebote dinámico del icono de la cesta */
@keyframes posIconCartBounce {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.45) rotate(-14deg); color: #1d4ed8; }
  55% { transform: scale(1.25) rotate(12deg); color: #2563eb; }
  80% { transform: scale(1.08) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.pos-icon-cart-bounce {
  display: inline-block !important;
  animation: posIconCartBounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  transform-origin: center center !important;
}

/* Pop del contador de artículos en carrito */
@keyframes posBadgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.pos-badge-pop {
  display: inline-block !important;
  animation: posBadgePop 0.4s ease-out !important;
}

/* Pop de la barra inferior fija en móvil */
@keyframes posBottomBarPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); box-shadow: 0 -4px 20px rgba(37, 99, 235, 0.5); }
  100% { transform: scale(1); }
}

.pos-bottombar-pop {
  animation: posBottomBarPop 0.45s ease-out !important;
}


