/* LIMGAR Mobile Menu - Enhanced CSS */
/* สำหรับเมนู Mobile แบบใหม่ด้วยข้อความภาษาไทย */

/* ===== MOBILE NAVIGATION ENHANCEMENT ===== */
@media (max-width: 768px) {
    
    /* Enhanced Mobile Navigation */
    nav.fixed.bottom-0 {
        background: linear-gradient(135deg, #22c55e 0%, #10b981 50%, #059669 100%) !important;
        backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Mobile Navigation Items */
    .mobile-nav-item {
        position: relative !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 0.75rem !important;
        min-height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Hover and Active States */
    .mobile-nav-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        transform: translateY(-2px) !important;
    }
    
    .mobile-nav-item:active {
        transform: translateY(0) scale(0.95) !important;
    }
    
    /* Icons in Mobile Navigation */
    .mobile-nav-item i {
        font-family: 'Font Awesome 5 Free' !important;
        font-weight: 900 !important;
        font-size: 1.125rem !important; /* 18px */
        color: rgba(255, 255, 255, 0.8) !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        line-height: 1 !important;
        text-align: center !important;
        margin-bottom: 0.25rem !important;
        transition: all 0.3s ease !important;
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
    
    /* Icon Hover Effects */
    .mobile-nav-item:hover i {
        color: #ffffff !important;
        transform: scale(1.1) !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Thai Text Labels */
    .mobile-nav-item span.thai-text {
        font-family: 'Sarabun', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-size: 0.75rem !important; /* 12px */
        font-weight: 500 !important;
        color: rgba(255, 255, 255, 0.8) !important;
        line-height: 1.2 !important;
        text-align: center !important;
        margin-top: 0.125rem !important;
        transition: all 0.3s ease !important;
        white-space: nowrap !important;
        letter-spacing: 0.025em !important;
    }
    
    /* Thai Text Hover Effects */
    .mobile-nav-item:hover span.thai-text {
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    /* Active Page Indicators */
    .mobile-nav-item[data-active="true"] {
        background: rgba(255, 255, 255, 0.15) !important;
    }
    
    .mobile-nav-item[data-active="true"] i {
        color: #ffffff !important;
        transform: scale(1.05) !important;
    }
    
    .mobile-nav-item[data-active="true"] span.thai-text {
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    /* Hover Indicator Dots */
    .mobile-nav-item .group .bg-yellow-400 {
        width: 4px !important;
        height: 4px !important;
        background: #fbbf24 !important;
        border-radius: 50% !important;
        transition: all 0.3s ease !important;
        opacity: 0 !important;
        transform: translateY(2px) !important;
    }
    
    .mobile-nav-item:hover .group .bg-yellow-400 {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    /* Cart Badge Enhancements */
    .cart-count {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
        color: #ffffff !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-size: 0.625rem !important; /* 10px */
        font-weight: 700 !important;
        line-height: 1 !important;
        min-width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        z-index: 10 !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
        animation: cartPulse 2s infinite !important;
    }
    
    /* Cart Badge Animation */
    @keyframes cartPulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.1); }
    }
    
    /* Active Page Top Indicator */
    nav.fixed.bottom-0 .absolute.top-0 {
        height: 3px !important;
        background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
        border-radius: 0 0 1rem 1rem !important;
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4) !important;
    }
    
    /* Touch Feedback */
    .mobile-nav-item {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1) !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* Focus States for Accessibility */
    .mobile-nav-item:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5) !important;
        outline-offset: 2px !important;
    }
    
    /* Specific Icon Enhancements */
    .mobile-nav-item .fa-home {
        font-size: 1.25rem !important; /* Slightly larger for home */
    }
    
    .mobile-nav-item .fa-leaf {
        color: rgba(34, 197, 94, 0.9) !important; /* Green tint for products */
    }
    
    .mobile-nav-item .fa-shopping-cart {
        color: rgba(59, 130, 246, 0.9) !important; /* Blue tint for cart */
    }
    
    .mobile-nav-item .fa-star {
        color: rgba(251, 191, 36, 0.9) !important; /* Gold tint for special */
    }
    
    .mobile-nav-item .fa-th-large {
        color: rgba(139, 92, 246, 0.9) !important; /* Purple tint for categories */
    }
    
    /* Hover Icon Color Overrides */
    .mobile-nav-item:hover .fa-leaf,
    .mobile-nav-item:hover .fa-shopping-cart,
    .mobile-nav-item:hover .fa-star,
    .mobile-nav-item:hover .fa-th-large,
    .mobile-nav-item:hover .fa-home {
        color: #ffffff !important; /* All white on hover */
    }
    
}

/* ===== DESKTOP OVERRIDES ===== */
@media (min-width: 769px) {
    /* Hide mobile navigation completely on desktop */
    nav.fixed.bottom-0 {
        display: none !important;
    }
    
    /* Remove mobile padding from body */
    body {
        padding-bottom: 0 !important;
    }
}

/* ===== LOADING AND TRANSITION IMPROVEMENTS ===== */
/* Smooth loading animation for icons */
.mobile-nav-item i {
    animation: iconFadeIn 0.6s ease-out forwards !important;
}

@keyframes iconFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Stagger animation for each menu item */
.mobile-nav-item:nth-child(1) i { animation-delay: 0.1s; }
.mobile-nav-item:nth-child(2) i { animation-delay: 0.2s; }
.mobile-nav-item:nth-child(3) i { animation-delay: 0.3s; }
.mobile-nav-item:nth-child(4) i { animation-delay: 0.4s; }
.mobile-nav-item:nth-child(5) i { animation-delay: 0.5s; }

/* Text loading animation */
.mobile-nav-item span.thai-text {
    animation: textFadeIn 0.8s ease-out forwards !important;
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Text stagger animation */
.mobile-nav-item:nth-child(1) span { animation-delay: 0.3s; }
.mobile-nav-item:nth-child(2) span { animation-delay: 0.4s; }
.mobile-nav-item:nth-child(3) span { animation-delay: 0.5s; }
.mobile-nav-item:nth-child(4) span { animation-delay: 0.6s; }
.mobile-nav-item:nth-child(5) span { animation-delay: 0.7s; }

/* ===== IMPROVED ACCESSIBILITY ===== */
/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-nav-item i,
    .mobile-nav-item span.thai-text {
        color: #ffffff !important;
    }
    
    nav.fixed.bottom-0 {
        background: #000000 !important;
        border-top: 2px solid #ffffff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav-item,
    .mobile-nav-item i,
    .mobile-nav-item span.thai-text {
        animation: none !important;
        transition: none !important;
    }
    
    .mobile-nav-item:hover {
        transform: none !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    nav.fixed.bottom-0 {
        display: none !important;
    }
}

