/**
 * Mobile Menu Styles
 * Clean implementation - slide menu from left
 */

/* ============================================
   MOBILE HEADER (visible only on mobile)
   ============================================ */
@media (max-width: 991px) {
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 20px;
        background-color: #000000;
        height: 70px;
        position: relative;
        z-index: 1001;
    }
    
    .mobile-header-emblem {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .mobile-emblem-img {
        display: block;
        margin: 0;
        object-fit: contain;
    }
    
    .mobile-emblem-placeholder {
        display: block;
        color: #ffffff;
        font-size: 30px;
        line-height: 1;
    }
    
    .mobile-header-brand {
        font-family: 'NouvelR', sans-serif;
        font-size: 18px;
        line-height: 20px;
        font-weight: 700;
        color: #ffffff;
        text-transform: uppercase;
        flex: 1;
        text-align: center;
        margin: 0 15px;
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 8px;
    }
    
    .mobile-header-brand .brand-name-bold {
        font-size: 18px;
        line-height: 20px;
        font-weight: 700;
    }
    
    .mobile-header-brand .brand-separator {
        font-size: 18px;
        line-height: 20px;
        font-weight: 700;
    }
    
    .mobile-header-brand .brand-city-name {
        font-size: 18px;
        line-height: 20px;
        font-weight: 400;
    }
    
    /* Mobile Hamburger Button */
    .mobile-menu-toggle {
        background: none;
        border: none;
        padding: 9px 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle:focus {
        outline: none;
    }
    
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .hamburger-icon .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background-color: #ffffff;
        border-radius: 1px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover .hamburger-icon .icon-bar,
    .mobile-menu-toggle:focus .hamburger-icon .icon-bar {
        background-color: #EFDF00;
    }
    
    .mobile-menu-toggle.active .hamburger-icon .icon-bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active .hamburger-icon .icon-bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-icon .icon-bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
}

/* ============================================
   MOBILE MENU (slide from left)
   ============================================ */

/* Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    opacity: 0;
}

.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    height: 70px;
    min-height: 70px;
}

.mobile-menu-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
}

.mobile-menu-emblem-img {
    display: block;
    margin: 0;
    object-fit: contain;
}

.mobile-menu-emblem-placeholder {
    display: block;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
}

.mobile-menu-brand {
    font-family: 'NouvelR', sans-serif;
    font-size: 18px;
    line-height: 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    flex: 1;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mobile-menu-brand .brand-name-bold {
    font-size: 18px;
    line-height: 20px;
    font-weight: 700;
}

.mobile-menu-brand .brand-separator {
    font-size: 18px;
    line-height: 20px;
    font-weight: 700;
}

.mobile-menu-brand .brand-city-name {
    font-size: 18px;
    line-height: 20px;
    font-weight: 400;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
    color: #EFDF00;
    outline: none;
}

.close-icon {
    display: block;
    font-weight: 300;
    line-height: 1;
    font-size: 24px;
}

/* Mobile Menu Items */
.mobile-menu-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobile-menu-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.mobile-menu-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    color: #ffffff;
    font-family: 'NouvelR', sans-serif;
    font-size: 13px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
    width: 100%;
}

.mobile-menu-item > a:hover,
.mobile-menu-item > a:focus {
    color: #EFDF00;
    background-color: transparent;
}

/* Prevent navigation for items with # link and submenu */
.mobile-menu-item.has-submenu > a[href="#"],
.mobile-menu-item.has-submenu > a[href="#/"],
.mobile-submenu-item.has-submenu > a[href="#"],
.mobile-submenu-item.has-submenu > a[href="#/"],
.mobile-submenu-level2-item.has-submenu > a[href="#"],
.mobile-submenu-level2-item.has-submenu > a[href="#/"] {
    cursor: pointer;
}

.mobile-menu-item.has-submenu > a[href="#"]:hover,
.mobile-menu-item.has-submenu > a[href="#/"]:hover,
.mobile-submenu-item.has-submenu > a[href="#"]:hover,
.mobile-submenu-item.has-submenu > a[href="#/"]:hover,
.mobile-submenu-level2-item.has-submenu > a[href="#"]:hover,
.mobile-submenu-level2-item.has-submenu > a[href="#/"]:hover {
    text-decoration: none;
}

.mobile-menu-item > a .menu-item-chevron {
    font-size: 20px;
    font-weight: 300;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
    color: #ffffff;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-menu-item.has-submenu > a .menu-item-chevron {
    transform: rotate(0deg);
}

.mobile-menu-item.has-submenu.expanded > a .menu-item-chevron {
    transform: rotate(90deg);
}

/* Submenu (Level 2) */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none; /* Hidden by default */
    background-color: rgba(0, 0, 0, 0.2);
}

/* Expanded submenus - show with display block */
.mobile-menu-item.has-submenu.expanded > .mobile-submenu,
.mobile-submenu-item.has-submenu.expanded > .mobile-submenu-level2,
.mobile-submenu-level2-item.has-submenu.expanded > .mobile-submenu-level3 {
    display: block !important; /* Show all items */
}

.mobile-submenu > li,
.mobile-submenu-level2 > li,
.mobile-submenu-level3 > li {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
}

.mobile-submenu > li > a,
.mobile-submenu-level2 > li > a,
.mobile-submenu-level3 > li > a {
    display: flex;
    align-items: center;
    padding: 15px 20px 15px 40px;
    color: #ffffff;
    font-family: 'NouvelR', sans-serif;
    font-size: 13px;
    line-height: 16px;
    font-weight: 400;
    text-transform: none;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
    width: 100%;
}

.mobile-submenu > li > a:hover,
.mobile-submenu > li > a:focus,
.mobile-submenu-level2 > li > a:hover,
.mobile-submenu-level2 > li > a:focus,
.mobile-submenu-level3 > li > a:hover,
.mobile-submenu-level3 > li > a:focus {
    color: #EFDF00;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Submenu Level 2 */
.mobile-submenu-level2 {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none; /* Hidden by default */
    background-color: rgba(0, 0, 0, 0.3);
}

.mobile-submenu-item.has-submenu > a .menu-item-chevron {
    font-size: 20px;
    font-weight: 300;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
    color: #ffffff;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-submenu-item.has-submenu.expanded > a .menu-item-chevron {
    transform: rotate(90deg);
}

.mobile-submenu-level2 > li > a {
    padding-left: 60px;
}

/* Submenu Level 3 */
.mobile-submenu-level3 {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none; /* Hidden by default */
    background-color: rgba(0, 0, 0, 0.4);
}

.mobile-submenu-level2-item.has-submenu > a .menu-item-chevron {
    font-size: 20px;
    font-weight: 300;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
    color: #ffffff;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-submenu-level2-item.has-submenu.expanded > a .menu-item-chevron {
    transform: rotate(90deg);
}

.mobile-submenu-level3 > li > a {
    padding-left: 80px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px) + 20px);
    background-color: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start !important;
    justify-content: space-between;
    gap: 20px;
    min-height: 80px;
    box-sizing: border-box;
}

.mobile-dealer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-shrink: 0;
    min-width: 80px;
    align-self: flex-start !important;
}

.mobile-dealer-logo-img {
    width: 80px;
    height: auto;
    max-width: 80px;
    max-height: none;
    object-fit: contain;
    display: block;
    align-self: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}

.mobile-menu-utils {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
    flex-wrap: nowrap;
}

.mobile-util-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.mobile-util-item:hover,
.mobile-util-item:focus {
    color: #EFDF00;
    text-decoration: none;
}

.mobile-util-item svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Hide mobile menu on desktop */
@media (min-width: 992px) {
    .mobile-header,
    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
        visibility: hidden !important;
    }
}

