/**
 * Magic Hair Oil Master Design System & Luxury Stylesheet
 * Handcrafted with clinical white canvas, high-contrast onyx black (#000000),
 * and metallic champagne gold (#d4af37) signatures.
 * 
 * CRITICAL ARCHITECTURAL HIGHLIGHTS:
 * - Header logo compacted by 25% (48px desktop / 42px mobile) with streamlined header height
 * - Top notification marquee featuring brand gold (#d4af37) background and solid black text
 * - Persistent sticky header across all viewports using overflow-x: clip
 * - High-contrast dark header styling with radiant champagne gold icons
 * - Footer attribution automatically stacks into two distinct lines on mobile viewports
 * - Total elimination of horizontal overflow and pipe character artifacts
 * 
 * @package           Magic Hair Oil Core
 * @author            Babar Dogar
 * @link              https://pinex.co.uk
 * @version           1.0
 */

/* ==========================================================================
   1. GLOBAL TOKENS & TOTAL HORIZONTAL SCROLL ELIMINATION
   ========================================================================== */
:root {
    --bb-black:            #000000;
    --bb-black-soft:       #0d0d0f;
    --bb-black-card:       #0c0e12;
    --bb-black-surface:    #14171f;
    --bb-white:            #ffffff;
    --bb-white-soft:       #f9fafb;
    --bb-white-muted:      #e5e7eb;
    --bb-gray-border:      #e5e7eb;
    --bb-gray-border-dark: #1f242e;
    
    --bb-gold:             #d4af37;
    --bb-gold-light:       #f9ecc1;
    --bb-gold-hover:       #b8952b;
    --bb-gold-glow:        rgba(212, 175, 55, 0.22);
    --bb-gold-gradient:    linear-gradient(135deg, #faecc1 0%, #d4af37 50%, #9a781b 100%);
    
    --bb-sale-green:       #10b981;
    --bb-alert-red:        #ef4444;
    --bb-amber-gold:       #f59e0b;
    
    --bb-font-display:     'Josefin Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bb-font-body:        'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bb-font-data:        'Space Grotesk', monospace;
    
    --bb-max-width:        1320px;
    --bb-radius-sm:        4px;
    --bb-radius-md:        8px;
    --bb-radius-pill:      9999px;
    --bb-shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.06);
    --bb-shadow-md:        0 10px 30px rgba(0, 0, 0, 0.12);
    --bb-shadow-lg:        0 20px 50px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

html {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100%;
    overflow-x: clip !important;
    overflow-y: visible !important;
    margin: 0;
    padding: 0;
}

body {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100%;
    background-color: var(--bb-white);
    color: var(--bb-black);
    font-family: var(--bb-font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip !important;
    overflow-y: visible !important;
    margin: 0;
    padding: 0;
    position: relative;
}

body.bb-no-scroll {
    overflow: hidden !important;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.bb-main-wrapper {
    flex: 1 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

.bb-container {
    width: 100% !important;
    max-width: var(--bb-max-width) !important;
    margin: 0 auto;
    padding: 0 24px !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   2. BRAND GOLD MARQUEE STRIP & COMPACT STICKY DARK HEADER
   ========================================================================== */
.bb-top-marquee-strip {
    overflow: hidden !important;
    white-space: nowrap;
    background: var(--bb-gold, #d4af37) !important;
    color: #000000 !important;
    padding: 9px 0;
    font-family: var(--bb-font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.bb-top-marquee-track {
    display: inline-flex;
    gap: 60px;
    animation: topMarqueeAnim 30s linear infinite;
}

.bb-top-marquee-track span {
    color: #000000 !important;
    font-weight: 800 !important;
}

.bb-top-marquee-strip:hover .bb-top-marquee-track {
    animation-play-state: paused;
}

@keyframes topMarqueeAnim {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* COMPACT STICKY HEADER WITH DARK LUXURY CANVAS */
.bb-header {
    background: #000000 !important;
    border-bottom: 1px solid #1a1a1a !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
}

.bb-header-row {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    min-height: 66px !important;
    gap: 16px;
}

.bb-header-left {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
}

.bb-header-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.bb-brand-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* SMARTLY COMPACT 25% REDUCED LOGO (48px Desktop) */
.bb-header-logo-img {
    height: 48px !important;
    max-height: 48px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 !important;
    transition: transform 0.2s ease;
}

.bb-header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

/* HIGH-CONTRAST HEADER ACTION BUTTONS */
.bb-nav-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #11141c !important;
    border: 1px solid #222938 !important;
    border-radius: var(--bb-radius-pill) !important;
    padding: 7px 11px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    font-family: var(--bb-font-display) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    position: relative !important;
    line-height: 1 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
}

.bb-nav-action-btn i {
    font-size: 17px !important;
    flex-shrink: 0 !important;
    color: var(--bb-gold) !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.bb-btn-hover-label {
    max-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin 0.2s ease !important;
    font-size: 11px !important;
    color: #ffffff !important;
    margin-left: 0 !important;
}

.bb-nav-action-btn:hover {
    background: #191e2b !important;
    border-color: var(--bb-gold) !important;
    color: var(--bb-gold) !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.3) !important;
}

.bb-nav-action-btn:hover i {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

.bb-nav-action-btn:hover .bb-btn-hover-label {
    max-width: 120px !important;
    opacity: 1 !important;
    margin-left: 6px !important;
    color: #ffffff !important;
}

.bb-header-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bb-nav-action-btn .bb-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bb-gold);
    color: var(--bb-black);
    font-family: var(--bb-font-data);
    font-size: 10px;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.bb-currency-select {
    background: #11141c !important;
    border: 1px solid #222938 !important;
    color: #ffffff !important;
    border-radius: var(--bb-radius-pill) !important;
    padding: 7px 11px !important;
    font-family: var(--bb-font-display) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    line-height: 1 !important;
}

.bb-currency-select:hover, .bb-currency-select:focus {
    border-color: var(--bb-gold) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25) !important;
}

/* ==========================================================================
   3. CLEAN CENTERED FOOTER & RESPONSIVE TWO-LINE MOBILE COPYRIGHT
   ========================================================================== */
.bb-site-footer {
    margin-top: auto;
    background: #080808;
    border-top: 1px solid #1a1a1a;
    padding: 50px 0 35px 0;
    color: #888888;
    font-size: 13px;
    text-align: center;
    width: 100% !important;
    max-width: 100% !important;
}

.bb-footer-nav-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    list-style: none;
    margin: 16px 0 10px 0;
    padding: 0;
    flex-wrap: wrap;
}

.bb-footer-nav-centered a {
    color: #d1d5db;
    font-family: var(--bb-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bb-footer-nav-centered a:hover {
    color: var(--bb-gold);
}

.bb-footer-legal-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin: 8px 0 22px 0;
    padding: 0;
    flex-wrap: wrap;
}

.bb-footer-legal-centered a {
    color: #666666;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bb-footer-legal-centered a:hover {
    color: #ffffff;
}

/* RESPONSIVE FOOTER ATTRIBUTION (TWO LINES ON MOBILE) */
.bb-footer-attribution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #666666;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .bb-footer-attribution {
        flex-direction: column !important;
        gap: 4px !important;
    }
    .bb-footer-sep {
        display: none !important;
    }
    .bb-footer-dev-text {
        display: block !important;
    }
}

/* ==========================================================================
   4. OFFCANVAS CART DRAWER: STRICT FIXED ISOLATION
   ========================================================================== */
.bb-drawer-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 100004 !important;
    display: none;
}

.bb-cart-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 420px !important;
    height: 100% !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 100005 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: none !important;
    flex-direction: column !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3) !important;
}

.bb-cart-drawer.active {
    display: flex !important;
    transform: translateX(0) !important;
}

.bb-drawer-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--bb-gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bb-free-ship-meter {
    background: #f9fafb;
    border-bottom: 1px solid var(--bb-gray-border);
    padding: 12px 24px;
}

.bb-meter-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.bb-meter-fill {
    height: 100%;
    background: var(--bb-gold);
    transition: width 0.3s ease, background 0.3s ease;
}

.bb-drawer-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bb-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--bb-gray-border);
    background: #fafafa;
}

/* ==========================================================================
   5. BUTTONS & UI COMPONENTS
   ========================================================================== */
.bb-btn-gold {
    background: var(--bb-gold);
    color: var(--bb-black);
    font-family: var(--bb-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: var(--bb-radius-sm);
    border: 1px solid var(--bb-gold);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bb-btn-gold:hover {
    background: var(--bb-black);
    border-color: var(--bb-black);
    color: var(--bb-white);
}

.bb-btn-dark {
    background: #14171f;
    color: #ffffff;
    border: 1px solid var(--bb-gray-border-dark);
    padding: 12px 26px;
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bb-btn-dark:hover {
    border-color: var(--bb-gold);
    color: var(--bb-gold);
}

/* Social Proof Toast */
.bb-live-order-toast {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    background: #ffffff !important;
    border: 1px solid var(--bb-gray-border) !important;
    border-radius: 8px !important;
    padding: 12px 18px !important;
    box-shadow: var(--bb-shadow-md) !important;
    display: none;
    align-items: center !important;
    gap: 14px !important;
    z-index: 9990 !important;
    max-width: 380px !important;
    transform: translateY(120%) !important;
    opacity: 0 !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease !important;
    pointer-events: none !important;
}

.bb-live-order-toast.active {
    display: flex !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.bb-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--bb-sale-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bb-toast-content {
    font-size: 12px;
    line-height: 1.4;
}

.bb-toast-time {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Modals */
.bb-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(6px) !important;
    z-index: 100010 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.bb-modal-overlay.active {
    display: flex !important;
}

.bb-modal-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 36px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.bb-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
}

.bb-auth-channel-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--bb-gray-border);
    margin-bottom: 22px;
}

.bb-channel-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--bb-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.bb-channel-tab.active {
    background: var(--bb-black);
    color: var(--bb-gold);
    border-color: var(--bb-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINT & MOBILE BOTTOM DOCK
   ========================================================================== */
@media (min-width: 769px) {
    .bb-mobile-app-bar {
        display: none !important;
    }
    .bb-mobile-hamburger-btn {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .bb-header-row {
        grid-template-columns: auto 1fr auto !important;
    }
    .bb-btn-hover-label {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bb-container {
        padding: 0 16px !important;
    }
    .bb-header-row {
        grid-template-columns: 1fr auto 1fr !important;
        min-height: 58px !important;
    }
    /* Smart Compact 25% Reduction on Mobile (42px) */
    .bb-header-logo-img {
        height: 42px !important;
        max-height: 42px !important;
    }
    .bb-header-left .bb-nav-action-btn {
        display: none !important;
    }
    .bb-mobile-hamburger-btn {
        display: inline-flex !important;
        font-size: 24px !important;
        color: #ffffff !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 6px !important;
    }
    .bb-header-right .bb-currency-select-wrap,
    .bb-header-right .bb-nav-action-btn:nth-child(2) {
        display: none !important;
    }
    
    .bb-mobile-app-bar {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        background: #000000 !important;
        border-top: 1px solid #1f242e !important;
        z-index: 9999 !important;
    }
    .bb-app-bar-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: 100%;
        align-items: center;
        text-align: center;
    }
    .bb-app-nav-item {
        color: #9ca3af;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 10px;
        text-transform: uppercase;
        font-family: var(--bb-font-display);
        font-weight: 700;
        cursor: pointer;
        text-decoration: none;
    }
    .bb-app-nav-item i {
        font-size: 20px;
        color: var(--bb-gold);
    }
    .bb-app-nav-item:hover,
    .bb-app-nav-item:focus {
        color: #ffffff;
    }
    body {
        padding-bottom: 60px !important;
    }
    #bb-social-proof-toast {
        bottom: 74px !important;
        left: 16px !important;
        right: 16px !important;
        max-width: calc(100% - 32px) !important;
        z-index: 9998 !important;
    }
}