/* ==============================================
   RONGSHRE — Universal Navbar CSS
   ============================================== */

/* ===== TOP BAR ===== */
.top-bar { background: #0A3A1F; color: rgba(255,255,255,0.7); font-size: 13px; padding: 6px 0; }
.top-bar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 100%; margin: 0 auto; padding: 0 60px; }
.top-bar a { color: rgba(255,255,255,0.7); transition: 0.3s; }
.top-bar a:hover { color: #FFC107; }
.top-bar .social a { margin-left: 12px; font-size: 14px; }

/* ===== HEADER ===== */
.rn-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 9999; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.rn-header .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 30px; flex-wrap: wrap; gap: 16px; max-width: 100%; margin: 0 auto; }
.rn-header .logo { font-size: 24px; font-weight: 900; letter-spacing: 2px; color: #0F4C2A; text-decoration: none; text-transform: uppercase; }
.rn-header .logo span { color: #FFC107; }

.rn-header .search-box-header { display: flex; background: #F8F9FA; border-radius: 50px; overflow: hidden; border: 2px solid #E5E7EB; flex: 1; max-width: 400px; }
.rn-header .search-box-header:focus-within { border-color: #0F4C2A; }
.rn-header .search-box-header input { flex: 1; padding: 10px 18px; border: none; outline: none; background: transparent; font-size: 14px; font-family: inherit; }
.rn-header .search-box-header button { background: #0F4C2A; color: #fff; border: none; padding: 10px 20px; cursor: pointer; transition: 0.3s; }
.rn-header .search-box-header button:hover { background: #FFC107; color: #000; }

.rn-header .nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.rn-header .nav a { color: #6B7280; font-size: 14px; font-weight: 500; text-decoration: none; transition: 0.3s; display: inline-flex; align-items: center; gap: 6px; position: relative; }
.rn-header .nav a:hover, .rn-header .nav a.active-link { color: #0F4C2A; font-weight: 700; }

.rn-header .nav .btn-login { background: #0F4C2A; color: #fff; padding: 8px 20px; border-radius: 50px; font-weight: 600; }
.rn-header .nav .btn-login:hover { background: #FFC107; color: #000; }

/* ===== CART LINK ===== */
.cart-link { position: relative; color: #1A1A2E !important; font-size: 18px !important; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: #FFC107; color: #000; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 50%; min-width: 18px; text-align: center; }

/* ===== MEGA MENU ===== */
.mega-menu { position: relative; }
.mega-menu .dropbtn { background: transparent; border: none; color: #6B7280; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 0; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; transition: 0.3s; }
.mega-menu .dropbtn:hover { color: #0F4C2A; }
.mega-menu .dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 500px; padding: 20px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); border: 1px solid #eee; z-index: 10001; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mega-menu:hover .dropdown-content { display: grid; }
.mega-menu .dropdown-content h4 { color: #0F4C2A; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.mega-menu .dropdown-content a { display: block; padding: 4px 0; color: #555; font-size: 13px; text-decoration: none; transition: 0.3s; }
.mega-menu .dropdown-content a:hover { color: #0F4C2A; padding-left: 6px; }

/* ===== PROFILE DROPDOWN ===== */
.profile-dropdown { position: relative; }
.profile-btn { background: #F8F9FA; border: 1px solid #eee; border-radius: 50px; padding: 4px 14px 4px 4px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: inherit; transition: 0.3s; }
.profile-btn:hover { background: #fff; border-color: #0F4C2A; }
.profile-btn .avatar { width: 32px; height: 32px; border-radius: 50%; background: #0F4C2A; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.profile-btn .pname { font-size: 14px; font-weight: 600; color: #1A1A2E; }

.dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: #fff; min-width: 240px; padding: 8px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); border: 1px solid #eee; z-index: 10001; }
.dropdown-menu.show { display: block; }
.dropdown-menu hr { border: none; border-top: 1px solid #eee; margin: 8px 0; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; color: #1A1A2E; text-decoration: none; font-size: 14px; transition: 0.2s; }
.dropdown-menu a:hover { background: #F8F9FA; color: #0F4C2A; }
.dropdown-menu a i { width: 18px; color: #0F4C2A; }

.user-info { display: flex; gap: 12px; padding: 12px; align-items: center; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; background: #0F4C2A; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.user-info strong { display: block; font-size: 14px; color: #1A1A2E; }
.role-badge { font-size: 11px; color: #6B7280; display: inline-block; margin-top: 2px; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .top-bar .container, .rn-header .container { padding: 12px 20px; }
    .rn-header .container { flex-direction: column; }
    .rn-header .nav { justify-content: center; }
    .rn-header .search-box-header { max-width: 100%; width: 100%; }
    .mega-menu .dropdown-content { min-width: 300px; grid-template-columns: 1fr; }
    .dropdown-menu { right: auto; left: 0; }
}
