/* Mobile Bottom Navigation Bar - Optimized */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: none;
    justify-content: space-around;
    align-items: stretch; /* Make buttons stretch vertically */
    padding: 0;
    z-index: 1060;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    height: 56px; /* Standard mobile navbar height */
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.7rem; /* Smaller font */
    padding: 6px 2px; /* Reduced padding */
    cursor: pointer;
    position: relative;
    flex: 1;
    min-height: auto;
    transition: all 0.2s ease;
    height: 100%; /* Full height of navbar */
}

.bottom-nav-btn i {
    font-size: 1.1rem; /* Slightly smaller icons */
    margin-bottom: 3px; /* Reduced margin */
    transition: all 0.2s ease;
}

.bottom-nav-btn:hover,
.bottom-nav-btn:active,
.bottom-nav-btn.active {
    color: var(--primary-color, #ff6b93);
    background: rgba(255, 107, 147, 0.05);
}

.bottom-nav-btn.active i {
    transform: translateY(-2px);
}

.bottom-nav-label {
    font-size: 0.65rem; /* Smaller label */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px; /* Limit width for small screens */
}

/* Cart badge - smaller */
.cart-nav-badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(50%);
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Enhanced dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 200px;
    max-width: 280px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px 12px 0 0;
    z-index: 1061;
    margin-bottom: 8px;
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-section {
    padding: 8px 0;
}

.dropdown-section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-header {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-header i {
    margin-right: 8px;
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}

.dropdown-item i {
    margin-right: 12px;
    width: 20px;
    font-size: 0.95rem;
    color: #666;
}

.dropdown-item:hover {
    background: rgba(255, 107, 147, 0.08);
    color: var(--primary-color, #ff6b93);
}

/* Language selector in dropdown */
.dropdown-language-select {
    width: calc(100% - 32px);
    margin: 8px 16px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
}

/* Show mobile nav only on mobile */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Hide floating buttons on mobile when bottom nav is shown */
    .floating-nav-group,
    .cart-floating-btn {
        display: none !important;
    }

    /* Adjust footer margin for bottom nav */
    .enterprise-footer {
        margin-bottom: 56px;
        padding-bottom: 20px;
    }

    /* Reduce spacing for very small screens */
    @media (max-width: 360px) {
        .mobile-bottom-nav {
            height: 52px;
        }

        .bottom-nav-btn i {
            font-size: 1rem;
            margin-bottom: 2px;
        }

        .bottom-nav-label {
            font-size: 0.6rem;
            max-width: 60px;
        }

        .dropdown-content {
            min-width: 180px;
            max-width: 240px;
        }
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: rgba(30, 30, 30, 0.98);
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    .bottom-nav-btn {
        color: #aaa;
    }

    .dropdown-content {
        background: rgba(40, 40, 40, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown-header {
        color: #aaa;
    }

    .dropdown-item {
        color: #ddd;
    }

    .dropdown-item:hover {
        background: rgba(255, 107, 147, 0.15);
    }

    .dropdown-language-select {
        background: #2a2a2a;
        border-color: rgba(255, 255, 255, 0.1);
        color: #ddd;
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        height: 48px; /* Shorter for landscape */
    }

    .bottom-nav-btn {
        padding: 4px 2px;
    }

    .bottom-nav-btn i {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .bottom-nav-label {
        font-size: 0.6rem;
    }
}