/* Mobile Menu CSS */
/* Header Overrides (Mobile Layout) - SCOPED TO MOBILE ONLY */
@media (max-width: 992px) {
    .main-nav .nav-inner {
        justify-content: center;
        position: relative;
    }

    .main-nav .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    .main-nav .hamburger {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        display: block;
        z-index: 11;
    }
}

/* Mobile Menu Container */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
    display: flex; /* Flexbox for layout */
    flex-direction: column; /* Ensure full height */
}

/* Ensure mobile menu container is hidden on desktop by default */
@media (min-width: 993px) {
    .mobile-menu-container {
        display: none !important;
    }
}

.mobile-menu-container.active {
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
}

.mobile-menu-container .mobile-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.mobile-menu-container.active .mobile-menu-backdrop {
    opacity: 1;
}

.mobile-menu-container .mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

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

.mobile-menu-container .mobile-menu-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    height: 72px;
}

.mobile-menu-container .mobile-menu-top .logo-mobile {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.mobile-menu-container .mobile-menu-top .close-mobile-menu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    color: #0d2b55;
}

/* Scrollable Content Area */
.mobile-menu-container .mobile-menu-content {
    position: relative;
    flex-grow: 1;
    width: 100%;
    overflow-y: auto; /* Enable scrolling */
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.mobile-menu-container .mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-menu-container .mobile-nav-links li {
    border-bottom: 1px solid #f0f0f0;
    position: static;
}

.mobile-menu-container .mobile-nav-links ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-menu-container .mobile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.mobile-menu-container .mobile-menu-link {
    flex-grow: 1;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    display: block;
    padding: 15px 20px;
    font-weight: 500;
}

.mobile-menu-container > li > a.mobile-menu-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.mobile-menu-container .mobile-submenu-toggle {
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 0.9rem;
    color: #999;
    cursor: pointer;
    border-left: 1px solid #f9f9f9;
    height: 100%;
}

/* Fixed Bottom Section */
.mobile-menu-bottom-fixed {
    flex-shrink: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 20;
    position: relative;
}

.mobile-nav-links-fixed {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Accordion Styles */
.mobile-accordion-submenu {
    display: none;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.mobile-accordion-submenu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-accordion-submenu .mobile-menu-link {
    padding-left: 30px !important; /* Indent level 2 */
    font-size: 0.95rem;
    font-weight: 400;
}

/* Level 3 Indentation */
.mobile-accordion-submenu .mobile-accordion-submenu .mobile-menu-link {
    padding-left: 45px !important; /* Indent level 3 */
    font-size: 0.9rem;
}

/* Toggle Rotation */
.mobile-submenu-toggle svg {
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.mobile-submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Active State Highlighting */
.mobile-nav-item.open > .mobile-menu-row > .mobile-menu-link {
    color: #0d2b55;
    font-weight: 600;
}

.mobile-nav-item.open > .mobile-menu-row {
    background: #f9f9f9;
}

/* Hide old header styles */
.mobile-menu-container .mobile-menu-header {
    display: none;
}

.mobile-menu-container button:focus, 
.mobile-menu-container a:focus {
    outline: 2px solid #0d2b55;
    outline-offset: -2px;
}

/* Buttons (Service Shop & Login) */
.mobile-actions {
    padding: 15px 20px;
    background: #fff;
    position: relative; /* Establish positioning context */
    z-index: 25; /* Higher than background but lower than dropdowns */
    /* border-top removed as it's now in fixed container */
}

.mobile-actions .mobile-actions-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.mobile-actions .btn-shop-nav {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    text-decoration: none;
    background: transparent;
    color: #f0a500;
    border: 2px solid #f0a500;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    transition: 0.2s;
}

.mobile-actions .btn-shop-nav:hover {
    background: #f0a500;
    color: #fff;
}

.mobile-actions .mobile-login-row {
    width: 100%;
}

.mobile-actions .mobile-login-dropdown {
    position: relative;
    width: 100%;
}

.mobile-actions .btn-login-nav {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    background: #f0a500;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(240,165,0,0.3);
}

.mobile-actions .btn-login-nav:hover {
    background: #e39d00;
}

.mobile-actions .btn-login-nav .login-arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 5px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.2s;
}

.mobile-actions .mobile-login-dropdown.open .login-arrow {
    transform: rotate(180deg);
}

/* Login Dropdown Position Fix for Fixed Bottom - Show UPWARDS */
.mobile-actions .login-dd-menu {
    display: none;
    position: absolute;
    bottom: 100%; /* Show above button */
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    padding: 6px 0;
    z-index: 1000; /* Ensure it is above other elements */
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.mobile-actions .login-dd-menu::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}

.mobile-actions .login-dd-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid #f9f9f9;
}

.mobile-actions .login-dd-menu a:last-child {
    border-bottom: none;
}

.mobile-actions .login-dd-menu a:hover {
    background: #f5f7fa;
    color: #0d2b55;
}

.mobile-actions .mobile-login-dropdown.open .login-dd-menu {
    display: block;
    opacity: 1;
}

/* Bottom Bar (Language & Currency) */
.mobile-bottom-bar {
    background: #0a1e3d;
    padding: 0;
    margin: 0;
    position: relative; /* Positioning context */
    z-index: 30; /* Higher than actions to ensure dropdowns cover them */
}

.mobile-bottom-bar .m-bottom-inner {
    display: flex;
    width: 100%;
}

.mobile-bottom-bar .tb-dropdown {
    flex: 1;
    text-align: center;
    position: relative;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.mobile-bottom-bar .tb-dropdown:last-child {
    border-right: none;
}

.mobile-bottom-bar .tb-divider {
    display: none;
}

.mobile-bottom-bar .tb-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 0;
    color: rgba(255,255,255,0.8);
    background: transparent;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.mobile-bottom-bar .tb-dropdown-btn .tb-arrow {
    margin-left: 8px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.mobile-bottom-bar .tb-dropdown-btn i {
    margin-right: 6px;
}

.mobile-bottom-bar .tb-dropdown-menu {
    display: none;
    position: absolute;
    bottom: 100%; /* Show above button */
    left: 0;
    width: 100%;
    background: #0f2a52; /* lighten($dark, 5%) */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px 8px 0 0;
    padding: 5px 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    z-index: 1000; /* Ensure it is above other elements */
}

.mobile-bottom-bar .tb-dropdown-menu a {
    display: block;
    padding: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-bottom-bar .tb-dropdown-menu a:last-child {
    border-bottom: none;
}

.mobile-bottom-bar .tb-dropdown-menu a.active {
    color: #f0a500;
    font-weight: bold;
}

.mobile-bottom-bar .tb-dropdown-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.mobile-bottom-bar .tb-dropdown.open .tb-dropdown-menu {
    display: block;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
