/* ============================================================
   PLAN UR EAT — Animation Styles
   ============================================================ */

/* ---- KEYFRAMES ---- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes waveIn {
  0% { clip-path: circle(0% at 50% 50%); }
  100% { clip-path: circle(150% at 50% 50%); }
}
@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2) rotate(-5deg); }
  50% { transform: scale(1.1) rotate(5deg); }
  75% { transform: scale(1.15) rotate(-3deg); }
}
@keyframes successPop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  80% { transform: scale(1.1) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes typeWriter {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}

/* ---- ENTRANCE ANIMATIONS ---- */
.animate-slide-left { animation: slideInLeft 0.6s ease both; }
.animate-slide-right { animation: slideInRight 0.6s ease both; }
.animate-slide-up { animation: slideInUp 0.6s ease both; }
.animate-fade { animation: fadeIn 0.6s ease both; }
.animate-zoom { animation: zoomIn 0.5s ease both; }
.animate-bounce { animation: bounceIn 0.8s ease both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-rotate { animation: rotate 10s linear infinite; }

/* ---- DELAY UTILITIES ---- */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-8 { animation-delay: 0.8s; }
.delay-10 { animation-delay: 1.0s; }

/* ---- HERO PARTICLE ANIMATION ---- */
.hero-particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20px) rotate(720deg); opacity: 0; }
}

/* ---- WAVE EFFECT ---- */
.wave-container { position: absolute; bottom: 0; left: 0; right: 0; }
.wave {
  position: absolute; bottom: 0; left: 0; width: 200%; height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23F3F4F6' fill-opacity='1' d='M0,40L48,37.3C96,35,192,29,288,32C384,35,480,45,576,48C672,51,768,45,864,40C960,35,1056,29,1152,32C1248,35,1344,45,1392,50L1440,56L1440,80L1392,80C1344,80,1248,80,1152,80C1056,80,960,80,864,80C768,80,672,80,576,80C480,80,384,80,288,80C192,80,96,80,48,80L0,80Z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
  background-size: 50% 100%;
  animation: wave 8s linear infinite;
}
.wave:nth-child(2) { animation: wave 12s linear infinite reverse; opacity: 0.5; }
@keyframes wave { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ---- PRODUCT CARD HOVER FX ---- */
.product-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  transition: border-color 0.25s;
  pointer-events: none; z-index: 1;
}
.product-card:hover::before { border-color: rgba(34,139,34,0.3); }

/* ADD TO CART RIPPLE */
.add-to-cart-btn { position: relative; overflow: hidden; }
.add-to-cart-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ---- CART SUCCESS ---- */
.cart-success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%; color: var(--green);
  animation: successPop 0.5s ease both;
}

/* ---- COUNTDOWN TIMER FX ---- */
.timer-num { transition: transform 0.3s ease, color 0.3s; }
.timer-num.flip { animation: flipNumber 0.5s ease; }
@keyframes flipNumber {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); }
}

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
  margin: 0 auto;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.btn-loading .spinner { display: inline-block; }

/* ---- GRADIENT TEXT ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--green), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- ANIMATED BADGE ---- */
.badge-pulse {
  position: relative;
}
.badge-pulse::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ---- STICKY CTA BAR (Mobile Product Detail) ---- */
.sticky-cta-bar {
  position: fixed; bottom: 56px; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  padding: 12px 16px; z-index: 850;
  display: flex; gap: 12px; align-items: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 12px rgba(0,0,0,.1);
}
.sticky-cta-bar.visible { transform: translateY(0); }
.sticky-cta-price { font-family: 'Poppins',sans-serif; font-weight: 800; font-size: 20px; color: var(--green); }
.sticky-cta-add { flex: 1; }

/* ---- SECTION REVEAL ANIMATION ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ---- HERO HEADLINE TYPING EFFECT ---- */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--orange);
}

/* ---- NUMBER COUNTER FX ---- */
.counter { display: inline-block; animation: countUp 0.8s ease both; }

/* ---- HOVER SCALE ---- */
.hover-scale { transition: transform 0.2s ease; }
.hover-scale:hover { transform: scale(1.03); }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* ---- PROGRESS BAR ---- */
.progress-bar { background: var(--border); border-radius: 10px; height: 6px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: var(--green); border-radius: 10px; transition: width 1.5s ease; }

/* ---- SKELETON CARD VARIATION ---- */
.skeleton-product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.skeleton-img { height: 180px; background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size:200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-text { height: 14px; margin: 12px; border-radius: 4px; background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size:200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-text-sm { height: 10px; margin: 8px 12px; width: 60%; border-radius: 4px; background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size:200% 100%; animation: shimmer 1.5s infinite; }

/* ---- TESTIMONIAL CARD ---- */
.testimonial-card {
  background: #fff; border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.testimonial-card:hover { transform: translateY(-4px); }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 12px; }
.testimonial-text { font-size: 14px; color: var(--text-light); line-height: 1.7; font-style: italic; margin-bottom: 12px; }
.testimonial-name { font-weight: 700; font-size: 14px; color: var(--text); }
.testimonial-location { font-size: 12px; color: var(--text-light); }
.testimonial-rating { color: #f59e0b; font-size: 14px; margin-bottom: 10px; }

/* ---- PAGE TRANSITIONS ---- */
.page-transition {
  animation: fadeIn 0.4s ease;
}

/* ---- BACK TO TOP TRANSITION ---- */
html { scroll-behavior: smooth; }
