/* Mobile Header Fixes - High Priority CSS */

/* MOBILE CUSTOMER PANEL VISIBILITY */
.mobile-customer-panel {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-customer-panel {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Force mobile header positioning */
@media (max-width: 1024px) {
    .modern-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 80px !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(12, 224, 107, 0.2) !important;
    }
    
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px !important;
        height: 80px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .main-nav {
        display: none !important;
    }
    
    .mobile-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }
    
    .logo-text h1 {
        font-size: 22px !important;
        background: linear-gradient(135deg, #ffffff 0%, var(--primary-green) 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .action-icons {
        display: flex !important;
        gap: 12px !important;
    }
    
    .icon-btn {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .login-btn {
        display: none !important;
    }
    
    /* Keep theme switcher visible on mobile
    .theme-switcher-container {
        display: none !important;
    } */
}

/* Tablet and smaller */
@media (max-width: 768px) {
    .modern-header {
        height: 80px !important;
    }
    
    .header-container {
        padding: 0 15px !important;
        height: 80px !important;
    }
    
    .logo-text h1 {
        font-size: 22px !important;
    }
    
    body {
        padding-top: 80px !important;
        margin: 0 !important;
    }
    
    .admin-bar body {
        padding-top: 126px !important;
    }
    
    .admin-bar .modern-header {
        top: 46px !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-container {
        padding: 0 10px !important;
    }
    
    .logo-text h1 {
        font-size: 20px !important;
    }
    
    .action-icons {
        gap: 8px !important;
    }
    
    .icon-btn {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed !important;
    top: 80px !important;
    right: -320px !important;
    width: 300px !important;
    height: calc(100vh - 80px) !important;
    background: rgba(0, 0, 0, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1001 !important;
}

.mobile-menu.active {
    right: 0 !important;
}

.admin-bar .mobile-menu {
    top: 126px !important;
    height: calc(100vh - 126px) !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .mobile-menu {
        top: 126px !important;
        height: calc(100vh - 126px) !important;
    }
}

/* Ensure mobile toggle is visible */
.mobile-toggle {
    display: none;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    z-index: 1002 !important;
}

@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex !important;
    }
}

.mobile-toggle span {
    width: 25px !important;
    height: 3px !important;
    background: var(--primary-green) !important;
    border-radius: 2px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Debug styles for mobile header */
@media (max-width: 1024px) {
    html body .modern-header {
        position: fixed !important;
        top: 0 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        z-index: 9999 !important;
    }
    
    html body .header-container {
        display: flex !important;
    }
    
    /* FORCE mobile header icons visibility on ALL pages including WooCommerce */
    html body .cart-contents,
    html body .mobile-customer-panel {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Override WooCommerce aggressive icon hiding */
    .woocommerce html body .cart-contents,
    .woocommerce html body .mobile-customer-panel,
    .woocommerce-page html body .cart-contents,
    .woocommerce-page html body .mobile-customer-panel,
    .page-template-page-my-account html body .cart-contents,
    .page-template-page-my-account html body .mobile-customer-panel {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specific targeting for my-account page */
    body.woocommerce-account .cart-contents,
    body.woocommerce-account .mobile-customer-panel {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}