:root {
    --primary-color: #7B100B;
}

/* ============ NAVBAR BASE ============ */
header.nav { 
    position: -webkit-sticky; 
    position: sticky; 
    top: 0; 
    z-index: 9990; 
    background: #fff; 
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; }

/* === বুলেটপ্রুফ আন্ডারলাইন রিমুভার === */
.navlinks a,
.navlinks a:hover,
.navlinks a:focus,
.navlinks a:active,
.navlinks a.active,
.navlinks a:visited {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important; /* ক্লিক করার পর যে বক্স/লাইন আসে তা বন্ধ করে */
    box-shadow: none !important;
    background: transparent !important;
    color: var(--primary-color) !important;
    font-weight: 600; 
    padding: 10px 12px; 
    transition: color 0.3s;
}

/* হোভার বা অ্যাক্টিভ হলে শুধু কালার চেঞ্জ হবে */
.navlinks a:hover, 
.navlinks a.active { 
    color: #e5a93b !important; 
}

/* কোনো প্রকার সিউডো-এলিমেন্ট (::after, ::before) লাইন তৈরি করতে পারবে না */
.navlinks a::after,
.navlinks a::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Cart Button (Header) */
.nav-cart-btn { 
    display: flex; align-items: center; gap: 8px; background: var(--primary-color); 
    color: #fff !important; border: none; padding: 8px 16px; border-radius: 25px; 
    font-weight: 700; font-size: 0.95rem; cursor: pointer; position: relative; 
}
.nav-cart-badge { position: absolute; top: -5px; right: -5px; background: #e5a93b; color: #000; font-size: 0.7rem; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ============ MOBILE BOTTOM NAVBAR (Scrollable) ============ */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.05);
    z-index: 9980;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding: 8px 5px;
}
.bottom-nav-scroll::-webkit-scrollbar { display: none; }

.nav-item {
    flex: 0 0 auto;
    min-width: 70px;
    border: none;
    background: transparent;
    color: #78716c;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px;
    font-size: 11px;
    text-decoration: none;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--primary-color); font-weight: 700; }

/* ============ RESPONSIVE FIXES ============ */
@media (max-width: 991px) {
    .nav-desktop-only, .navlinks { display: none !important; }
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 65px; }
}

/* ============ LOGIN DROPDOWN ============ */
.nav-auth-dropdown {
    position: relative;
    display: inline-block;
}

.nav-auth-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
}

.nav-auth-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 140px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    flex-direction: column;
    z-index: 100;
    border: 1px solid #eee;
}

.nav-auth-menu a {
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.nav-auth-menu a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

/* Hover করলে ড্রপডাউন ওপেন হবে */
.nav-auth-dropdown:hover .nav-auth-menu {
    display: flex;
}

/* ============ USER DROPDOWN (currently unstyled in header.php output) ============ */
.nav-user { position: relative; }

.nav-user-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .15s ease;
}
.nav-user-toggle:hover { background: #f5f5f5; }

.nav-user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 6px 0;
    display: none;
    z-index: 100;
}
.nav-user-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}
.nav-user-menu a:hover { background: #f5f5f5; color: var(--primary-color); }
.nav-user-menu .user-menu-logout { color: #b91c1c; }

/* Open states — CSS-only (hover) + JS (.open class) both supported */
.nav-user:hover .nav-user-menu,
.nav-user.open .nav-user-menu { display: block; }

/* Make guest login visible against white nav */
.nav-guest { display: flex; align-items: center; gap: 10px; }
.nav-auth {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background .15s;
}
.nav-auth:hover { background: #f5f5f5; }
.nav-auth-cta {
    background: var(--primary-color);
    color: #fff !important;
}
.nav-auth-cta:hover { background: #5a0b07; }

/* Make the nav unambiguously above page heroes / overlays */
header.nav#siteNav {
    z-index: 2147483000; /* stands above every page section */
}
