/* ===================================
   Mobile Bottom Navigation Bar
   Modern, User-Friendly Design
   =================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #3B9DD5 0%, #7BC043 100%) 1;
    box-shadow: 0 -6px 30px rgba(59, 157, 213, 0.15), 0 -2px 10px rgba(123, 192, 67, 0.1);
    padding: 0;
    display: none; /* Hidden by default, shown on mobile */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.mobile-bottom-nav.active {
    display: flex;
}

.mobile-bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.25rem;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 16px;
    margin: 0 0.25rem;
    min-width: 0;
}

.mobile-bottom-nav .nav-item:hover {
    color: #3B9DD5;
    background: linear-gradient(135deg, rgba(59, 157, 213, 0.12) 0%, rgba(123, 192, 67, 0.08) 100%);
    transform: translateY(-3px);
}

.mobile-bottom-nav .nav-item.active {
    color: white;
    background: linear-gradient(135deg, #3B9DD5 0%, #7BC043 100%);
    box-shadow: 0 4px 15px rgba(59, 157, 213, 0.4), 0 2px 8px rgba(123, 192, 67, 0.3);
    transform: translateY(-4px);
}

.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #3B9DD5 0%, #7BC043 100%);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(59, 157, 213, 0.5);
}

.mobile-bottom-nav .nav-icon {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.mobile-bottom-nav .nav-item.active .nav-icon {
    transform: scale(1.2) translateY(-2px);
    color: white;
    filter: drop-shadow(0 4px 8px rgba(255,255,255,0.3));
    animation: iconBounce 0.6s ease-out;
}

.mobile-bottom-nav .nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: all 0.3s ease;
}

.mobile-bottom-nav .nav-item.active .nav-label {
    color: white;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Badge for notifications/counts */
.mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

/* Cart button styling in mobile nav */
.mobile-bottom-nav .nav-item#mobileCartBtn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.mobile-bottom-nav .nav-item#mobileCartBtn:focus {
    outline: 3px solid rgba(59, 157, 213, 0.5);
    outline-offset: 3px;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 2px 10px rgba(220, 53, 69, 0.6);
    }
}

/* Ripple effect on click */
.mobile-bottom-nav .nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 157, 213, 0.4) 0%, rgba(123, 192, 67, 0.4) 100%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.mobile-bottom-nav .nav-item:active::after {
    width: 200px;
    height: 200px;
}

/* Icon bounce animation */
@keyframes iconBounce {
    0%, 100% {
        transform: scale(1.2) translateY(-2px);
    }
    50% {
        transform: scale(1.3) translateY(-4px);
    }
}

/* Add padding to body when bottom nav is visible */
body.has-mobile-nav {
    padding-bottom: 70px;
}

/* Show on mobile devices only */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body.has-mobile-nav {
        padding-bottom: 70px;
    }
}

/* Hide on larger screens */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body.has-mobile-nav {
        padding-bottom: 0;
    }
}

/* RTL Support */
[dir="rtl"] .mobile-bottom-nav .nav-item.active::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .mobile-bottom-nav .nav-badge {
    right: auto;
    left: 0.5rem;
}

/* Smooth transitions */
.mobile-bottom-nav * {
    -webkit-tap-highlight-color: transparent;
}

/* Accessibility */
.mobile-bottom-nav .nav-item:focus {
    outline: 3px solid rgba(59, 157, 213, 0.5);
    outline-offset: 3px;
    border-radius: 16px;
}

/* Glow effect for active item */
.mobile-bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 157, 213, 0.2) 0%, rgba(123, 192, 67, 0.2) 100%);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        border-top-color: rgba(59, 157, 213, 0.3);
    }
    
   
    
    .mobile-bottom-nav .nav-item:hover,
    .mobile-bottom-nav .nav-item.active {
        color: #3B9DD5;
    }
}

