/**
 * Mobile Navbar Fix CSS - COMPACT SIZE VERSION
 * Proper mobile navigation with fixed header and compact menu
 */

/* GLOBAL MOBILE BACK BUTTON REMOVAL */
.mobile-back,
div.mobile-back,
li .mobile-back,
.mobile-back-item,
.sm .mobile-back,
.pixelstrap .mobile-back,
.sm-horizontal .mobile-back,
.sm-vertical .mobile-back,
.sticky .header7 .sm-horizontal .mobile-back,
.dark .sm-horizontal .mobile-back,
.dark .sm-vertical .mobile-back,
.dark .mobile-back,
.dark div.mobile-back,
.dark li .mobile-back,
.dark .mobile-back-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    z-index: -1 !important;
}

/* GLOBAL BURGER MENU FIXES */
/* Hide duplicate burger menus */
.category-header7 .toggle-nav,
.icon-block .toggle-nav,
nav .toggle-nav {
    display: none !important;
}

/* Only show the main burger menu */
.header7 .toggle-nav {
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    position: relative;
}

.header7 .toggle-nav .sidebar-bar {
    font-size: 20px;
    color: #333;
}

/* DESKTOP STYLES (992px and up) */
@media (min-width: 992px) {
    /* Hide burger menu on desktop */
    .header7 .toggle-nav {
        display: none !important;
    }
    
    /* Show desktop navigation */
    .categroy-contain {
        display: block !important;
    }
    
    /* Show category header on desktop */
    .category-header7 {
        display: block !important;
    }
    
    /* Reset body padding for desktop to allow normal sticky behavior */
    body {
        padding-top: 0 !important;
    }
    
    /* DON'T override sticky header styles - let existing color11.css handle it */
    /* The existing .sticky class in color11.css already has perfect styles */
}

/* MOBILE STYLES (991px and below) - COMPACT VERSION */
@media (max-width: 991px) {
    /* FIXED HEADER FOR MOBILE */
    #stickyheader {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    /* Add padding to body to compensate for fixed header */
    body {
        padding-top: 80px !important;
    }
    
    /* Mobile header styling */
    .header7 {
        background: white !important;
        padding: 10px 0 !important;
    }
    
    /* Hide desktop search form on mobile */
    .header7 form {
        display: none !important;
    }
    
    /* Hide desktop navigation completely on mobile */
    .categroy-contain {
        display: none !important;
    }
    
    /* Hide category header (desktop menu) completely on mobile */
    .category-header7 {
        display: none !important;
    }
    
    /* Show burger menu on mobile */
    .header7 .toggle-nav {
        display: block !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    /* Mobile logo adjustments */
    .brand-logo {
        max-width: calc(100% - 60px) !important;
    }
    
    .brand-logo img {
        max-height: 35px !important;
    }
    
    /* COMPACT MOBILE MENU STYLES */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px; /* COMPACT: Reduced from 300px */
        max-width: 85vw;
        height: 100vh;
        background: white;
        z-index: 10000;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-menu-overlay.active .mobile-menu-sidebar {
        right: 0;
    }
    
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px; /* COMPACT: Reduced from 15px 20px */
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
    }
    
    .mobile-menu-close {
        cursor: pointer;
        padding: 4px; /* COMPACT: Reduced from 5px */
        font-size: 16px; /* COMPACT: Reduced from 18px */
        color: #666;
    }
    
    .mobile-menu-content {
        padding: 0;
    }
    
    /* COMPACT List Vertikal Layout - Seperti Gambar */
    .mobile-menu-list-container {
        padding: 0;
        margin: 0;
    }
    
    .mobile-menu-list-item {
        border-bottom: 2px solid #333;
        position: relative;
    }
    
    .mobile-menu-list-item:first-child {
        border-top: 2px solid #333;
    }
    
    .mobile-menu-list-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px; /* COMPACT: Reduced from 18px 20px */
        background: #ffffff;
        color: #333;
        text-decoration: none;
        font-size: 14px; /* COMPACT: Reduced from 16px */
        font-weight: 500;
        transition: background-color 0.2s ease;
        min-height: 45px; /* COMPACT: Reduced from 60px */
        box-sizing: border-box;
    }
    
    .mobile-menu-list-link:hover {
        background: #f8f9fa;
        text-decoration: none;
        color: #333;
    }
    
    .list-text {
        font-size: 14px; /* COMPACT: Reduced from 16px */
        font-weight: 500;
        color: #333;
        text-align: left;
    }
    
    .list-arrow {
        font-size: 10px; /* COMPACT: Already small */
        color: #666;
        transition: transform 0.2s ease;
    }
    
    .mobile-menu-list-item.active .list-arrow {
        transform: rotate(180deg);
    }
    
    /* COMPACT Submenu untuk List Layout */
    .mobile-menu-list-item .mobile-submenu {
        background: #f8f9fa;
        border-bottom: 2px solid #333;
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-menu-list-item.active .mobile-submenu {
        display: block;
    }
    
    .mobile-submenu-link {
        display: block;
        padding: 10px 30px; /* COMPACT: Reduced from 12px 40px */
        color: #666;
        text-decoration: none;
        font-size: 13px; /* COMPACT: Already small */
        border-bottom: 1px solid #e0e0e0;
        transition: background-color 0.2s ease;
    }
    
    .mobile-submenu-link:last-child {
        border-bottom: none;
    }
    
    .mobile-submenu-link:hover {
        background: #e9ecef;
        color: #333;
        text-decoration: none;
    }
    
    /* COMPACT Location Section */
    .mobile-menu-location-section {
        background: #e3f2fd;
        border-bottom: 2px solid #333;
    }
    
    .mobile-menu-location-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px; /* COMPACT: Reduced from 15px 20px */
        color: #1976d2;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px; /* COMPACT: Reduced from 15px */
        min-height: 45px; /* COMPACT: Reduced from 50px */
        box-sizing: border-box;
    }
    
    .mobile-menu-location-link i {
        margin-right: 6px; /* COMPACT: Reduced from 8px */
        font-size: 14px; /* COMPACT: Reduced from 16px */
    }
    
    .mobile-menu-location-link:hover {
        background: rgba(25, 118, 210, 0.1);
        text-decoration: none;
        color: #1565c0;
    }
    
    /* COMPACT User Section */
    .mobile-menu-user-section {
        background: #f3e5f5;
        border-bottom: 2px solid #333;
    }
    
    .mobile-menu-user-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px; /* COMPACT: Reduced from 15px 20px */
        color: #7b1fa2;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px; /* COMPACT: Reduced from 15px */
        border-bottom: 1px solid rgba(123, 31, 162, 0.1);
        min-height: 45px; /* COMPACT: Reduced from 50px */
        box-sizing: border-box;
    }
    
    .mobile-menu-user-link i {
        margin-right: 6px; /* COMPACT: Reduced from 8px */
        font-size: 14px; /* COMPACT: Reduced from 16px */
    }
    
    .mobile-menu-user-link:hover {
        background: rgba(123, 31, 162, 0.1);
        text-decoration: none;
        color: #6a1b9a;
    }
    
    .mobile-menu-logout {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 12px 16px; /* COMPACT: Reduced from 15px 20px */
        background: none;
        border: none;
        color: #d32f2f;
        font-size: 14px; /* COMPACT: Reduced from 15px */
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s ease;
        min-height: 45px; /* COMPACT: Reduced from 50px */
        box-sizing: border-box;
    }
    
    .mobile-menu-logout:hover {
        background: rgba(211, 47, 47, 0.1);
    }
    
    .mobile-menu-logout i {
        margin-right: 6px; /* COMPACT: Reduced from 8px */
        font-size: 14px; /* COMPACT: Reduced from 16px */
    }
    
    /* COMPACT Honda Logo Section */
    .mobile-menu-honda-section {
        text-align: center;
        padding: 15px; /* COMPACT: Reduced from 20px */
        background: #f8f9fa;
        border-bottom: 2px solid #333;
    }
    
    .mobile-menu-honda-logo {
        max-height: 30px; /* COMPACT: Reduced from 40px */
        height: auto;
    }
    
    /* Prevent body scroll when menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    /* Mobile menu overlay */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
    }
    
    /* Mobile search bar (separate from header) */
    .searchbar-input {
        display: block !important;
        position: fixed !important;
        top: -100px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        padding: 15px !important;
        z-index: 9997 !important;
        transition: top 0.3s ease !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    /* Show search bar when search is active */
    .search-active .searchbar-input {
        top: 80px !important;
    }
    
    /* Mobile search toggle */
    .mobile-search {
        display: block !important;
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        cursor: pointer !important;
        padding: 10px !important;
        color: #333 !important;
        font-size: 18px !important;
    }
}