/* ========================================
   MODERN MOBILE MENU - CLEAN & FAST
   ======================================== */

/* CSS Variables */
:root {
    --mobile-primary: #2C1810;
    --mobile-accent: #B98A3D;
    --mobile-text: #FFFFFF;
    --mobile-text-muted: #B8B8B8;
    --mobile-bg: #1A0F0A;
    --mobile-border: rgba(255,255,255,0.1);
    --mobile-shadow: 0 8px 32px rgba(0,0,0,0.3);
    --mobile-radius: 12px;
    --mobile-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   MOBILE TOP BAR
   ======================================== */

.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--mobile-primary);
    z-index: 1000;
    box-shadow: var(--mobile-shadow);
    transition: var(--mobile-transition);
}

.mobile-topbar.hidden {
    transform: translateY(-100%);
}

.mobile-topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
}

.mobile-topbar-logo {
    flex: 1;
    max-width: 200px;
}

.mobile-topbar-logo img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: var(--mobile-transition);
}

.mobile-topbar-logo img:hover {
    transform: scale(1.05);
}

.mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--mobile-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--mobile-transition);
    position: relative;
}

.mobile-topbar-btn:hover {
    background: var(--mobile-accent);
    transform: scale(1.05);
}

.mobile-topbar-btn i {
    font-size: 16px;
}

/* Wishlist Badge */
.mobile-wishlist-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--mobile-accent);
    color: var(--mobile-text);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MOBILE MENU OVERLAY
   ======================================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--mobile-primary) 0%, var(--mobile-bg) 100%);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: var(--mobile-transition);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MOBILE MENU HEADER
   ======================================== */

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    background: rgba(255,255,255,0.08);
    border-bottom: 1px solid var(--mobile-border);
    backdrop-filter: blur(15px);
    min-height: 80px;
}

.mobile-menu-close {
    width: 52px;
    height: 52px;
    border: none;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: var(--mobile-text);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--mobile-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 10;
}

.mobile-menu-close:hover {
    background: var(--mobile-accent);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(185, 138, 61, 0.4);
    border-color: var(--mobile-accent);
}

.mobile-menu-close:active {
    transform: scale(1.05);
}

.mobile-menu-logo {
    height: 50px;
    filter: brightness(0) invert(1);
    transition: var(--mobile-transition);
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.mobile-menu-logo:hover {
    transform: scale(1.05);
}

.mobile-menu-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mobile-menu-actions .mobile-topbar-btn {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: var(--mobile-transition);
}

.mobile-menu-actions .mobile-topbar-btn:hover {
    background: var(--mobile-accent);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(185, 138, 61, 0.3);
    border-color: var(--mobile-accent);
}

.mobile-menu-actions .mobile-topbar-btn i {
    font-size: 18px;
}

/* ========================================
   MOBILE MENU NAVIGATION
   ======================================== */

.mobile-menu-nav {
    padding: 20px 0;
    height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid var(--mobile-border);
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: var(--mobile-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--mobile-transition);
    position: relative;
}

.mobile-menu-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--mobile-text);
    text-decoration: none;
}

.mobile-menu-link i {
    width: 24px;
    font-size: 18px;
    margin-right: 16px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-menu-link img {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.mobile-menu-link span {
    flex: 1;
    font-weight: 500;
}

/* Dropdown Arrow */
.mobile-dropdown-arrow {
    font-size: 14px;
    color: var(--mobile-accent);
    transition: var(--mobile-transition);
    margin-left: auto;
}

.mobile-menu-item.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
    color: var(--mobile-text);
}

/* ========================================
   MOBILE SUBMENU
   ======================================== */

.mobile-submenu {
    display: none;
    background: rgba(0,0,0,0.2);
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    display: block;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-submenu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-submenu a {
    display: flex;
    align-items: center;
    padding: 16px 20px 16px 60px;
    color: var(--mobile-text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: var(--mobile-transition);
    position: relative;
}

.mobile-submenu a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--mobile-text);
    text-decoration: none;
}

.mobile-submenu a img {
    width: 20px;
    height: 15px;
    margin-right: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ========================================
   MOBILE SUB-SUBMENU
   ======================================== */

.mobile-sub-submenu {
    display: none;
    background: rgba(0,0,0,0.3);
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-sub-submenu.active {
    display: block;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-sub-submenu a {
    padding: 14px 20px 14px 80px;
    font-size: 14px;
    color: var(--mobile-text-muted);
}

.mobile-sub-submenu a:hover {
    color: var(--mobile-text);
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.mobile-menu-nav::-webkit-scrollbar,
.mobile-submenu::-webkit-scrollbar,
.mobile-sub-submenu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-nav::-webkit-scrollbar-track,
.mobile-submenu::-webkit-scrollbar-track,
.mobile-sub-submenu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.mobile-menu-nav::-webkit-scrollbar-thumb,
.mobile-submenu::-webkit-scrollbar-thumb,
.mobile-sub-submenu::-webkit-scrollbar-thumb {
    background: var(--mobile-accent);
    border-radius: 2px;
}

.mobile-menu-nav::-webkit-scrollbar-thumb:hover,
.mobile-submenu::-webkit-scrollbar-thumb:hover,
.mobile-sub-submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(185, 138, 61, 0.8);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-overlay.active .mobile-menu-nav {
    animation: slideInFromLeft 0.4s ease;
}

.mobile-menu-item {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

.mobile-menu-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu-item:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu-item:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu-item:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu-item:nth-child(5) { animation-delay: 0.3s; }
.mobile-menu-item:nth-child(6) { animation-delay: 0.35s; }
.mobile-menu-item:nth-child(7) { animation-delay: 0.4s; }
.mobile-menu-item:nth-child(8) { animation-delay: 0.45s; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-topbar,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    body {
        margin-top: 0 !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-topbar {
        display: block;
    }
    
    .navigation {
        display: none;
    }
    
    body {
        margin-top: 60px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .mobile-topbar {
        height: 55px;
    }
    
    .mobile-topbar-content {
        padding: 0 15px;
    }
    
    .mobile-topbar-logo img {
        height: 35px;
    }
    
    .mobile-topbar-btn {
        width: 36px;
        height: 36px;
    }
    
    .mobile-topbar-btn i {
        font-size: 14px;
    }
    
    .mobile-wishlist-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -5px;
        right: -5px;
    }
    
    body {
        margin-top: 55px;
    }
    
    .mobile-menu-header {
        padding: 20px 15px;
        min-height: 70px;
    }
    
    .mobile-menu-close {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .mobile-menu-logo img {
        height: 45px;
    }
    
    .mobile-menu-actions .mobile-topbar-btn {
        width: 44px;
        height: 44px;
    }
    
    .mobile-menu-actions .mobile-topbar-btn i {
        font-size: 16px;
    }
    
    .mobile-menu-link {
        padding: 16px 15px;
        font-size: 15px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .mobile-topbar {
        height: 50px;
    }
    
    .mobile-topbar-content {
        padding: 0 12px;
    }
    
    .mobile-topbar-logo img {
        height: 30px;
    }
    
    .mobile-topbar-btn {
        width: 32px;
        height: 32px;
    }
    
    .mobile-topbar-btn i {
        font-size: 12px;
    }
    
    .mobile-wishlist-badge {
        width: 14px;
        height: 14px;
        font-size: 8px;
        top: -4px;
        right: -4px;
    }
    
    body {
        margin-top: 50px;
    }
    
    .mobile-menu-header {
        padding: 18px 12px;
        min-height: 65px;
    }
    
    .mobile-menu-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .mobile-menu-logo img {
        height: 40px;
    }
    
    .mobile-menu-actions .mobile-topbar-btn {
        width: 40px;
        height: 40px;
    }
    
    .mobile-menu-actions .mobile-topbar-btn i {
        font-size: 14px;
    }
}

/* ========================================
   BODY SCROLL LOCK
   ======================================== */

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.mobile-menu-hidden {
    display: none !important;
}

.mobile-menu-visible {
    display: block !important;
}

/* Smooth transitions for all interactive elements */
.mobile-menu-link,
.mobile-topbar-btn,
.mobile-menu-close {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
