/* ========================================================
   VICTORIA VENDE — Estilos Principales, Animaciones & Rendimiento 60fps
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #10b981; /* Verde esmeralda fresco */
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --secondary: #2563eb;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --dark: #0f172a;
  --gray-bg: #f8fafc;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

button, a, input, select, textarea, .categoria-btn, .producto-card, .btn-fav {
  touch-action: manipulation;
}

body {
  background-color: var(--gray-bg);
  color: #1e293b;
  overflow-x: hidden;
  padding-bottom: 72px; /* Espacio para barra inferior móvil */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Optimización GPU para Modales, Header y Navbar Inferior */
header, nav, .modal-content-animated, .toast {
  transform: translateZ(0);
  will-change: transform;
}

/* Optimización de Imágenes */
img {
  content-visibility: auto;
}

/* Scrollbar personalizada */
::-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 horizontal en categorías */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Transiciones ultra fluidas en tarjetas */
.card-hover {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}
.card-hover:active {
  transform: scale(0.98);
}

/* Animaciones de Modales */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease-out;
}

.modal-content-animated {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
}

/* Botón WhatsApp Vibrante */
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: all 0.15s ease;
}
.btn-whatsapp:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  transform: translateY(-1px);
}
.btn-whatsapp:active {
  transform: scale(0.98);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

@media (min-width: 768px) {
  #toast-container {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
  }
}

.toast {
  pointer-events: auto;
  animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
