/* Custom styles for King's Supermarket */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #2d5e2d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #244a24;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .font-display,
.navbar-scrolled span[class*="font-display"] {
    color: #111827 !important;
}

.navbar-scrolled .text-gray-600 {
    color: #4b5563 !important;
}

.navbar-scrolled .text-gray-500 {
    color: #6b7280 !important;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hero parallax-like effect */
.hero-bg {
    will-change: transform;
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Counter animation */
.counter {
    display: inline-block;
}

/* Focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Print styles */
@media print {
    nav, #contact, .hero-bg { display: none; }
    body { color: #000; background: #fff; }
}
