<header class="bg-paper/95 backdrop-blur border-b border-stone-200 sticky top-0 z-50">
  {{$isHome := eq .Type "home"}}
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-10">
    <div class="flex justify-between items-center h-20">
      <a href="/" class="flex items-center gap-3 hover:opacity-80">
        {{if .Site}}{{if .Site.Logo}}
          <img src="{{.Site.Logo}}" alt="{{.Site.Title}}" class="h-10 w-auto object-contain">
        {{else}}
          <div class="flex items-baseline gap-1.5">
            <span class="text-2xl font-serif font-semibold tracking-wide text-ink">途然</span>
            <span class="text-xs tracking-[0.3em] text-muted uppercase">TooRunn</span>
          </div>
        {{end}}{{end}}
      </a>
      <nav class="hidden md:flex items-center gap-1">
        <a href="/" class="px-3 py-2 text-sm tracking-wide {{if $isHome}}text-primary font-medium{{else}}text-ink/70 hover:text-primary{{end}}">首页</a>
        {{range .Columns}}
        <a href="{{.URL}}" class="px-3 py-2 text-sm tracking-wide {{if .IsSelect}}text-primary font-medium{{else}}text-ink/70 hover:text-primary{{end}}">{{.Name}}</a>
        {{end}}
      </nav>
      <div class="hidden md:flex items-center gap-3">
        <form action="/search" method="get" class="relative">
          <input type="text" name="key" placeholder="搜索鞋款 / 包款" class="w-44 pl-9 pr-3 py-2 text-sm bg-stone-100 border border-transparent focus:border-primary focus:bg-white rounded-full outline-none transition">
          <svg class="absolute left-3 top-2.5 w-4 h-4 text-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
        </form>
      </div>
      <button id="mobileMenuBtn" class="md:hidden p-2 -mr-2 text-ink" aria-label="菜单">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
      </button>
    </div>
    <div id="mobileMenu" class="hidden md:hidden pb-4 border-t border-stone-200 pt-3">
      <a href="/" class="block py-2 text-sm {{if $isHome}}text-primary{{else}}text-ink/70{{end}}">首页</a>
      {{range .Columns}}<a href="{{.URL}}" class="block py-2 text-sm {{if .IsSelect}}text-primary{{else}}text-ink/70{{end}}">{{.Name}}</a>{{end}}
      <form action="/search" method="get" class="mt-3">
        <input type="text" name="key" placeholder="搜索鞋款 / 包款" class="w-full px-3 py-2 text-sm bg-stone-100 rounded-full outline-none">
      </form>
    </div>
  </div>
</header>
