/* Custom styles for Delta Mini Market */

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

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUpDelay 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUpDelay2 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(255, 251, 240, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.1);
}

.nav-scrolled .font-serif,
.nav-scrolled a:not(.bg-emerald-700):not(.bg-cream-400) {
    color: #065f46 !important;
}

.nav-scrolled .text-emerald-600 {
    color: #059669 !important;
}

.nav-scrolled .bg-emerald-700 {
    background: #059669 !important;
}

.nav-scrolled .bg-emerald-700:hover {
    background: #047857 !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #d1fae5 25%, #a7f3d0 50%, #d1fae5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

img[src] {
    animation: none;
    background: none;
}

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

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

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

/* Product card hover effect */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

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

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif.text-4xl,
    .font-serif.text-5xl {
        font-size: 2.25rem;
        line-height: 1.2;
    }
}

/* Print styles */
@media print {
    nav,
    #mobile-menu-btn,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-emerald-900,
    .bg-emerald-700 {
        background: #065f46 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
