/* ============================================================
   TUBIASCONTIGO — Header, Drawer & Sidebar Styles
   /assets/header.css
   ============================================================ */

/* ---- Header Logo Constraints & Solid Mobile Header ---- */
#site-header {
    z-index: 9999 !important;
    background-color: #ffffff !important;
    position: sticky !important;
    top: 0 !important;
}

#site-header a img,
.header-logo-img {
    height: 38px !important;
    max-height: 44px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
}
@media (min-width: 640px) {
    #site-header a img,
    .header-logo-img {
        height: 44px !important;
    }
}

/* ---- Mobile Navigation Sidebar ---- */
#mobile-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 300px !important;
    max-width: 85vw !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s !important;
    box-shadow: 8px 0 35px rgba(0, 0, 0, 0.15) !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#mobile-sidebar.is-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@media (min-width: 768px) {
    #mobile-sidebar {
        display: none !important;
    }
}

/* ---- Sliding Cart Drawer ---- */
#drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 420px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    transform: translateX(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.15) !important;
}

#drawer.is-open {
    transform: translateX(0) !important;
}

/* ---- Overlays & Backdrops ---- */
#overlay,
#sidebar-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99998 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

#overlay.is-open,
#sidebar-backdrop.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (min-width: 768px) {
    #sidebar-backdrop {
        display: none !important;
    }
}

/* ---- Sidebar Header & Footer Dividers ---- */
.tbc-sidebar-header,
.tbc-sidebar-footer {
    border-color: rgba(226, 232, 240, 0.8);
}

/* ---- Cart icon badge ---- */
.cart-badge {
    display: flex;
}

/* ---- Cart item card ---- */
.cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

/* ---- Qty control pill ---- */
.qty-control {
    background: rgba(128, 68, 176, 0.08);
    border-radius: 8px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- Cart empty state icon bg ---- */
.cart-empty-icon-bg {
    background: rgba(128, 68, 176, 0.1);
}

/* ---- Cart icon badge bg ---- */
.cart-icon-bg {
    background: rgba(128, 68, 176, 0.15);
}

/* ---- Cart totals divider ---- */
.cart-totals-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    margin: 0;
}

/* ---- Nav link active state ---- */
.sidebar-nav-link.active {
    background: rgba(128, 68, 176, 0.12);
}