/* === Custom Styles for Afghan International Halal Market === */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
    background: #D4A0A8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Selection color */
::selection {
    background: #F5B4BE;
    color: #4E1E27;
}

/* Animation keyframes */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes bounce-slow {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* Animation classes */
.animate-slide-up {
    animation: slide-up 0.8s ease-out forwards;
}

.animate-slide-up:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-slide-up:nth-child(3) {
    animation-delay: 0.2s;
}

.animate-slide-up:nth-child(4) {
    animation-delay: 0.3s;
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Stagger animation for product cards */
.group {
    opacity: 0;
    transform: translateY(20px);
}

.group.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Nav scroll state */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-scrolled .font-display,
.nav-scrolled a:not(.bg-burgundy-600) {
    color: #7B2D3B !important;
}

.nav-scrolled .bg-burgundy-600 {
    background: #7B2D3B !important;
}

/* Image hover zoom with overflow hidden parent */
.group img {
    will-change: transform;
}

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

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

#mobile-menu.open {
    max-height: 400px;
    padding: 0;
}

/* Reduce motion for accessibility */
@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;
    }

    .group {
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-display.text-4xl {
        font-size: 2.5rem;
    }
}

/* Print styles */
@media print {
    nav,
    .animate-bounce-slow,
    #contact-form,
    iframe {
        display: none !important;
    }

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