/* =======================================================
   1. FLOATING LOGO (MELAYANG MURNI)
   ======================================================= */
.floating-brand-logo {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.floating-brand-logo img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

[data-bs-theme="dark"] .floating-brand-logo img {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85))
            drop-shadow(0 0 12px rgba(56, 189, 248, 0.45));
}

/* =======================================================
   2. DESKTOP HEADER NAVBAR
   ======================================================= */
.desktop-header-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--navbar-bg, #ffffff);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.desktop-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.logo-desktop-spacer {
    width: 130px;
    height: 1px;
    flex-shrink: 0;
}

.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-item-link {
    text-decoration: none;
    color: var(--text-main, #0f172a);
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.nav-item-link:hover {
    color: var(--primary-color, #0b2545);
}

.lang-switch-desktop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0.75rem;
}

.lang-switch-desktop a {
    text-decoration: none;
    color: var(--text-muted, #9ca3af);
    transition: color 0.2s ease;
}

.lang-switch-desktop a.active-lang {
    color: var(--primary-color, #0b2545);
}

.lang-switch-desktop .divider {
    color: var(--border-color, #cbd5e1);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main, #0f172a);
    padding: 2px;
    transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.18);
}

/* =======================================================
   3. FLOATING BUBBLE ID / EN & THEME (MOBILE)
   ======================================================= */
.mobile-floating-bubble {
    display: none;
    position: fixed;
    bottom: 78px;
    right: 16px;
    background: var(--card-bg, rgba(255, 255, 255, 0.94));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    font-size: 0.78rem;
    font-weight: 800;
    z-index: 1150;
    gap: 7px;
    align-items: center;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.mobile-floating-bubble a {
    text-decoration: none;
    color: var(--text-muted, #94a3b8);
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-floating-bubble a.active {
    color: #ffffff !important;
    background-color: var(--primary-color, #0b2545);
}

[data-bs-theme="dark"] .mobile-floating-bubble a.active {
    background-color: #38bdf8;
    color: #07090e !important;
}

.bubble-sep {
    color: var(--border-color, #94a3b8);
    font-weight: 400;
    opacity: 0.6;
}

.theme-toggle-btn-bubble {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: inherit;
}

/* =======================================================
   4. MOBILE BOTTOM NAVIGATION BAR
   ======================================================= */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--navbar-bg, #0b1120);
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.45rem 0.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    z-index: 1100;
    transition: transform 0.35s ease, opacity 0.35s ease; /* Tambahkan baris transisi ini */
}

.mobile-bottom-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
    font-weight: 600;
    padding: 3px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-bottom-nav i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav.active {
    color: var(--primary-color, #38bdf8);
}

.mobile-bottom-nav.active i {
    transform: translateY(-2px);
}

/* =======================================================
   5. DESKTOP PRODUCT DROPDOWN
   ======================================================= */
.dropdown-product-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.desktop-product-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main, #0f172a);
    font-weight: 600;
    font-size: 0.92rem;
    font-family: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.desktop-product-btn:hover {
    color: var(--primary-color, #0b2545);
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.dropdown-product-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

.desktop-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 8px;
    min-width: 250px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-product-wrapper.active .desktop-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.desktop-dropdown-menu a {
    text-decoration: none;
    color: var(--text-main, #0f172a);
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.desktop-dropdown-menu a:hover {
    background-color: var(--bg-alt, #f1f5f9);
    color: var(--primary-color, #0b2545);
}

.drop-idx, .sheet-idx {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
}

/* =======================================================
   6. MOBILE PRODUCT SHEET (MODAL SLIDE-UP)
   ======================================================= */
.mobile-product-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1250;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-product-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-product-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 75vh;
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px 20px 0 0;
    padding: 12px 18px 85px 18px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    z-index: 1300;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-product-sheet.show {
    transform: translateY(0);
}

.mobile-sheet-pill {
    width: 40px;
    height: 4px;
    background: var(--border-color, #cbd5e1);
    border-radius: 4px;
    margin: 0 auto 6px auto;
}

.btn-close-sheet {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
}

.mobile-sheet-body {
    overflow-y: auto;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-sheet-body a {
    text-decoration: none;
    color: var(--text-main, #0f172a);
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-alt, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
}

.mobile-sheet-body a:hover,
.mobile-sheet-body a:active {
    background: var(--primary-color, #0b2545);
    color: #ffffff;
}

/* =======================================================
   7. RESPONSIVE BREAKPOINTS (< 768px)
   ======================================================= */
@media (max-width: 767.98px) {
    .desktop-header-bar {
        display: none !important;
    }

    .mobile-floating-bubble,
    .mobile-bottom-bar {
        display: flex !important;
    }

    body {
        padding-bottom: 70px;
    }

/* Animasi sembunyi saat scroll down khusus mobile */
    .floating-brand-logo.is-hidden-scroll {
        transform: translateY(-80px) scale(0.9) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .mobile-floating-bubble.is-hidden-scroll {
        transform: translateY(80px) scale(0.9) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    /* Navbar bawah meluncur turun keluar layar saat scroll down */
    .mobile-bottom-bar.is-hidden-scroll {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Penyelarasan Ikon Nav Desktop */
.nav-item-link,
.desktop-product-btn {
    display: inline-flex;
    align-items: center;
}

.nav-item-link i,
.desktop-product-btn i.bi-box-seam {
    font-size: 1rem;
    color: var(--primary-color);
}