/* Custom styles for Gulzar Halal Market */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(254, 253, 248, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

.nav-logo-text {
  color: #102a43;
}

.nav-scrolled .nav-logo-text {
  color: #102a43;
}

/* Hero badge animation */
.hero-badge {
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Hero content animation */
#hero h1,
#hero p,
#hero .flex-wrap {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero h1 { animation-delay: 0.2s; }
#hero p { animation-delay: 0.4s; }
#hero .flex-wrap { animation-delay: 0.6s; }

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

/* Hero image animation */
#hero .relative.rounded-3xl {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Floating card animation */
.absolute.-bottom-6.-left-6 {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Back to top button */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Product card image hover */
.group .relative.rounded-2xl.overflow-hidden {
  box-shadow: 0 4px 20px rgba(16, 42, 67, 0.08);
  transition: box-shadow 0.5s ease;
}

.group:hover .relative.rounded-2xl.overflow-hidden {
  box-shadow: 0 12px 40px rgba(16, 42, 67, 0.15);
}

/* Button ripple effect */
button, a {
  position: relative;
  overflow: visible;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #fefdf8;
}

::-webkit-scrollbar-thumb {
  background: #d9e2ec;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9fb3c8;
}

/* Selection color */
::selection {
  background: #d4a843;
  color: #102a43;
}

/* Mobile menu transition */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print styles */
@media print {
  nav, #back-to-top, .scroll-reveal {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
