/* The store's own header and footer on store.gpuwerk.com (build-store.py
 * store_host_header / store_host_footer; docs/plans/store-subdomain-2026-11-29.md).
 * Loaded after navigation.css and store.css on the store host's pages only.
 * Two rows on wide screens: the logo, search, account and cart, then the
 * categories; on a phone the logo, search, cart and a menu that lists the
 * categories first. */

header.site.store-hdr { display: block; padding-top: 10px; padding-bottom: 0; min-height: 0; }
.store-hdr .sth-top { display: flex; align-items: center; gap: 20px; min-height: 52px; }
.store-hdr .sth-logo { gap: 9px; }
.store-hdr .sth-word,
.store-foot .sth-word { margin-left: 4px; padding-left: 11px; border-left: 1px solid #3b4248; color: var(--nav-muted, #b9c0b9); font-weight: 500; letter-spacing: 0; }
.store-hdr .sth-search { flex: 1 1 auto; max-width: 560px; min-width: 0; }
.store-hdr .sth-search:empty { visibility: hidden; }
.store-hdr .sth-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.store-hdr .sth-quiet,
.store-hdr .sth-act { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: var(--nav-muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.store-hdr .sth-quiet { font-weight: 500; }
.store-hdr .sth-quiet:hover,
.store-hdr .sth-act:hover { color: var(--nav-text); background: var(--nav-hover); }
.store-hdr .sth-cart { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: var(--nav-text); text-decoration: none; font-size: 14px; font-weight: 600; }
.store-hdr .sth-cart:hover { background: var(--nav-hover); }
.store-hdr .sth-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--nav-text); font: 600 14px/1 Inter, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.store-hdr .sth-icon:hover { background: var(--nav-hover); }
.store-hdr .sth-icon[hidden],
.store-hdr .sth-menu-btn { display: none; }

/* The categories row. */
.store-hdr .sth-cats { display: flex; align-items: center; gap: 2px; min-height: 48px; margin: 0 -12px; }
.store-hdr .sth-cat { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: var(--nav-muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.store-hdr .sth-cat:hover,
.store-hdr .sth-cat[aria-current="page"] { color: var(--nav-text); background: var(--nav-hover); }
.store-hdr .sth-group { position: relative; display: flex; align-items: center; }
.store-hdr .sth-group > .sth-cat { padding-right: 4px; }
.store-hdr .sth-more { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 44px; margin-left: -2px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--nav-muted); cursor: pointer; }
.store-hdr .sth-more:hover { color: var(--nav-text); background: var(--nav-hover); }
.store-hdr .sth-more svg { transition: transform .15s ease; }
.store-hdr .sth-group.open .sth-more svg { transform: rotate(180deg); }
.store-hdr .sth-drop { position: absolute; top: 100%; left: 0; z-index: 120; display: none; min-width: 230px; padding: 8px; border: 1px solid #282c30; border-radius: 8px; background: #101214; }
.store-hdr .sth-drop a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--nav-muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.store-hdr .sth-drop a:first-child { color: var(--nav-text); font-weight: 600; }
.store-hdr .sth-drop a:hover { color: var(--nav-text); background: var(--nav-hover); }
.store-hdr .sth-group.open .sth-drop { display: block; }
@media (hover: hover) and (min-width: 901px) {
  .store-hdr .sth-group:hover .sth-drop { display: block; }
}
.store-hdr .sth-menu-extra { display: none; }

/* The search button is the phone header's; wide screens show the box itself. */
@media (min-width: 901px) {
  .store-hdr [data-sth-search] { display: none; }
}

/* Narrower desktops: the categories scroll sideways rather than wrap. */
@media (max-width: 1180px) and (min-width: 901px) {
  .store-hdr .sth-quiet { display: none; }
}

/* Phone and tablet: logo, search, cart, menu; the menu lists the categories first. */
@media (max-width: 900px) {
  header.site.store-hdr { padding-top: 0; }
  .store-hdr .sth-top { gap: 4px; min-height: 60px; }
  .store-hdr .sth-search { order: 5; flex: 1 0 100%; max-width: none; display: none; padding-bottom: 10px; }
  .store-hdr.search-open .sth-search { display: block; }
  .store-hdr .sth-top { flex-wrap: wrap; }
  .store-hdr .sth-quiet,
  .store-hdr .sth-act,
  .store-hdr .store-cart-text { display: none; }
  .store-hdr .sth-icon:not([hidden]) { display: inline-flex; }
  .store-hdr .sth-menu-btn span { display: none; }
  .store-hdr .sth-cats { display: none; margin: 0 -8px; padding: 4px 0 16px; border-top: 1px solid #262b26; }
  .store-hdr.menu-open .sth-cats { display: block; max-height: calc(100vh - 61px); overflow-y: auto; }
  .store-hdr .sth-cats .sth-cat { display: flex; width: 100%; font-size: 16px; color: var(--nav-text); }
  .store-hdr .sth-group { flex-wrap: wrap; }
  .store-hdr .sth-group > .sth-cat { flex: 1; width: auto; }
  .store-hdr .sth-more { width: 44px; }
  .store-hdr .sth-drop { position: static; flex: 1 0 100%; min-width: 0; padding: 0 0 8px 12px; border: 0; background: none; }
  .store-hdr .sth-drop a { padding: 10px 12px; font-size: 15px; }
  .store-hdr .sth-menu-extra { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid #262b26; }
  .store-hdr .sth-menu-extra a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; color: var(--nav-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
}
