/* ============================================
   Mercado de Teis — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-slate-900 {
    color: #0f172a;
}

/* Hero image animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile nav links */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #0d9488;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
    left: 10%;
}

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

/* Counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Selection color */
::selection {
    background-color: #0d9488;
    color: white;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Parallax-like subtle effect on hero */
@media (prefers-reduced-motion: no-preference) {
    .hero-image {
        animation: float 6s ease-in-out infinite;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .fade-in {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
