@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  font-family: system-ui, -apple-system, sans-serif;
}

/* header nav on scroll effect... */



.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgb(16 185 129);
}

.product-card img {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.product-card:hover img {
  transform: scale(1.08);
}

.neon-glow {
  text-shadow: 0 0 10px #10b981,
               0 0 20px #10b981;
}

/* product modal simple animation */
#product-modal {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 2s ease;
}

#product-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}


#page-loader {
  transition: opacity 0.8s ease , transform 0.8s ease;
  
}
#page-loader.hidden {
  opacity: 0;
  transform: scale(0.95); /* slight shrink while fading */
  pointer-events: none;
}

/* page content transition after page loader */
#page-content {
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
  transform: translateY(10px); /* slight slide up */
  /* display: none; */
}

#page-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* cart effect when item is added */
.cart-glow {
  box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
  transition: box-shadow 0.3s ease;
}


/* css for proper behaviour when cart is open or active */
#cart-drawer {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  overflow-y: auto; /* only scroll if content exceeds height */
}

body.cart-open {
  overflow: hidden; /* prevent background scroll */
}

/* fix for bottom nav displacement to top */
.pb-safe {
  padding-bottom: constant(safe-area-inset-bottom); /* legacy iOS */
  padding-bottom: env(safe-area-inset-bottom);      /* modern iOS */
}



/* fix to display confetti */
canvas.confetti-canvas {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 99999 !important;
}

/* animation for the food menu icon */
@keyframes shakeGlow {
  0%   { transform: rotate(0deg) translateY(0) scale(1); text-shadow: none; }
  20%  { transform: rotate(90deg) translateY(-10px) scale(1.1); text-shadow: 0 0 10px #10b981; }
  40%  { transform: rotate(180deg) translateY(0) scale(1.05); text-shadow: 0 0 20px #4ade80; }
  60%  { transform: rotate(270deg) translateY(-10px) scale(1.1); text-shadow: 0 0 15px #10b981; }
  80%  { transform: rotate(360deg) translateY(0) scale(1.05); text-shadow: 0 0 25px #4ade80; }
  100% { transform: rotate(360deg) translateY(0) scale(1); text-shadow: none; }
}


.animate-shakeGlow {
  animation: shakeGlow 1.2s ease-in-out;
}



.animate-spin {
  animation: spin 2s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Cart item row */
.cart-item {
  animation: slideIn 0.3s ease forwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}