/* ========================================================
   HIDE THEME DEFAULTS
   ======================================================== */
header#masthead, header.site-header, header#header, .ast-main-header-wrap, .generate-header, footer#colophon, footer.site-footer, footer#footer, .site-info { display: none !important; }

/* ========================================================
   GLOBAL & TOP BAR
   ======================================================== */
.chfb-top-bar, .chfb-header-wrap, .chfb-footer-wrap { width: 100% !important; box-sizing: border-box !important; margin: 0 !important; font-family: Arial, sans-serif !important; }
.chfb-top-bar { background: #111 !important; color: #fff !important; padding: 0 5% !important; font-size: 13px !important; display: flex !important; justify-content: space-between !important; align-items: center !important; height: 40px !important; }
.chfb-ticker { flex: 1 !important; white-space: nowrap !important; overflow: hidden !important; position: relative !important; margin-right:20px !important;}
.chfb-ticker p { display: inline-block !important; animation: chfbScroll 15s linear infinite !important; margin: 0 !important; font-weight: bold !important; color: #00ffcc !important; }
@keyframes chfbScroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.chfb-contact-info span { margin-left: 15px !important; }

/* ========================================================
   BASE HEADER STYLES (Perfect Right Alignment)
   ======================================================== */
.chfb-header-wrap { 
    background-color: var(--chfb-bg) !important; 
    padding: 15px 5% !important; 
    display: flex !important; justify-content: space-between !important; align-items: center !important; 
    position: sticky !important; top: 0 !important; z-index: 99999 !important; transition: all 0.4s ease !important; 
}
.chfb-header-wrap.scrolled { background-color: transparent !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }
.chfb-header-wrap::before { content: '' !important; position: absolute !important; inset: 0 !important; background: var(--chfb-bg) !important; z-index: -1 !important; transition: 0.4s !important; }
.chfb-header-wrap.scrolled::before { opacity: 0.85 !important; backdrop-filter: blur(15px) !important; -webkit-backdrop-filter: blur(15px) !important; }

.chfb-logo-area { flex: 0 0 auto !important; }
.chfb-logo-area a { display: flex !important; align-items: center !important; gap: 12px !important; text-decoration: none !important; }
.chfb-logo-area img { max-height: 50px !important; width: auto !important; }
.chfb-site-title { font-size: 22px !important; font-weight: bold !important; color: var(--chfb-txt) !important; letter-spacing: 0.5px !important; }

/* NAV - Right Aligned with gap */
.chfb-nav { 
    flex: 1 1 auto !important; 
    display: flex !important; 
    justify-content: flex-end !important; /* Forces menu to right */
    align-items: center !important; 
    gap: 30px !important; 
    margin-right: 30px !important; /* Gap before actions */
}
.chfb-nav a { color: var(--chfb-txt) !important; text-decoration: none !important; font-weight: 600 !important; font-size: 16px !important; transition: 0.3s !important; }
.chfb-nav a:hover { opacity: 0.7 !important; }

.chfb-header-actions { flex: 0 0 auto !important; display: flex !important; align-items: center !important; gap: 20px !important; }
.chfb-search-icon, .chfb-cart-icon { font-size: 20px !important; cursor: pointer !important; text-decoration: none !important; color: var(--chfb-txt) !important;}
.chfb-cart-icon .cart-count { background: #ff4757 !important; color: white !important; padding: 2px 6px !important; border-radius: 50px !important; font-size: 12px !important; margin-left: 5px !important; }

@media (min-width: 769px) { .chfb-hamburger { display: none !important; } }

/* HEADER PREVIEWS */
.chfb-header-wrap.h-center { flex-direction: column !important; justify-content: center !important; gap: 15px !important; }
.chfb-header-wrap.h-split .chfb-nav { justify-content: center !important; margin-right: 0 !important; }
.chfb-header-wrap.h-floating { margin: 15px 5% !important; width: 90% !important; border-radius: 50px !important; top: 15px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }
.chfb-header-wrap.h-grad-1, .chfb-header-wrap.h-grad-1::before { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%) !important; }
.chfb-header-wrap.h-grad-2, .chfb-header-wrap.h-grad-2::before { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important; }
.chfb-header-wrap.h-grad-3, .chfb-header-wrap.h-grad-3::before { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364) !important; }
.chfb-header-wrap.h-grad-1 *, .chfb-header-wrap.h-grad-3 * { color: #fff !important; border-color: #fff !important; }
.chfb-header-wrap.h-glass, .chfb-header-wrap.h-glass::before { background: rgba(255,255,255,0.1) !important; backdrop-filter: blur(20px) !important; border-bottom: 1px solid rgba(255,255,255,0.2) !important; }
.chfb-header-wrap.h-3d-neu1 { background: #e0e5ec !important; box-shadow: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255, 0.5) !important; border-radius: 20px !important; margin: 10px 2% !important; width: 96% !important; top: 10px !important; }
.chfb-header-wrap.h-3d-neu1::before { display: none !important; }
.chfb-header-wrap.h-3d-neu2 { background: #2b2b2b !important; box-shadow: 8px 8px 16px #1a1a1a, -8px -8px 16px #3c3c3c !important; border-radius: 20px !important; margin: 10px 2% !important; width: 96% !important; top: 10px !important; }
.chfb-header-wrap.h-3d-neu2::before { display: none !important; }
.chfb-header-wrap.h-3d-neu2 * { color: #fff !important; }
.chfb-header-wrap.h-3d-cyber, .chfb-header-wrap.h-3d-cyber::before { background: #000 !important; border-bottom: 3px solid #0ff !important; box-shadow: 0 10px 20px rgba(0,255,255,0.4) !important; }
.chfb-header-wrap.h-3d-cyber * { color: #0ff !important; text-shadow: 0 0 5px #0ff !important; }
.chfb-header-wrap.h-3d-bevel, .chfb-header-wrap.h-3d-bevel::before { background: #e0e0e0 !important; border-top: 3px solid #fff !important; border-bottom: 6px solid #aaa !important; }
.chfb-header-wrap.h-3d-float { margin: 20px 5% !important; width: 90% !important; border-radius: 15px !important; box-shadow: 0 25px 50px rgba(0,0,0,0.25) !important; top: 20px !important; }
.chfb-header-wrap.h-3d-metallic, .chfb-header-wrap.h-3d-metallic::before { background: linear-gradient(to bottom, #f0f0f0, #c0c0c0) !important; border-bottom: 3px solid #888 !important; }
.chfb-header-wrap.h-3d-clay { background: #ffcfdf !important; border-radius: 30px !important; box-shadow: inset 5px 5px 15px rgba(255,255,255,0.8), inset -5px -5px 15px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.05) !important; margin: 15px 2% !important; width: 96% !important; top: 15px !important; }
.chfb-header-wrap.h-3d-clay::before { display: none !important; }

/* ========================================================
   FOOTER BASE (Proper Flexbox & Custom Colors)
   ======================================================== */
.chfb-footer-wrap { 
    display: flex !important; flex-wrap: wrap !important; 
    justify-content: space-between !important; /* Distributes 4 cols perfectly */
    gap: 40px !important; 
    padding: 60px 5% !important; 
    background-color: var(--chfb-f-bg) !important; 
    color: var(--chfb-f-txt) !important; 
    border-top: 1px solid rgba(0,0,0,0.05) !important; 
}
.chfb-col { flex: 1 1 220px !important; } /* Tells flexbox to grow evenly */
.chfb-col h4 { font-size: 20px !important; margin-bottom: 20px !important; font-weight: 600 !important; color: inherit !important; filter: brightness(1.2); }
.chfb-col ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.chfb-col ul li { margin-bottom: 12px !important; }
.chfb-col a { color: inherit !important; text-decoration: none !important; transition: 0.3s !important; opacity: 0.8 !important;}
.chfb-col a:hover { opacity: 1 !important; padding-left: 5px !important; }
.chfb-col p { margin-bottom: 10px !important; opacity: 0.9 !important; }
.chfb-socials { display: flex !important; gap: 15px !important; margin-top: 20px !important; }
.chfb-socials a { display: flex !important; justify-content: center !important; align-items: center !important; width: 40px !important; height: 40px !important; background: rgba(0,0,0,0.2) !important; border-radius: 50% !important; transition: 0.3s !important; padding-left:0 !important;}
.chfb-socials a:hover { transform: translateY(-3px) !important; background: #007bff !important; color: #fff !important; opacity: 1 !important; }
.chfb-socials svg { width: 20px !important; height: 20px !important; }

/* FOOTER PREVIEWS */
.chfb-footer-wrap.f-centered { text-align: center !important; flex-direction: column !important; align-items: center !important; }
.chfb-footer-wrap.f-wave { padding-top: 20px !important; }
.chfb-footer-wrap.f-minimal { border-top: 2px solid #000 !important; }
.chfb-footer-wrap.f-grad-1 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%) !important; color: #fff !important; }
.chfb-footer-wrap.f-grad-2 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important; color: #111 !important; }
.chfb-footer-wrap.f-dark { background: #050505 !important; color: #ccc !important; border-top: 1px solid #222 !important; }
.chfb-footer-wrap.f-glass { background: rgba(0,0,0,0.9) !important; backdrop-filter: blur(20px) !important; color: #fff !important; border-top: 1px solid rgba(255,255,255,0.1) !important; }
.chfb-footer-wrap.f-3d-neu1 { background: #e0e5ec !important; color: #333 !important; border:none !important; }
.chfb-footer-wrap.f-3d-neu1 .chfb-col { padding: 20px !important; border-radius: 15px !important; box-shadow: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255, 0.5) !important; }
.chfb-footer-wrap.f-3d-neu2 { background: #2b2b2b !important; color: #ccc !important; border:none !important; }
.chfb-footer-wrap.f-3d-neu2 .chfb-col { padding: 20px !important; border-radius: 15px !important; box-shadow: 8px 8px 16px #1a1a1a, -8px -8px 16px #3c3c3c !important; }
.chfb-footer-wrap.f-3d-cyber { background: #000 !important; color: #0ff !important; border-top: 3px solid #0ff !important; box-shadow: inset 0 10px 20px rgba(0,255,255,0.1) !important; }
.chfb-footer-wrap.f-3d-bevel { background: #e0e0e0 !important; color: #333 !important; border-top: 6px solid #fff !important; box-shadow: inset 0 10px 10px rgba(0,0,0,0.05) !important;}
.chfb-footer-wrap.f-3d-cards { background: #f0f2f5 !important; color: #333 !important; border: none !important; }
.chfb-footer-wrap.f-3d-cards .chfb-col { background: #fff !important; padding: 25px !important; border-radius: 12px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; transition: 0.3s !important; }
.chfb-footer-wrap.f-3d-cards .chfb-col:hover { transform: translateY(-10px) !important; box-shadow: 0 15px 40px rgba(0,0,0,0.1) !important; }
.chfb-footer-wrap.f-3d-metallic { background: linear-gradient(to right, #434343 0%, black 100%) !important; color: #fff !important; border-top: 4px solid #888 !important; }
.chfb-footer-wrap.f-3d-clay { background: #f8f9fa !important; color: #333 !important; border:none !important;}
.chfb-footer-wrap.f-3d-clay .chfb-col { background: #fff !important; padding: 20px !important; border-radius: 20px !important; box-shadow: inset 5px 5px 15px rgba(0,0,0,0.05), inset -5px -5px 15px rgba(255,255,255,1), 0 10px 20px rgba(0,0,0,0.05) !important; }

/* ========================================================
   MEGA MENU CENTER ALIGNMENT FIX
   ======================================================== */
.chfb-has-mega { position: relative !important; display: inline-block !important; padding: 10px 0 !important; }
.chfb-mega-box { 
    position: absolute !important; top: 100% !important; left: 50% !important; transform: translateX(-50%) translateY(15px) !important; 
    width: 600px !important; background: #fff !important; box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important; 
    border-radius: 8px !important; padding: 20px !important; opacity: 0 !important; visibility: hidden !important; 
    transition: 0.3s all ease !important; z-index: 999999 !important; border-top: 3px solid #007bff !important; 
}
.chfb-has-mega:hover .chfb-mega-box { opacity: 1 !important; visibility: visible !important; transform: translateX(-50%) translateY(0) !important; }
.chfb-mega-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 15px !important; }
.mega-item { position: relative !important; display: block !important; border-radius: 6px !important; overflow: hidden !important; text-align: center !important; }
.mega-item img { width: 100% !important; height: 160px !important; object-fit: cover !important; transition: 0.3s !important; }
.mega-item:hover img { transform: scale(1.05) !important; }
.mega-item .m-text { position: absolute !important; bottom: 0 !important; left: 0 !important; width: 100% !important; background: rgba(0,0,0,0.6) !important; color: #fff !important; padding: 8px 0 !important; font-size: 13px !important; font-weight: bold !important; }

/* ========================================================
   MODALS & AVATAR
   ======================================================== */
.chfb-user-account { position: relative !important; display: inline-flex !important; align-items: center !important; cursor: pointer !important; }
.chfb-user-account img { border-radius: 50% !important; border: 2px solid var(--chfb-txt) !important; }
.chfb-login-btn { border: 2px solid var(--chfb-txt) !important; padding: 8px 15px !important; border-radius: 25px !important; font-size: 14px !important; display: inline-block !important; font-weight: bold !important; color: var(--chfb-txt) !important; text-decoration: none !important;}
.chfb-login-btn:hover { background: var(--chfb-txt) !important; color: var(--chfb-bg) !important; }
.chfb-user-dropdown { display: none !important; position: absolute !important; top: 120% !important; right: 0 !important; background: #fff !important; min-width: 180px !important; box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important; border-radius: 8px !important; padding: 10px 0 !important; z-index: 1000 !important; flex-direction: column !important; border: 1px solid #eee !important; }
.chfb-user-account:hover .chfb-user-dropdown { display: flex !important; }
.chfb-user-dropdown span { padding: 8px 15px !important; font-size: 13px !important; color: #888 !important; border-bottom: 1px solid #eee !important; margin-bottom: 5px !important; }
.chfb-user-dropdown a { color: #333 !important; padding: 10px 15px !important; font-size: 14px !important; display: block !important; text-decoration: none !important;}
.chfb-user-dropdown a:hover { background: #f8f9fa !important; color: #007bff !important; }

.chfb-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999999; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.chfb-modal-box { background: #fff; width: 100%; max-width: 400px; padding: 30px; border-radius: 15px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.chfb-close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: #888; transition: 0.3s; }
.chfb-close-btn:hover { color: #ff4757; }
.chfb-modal-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.chfb-tab { flex: 1; padding: 10px; background: none; border: none; font-size: 16px; font-weight: bold; color: #888; cursor: pointer; }
.chfb-tab.active { color: #007bff; border-bottom: 3px solid #007bff; }
.chfb-auth-form input { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 8px; box-sizing: border-box; }
.chfb-submit-btn { width: 100%; padding: 12px; background: #007bff; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; }

/* ========================================================
   MOBILE RESPONSIVE FIXES
   ======================================================== */
@media (max-width: 768px) {
    .chfb-header-wrap { flex-wrap: wrap !important; }
    .chfb-logo-area { flex: 1 !important; }
    .chfb-hamburger { display: block !important; margin-left: 15px !important; font-size: 24px !important; }
    .chfb-top-bar { flex-direction: column !important; height: auto !important; padding: 10px !important; gap: 10px !important; text-align: center !important;}
    
    .chfb-mega-box { width: 100vw !important; left: 50% !important; transform: translateX(-50%) !important; }
    .chfb-mega-grid { grid-template-columns: repeat(2, 1fr) !important; }
    
    .chfb-nav { display: none !important; flex-direction: column !important; position: absolute !important; top: 100% !important; left: 0 !important; width: 100% !important; background-color: var(--chfb-bg) !important; padding: 20px 5% !important; align-items: flex-start !important; box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; border-top: 1px solid #eee !important; margin-right: 0 !important; }
    .chfb-nav.active { display: flex !important; }
    .chfb-nav a, .chfb-has-mega { width: 100% !important; padding: 12px 0 !important; border-bottom: 1px solid #eee !important; margin: 0 !important; }
    .chfb-contact-info { display:none !important; }
}