/* ===================================================================
   Noon Gallery - Responsive Motion Graphics & Animations
   حركات موشن جرافيك وتأثيرات انسيابية راقية ومتجاوبة
   =================================================================== */

/* 1. Scroll Progress Bar (شريط التمرير الذهبي الذكي في أعلى المتجر) */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #8F7038 0%, #C9A96E 50%, #F7EFE1 100%);
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.7);
  z-index: 999999;
  transition: width 0.1s ease-out;
  pointer-events: none;
}

/* 2. Keyframes for Floating & Ambient Motion */
@keyframes floatGentle {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes floatSlow {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.45);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(201, 169, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 169, 110, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes bounceCart {
  0%, 100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.3) rotate(-6deg);
  }
  60% {
    transform: scale(0.92) rotate(3deg);
  }
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* 3. Infinite Marquee Ticker (شريط المميزات الحركي العصري) */
.marquee-ticker {
  background: linear-gradient(90deg, #2D141C 0%, #3B1B26 50%, #2D141C 100%);
  color: #F7EFE1;
  padding: 0.85rem 0;
  overflow: hidden;
  border-top: 1px solid rgba(201, 169, 110, 0.3);
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
  position: relative;
  direction: ltr; /* Keeps translation math smooth */
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 2.5rem;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #FAF8F5;
  direction: rtl;
}

.marquee-item i {
  color: #C9A96E;
  font-size: 1rem;
}

.marquee-item .sep {
  opacity: 0.35;
  color: #C9A96E;
  margin-inline-start: 1.5rem;
}

/* 4. Luxury Shimmer Effect on CTA Buttons */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(30deg);
  transition: all 0.75s ease;
  opacity: 0;
}
.btn-shimmer:hover::after {
  opacity: 1;
  transform: rotate(30deg) translate(50%, 50%);
}

/* 5. Safe Scroll Reveal (ظهور فوري 100% بدون أي تأخير أو إخفاء) */
.reveal-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Stagger Delays for Grid items */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* 6. Product & Category Card Hover Interactions */
.product-card,
.category-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(35, 25, 20, 0.12);
  border-color: rgba(201, 169, 110, 0.5);
}

.product-card .card-thumb img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 7. Floating Glass Badges */
.floating-badge-card {
  animation: floatSlow 4s ease-in-out infinite alternate;
}

/* 8. Badge Pulse */
.hero-badge i {
  display: inline-block;
  animation: pulseGlow 3s infinite;
}

/* 9. Mobile Responsiveness for Animations */
@media (max-width: 768px) {
  .marquee-track {
    animation-duration: 20s; /* slightly faster on mobile */
    gap: 1.5rem;
  }

  .marquee-item {
    font-size: 0.85rem;
  }

  /* Disable heavy translations on mobile to avoid overflow */
  .reveal-on-scroll {
    transform: translateY(14px);
    transition-duration: 0.5s;
  }

  .product-card:hover {
    transform: none; /* Better tactile feel on touch screens */
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
