/* Utilizamos utilidades Tailwind para todo el layout/estilo. Este CSS incluye animaciones personalizadas. */
.hero-slide {
  filter: brightness(0.6);
  animation: fade 30s infinite;
  opacity: 0;
  transform: scale(1.1);
  transition: transform 0.3s ease;
}
.hero-slide:nth-child(1) {
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  animation-delay: 7.5s;
}
.hero-slide:nth-child(3) {
  animation-delay: 15s;
}
.hero-slide:nth-child(4) {
  animation-delay: 22.5s;
}

@keyframes fade {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  3% {
    opacity: 1;
    transform: scale(1);
  }
  22% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Animaciones personalizadas */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Aplicar animaciones a elementos */
.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Mejorar el scroll suave */
html {
  scroll-behavior: smooth;
}

/* Estilos para el drawer del carrito */
#drawer {
  transition: all 0.3s ease-in-out;
}

#drawer:not(.hidden) .transform {
  transform: translateX(0);
}

/* Mejorar la experiencia táctil en móviles */
@media (hover: none) and (pointer: coarse) {
  .hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }

  .hover\:-translate-y-1:hover {
    transform: translateY(0);
  }
}
