/* ==========================================================
   2. HEADER LAYOUT (CAROUSEL TOPBAR)
========================================================== */
.marbo-announcement-bar {
    background-color: #000000;
    color: #ffffff;
    position: relative;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 40px; 
}

.topbar-arrow {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 2;
    flex-shrink: 0;
}

.topbar-arrow:hover {
    opacity: 1;
}

.topbar-slider-viewport {
    overflow: hidden;
    flex: 1; 
    max-width: 800px; 
    margin: 0 auto;
}

.topbar-slider-track {
    display: flex;
    width: 100%;
}

.topbar-slide {
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    user-select: none;
}

.topbar-slide strong, 
.topbar-slide b {
    font-weight: 600;
    color: #ffffff; 
}

/* Tablet & Mobile (Thinner Bar) */
@media (max-width: 768px) {
    .marbo-announcement-bar {
        padding: 2px 15px; 
    }
    .topbar-slide {
        font-size: 10.5px;
        letter-spacing: 0.5px;
    }
    .topbar-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* The actual scrolling animation */
@keyframes marboMarqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================
   DESKTOP HEADER BASE
========================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
    position: sticky;
    top: -150px; 
    z-index: 9999;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.site-header.smart-sticky {
    transform: translateY(150px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.header-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 100%; padding: 0 50px;
}

.header-left, .header-right { flex: 1; display: flex; align-items: center; }
.header-right { justify-content: flex-end; }

/* Desktop Logo */
.header-center .custom-logo-link img { 
    max-height: 40px !important; 
    width: auto !important; 
    display: block; 
    margin: 0 auto;
    transition: max-height 0.3s ease;
}
.custom-text-logo { font-size: 32px; font-weight: 300; text-decoration: none; color: #111; }

/* Menus & Animations */
.left-nav ul, .right-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 35px; }
.left-nav ul li, .right-nav ul li { position: relative; }

.left-nav a, .right-nav a {
    text-decoration: none; color: #111111;
    font-size: 16px; font-weight: 600; 
    position: relative; display: inline-block; padding-bottom: 4px; 
}

.left-nav a::after, .right-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 1px; background-color: #111111; transition: width 0.25s ease-out; 
}

@keyframes dribbleLine {
    0%   { width: 0; }
    45%  { width: 115%; } 
    65%  { width: 90%; }  
    85%  { width: 105%; } 
    100% { width: 100%; } 
}

.left-nav a:hover::after, .right-nav a:hover::after,
.left-nav .current-menu-item > a::after, .right-nav .current-menu-item > a::after {
    animation: dribbleLine 0.45s ease-out forwards;
}

.left-nav ul ul.sub-menu, .right-nav ul ul.sub-menu {
    position: absolute; top: 100%; left: 0;
    background: #ffffff; border: 1px solid #f0f0f0; box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    min-width: 220px; padding: 20px 25px; border-radius: 8px; z-index: 10000;
    display: flex; flex-direction: column; gap: 15px;
    opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s ease;
}

.left-nav ul li:hover > ul.sub-menu, .right-nav ul li:hover > ul.sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.left-nav ul ul.sub-menu li a, .right-nav ul ul.sub-menu li a {
    font-size: 15px; width: fit-content; font-weight: 600; 
}

/* Header Icons & Cart Badge */
.header-icons { display: flex; gap: 25px; align-items: center; margin-left: 45px; }
.nav-icon { color: #111111; display: flex; align-items: center; transition: opacity 0.3s ease; }
.nav-icon:hover { opacity: 0.6; }

.cart-icon-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    overflow: visible !important; 
}

.cart-count-badge {
    position: absolute !important;
    top: -8px !important; 
    right: -10px !important; 
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    width: 20px !important; 
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    z-index: 99 !important; 
}

/* ==========================================================
   TABLET & MOBILE HEADER RESPONSIVENESS
========================================================== */

/* Hide Mobile Elements on Desktop */
.mobile-menu-trigger { display: none; }
.marbo-mobile-menu { display: none; }

/* Mobile/Tablet Styles */
@media (max-width: 1024px) {
    .site-header { padding: 15px 0 !important; }
    .header-container { padding: 0 20px; position: relative; }
    .left-nav, .right-nav { display: none; } 
    .mobile-menu-trigger { flex: 0 1 auto; display: block; }
    .hamburger-btn { background: transparent; border: none; cursor: pointer; color: #111; padding: 0; display: flex; align-items: center; }
    
    .header-center { position: absolute; left: 50%; transform: translateX(-50%); width: auto; }
    
    /* Mobile Logo Size */
    .header-center .custom-logo-link img { max-height: 40px !important; }
    
    .header-right { flex: 0 1 auto; justify-content: flex-end; }
    .desktop-account-icon { display: none !important; }
    .header-icons { margin-left: 0; gap: 15px; }

    /* Mobile Slide-Out Menu */
    .marbo-mobile-menu {
        display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: #ffffff; z-index: 100001; 
        transform: translateX(-100%); transition: transform 0.4s ease; overflow-y: auto;
    }
    .marbo-mobile-menu.active { transform: translateX(0); }
    
    .mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f0f0f0; }
    .mobile-logo img { max-height: 15px; width: auto; } /* Size of logo INSIDE the mobile menu drawer */
    .mobile-close-btn { background: transparent; border: none; cursor: pointer; color: #111; display: flex; align-items: center; padding: 0; }
    
    .mobile-menu-body { padding: 30px 20px; }
    .mobile-nav ul { list-style: none; padding: 0; margin: 0; }
    .mobile-nav ul li { margin-bottom: 25px; }
    
    .mobile-nav a { display: inline-block; font-size: 20px; color: #111; text-decoration: none; font-family: 'Jost', sans-serif; font-weight: 600; position: relative; padding-bottom: 2px; }
    .mobile-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background-color: #111111; transition: width 0.25s ease-out; }
    .mobile-nav a:hover::after, .mobile-nav .current-menu-item > a::after { animation: dribbleLine 0.45s ease-out forwards; }
    
    .mobile-nav ul ul.sub-menu { padding-left: 20px; margin-top: 15px; display: flex; flex-direction: column; gap: 15px; }
    .mobile-nav ul ul.sub-menu li { margin-bottom: 0; }
    .mobile-nav ul ul.sub-menu li a { font-size: 16px; color: #444; font-weight: 600; }
    
    .mobile-menu-footer { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
    .mobile-menu-footer a { font-size: 16px; color: #444; text-decoration: none; font-family: 'Jost', sans-serif; font-weight: 300; }
}