/**
 * Mobile Navigation CSS
 * Responsive navigation menu for mobile devices
 */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    /* position: fixed; */
    top: 15px;
    left: 15px;
    right: 0;
    z-index: 9999;
    background: #1b74e4;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(27, 116, 228, 0.3);
}

.mobile-menu-toggle:hover {
    background: #0d5cb6;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(27, 116, 228, 0.4);
}

.mobile-menu-toggle.active {
    background: #dc3545;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Menu */
.mobile-navigation-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-navigation-menu.active {
    pointer-events: all;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-navigation-menu.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-navigation-menu.active .mobile-menu-container {
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #1b74e4 0%, #0d5cb6 100%);
    color: white;
    min-height: 80px;
}

.mobile-menu-logo .logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile Menu Content */
.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-nav {
    flex: 1;
    padding: 20px 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-link:hover {
    background: #f8f9fa;
    color: #1b74e4;
    text-decoration: none;
}

.mobile-menu-link .menu-icon {
    width: 20px;
    margin-right: 12px;
    color: #666;
    transition: color 0.3s ease;
}

.mobile-menu-link:hover .menu-icon {
    color: #1b74e4;
}

.mobile-menu-link .menu-text {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
}

.mobile-menu-link .menu-arrow {
    color: #999;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-menu-item.expanded .mobile-menu-link .menu-arrow {
    transform: rotate(90deg);
}

/* Mobile Submenu */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu-item.expanded .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu-item {
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 52px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-submenu-link:hover {
    background: #e9ecef;
    color: #1b74e4;
    text-decoration: none;
}

.mobile-submenu-link .submenu-icon {
    width: 16px;
    margin-right: 10px;
    color: #777;
}

.mobile-submenu-link:hover .submenu-icon {
    color: #1b74e4;
}

.mobile-submenu-link .submenu-text {
    flex: 1;
}

.mobile-submenu-link .submenu-arrow {
    color: #999;
    font-size: 10px;
}

/* Mobile Sub-Submenu */
.mobile-sub-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #e9ecef;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu-item.expanded .mobile-sub-submenu {
    max-height: 300px;
}

.mobile-sub-submenu-link {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 72px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
}

.mobile-sub-submenu-link:hover {
    background: #dee2e6;
    color: #1b74e4;
    text-decoration: none;
}

.mobile-sub-submenu-link .sub-submenu-icon {
    width: 14px;
    margin-right: 8px;
    color: #888;
}

.mobile-sub-submenu-link:hover .sub-submenu-icon {
    color: #1b74e4;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: grid;
    gap: 10px;
}

.mobile-menu-user-actions {
    border-bottom: 1px solid #e9ecef;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #333;
    font-weight: 500;
}

.mobile-user-info i {
    margin-right: 10px;
    color: #1b74e4;
    font-size: 18px;
}

.mobile-login-btn,
.mobile-logout-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #1b74e4;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.mobile-login-btn:hover,
.mobile-logout-btn:hover {
    background: #0d5cb6;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

.mobile-logout-btn {
    background: #dc3545;
}

.mobile-logout-btn:hover {
    background: #c82333;
}

.mobile-login-btn i,
.mobile-logout-btn i {
    margin-right: 8px;
}

.mobile-menu-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
}

.contact-item i {
    width: 16px;
    margin-right: 8px;
    color: #1b74e4;
}

.mobile-menu-orders-container {
    display: grid;
    gap: 10px;
}

/* Mobile Category Menu */
.mobile-category-menu {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.mobile-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
}

.mobile-category-header .category-title {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-category-header .category-title i {
    margin-right: 10px;
    color: #1b74e4;
}

.category-toggle-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-category-menu.expanded .category-toggle-btn {
    transform: rotate(180deg);
}

.mobile-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-category-menu.expanded .mobile-category-content {
    max-height: 400px;
}

/* Horizontal Scrollable Categories */
.category-scroll-container {
    padding: 16px 20px;
}

.category-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 12px;
    padding-bottom: 8px;
}

.category-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.category-item {
    flex: 0 0 auto;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item.active .category-link {
    background: linear-gradient(135deg, #1b74e4 0%, #0d5cb6 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 116, 228, 0.3);
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.category-link:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-icon {
    color: #1b74e4;
    font-size: 20px;
}

.category-item.active .category-icon {
    color: white;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.category-count {
    font-size: 11px;
    opacity: 0.8;
}

.show-more-item .show-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: #e9ecef;
    border: 2px dashed #ced4da;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 13px;
}

.show-more-item .show-more-btn:hover {
    background: #dee2e6;
    border-color: #adb5bd;
    color: #495057;
}

.show-more-item .show-more-btn i {
    margin-bottom: 4px;
    font-size: 16px;
}

/* Category Grid (Vertical) */
.category-grid-container {
    padding: 16px 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.category-grid-item {
    cursor: pointer;
}

.category-grid-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.category-grid-link:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1b74e4;
}

.category-grid-icon {
    margin-bottom: 10px;
    color: #1b74e4;
    font-size: 24px;
}

.category-grid-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-grid-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.category-grid-count {
    font-size: 12px;
    opacity: 0.8;
}

/* Category Modal */
.category-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.category-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.category-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.category-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #1b74e4 0%, #0d5cb6 100%);
    color: white;
}

.category-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.category-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.category-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.category-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.category-modal-item {
    cursor: pointer;
}

.category-modal-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.category-modal-link:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #333;
    border-color: #1b74e4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-modal-link i {
    margin-bottom: 8px;
    color: #1b74e4;
    font-size: 20px;
}

.category-modal-link span {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.category-modal-link small {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-header {
        padding-left: 70px;
    }

    .mobile-menu-container {
        width: 280px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .category-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .mobile-menu-container {
        width: 260px;
        max-width: 90vw;
    }

    .mobile-menu-header {
        padding: 16px;
        min-height: 70px;
    }

    .mobile-menu-logo .logo-img {
        height: 32px;
    }

    .category-item {
        min-width: 100px;
    }

    .category-link,
    .category-grid-link {
        padding: 10px 12px;
    }

    .category-name,
    .category-grid-name {
        font-size: 12px;
    }

    .category-modal-content {
        margin: 10px;
        max-height: 85vh;
    }

    .category-modal-header {
        padding: 16px;
    }

    .category-modal-body {
        padding: 16px;
    }

    .category-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
}

/* Animation Classes */
.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.slide-out-left {
    animation: slideOutLeft 0.3s ease-in;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-in;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}