add_shortcode('tianhao_header',function (){static $printed=false;$logo_text='TIANHAO';$topbar_text='COLOR MASTERBATCH • FUNCTIONAL MASTERBATCH • MOQ 500 KG • 14 DAYS LEAD TIME';$cta_text='GET QUOTE';$cta_url=home_url(/contact);$menu_html='';if (function_exists('has_nav_menu') && has_nav_menu('primary')){$menu_html=wp_nav_menu(['theme_location'=>'primary','container'=>false,'echo'=>false,'menu_class'=>'th-menu','fallback_cb'=>false,'depth'=>2,'items_wrap'=>'<ul class="th-menu">%3$s</ul>',])}else{$menu_html='<ul class="th-menu">' . '<li><a href="' . esc_url(home_url('/')) . '">HOME</a></li>' . '<li><a href="' . esc_url(home_url('/about')) . '">ABOUT</a></li>' . '<li><a href="' . esc_url(home_url('/products')) . '">PRODUCTS</a></li>' . '<li><a href="' . esc_url(home_url('/applications')) . '">APPLICATIONS</a></li>' . '<li><a href="' . esc_url(home_url('/faq')) . '">FAQ</a></li>' . '<li><a href="' . esc_url(home_url(/contact)) . '">CONTACT</a></li>' . '</ul>'}ob_start();if (!$printed){$printed=true;?><style>.th-header-block{--th-text:rgba(255,255,255,.92);--th-muted:rgba(255,255,255,.72);--th-hover:#fff;--th-button-bg:rgba(255,255,255,.08);--th-button-border:rgba(255,255,255,.22);--th-button-hover:rgba(255,255,255,.16);position:fixed;top:0;left:50%;right:50%;width:100vw;margin-left:-50vw;margin-right:-50vw;z-index:99999;color:var(--th-text);font-family:Arial,Helvetica,sans-serif}body.admin-bar .th-header-block{top:32px}@media (max-width:782px){body.admin-bar .th-header-block{top:46px}}.th-header-block *{box-sizing:border-box}.th-header-block a{color:inherit;text-decoration:none}.th-header-block a:focus,.th-header-block a:focus-visible,.th-header-block button:focus,.th-header-block button:focus-visible{outline:none!important;box-shadow:none!important}.th-wrap{width:min(100%, 1440px);padding-left:28px;padding-right:28px;margin:0 auto}.th-topbar{background:#000;border-bottom:1px solid rgb(255 255 255 / .08);text-align:center;font-size:10px;letter-spacing:.34em;color:rgb(255 255 255 / .88);line-height:1}.th-topbar .th-wrap{padding:10px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.th-header{min-height:70px;background:transparent!important;border-bottom:1px solid transparent!important;box-shadow:none!important;transition:background 180ms ease,box-shadow 180ms ease,border-color 180ms ease}.th-header-inner{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:14px 0}.th-logo{display:inline-flex;align-items:center;white-space:nowrap;line-height:1;flex-shrink:0}.th-logo-main{font-size:21px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.th-nav{flex:1;min-width:0;display:flex;justify-content:center}.th-menu{margin:0;padding:0;list-style:none;display:flex;align-items:center;gap:26px}.th-menu>li{list-style:none;position:relative}.th-menu>li>a{position:relative;display:inline-flex;align-items:center;height:40px;font-size:11px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--th-muted);transition:color .25s ease}.th-menu>li:hover>a,.th-menu>li.current-menu-item>a,.th-menu>li.current-menu-ancestor>a,.th-menu>li.current_page_item>a{color:var(--th-hover)}.th-menu>li.current-menu-item>a::after,.th-menu>li.current-menu-ancestor>a::after,.th-menu>li.current_page_item>a::after{content:"";position:absolute;left:0;right:0;bottom:-5px;height:1px;background:rgb(255 255 255 / .55)}.th-menu .sub-menu{position:absolute;top:100%;left:0;min-width:220px;margin:0;padding:14px 0;list-style:none;background:rgb(20 20 20 / .92);border:1px solid rgb(255 255 255 / .08);opacity:0;visibility:hidden;transform:translateY(8px);transition:all .25s ease;z-index:20}.th-menu li:hover>.sub-menu{opacity:1;visibility:visible;transform:translateY(0)}.th-menu .sub-menu li{list-style:none}.th-menu .sub-menu a{display:block;padding:10px 18px;font-size:11px;letter-spacing:.12em;color:rgb(255 255 255 / .78)}.th-menu .sub-menu a:hover{color:#fff;background:rgb(255 255 255 / .06)}.th-cta{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;min-width:122px;height:42px;padding:0 22px;border:1px solid var(--th-button-border);border-radius:999px;background:var(--th-button-bg);font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;flex-shrink:0;transition:background .25s ease,border-color .25s ease,transform .25s ease}.th-cta:hover{background:var(--th-button-hover);border-color:rgb(255 255 255 / .3);transform:translateY(-1px)}.th-cta::before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,transparent 20%,rgb(255 255 255 / .22) 42%,transparent 62%);transform:translateX(-120%);transition:transform 700ms ease;pointer-events:none}.th-cta:hover::before{transform:translateX(120%)}.th-header-block.is-solid{--th-text:#0f1115;--th-muted:rgba(15,17,21,.72);--th-hover:#0f1115;--th-button-bg:rgba(15,17,21,.06);--th-button-border:rgba(15,17,21,.18);--th-button-hover:rgba(15,17,21,.10)}.th-header-block.is-solid .th-header{background:linear-gradient(180deg,rgb(255 255 255 / .84),rgb(255 255 255 / .72))!important;backdrop-filter:blur(22px) saturate(145%);border-bottom:1px solid rgb(15 17 21 / .06)!important;box-shadow:0 8px 28px rgb(15 17 21 / .05),inset 0 1px 0 rgb(255 255 255 / .56)!important}.th-header-block.is-solid .th-menu>li.current-menu-item>a::after,.th-header-block.is-solid .th-menu>li.current-menu-ancestor>a::after,.th-header-block.is-solid .th-menu>li.current_page_item>a::after{background:rgb(15 17 21 / .35)}@media (max-width:1100px){.th-menu{gap:18px}}@media (max-width:920px){.th-header-inner{flex-wrap:wrap;justify-content:center;padding:16px 0 18px}.th-logo,.th-cta{width:100%;justify-content:center}.th-nav{order:3;width:100%}.th-menu{width:100%;flex-wrap:wrap;justify-content:center;gap:10px 18px}.th-menu .sub-menu{display:none}}@media (max-width:640px){.th-wrap{padding-left:16px;padding-right:16px}.th-topbar{font-size:9px;letter-spacing:.18em}.th-logo-main{font-size:19px}.th-menu>li>a{height:34px;font-size:10px;letter-spacing:.12em}.th-cta{min-width:100%}}</style><script>(function(){function init(){var header=document.querySelector('.th-header-block[data-th-header]');if(!header || header.dataset.thInited) return;header.dataset.thInited='1';function sync(){if(window.scrollY>20) header.classList.add('is-solid');else header.classList.remove('is-solid')}sync();window.addEventListener('scroll',sync,{passive:true})}if(document.readyState==='loading') document.addEventListener('DOMContentLoaded',init);else init()})();</script><?php}?><div class="th-header-block" data-th-header><div class="th-topbar"><div class="th-wrap"><?php echo esc_html($topbar_text);?></div></div><header class="th-header"><div class="th-wrap th-header-inner"><a class="th-logo" href="<?php echo esc_url(home_url('/')); ?>" aria-label="Home"><span class="th-logo-main"><?php echo esc_html($logo_text);?></span></a><nav class="th-nav" aria-label="Primary Navigation"><?php echo $menu_html;?></nav><a class="th-cta" href="<?php echo esc_url($cta_url); ?>"><?php echo esc_html($cta_text);?></a></div></header></div><?php return ob_get_clean()});