/* Shared public header — keeps each page's existing menu and language logic intact. */
:where(#siteHeader,.topnav){position:sticky!important;top:0;z-index:30;background:rgba(9,12,18,.8)!important;border-bottom:1px solid rgba(255,255,255,.07)!important;backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%)}
:where(#siteHeader,.topnav)>:first-child{max-width:1400px!important;height:56px!important;margin:0 auto!important;padding:0 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px}
:where(#siteHeader,.topnav) img[id*="navLogo"],:where(#siteHeader,.topnav) img.logo{height:20px!important;width:auto!important}
:where(#siteHeader,.topnav) :is(.nav-right,.nav-actions)>a,#siteHeader>div>div:last-child>a,:where(#siteHeader)>.nav>div:last-child>a{border:0!important;background:transparent!important;box-shadow:none!important;color:#cfcfcf!important}
:where(#siteHeader,.topnav) :is(.nav-right,.nav-actions)>a>span,#siteHeader>div>div:last-child>a>span,:where(#siteHeader)>.nav>div:last-child>a>span{color:#cfcfcf!important}
/* หน้าแรกไม่มีปุ่มกลับหน้าหลักใน desktop — ซ่อนเฉพาะลิงก์แรกของกลุ่ม action */
:where(#siteHeader,.topnav)>:first-child>div:last-child>a[href="/"]:first-child{display:none!important}
#siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child{display:inline-flex!important}
#siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child svg{display:block!important;align-self:center!important;flex:none}
#siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child span{display:flex!important;align-items:center!important;align-self:center!important;line-height:1!important}
:where(#siteHeader,.topnav) :is(.nav-right,.nav-actions)>a:hover,#siteHeader>div>div:last-child>a:hover,:where(#siteHeader)>.nav>div:last-child>a:hover{background:rgba(255,255,255,.08)!important;transform:translateY(-1px)}
:where(#siteHeader,.topnav) :is(#langBtn,.lang-btn){border:0!important;background:transparent!important;color:#cfcfcf!important;box-shadow:none!important}
:where(#siteHeader,.topnav) :is(#langBtn,.lang-btn):hover{background:rgba(255,255,255,.08)!important;color:#cfcfcf!important;transform:translateY(-1px)}
/* สีไอคอนคงเดิมแม้ hover */
:where(#siteHeader,.topnav) a[href="spec-advisor"] svg,:where(#siteHeader,.topnav) a[href="spec-advisor"] svg *{stroke:#1ad1ff!important}
:where(#siteHeader,.topnav) a[href="warranty-check"] svg,:where(#siteHeader,.topnav) a[href="warranty-check"] svg *{stroke:#34d399!important}
#siteHeader{transition:top .24s ease,width .24s ease,margin .24s ease,transform .24s ease,border-radius .24s ease,box-shadow .24s ease,border-color .24s ease!important}
#siteHeader.is-floating{top:12px!important;width:min(1400px,calc(100% - 48px));margin:0 auto;transform:scale(.98);transform-origin:top center;border:1px solid #1e2a3a!important;border-radius:16px;box-shadow:0 12px 34px rgba(0,0,0,.30);overflow:hidden;animation:headerFloatIn .34s cubic-bezier(.16,1,.3,1)}
@keyframes headerFloatIn{0%{transform:scale(1) translateY(-5px)}100%{transform:scale(.98) translateY(0)}}
.page-home-link{position:absolute;top:76px;left:max(20px,calc((100vw - 1400px)/2 + 16px));z-index:8;display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px;border:1px solid rgba(255,255,255,.11);border-radius:10px;background:rgba(17,23,34,.72);color:#cfcfcf;font:600 12px 'Prompt',sans-serif;text-decoration:none;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:background .18s ease,transform .18s ease,border-color .18s ease}
.page-home-link:hover{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.18);color:#cfcfcf;transform:translateY(-1px)}
.page-home-link svg{stroke:#cfcfcf}
.shared-services{display:flex;align-items:center;gap:8px}
.shared-services a{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:10px;color:#cfcfcf!important;font:600 12px 'Prompt',sans-serif;text-decoration:none;white-space:nowrap}
.shared-services a:hover{background:rgba(255,255,255,.08);transform:translateY(-1px)}
.shared-services .shared-spec svg,.shared-services .shared-spec svg *{stroke:#1ad1ff!important}.shared-services .shared-warranty svg,.shared-services .shared-warranty svg *{stroke:#34d399!important}
[data-shared-menu]{display:none}[data-shared-menu] .nmb-bars{display:flex;flex-direction:column;gap:4px;width:18px}[data-shared-menu] .nmb-bars span{width:18px;height:2px;border-radius:2px;background:#fff}

@media(max-width:640px){
  :where(#siteHeader,.topnav)>:first-child{padding:0 16px!important}
  .page-home-link{top:68px;left:12px;height:38px;padding:0 11px}
  #siteHeader.is-floating{top:8px!important;width:calc(100% - 24px);transform:scale(.99);border-radius:14px;animation-name:headerFloatInMobile}
  :where(#siteHeader,.topnav) :is(.nav-right,.nav-actions)>a,#siteHeader>div>div:last-child>a,:where(#siteHeader)>.nav>div:last-child>a{display:none!important}
  #siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto;height:38px;padding:0 8px!important;gap:5px!important;flex:none;white-space:nowrap}
  #siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child span{display:flex!important;align-items:center!important;font-size:11px!important;line-height:1!important}
  :where(#siteHeader,.topnav) img[id*="navLogo"],:where(#siteHeader,.topnav) img.logo{height:13px!important}
  .shared-services{display:none}
  .topnav.shared-menu-open .shared-services{position:fixed;top:64px;right:12px;z-index:40;display:grid;min-width:206px;padding:7px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(13,18,27,.96);box-shadow:0 18px 50px rgba(0,0,0,.6)}
  .topnav.shared-menu-open .shared-services a{height:44px;padding:0 10px}
  :where(#siteHeader,.topnav) [data-shared-menu]{display:inline-flex!important;align-items:center;justify-content:center;width:38px;height:38px;margin-left:2px;border:0;border-radius:11px;background:linear-gradient(145deg,rgba(255,255,255,.07),rgba(255,255,255,.02));color:#fff}
}
@media(max-width:390px){
  #siteHeader.show-header-home>:first-child{padding:0 10px!important;gap:6px!important}
  #siteHeader.show-header-home>:first-child>div:last-child{gap:4px!important}
  #siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child{padding:0 6px!important;gap:4px!important}
  #siteHeader.show-header-home>:first-child>div:last-child>a[href="/"]:first-child span{font-size:10px!important}
}
@keyframes headerFloatInMobile{0%{transform:scale(1) translateY(-4px)}100%{transform:scale(.99) translateY(0)}}
