/* ── TOPBAR ─────────────────────────────────────────────── */
@keyframes tbShine {
    0%   { transform: translateX(-120%); }
    60%  { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

.branex-topbar {
    background: var(--gradient-dark);
    height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    font-family: var(--font);
}
.branex-topbar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.07) 50%, transparent 100%);
    pointer-events: none;
}
.branex-topbar .container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.branex-topbar-inner {
    width: 100%;
    height: 44px;
    position: relative;
}
.branex-notice-item {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.branex-notice-item.active {
    display: flex;
}
.branex-topbar-text {
    color: #fff;
    white-space: nowrap;
}
.branex-notice-mobile { display: none !important; }
@media (max-width: 640px) {
    .branex-notice-desktop { display: none !important; }
    .branex-notice-mobile.active { display: flex !important; }
}
.branex-promo-go {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 32px;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: 0.2s;
    line-height: normal;
}
.branex-notice-item:hover .branex-promo-go {
    background: var(--accent-dark);
    transform: scale(1.05);
}

/* --- HEADER --- */
.branex-header {
    background: var(--bg);
    border-bottom: 1px solid var(--bg-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: var(--font);
}
.branex-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
}

/* LOGO */
.branex-logo-col { display: flex; align-items: center; gap: 10px; }
.branex-logo-link { display: flex; align-items: center; text-decoration: none; }
.branex-logo-img  { max-height: 52px; width: auto; display: block; border-radius: 50px; }
.branex-logo-link img { max-height: 52px; width: auto; }
.branex-logo img  { max-height: 52px; width: auto; }
.branex-logo-site-name a {
    font-size: 18px; font-weight: 800; color: var(--text); text-decoration: none;
    letter-spacing: -0.3px;
}
.branex-logo-site-name a:hover { color: var(--accent); }

/* DESKTOP NAV */
.branex-desktop-nav { display: flex; }
.branex-nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2px;
    margin: 0; padding: 0;
}
.branex-nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.branex-nav-menu > li > a i { font-size: 12px; margin-top: 2px; }
.branex-nav-menu > li > a:hover,
.branex-nav-menu > li.current-menu-item > a {
    background: var(--bg-light);
    color: var(--primary);
}

/* Custom Dropdown */
.branex-nav-menu > li.has-branex-dropdown { position: relative; }
.branex-nav-menu > li.has-branex-dropdown > .branex-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: var(--bg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(241, 245, 249, 0.8);
    border-radius: 16px;
    padding: 15px;
    display: none;
    z-index: 999999;
    margin-top: 12px;
    animation: branexFadeInUp 0.3s ease-out;
    list-style: none;
}
.branex-nav-menu > li.has-branex-dropdown:hover > .branex-dropdown-menu { display: block; }
.branex-nav-menu > li.has-branex-dropdown > .branex-dropdown-menu::before {
    content: ''; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; background: transparent;
}
.branex-dropdown-menu > li { margin-bottom: 5px; }
.branex-dropdown-menu > li:last-child { margin-bottom: 0; }
.branex-dropdown-menu > li > a {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.branex-dropdown-menu > li > a:hover { background: var(--bg-light); }
.branex-dd-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-right: 15px; }
.branex-dd-text-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.branex-dd-text { color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: 0.3px; line-height: 1.2; margin-bottom: 4px; }
.branex-dd-subtext { color: var(--text-muted); font-size: 11.5px; font-weight: 500; line-height: 1.2; }
.branex-dd-arrow { color: var(--border); font-size: 13px; transition: 0.2s; margin-left: 10px; }
.branex-dropdown-menu > li > a:hover .branex-dd-arrow { transform: translateX(3px); color: var(--text-muted); }
.branex-dd-simple-link { padding: 12px 18px !important; display: flex !important; align-items: center; justify-content: space-between; }
.branex-dd-simple-link .branex-dd-text { font-size: 13.5px; font-weight: 600; margin-bottom: 0; }
.branex-dd-simple-link .branex-dd-arrow { margin-left: 10px; }

/* HEADER ACTIONS */
.branex-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* AFFILIATE BUTTON */
.branex-btn-affiliate {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--gold);
    padding: 6px 15px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    letter-spacing: 1px;
    position: relative;
    z-index: 100;
    text-transform: uppercase;
}
.branex-btn-affiliate::before,
.branex-btn-affiliate::after {
    content: '';
    position: absolute;
    top: 25%;
    height: 50%;
    width: 1.5px;
    background: rgba(var(--primary-rgb), 0.3);
}
.branex-btn-affiliate::before { left: 0; }
.branex-btn-affiliate::after { right: 0; }
.branex-btn-affiliate:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
    background-image: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.branex-btn-affiliate:hover::before,
.branex-btn-affiliate:hover::after { background: rgba(var(--primary-rgb), 0.6); }

/* MOBILE */
.branex-mobile-actions { display: none; align-items: center; gap: 15px; }
.branex-mobile-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-light); border-radius: 50%; color: var(--text); font-size: 18px; text-decoration: none; }
.branex-mobile-menu-toggle { background: none; border: none; width: 30px; height: 24px; position: relative; cursor: pointer; padding: 0; }
.branex-mobile-menu-toggle span { display: block; width: 100%; height: 3px; background: var(--primary); border-radius: 3px; position: absolute; transition: 0.3s; }
.branex-mobile-menu-toggle span:nth-child(1) { top: 0; }
.branex-mobile-menu-toggle span:nth-child(2) { top: 10px; width: 75%; right: 0; }
.branex-mobile-menu-toggle span:nth-child(3) { bottom: 0; }

.branex-mobile-sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: var(--bg); z-index: 9999999; box-shadow: -10px 0 30px rgba(0,0,0,0.1); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.branex-mobile-sidebar.active { right: 0; }
.branex-mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999998; opacity: 0; visibility: hidden; transition: 0.3s; }
.branex-mobile-overlay.active { opacity: 1; visibility: visible; }
.branex-ms-header { padding: 25px; border-bottom: 1px solid var(--bg-light); display: flex; align-items: center; gap: 12px; }
.branex-ms-header .custom-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.branex-ms-header .custom-logo { max-height: 40px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
.branex-ms-logo { max-height: 40px; max-width: 140px; width: auto; height: auto; object-fit: contain; display: block; }
.branex-ms-site-name { font-size: 16px; font-weight: 800; color: var(--text); margin-right: auto; }
.branex-ms-close { background: none; border: none; font-size: 32px; color: var(--text-muted); cursor: pointer; }
.branex-ms-body { flex: 1; overflow-y: auto; padding: 20px 0; }
.branex-ms-menu { list-style: none; padding: 0; margin: 0; }
.branex-ms-menu > li > a { display: flex; align-items: center; justify-content: space-between; padding: 15px 25px; color: var(--text); font-size: 16px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--bg-light); }
.branex-ms-menu > li.has-ms-sub.active > a { color: var(--primary); background: var(--accent-light); }
.branex-ms-submenu { list-style: none; padding: 0; margin: 0; background: var(--bg-light); display: none; }
.branex-ms-submenu li a { display: block; padding: 12px 40px; color: var(--text-muted); font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--bg-light); }
.branex-ms-footer { padding: 25px; border-top: 1px solid var(--bg-light); }
.branex-ms-btn-primary { display: block; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: #fff; text-align: center; padding: 14px; border-radius: 12px; font-weight: 800; text-decoration: none; margin-bottom: 20px; box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2); }
.branex-ms-social { display: flex; justify-content: center; gap: 20px; }
.branex-ms-social a { color: var(--text-muted); font-size: 20px; }

@media (max-width: 1024px) {
    .branex-desktop-nav, .branex-header-actions { display: none; }
    .branex-mobile-actions { display: flex; }
    .branex-header-inner { height: 64px; }
    .branex-logo-img { max-height: 40px; }
    .branex-topbar-text { font-size: 11px; }
    .branex-promo-badge { font-size: 10px; padding: 2px 6px; }
}
@media (max-width: 640px) {
    .branex-topbar { height: auto !important; overflow: hidden; }
    .branex-topbar .container { flex: 1; min-width: 0; }
    .branex-topbar-inner { height: auto !important; position: static !important; }
    .branex-notice-item {
        position: static !important;
        inset: auto !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 8px 10px !important;
        width: 100% !important;
    }
    .branex-notice-mobile.active { display: flex !important; }
    .branex-topbar-text { white-space: normal !important; word-break: break-word !important; text-align: center !important; font-size: 11px !important; }
    .branex-badge-arrow { display: inline-flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 8px !important; }
    .branex-promo-badge { font-size: 10px !important; padding: 2px 8px !important; white-space: nowrap !important; }
}

/* SUPPORT DROPDOWN */
.branex-support-dropdown { position: relative; }
.branex-btn-support {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.branex-btn-support:hover { border-color: var(--accent); color: var(--primary); background: rgba(var(--accent-rgb), 0.04); }
.branex-support-mega-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    border: 1px solid var(--bg-light);
    width: 340px;
    padding: 20px;
    display: none;
    z-index: 999999;
}
.branex-support-mega-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    right: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}
.branex-support-dropdown:hover .branex-support-mega-menu { display: block; }
.psm-section { margin-bottom: 18px; }
.psm-section h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--text); letter-spacing: .5px; margin-bottom: 12px; }
.psm-phone-box { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--text); font-weight: 700; font-size: 16px; text-decoration: none; margin-bottom: 8px; }
.psm-timing { text-align: center; font-size: 12.5px; color: var(--text-muted); }
.psm-chat-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.psm-chat-btn { background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; text-align: center; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: 0.2s; }
.psm-chat-btn i { font-size: 20px; color: var(--accent); }
.psm-chat-btn:hover { background: var(--accent-light); }
.psm-links { border-top: 1px solid var(--bg-light); margin-top: 15px; padding-top: 10px; }
.psm-link { display: flex; align-items: center; gap: 10px; padding: 9px 5px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 6px; transition: 0.2s; }
.psm-link i { color: var(--text-muted); width: 18px; }
.psm-link:hover { background: var(--bg-light); }

/* ACCOUNT BUTTON */
.branex-btn-account {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #ffffff !important;
    padding: 9px 24px;
    border-radius: 50px;
    font-size: 14.5px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.2);
    border: none;
    text-decoration: none;
}
.branex-btn-account:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35); background: linear-gradient(135deg, var(--accent-dark) 0%, var(--primary) 100%); }
.branex-btn-account i { font-size: 15px; margin-right: 2px; }
