/* Estilos personalizados y utilidades para el Catálogo WhatsApp - Azul Accesorios */

:root {
  --primary: #4424e9;
  --primary-hover: #371fc5;
  --primary-contrast: #ffffff;
  --brand: #4424e9;
  --brand-hover: #371fc5;
  --brand-glow: rgba(68, 36, 233, 0.35);
  --volt: #4424e9;
  --volt-hover: #371fc5;
  --volt-glow: rgba(68, 36, 233, 0.4);
  --whatsapp: #25d366;
  --whatsapp-hover: #128c7e;
  --dark: #0b0c1b;
  --dark-surface: #12132b;
}

/* Evitar resaltado gris de tap en móviles */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Scrollbar estética */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Ocultar barra de scroll en contenedores horizontales */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

/* Evitar zoom molesto en inputs en Safari iOS */
@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Efectos de transición */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botón flotante WhatsApp */
.wa-floating-btn {
  position: fixed;
  bottom: 84px; /* Separado de la barra inferior móvil */
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background-color: #25d366;
  color: white;
  border-radius: 9999px;
  box-shadow: 0 8px 20px -4px rgba(37, 211, 102, 0.5), 0 4px 8px -2px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 640px) {
  .wa-floating-btn {
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
  }
}
.wa-floating-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 16px 26px -6px rgba(37, 211, 102, 0.6);
}

/* Botón flotante Mi Pedido (Desktop) - Estilo Azul Accesorios */
.cart-floating-btn {
  display: none;
}
@media (min-width: 768px) {
  .cart-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 96px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0b0c1b;
    color: #ffffff;
    border: 1.5px solid #4424e9;
    padding: 12px 22px;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.4), 0 0 15px rgba(68, 36, 233, 0.25);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
  }
  .cart-floating-btn .cart-floating-icon {
    color: #818cf8;
    transition: transform 0.2s ease, color 0.2s ease;
  }
  .cart-floating-btn:hover {
    background-color: #4424e9;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -4px rgba(68, 36, 233, 0.45);
  }
  .cart-floating-btn:hover .cart-floating-icon {
    color: #ffffff;
    transform: scale(1.1);
  }
}

/* Ondas pulsantes de WhatsApp */
.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background-color: rgba(37, 211, 102, 0.6);
  animation: wa-pulse-animation 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: -1;
}

@keyframes wa-pulse-animation {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Insignia del Carrito */
.cart-counter-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background-color: #4424e9;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Modal del Carrito Centrado */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 10, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
@media (min-width: 640px) {
  .cart-modal-overlay {
    padding: 20px;
  }
}
.cart-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-modal-overlay.open .cart-modal-card {
  transform: scale(1) translateY(0);
}

/* Animación de apertura para Drawer / Offcanvas si se usa */
.drawer-enter {
  transform: translateX(100%);
}
.drawer-enter-active {
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-exit {
  transform: translateX(0);
}
.drawer-exit-active {
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 1, 1);
}

/* Chips de Variación (Talla / Color) */
.variation-chip {
  cursor: pointer;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  transition: all 0.15s ease;
  user-select: none;
}
.variation-chip:hover {
  border-color: #4424e9;
  background: #f5f3ff;
}
.variation-chip.selected {
  border-color: #4424e9;
  background-color: #eef2ff;
  color: #4424e9;
  font-weight: 800;
  box-shadow: 0 0 0 1.5px #4424e9;
}

/* Tarjetas de Producto */
.product-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}
@media (min-width: 768px) {
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(68, 36, 233, 0.15), 0 0 20px rgba(68, 36, 233, 0.08);
    border-color: #4424e9;
  }
}

.product-card .img-zoom {
  transition: transform 0.35s ease;
}
@media (min-width: 768px) {
  .product-card:hover .img-zoom {
    transform: scale(1.05);
  }
}

/* Botón WhatsApp */
.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-whatsapp:hover {
  background-color: #1eb956;
}

/* Botón Primario Brand */
.btn-volt, .btn-brand {
  background-color: #4424e9;
  color: #ffffff;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-volt:hover, .btn-brand:hover {
  background-color: #371fc5;
  box-shadow: 0 6px 18px rgba(68, 36, 233, 0.35);
}

/* Toast de notificación */
.toast-notification {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0b0c1b;
  color: #ffffff;
  border: 1px solid #4424e9;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(68, 36, 233, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
@media (min-width: 640px) {
  .toast-notification {
    bottom: 24px;
  }
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Barra de navegación inferior fija para móviles */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 12, 27, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(68, 36, 233, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 45;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-bar a,
.mobile-bottom-bar button {
  color: #94a3b8;
  transition: color 0.15s ease;
}
.mobile-bottom-bar a.active,
.mobile-bottom-bar a:hover,
.mobile-bottom-bar button:hover {
  color: #818cf8;
}
@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none;
  }
}
