/* ============================================================
   NAVBAR PREMIUM BSM (Navy Theme)
   ============================================================ */

:root {
    --bsm-primary: #1A1A1A;
    --bsm-primary-dark: #0D0D0D;
    --bsm-primary-light: #3A3A3A;
    --bsm-accent: #C9A84C;
    --bsm-accent-dark: #B08F35;
    --bsm-accent-light: #E0C66A;
    --bsm-nav-height: 80px;
    --bsm-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --bsm-shadow-hover: 0 6px 28px rgba(0, 0, 0, 0.25);
}

/* ---- Header Wrapper ---- */
.bsm-header {
    z-index: 1030;
}

/* ---- Navbar Base (NAVY) ---- */
.bsm-navbar {
    background: linear-gradient(180deg, var(--bsm-primary) 0%, var(--bsm-primary-dark) 100%);
    height: var(--bsm-nav-height);
    box-shadow: var(--bsm-shadow);
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    padding: 0;
    transition: box-shadow .3s ease;
}

.bsm-navbar:hover {
    box-shadow: var(--bsm-shadow-hover);
}

/* Spacer supaya konten tidak ketimpa fixed navbar */
body {
    padding-top: var(--bsm-nav-height);
    margin: 0;
}

/* Pastikan section setelah navbar tidak punya margin-top tambahan */
main, .main-content, .bsm-hero, .hero, .hero-section {
    margin-top: 0 !important;
}

/* ============================================================
   LOGO / BRAND
   ============================================================ */
.bsm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    text-decoration: none;
    transition: transform .3s ease;
}

.bsm-brand:hover { transform: translateY(-1px); }

.bsm-brand-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #080808 0%, #1A1A1A 100%);
    border: 1.5px solid rgba(201, 168, 76, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 168, 76, 0.15);
    position: relative;
    overflow: hidden;
}

.bsm-brand-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(201, 168, 76, 0.2) 100%);
}

.bsm-brand-mark-text {
    color: var(--bsm-accent);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.bsm-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.bsm-brand-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.bsm-brand-sub {
    color: rgba(201, 168, 76, 0.85);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ============================================================
   MENU LINKS (Center)
   ============================================================ */
.bsm-nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1rem !important;
    position: relative;
    transition: color .25s ease;
}

.bsm-nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--bsm-accent);
    transition: width .3s ease;
    border-radius: 2px;
}

.bsm-nav-link:hover {
    color: #ffffff !important;
}

.bsm-nav-link:hover::after {
    width: 24px;
}

.bsm-nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

.bsm-nav-link.active::after {
    width: 28px;
}

/* ============================================================
   GUEST BUTTONS (Masuk & Daftar)
   ============================================================ */
.bsm-btn-login,
.bsm-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all .25s ease;
    white-space: nowrap;
}

.bsm-btn-login {
    color: #ffffff;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.bsm-btn-login:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.bsm-btn-register {
    color: var(--bsm-primary);
    background: linear-gradient(135deg, var(--bsm-accent) 0%, var(--bsm-accent-dark) 100%);
    border: 1.5px solid var(--bsm-accent);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.35);
}

.bsm-btn-register:hover {
    color: var(--bsm-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(201, 168, 76, 0.5);
}

/* ============================================================
   CART BUTTON
   ============================================================ */
.bsm-cart-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    transition: all .25s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bsm-cart-btn:hover {
    background: var(--bsm-accent);
    color: var(--bsm-primary);
    transform: translateY(-1px);
    border-color: var(--bsm-accent);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
}

.bsm-cart-btn i {
    font-size: 1.35rem;
    transition: transform .3s ease;
}

.bsm-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bsm-primary);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

/* Animations */
.cart-shake {
    animation: cart-shake 0.6s ease;
}
@keyframes cart-shake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(5deg); }
}

.badge-bounce {
    animation: badge-bounce 0.6s ease;
}
@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

[x-cloak] { display: none !important; }

/* ============================================================
   DIVIDER
   ============================================================ */
.bsm-nav-divider {
    display: block;
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 6px;
}

/* ============================================================
   USER DROPDOWN
   ============================================================ */
.bsm-user-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.75rem !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all .25s ease;
}

.bsm-user-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(201, 168, 76, 0.4);
}

.bsm-user-btn::after {
    margin-left: 2px;
    color: rgba(255, 255, 255, 0.7);
}

.bsm-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bsm-accent) 0%, var(--bsm-accent-dark) 100%);
    color: var(--bsm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bsm-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

/* ---- Dropdown Menu ---- */
.bsm-dropdown {
    border: none;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    margin-top: 12px !important;
    min-width: 260px;
    background: #ffffff;
    animation: dropdownFade .2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bsm-dropdown-header {
    padding: 0.75rem 1rem 0.5rem;
}

.bsm-dropdown-name {
    color: var(--bsm-primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
}

.bsm-dropdown-email {
    color: #8899AA;
    font-size: 0.78rem;
    margin: 2px 0 0;
}

.bsm-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    color: #4A5568 !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all .2s ease;
}

.bsm-dropdown-item i {
    color: var(--bsm-primary);
    font-size: 1rem;
    width: 18px;
}

.bsm-dropdown-item:hover {
    background: rgba(201, 168, 76, 0.1) !important;
    color: var(--bsm-primary) !important;
}

.bsm-dropdown-item.active {
    background: rgba(26, 26, 26, 0.08) !important;
    color: var(--bsm-primary) !important;
    font-weight: 600;
}

.bsm-dropdown-logout {
    color: #E74C3C !important;
}

.bsm-dropdown-logout i {
    color: #E74C3C !important;
}

.bsm-dropdown-logout:hover {
    background: rgba(231, 76, 60, 0.08) !important;
    color: #C0392B !important;
}

/* ============================================================
   HAMBURGER (MOBILE ONLY — max-width: 991.98px)
   ============================================================ */
.bsm-toggler {
    border: none;
    background: transparent;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.bsm-toggler:focus { outline: none; box-shadow: none; }

.bsm-toggler span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #ffffff;
    border-radius: 2px;
    transition: all .3s ease;
}

.bsm-toggler[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.bsm-toggler[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.bsm-toggler[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .bsm-navbar { height: 70px; }
    body { padding-top: 70px; }

    .bsm-brand-mark { width: 42px; height: 42px; }
    .bsm-brand-title { font-size: 0.9rem; }
    .bsm-brand-sub { font-size: 0.65rem; }

    .navbar-collapse {
        background: var(--bsm-primary-dark);
        margin-top: 15px;
        padding: 1rem;
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(201, 168, 76, 0.25);
    }

    .bsm-nav-center { gap: 4px; }
    .bsm-nav-link { padding: 0.7rem 0.75rem !important; }
    .bsm-nav-link::after { left: 12px; transform: none; }

    .bsm-nav-right {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 8px;
    }

    .bsm-btn-login,
    .bsm-btn-register { width: 100%; justify-content: center; }
}

@media (max-width: 575.98px) {
    .bsm-brand-text { display: none; }
}
