* {
  animation-fill-mode: both;
}

body {
  animation: pageFadeIn 0.5s ease-out;
}

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

.navbar {
  animation: slideDown 0.6s ease-out;
}

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

.navbar .logo {
  animation: fadeInLeft 0.8s ease-out 0.2s both;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.navbar .links {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

.navbar .icons {
  animation: fadeInRight 0.8s ease-out 0.4s both;
}

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

.navbar .links a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .links a:hover {
  transform: translateY(-2px);
}

.search-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card {
  animation: slideInUp 0.6s ease-out both;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:nth-child(1) {
  animation-delay: 0.1s;
}
.product-card:nth-child(2) {
  animation-delay: 0.2s;
}
.product-card:nth-child(3) {
  animation-delay: 0.3s;
}
.product-card:nth-child(4) {
  animation-delay: 0.4s;
}
.product-card:nth-child(5) {
  animation-delay: 0.5s;
}
.product-card:nth-child(6) {
  animation-delay: 0.6s;
}
.product-card:nth-child(7) {
  animation-delay: 0.7s;
}
.product-card:nth-child(8) {
  animation-delay: 0.8s;
}

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

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card-img img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.offer-badge {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.filter-bar {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.filter-item {
  animation: fadeInScale 0.5s ease-out both;
}

.filter-item:nth-child(1) {
  animation-delay: 0.6s;
}
.filter-item:nth-child(2) {
  animation-delay: 0.7s;
}
.filter-item:nth-child(3) {
  animation-delay: 0.8s;
}
.filter-item:nth-child(4) {
  animation-delay: 0.9s;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dropdown-options {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-trigger {
  transition: all 0.3s ease;
}

.dropdown-trigger:hover {
  transform: translateY(-1px);
}

.pro {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

img {
  animation: fadeIn 0.6s ease-out;
}

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

.icons i {
  transition: all 0.3s ease;
}

.icons i:hover {
  transform: scale(1.1) rotate(5deg);
}

@media (max-width: 768px) {
  .navbar {
    animation: slideDown 0.4s ease-out;
  }

  .product-card {
    animation-duration: 0.4s;
  }

  .filter-item {
    animation-duration: 0.3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .product-card:hover,
  .btn-primary:hover,
  .navbar .links a:hover,
  .icons i:hover {
    transform: none !important;
  }
}

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

.y-animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.y-animate-slide-down {
  animation: slideDown 0.6s ease-out;
}

.y-animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.y-animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

html {
  scroll-behavior: smooth;
}

*:focus {
  outline: 2px solid var(--y-color-crimson);
  outline-offset: 2px;
  transition: outline 0.2s ease;
}
