/* =====================================
   MODERN NAVBAR
===================================== */
nav{
    position:sticky;
    top:16px;
    width:96%;
    max-width:1600px;
    margin:16px auto;
    height:78px;
    padding:0 18px;
    gap:20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--surface);
    backdrop-filter:blur(18px);
    border-radius:22px;
    border:1px solid var(--border);
    box-shadow:
        0 10px 40px rgba(15,23,42,.08);
    z-index:1000;
}
/*nav{
    position:sticky;
    top:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 6%;
    background:var(--surface);
    backdrop-filter:blur(14px);
    border-bottom:1px solid var(--border);
    border-radius:22px;
    transition:background .3s,border-color .3s;
}*/
.nav-left{
    display:flex;
    align-items:center;
}
.logo{
    display:flex;
    align-items:center;
    gap:16px;
}
.logo img{
    width:48px;
}
.logo-text h2{
    font-size:2rem;
    font-weight:800;
    color:var(--text);
    line-height:1;
}
.logo-text span{
    color:var(--text-light);
    font-size:.95rem;
}
.nav-center{
    display:flex;
    align-items:center;
    flex-shrink:0;
    gap:10px;
}
.nav-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 18px;
    border-radius:14px;
    color:var(--text-light);
    font-weight:600;
    transition:.25s;
    position:relative;
}
.nav-item:hover{
    background:var(--surface-2);
    color:var(--primary);
}
.nav-item.active{
    background:var(--surface-2);
    color:var(--primary);
}
.nav-item i{
    font-size:18px;
}
.nav-right{
    display:flex;
    align-items:center;
    gap:14px;
    
    justify-content:flex-end;
    
}
.search-box{
    width:420px;
    height:48px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 18px;
    background:var(--background);
    border:1px solid var(--border);
    border-radius:999px;
    transition:.25s;
}
.search-box:focus-within{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(239,68,68,.12);
}
.search-box input{
    flex:1;
    border:none;
    outline:none;
    background:transparent;
    font-size:15px;
    color:var(--text);
    box-shadow:none;
}
.search-box i{
    color:#94A3B8;
}
.icon-btn{
    width:46px;
    height:46px;
    border-radius:50%;
    background:var(--surface);
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#374151;
    position:relative;
    transition:.25s;
}
.icon-btn:hover{
    transform:translateY(-2px);
    color:var(--primary);
    box-shadow:0 8px 20px rgba(0,0,0,.12);
}
#messageCount,
#notificationCount,
#cartCount{
    position:absolute;
    top:-4px;
    right:-2px;
    min-width:18px;
    height:18px;
    display:none;
    justify-content:center;
    align-items:center;
    border-radius:999px;
    background:#EF4444;
    color:white;
    font-size:10px;
    font-weight:700;
    border:2px solid white;
}
.profile-menu{
    position:relative;
}
#profileToggle{
    height:48px;
    padding:0 18px;
    border:none;
    background:var(--surface);
    border-radius:999px;
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    font-weight:600;
}
#profileToggle:hover{
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}
#profileToggle .fa-user-circle{
    font-size:30px;
    color:var(--primary);
}
.profile-dropdown{
    position:absolute;
    right:0;
    top:65px;
    width:260px;
    background:var(--surface);
    border-radius:20px;
    overflow:hidden;
    display:none;
    box-shadow:
        0 20px 60px rgba(15,23,42,.12);
}
.profile-dropdown a{
    display:flex;
    align-items:center;
    gap:14px;
    padding:18px 22px;
    color:#374151;
    font-weight:500;
}
.profile-dropdown a:hover{
    background:var(--background);
}
.profile-dropdown hr{
    border:none;
    border-top:1px solid #ECECEC;
}
.profile-menu.open .profile-dropdown{
    display:block;
}
.menu-toggle{
    display:none;
    width:52px;
    height:52px;
    border:1px solid var(--border);
    border-radius:16px;
    background:var(--surface);
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:22px;
    color:#374151;
    transition:.25s;
}
.menu-toggle:hover{
    color:var(--primary);
}
@media(max-width:900px){
    .nav-center,
    .nav-right{
        display:none;
    }
    .menu-toggle{
        display:flex;
    }
    .nav-links{
    background:var(--surface);
    }
}
/* =====================================
   MOBILE DRAWER
===================================== */
.mobile-menu{
    position:fixed;
    top:0;
    right:-100%;
    width:320px;
    height:100vh;
    background:var(--surface);
    box-shadow:-15px 0 40px rgba(0,0,0,.15);
    z-index:2000;
    transition:.35s ease;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.mobile-menu.active{
    right:0;
}
.mobile-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.45);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:1999;
}
.mobile-overlay.active{
    opacity:1;
    visibility:visible;
}
.mobile-menu-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:25px;
    border-bottom:1px solid #ECECEC;
}
.mobile-profile{
    display:flex;
    align-items:center;
    gap:16px;
}
.mobile-avatar{
    width:56px;
    height:56px;
    border-radius:50%;
    background:var(--primary);
    color:white;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:22px;
}
.close-menu{
    width:44px;
    height:44px;
    border:none;
    border-radius:12px;
    background:var(--surface-alt);
    cursor:pointer;
    font-size:20px;
}
.mobile-links{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:20px;
    gap:8px;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    padding-bottom:calc(40px + env(safe-area-inset-bottom));
}
.mobile-links a{
    display:flex;
    align-items:center;
    gap:15px;
    padding:16px;
    border-radius:14px;
    color:#374151;
    font-weight:600;
    transition:.25s;
}
.mobile-links a:hover{
    background:var(--surface-2);
    color:var(--primary);
}
.mobile-links hr{
    border:none;
    border-top:1px solid #ECECEC;
    margin:10px 0;
}
@media(min-width:901px){
    .mobile-menu,
    .mobile-overlay{
        display:none;
    }
}
.theme-toggle{
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:var(--surface);
    color:var(--text);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.3s;
    box-shadow:var(--shadow);
}
.theme-toggle:hover{
    transform:scale(1.05);
}
.mobile-theme{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 16px;
    margin:10px 0;
    border-radius:14px;
    background:var(--surface);
}
.theme-info{
    display:flex;
    align-items:center;
    gap:14px;
    font-weight:600;
}
.theme-switch{
    position:relative;
    width:54px;
    height:30px;
}
.theme-switch input{
    display:none;
}
.slider{
    position:absolute;
    inset:0;
    background:#CBD5E1;
    border-radius:999px;
    cursor:pointer;
    transition:.3s;
}
.slider::before{
    content:"";
    position:absolute;
    width:22px;
    height:22px;
    left:4px;
    top:4px;
    border-radius:50%;
    background:var(--surface);
    transition:.3s;
}
.theme-switch input:checked + .slider{
    background:var(--primary);
}
.theme-switch input:checked + .slider::before{
    transform:translateX(24px);
}
.appearance-btn{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px;
    border:none;
    background:none;
    color:var(--text);
    cursor:pointer;
    font-size:16px;
}
.appearance-left{
    display:flex;
    align-items:center;
    gap:14px;
}
.appearance-menu{
    display:none;
    margin-top:8px;
    padding:8px;
    border-radius:14px;
    background:var(--surface);
    border:1px solid var(--border);
}
.appearance-menu.open{
    display:block;
}
.theme-option{
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px 16px;
    border-radius:12px;
    cursor:pointer;
    transition:.25s;
}
.theme-option:hover{
    background:var(--hover);
}
.theme-option.active{
    background:rgba(239,68,68,.12);
    color:var(--primary);
}
.theme-option .check{
    margin-left:auto;
    opacity:0;
}
.theme-option.active .check{
    opacity:1;
}

@media (min-width:901px) and (max-width:1200px){

    .nav-left{
        display:none;
    }

    .nav-center a[href="create-listing.html"]{
        display:none;
    }

}

/* Large laptops/desktops */
@media (max-width:1400px){
    .search-box{
        width:360px;
    }
}

/* Tablets */
@media (max-width:1200px){
    .search-box{
        width:260px;
    }
}

/* Small tablets */
@media (max-width:1050px){
    .search-box{
        width:200px;
    }
}