/**
 * MMCOL Modern Visual Upgrade
 * Solo mejoras sutiles - Sin cambiar el fondo
 * Color dorado del landing React
 */

/* ========================================
   1. TIPOGRAFÍA PREMIUM
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* 🎨 COLOR DORADO DEL LANDING (más amarillo) */
  --gold: hsl(43, 74%, 49%);           /* #dead3d */
  --gold-light: hsl(43, 80%, 60%);     /* Más claro */
  --gold-dark: hsl(43, 70%, 35%);      /* Más oscuro */
  
  /* Sombras elegantes */
  --shadow-gold: 0 4px 30px hsl(43 74% 49% / 0.25);
  --shadow-elegant: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
  
  /* Gradientes con el nuevo dorado */
  --gradient-gold: linear-gradient(135deg, hsl(43, 74%, 49%) 0%, hsl(43, 80%, 60%) 50%, hsl(43, 74%, 49%) 100%);
  --gradient-gold-shimmer: linear-gradient(90deg, transparent, hsl(43 74% 49% / 0.4), transparent);
  
  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

/* ========================================
   2. ANIMACIONES SUTILES
   ======================================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px hsl(43 74% 49% / 0.4);
  }
  50% {
    box-shadow: 0 0 40px hsl(43 74% 49% / 0.7);
  }
}

@keyframes text-glow {
  0%, 100% {
    text-shadow: 0 0 20px hsl(43 74% 49% / 0.5);
  }
  50% {
    text-shadow: 0 0 30px hsl(43 74% 49% / 0.8);
  }
}

/* Clases de animación reutilizables */
.animate-fade-up {
  animation: fadeUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Delays para animaciones secuenciales */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   3. MEJORAS TIPOGRÁFICAS
   ======================================== */

/* Títulos principales con Playfair Display */
h1, h2, h3,
.font-display,
.text-display {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Mejorar legibilidad del texto */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

/* Texto dorado con brillo */
.text-gold-glow {
  color: var(--gold);
  animation: text-glow 3s ease-in-out infinite;
}

/* ========================================
   4. CARDS DE PRODUCTOS MEJORADAS
   ======================================== */

.product-card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-elegant);
}

.product-card:hover::before {
  opacity: 1;
}

/* Efecto shimmer en hover */
.product-card .shimmer-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-gold-shimmer);
  transform: translateX(-100%);
  pointer-events: none;
  opacity: 0;
}

.product-card:hover .shimmer-effect {
  animation: shimmer 1.5s ease-in-out;
  opacity: 0.5;
}

/* Imagen de producto mejorada */
.product-image-container {
  background: linear-gradient(135deg, #fefdfb 0%, #f9f7f4 100%);
  border-bottom: 1px solid rgba(212, 168, 73, 0.1);
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover .product-image-container {
  background: linear-gradient(135deg, #fff 0%, #fefdfb 100%);
}

/* ========================================
   5. BOTONES CON NUEVO DORADO + SHIMMER
   ======================================== */

/* Botón primario dorado mejorado */
.btn-gold,
.bg-gold,
button.bg-gold,
a.bg-gold,
button[class*="bg-gold"],
a[class*="bg-gold"] {
  background: var(--gradient-gold) !important;
  box-shadow: var(--shadow-gold);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-gold:hover,
.bg-gold:hover,
button.bg-gold:hover,
a.bg-gold:hover,
button[class*="bg-gold"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 40px hsl(43 74% 49% / 0.4);
}

/* Efecto shimmer en botones */
.btn-gold::after,
.bg-gold::after,
button.bg-gold::after,
a.bg-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-gold:hover::after,
.bg-gold:hover::after,
button.bg-gold:hover::after,
a.bg-gold:hover::after {
  left: 100%;
}

/* Botón de carrito flotante */
.cart-btn-float {
  box-shadow: var(--shadow-elegant);
  animation: float 3s ease-in-out infinite;
}

/* ========================================
   6. HEADER Y NAVEGACIÓN
   ======================================== */

/* Header con blur moderno */
header,
.unified-header,
.header-main {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(212, 168, 73, 0.1) !important;
  transition: all 0.3s ease;
}

header.scrolled,
.header-main.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: var(--shadow-soft);
}

/* Logo con animación suave */
.logo-container img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   7. FILTROS Y MODALS MEJORADOS
   ======================================== */

/* Modal con backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
}

/* Scrollbar personalizada */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gradient-gold);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, hsl(43, 80%, 60%) 0%, hsl(43, 74%, 49%) 100%);
}

/* ========================================
   8. BADGES Y ETIQUETAS
   ======================================== */

/* Badge de descuento mejorado */
.badge-discount {
  background: var(--gradient-gold);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-gold);
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Badge "Nuevo" */
.badge-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge "Popular" / Social Proof */
.badge-popular {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

/* ========================================
   9. INPUTS Y FORMS MEJORADOS
   ======================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  border-radius: var(--radius-lg);
  border: 2px solid rgba(212, 168, 73, 0.2);
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px hsl(43 74% 49% / 0.1);
  outline: none;
}

/* ========================================
   10. EFECTOS DE CARGA
   ======================================== */

/* Skeleton loader */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #f8f8f8 50%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
}

/* Spinner dorado */
.spinner-gold {
  border: 3px solid hsl(43 74% 49% / 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   11. CARRITO Y BADGES ANIMADOS
   ======================================== */

.cart-badge,
.notification-badge,
.badge-count {
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ========================================
   12. SCROLL PROGRESS Y SCROLL TO TOP
   ======================================== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-gold);
  z-index: 9999;
  transform-origin: left;
  box-shadow: 0 0 10px hsl(43 74% 49% / 0.5);
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--gradient-gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 40px hsl(43 74% 49% / 0.4);
}

/* ========================================
   13. RESPONSIVE MEJORAS
   ======================================== */

@media (max-width: 768px) {
  :root {
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
  }
  
  .product-card {
    border-radius: var(--radius-xl);
  }
  
  h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

/* ========================================
   14. UTILIDADES ADICIONALES
   ======================================== */

/* Gradiente de texto dorado */
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Borde dorado con gradiente */
.border-gold-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              var(--gradient-gold) border-box;
}

/* Overlay oscuro para modals */
.overlay-dark {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* Separador decorativo */
.divider-gold {
  height: 2px;
  background: var(--gradient-gold);
  opacity: 0.3;
  margin: 2rem 0;
}

/* Hover con escala suave */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Sombra al hacer scroll */
.shadow-on-scroll {
  transition: box-shadow 0.3s ease;
}

.shadow-on-scroll.scrolled {
  box-shadow: var(--shadow-soft);
}

/* ========================================
   15. MEJORAS PARA ACCESIBILIDAD
   ======================================== */

/* Focus visible mejorado */
*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reducir movimiento para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
