/**
 * 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: #ffffff; /* White background for mobile header */
        height: 70px;
        position: relative;
        z-index: 1001;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .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: #000000; /* Black placeholder on white background */
        font-size: 30px;
        line-height: 1;
    }
    
    .mobile-header-brand {
        font-family: 'Read Font', sans-serif; /* Read Font per Dacia guidelines */
        font-size: 16px;
        line-height: 20px;
        font-weight: 400;
        color: #000000; /* Black text on white background */
        text-transform: none; /* No uppercase - match dacia.gr */
        flex: 1;
        text-align: center;
        margin: 0 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .mobile-header-brand .brand-name-bold {
        font-family: 'Dacia Block', sans-serif; /* Dacia Block for brand name */
        font-size: 16px;
        line-height: 20px;
        font-weight: 700;
        text-transform: uppercase;
        color: #000000;
    }
    
    .mobile-header-brand .brand-separator {
        font-family: 'Read Font', sans-serif; /* Read Font for separator */
        font-size: 16px;
        line-height: 20px;
        font-weight: 400;
        color: #000000;
    }
    
    .mobile-header-brand .brand-city-name {
        font-family: 'Read Font', sans-serif; /* Read Font for city name */
        font-size: 16px;
        line-height: 20px;
        font-weight: 400;
        text-transform: none; /* No uppercase - match dacia.gr */
        color: #000000;
    }
    
    /* 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: #000000; /* Black hamburger on white background */
        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: var(--dacia-khaki, #646b52); /* Dacia Khaki hover */
    }
    
    .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); /* Semi-transparent backdrop */
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Panel - Slide from right like dacia.gr */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0; /* Slide from right */
    left: auto; /* Override left positioning */
    width: 85%;
    max-width: 400px; /* Wider menu like dacia.gr */
    height: 100vh;
    background-color: #333333; /* Dark grey background like dacia.gr */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(100%); /* Start from right (hidden) */
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3); /* Shadow on left side */
    visibility: hidden;
    opacity: 0;
}

.mobile-menu.open {
    transform: translateX(0); /* Slide in from right */
    visibility: visible;
    opacity: 1;
}

/* Mobile Menu Header */
/* Per Dacia Digital Standard Guide - Page 41: Close button (X) next to "City name" */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #333333; /* Dark grey background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    height: auto;
    min-height: 70px;
}

.mobile-menu-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    background: transparent !important; /* Ensure transparent background */
}

.mobile-menu-emblem-img {
    display: block;
    margin: 0;
    object-fit: contain;
    background: transparent !important; /* Ensure transparent background - no white square */
    /* Emblem should be white to show on dark background (#333333) */
    /* If emblem appears as white square, it might have white background in the image itself */
}

.mobile-menu-emblem-placeholder {
    display: block;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
}

.mobile-menu-city-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between DACIA, separator, and city name */
}

.mobile-menu-city-name .brand-name-bold {
    font-family: 'Dacia Block', sans-serif; /* Dacia Block for brand name */
    font-size: 16px;
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff !important; /* White color */
}

.mobile-menu-city-name .brand-separator {
    font-family: 'Read Font', sans-serif; /* Read Font for separator */
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    color: #ffffff !important; /* White color */
}

.mobile-menu-city-name .brand-city-name {
    font-family: 'Read Font', sans-serif; /* Read Font per Dacia guidelines */
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    color: #ffffff !important; /* White color */
    text-transform: none; /* No uppercase */
}

.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: var(--dacia-khaki, #646b52); /* Dacia Khaki hover color */
    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: 'Dacia Block', sans-serif; /* Dacia Block for menu items */
    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: var(--dacia-khaki, #646b52); /* Dacia Khaki hover color */
    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); /* Point right (›) when collapsed */
}

.mobile-menu-item.has-submenu.expanded > a .menu-item-chevron {
    transform: rotate(-90deg); /* Point up (↑) when expanded - matching dacia.gr */
}

/* 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: 'Read Font', sans-serif; /* Read Font for submenu items */
    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: var(--dacia-khaki, #646b52); /* Dacia Khaki hover color */
    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); /* Point up when expanded - matching dacia.gr */
}

.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); /* Point up when expanded - matching dacia.gr */
}

.mobile-submenu-level3 > li > a {
    padding-left: 80px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    padding-top: 30px; /* More space from top */
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px) + 20px); /* Increased bottom padding to always show */
    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: 120px; /* Increased min-height to accommodate items higher from bottom */
    box-sizing: border-box;
    margin-top: auto; /* Push footer to bottom but with padding */
}

.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;
    gap: 8px; /* Space between logo and text */
}

.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-dealer-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px; /* Space between "Dacia Dealer" and dealer name */
}

.mobile-dealer-label {
    font-family: 'Read Font', sans-serif;
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: #ffffff;
    text-transform: none;
}

.mobile-dealer-name {
    font-family: 'Read Font', sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    color: #ffffff;
    text-transform: none;
}

.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;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
    min-width: 40px;
    height: auto;
    flex-shrink: 0;
    gap: 4px;
}

.mobile-util-item:hover,
.mobile-util-item:focus {
    color: #EFDF00;
    text-decoration: none;
}

.mobile-util-item svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.mobile-util-label {
    font-family: 'Read Font', sans-serif;
    font-size: 10px;
    line-height: 12px;
    font-weight: 400;
    color: #ffffff;
    text-transform: none;
    white-space: nowrap;
    text-align: center;
}

/* 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;
    }
}

