/* ============================================
   MAIN NAVIGATION - BEAUTIFUL & MODERN
   ============================================ */

/* ===== BASE NAV ===== */
.main-nav {
    background: #ffffff;
    border-bottom: 1px solid #e8edf4;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* ===== LOGO ===== */
.nav-brand {
    flex-shrink: 0;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    color: #0f172a;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.nav-logo:hover {
    opacity: 0.85;
}

.logo-accent {
    color: #1e3a8a;
}

/* ===== DESKTOP MENU ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    position: relative;
}

.nav-link:hover {
    color: #1e3a8a;
    background: #f0f4ff;
}

.nav-link i {
    font-size: 0.85rem;
}

/* ===== ACTIVE STATE - CLEAN UNDERLINE ===== */
.nav-link.active {
    color: #1e3a8a;
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-link.active:hover::after {
    width: 32px;
}

.arrow {
    font-size: 10px;
    margin-left: 2px;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* ===== DROPDOWN MENU (Simple) ===== */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8edf4;
    box-shadow: 0 16px 48px rgba(0,0,0,0.08);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.25s ease;
    z-index: 1001;
    list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}

.dropdown-menu li a:hover {
    background: #f0f4ff;
    color: #1e3a8a;
    padding-left: 26px;
}

/* ===== MEGA DROPDOWN ===== */
.dropdown-mega {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.98);
    width: 90vw;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8edf4;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    padding: 32px 36px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.shop-mega {
    max-width: 900px !important;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.mega-col h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f4ff;
}

.mega-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-col ul li {
    margin-bottom: 2px;
}

.mega-col ul li a {
    display: block;
    padding: 6px 8px;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.mega-col ul li a:hover {
    background: #f0f4ff;
    color: #1e3a8a;
    transform: translateX(4px);
}

.mega-col .view-all a {
    font-weight: 600;
    color: #1e3a8a;
    margin-top: 4px;
}

/* ===== RIGHT ACTIONS ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Cart */
.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.nav-cart:hover {
    background: #f0f4ff;
    color: #1e3a8a;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Auth Buttons */
.btn-nav {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login {
    background: transparent;
    color: #475569;
}

.btn-login:hover {
    background: #f0f4ff;
    color: #1e3a8a;
}

.btn-register {
    background: #1e3a8a;
    color: #ffffff;
}

.btn-register:hover {
    background: #0f2b6d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn-logout {
    background: transparent;
    color: #475569;
}

.btn-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.btn-primary {
    background: #1e3a8a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0f2b6d;
    color: #ffffff;
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-toggle:hover {
    background: #f0f4ff;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    padding: 20px 24px 40px;
    overflow-y: auto;
    z-index: 999;
    border-top: 1px solid #e8edf4;
}

.mobile-menu.open {
    display: block;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav > li > a,
.mobile-dropdown > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    color: #0f172a;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.mobile-dropdown > span i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.open > span i {
    transform: rotate(180deg);
}

.mobile-dropdown ul {
    list-style: none;
    padding-left: 16px;
    margin: 0;
    display: none;
}

.mobile-dropdown.open ul {
    display: block;
}

.mobile-dropdown ul li a {
    display: block;
    padding: 10px 0;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f8fafc;
}

.mobile-dropdown ul li a:hover {
    color: #1e3a8a;
}

.mobile-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #dc2626;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.mobile-logout:hover {
    color: #b91c1c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .nav-menu {
        gap: 0;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .dropdown-mega {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: 60px;
        padding: 0 16px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-actions .btn-nav {
        display: none;
    }

    .mobile-menu {
        top: 60px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 56px;
        padding: 0 12px;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .nav-actions .btn-nav {
        display: none;
    }
}