/* Header layout; scoped to avoid changing product and checkout styles. */
.typ-header, .typ-header * { box-sizing: border-box; }
header.typ-header { display: block; width: 100%; height: auto; margin: 0; padding: 0; position: relative; background: #fff; color: #172333; font-family: Arial, sans-serif; z-index: 100; }
.typ-header__main { width: calc(100% - 40px); max-width: 1360px; min-height: 98px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(200px, 1fr) auto; align-items: center; gap: 60px; padding: 16px 0; }
.typ-header__logo { display: block; line-height: 0; }
.typ-header__logo img { display: block; width: 210px; max-width: 100%; height: auto; max-height: 74px; object-fit: contain; }
.typ-header__search { display: flex; align-items: center; height: 48px; min-width: 0; margin: 0; background: #fafafa; border: 1px solid #ededed; border-radius: 5px; }
.typ-header__search:focus-within { border-color: #b90016; box-shadow: 0 0 0 2px #b9001612; }
.typ-header__search input[type="search"] { flex: 1; min-width: 0; width: 100%; height: 46px; border: 0; padding: 0 19px; margin: 0; outline: none; background: transparent; color: #172333; font: 14px Arial, sans-serif; box-shadow: none; }
.typ-header__search input::placeholder { color: #898989; font-style: italic; opacity: 1; }
.typ-header__search button { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 46px; padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; color: #d0001b; cursor: pointer; }
.typ-header svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.typ-header__actions { display: flex; align-items: center; gap: 26px; }
.typ-header__actions a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; color: #172333; font-size: 14px; white-space: nowrap; text-decoration: none; }
.typ-header__actions b { font-weight: 400; }
.typ-header a:hover, .typ-header summary:hover { color: #c60019; }
.typ-header a:focus-visible, .typ-header button:focus-visible, .typ-header summary:focus-visible { outline: 2px solid #c60019; outline-offset: 3px; }
.typ-header__nav { border-top: 1px solid #e5e5e5; border-bottom: 1px solid #eee; background: #fff; }
.typ-header__nav-inner { width: calc(100% - 40px); max-width: 1360px; margin: 0 auto; display: flex; align-items: center; gap: 20px; position: relative; }
.typ-header__categories { flex-shrink: 0; }
.typ-header__categories summary { display: flex; align-items: center; gap: 8px; min-height: 50px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.typ-header__categories summary::-webkit-details-marker { display: none; }
.typ-header__categories summary svg { width: 17px; height: 17px; }
.typ-header__categories > ul { position: absolute; top: 100%; left: 0; width: 340px; max-width: 100%; max-height: 65vh; overflow-y: auto; padding: 18px 22px; margin: 0; background: #fff; border: 1px solid #eee; box-shadow: 0 12px 24px #00000012; z-index: 10; }
.typ-header__categories ul { list-style: none; }
.typ-header__categories ul ul { padding: 0 0 8px 14px; }
.typ-header__categories li a { display: block; padding: 9px 0; color: #172333; font-size: 13px; line-height: 1.4; }
.typ-header__categories > ul > li > a { font-weight: 700; }
@media (max-width: 1350px) {
  .typ-header__main { gap: 32px; grid-template-columns: 220px minmax(180px, 1fr) auto; }
}
@media (max-width: 760px) {
  .typ-header__main { width: calc(100% - 32px); grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 12px 0; min-height: 0; }
  .typ-header__logo img { width: 180px; max-height: 58px; }
  .typ-header__actions { gap: 14px; }
  .typ-header__actions a { font-size: 12px; gap: 4px; }
  .typ-header__account span { display: none; }
  .typ-header__search { grid-row: 2; grid-column: 1 / -1; }
  .typ-header__nav-inner { width: calc(100% - 32px); gap: 18px; }
  .typ-header__categories summary { font-size: 11px; min-height: 46px; }
}
@media (max-width: 360px) {
  .typ-header__main { gap: 10px; }
  .typ-header__actions { gap: 8px; }
  .typ-header__logo img { width: 140px; }
}

/* Main categories with dropdown subcategories; all-categories panel is preserved. */
.typ-header__menu { display: flex; flex: 1; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0 12px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.typ-header__menu > li { display: flex; align-items: center; position: relative; min-width: 0; }
.typ-header__menu > li > a { display: flex; align-items: center; min-height: 50px; padding: 0 4px; color: #101010; font-size: 12px; font-weight: 700; text-transform: uppercase; line-height: 1.4; }
.typ-header__submenu-toggle { display: grid; place-items: center; width: 36px; height: 44px; flex-shrink: 0; padding: 0; border: 0; background: transparent; color: #172333; cursor: pointer; }
.typ-header__submenu-toggle svg { width: 16px; height: 16px; transition: transform .15s; }
.typ-header__submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.typ-header__menu > li > ul { display: none; position: absolute; top: 100%; left: 0; z-index: 20; width: 290px; max-width: calc(100vw - 32px); max-height: 65vh; overflow: auto; margin: 0; padding: 10px 0; list-style: none; background: #fff; border: 1px solid #e8e8e8; border-top: 2px solid #c60019; border-radius: 0 0 4px 4px; box-shadow: 0 10px 24px #00000014; }
.typ-header__menu > li:last-child > ul { left: auto; right: 0; }
.typ-header__menu > li.is-open > ul,
.typ-header__menu:not(.is-enhanced) > li:hover > ul,
.typ-header__menu:not(.is-enhanced) > li:focus-within > ul { display: block; }
.typ-header__menu > li > ul a { display: block; padding: 11px 18px; font-size: 13px; line-height: 1.4; color: #172333; white-space: normal; }
.typ-header__menu > li > ul a:hover { background: #faf5f5; color: #c60019; }
.typ-header__menu > li > ul ul { list-style: none; margin: 0 12px 0 18px; padding: 0; border-left: 1px solid #eee; }
@media (max-width: 760px) {
  .typ-header__nav-inner { flex-wrap: wrap; gap: 0; }
  .typ-header__categories { width: 100%; }
  .typ-header__menu { width: 100%; flex: 0 0 100%; justify-content: flex-start; gap: 0 8px; border-top: 1px solid #eee; }
  .typ-header__menu > li { position: static; }
  .typ-header__menu > li > a { min-height: 44px; font-size: 11px; }
  .typ-header__menu > li > ul, .typ-header__menu > li:last-child > ul { left: 0; right: 0; width: 100%; }
  .typ-header__submenu-toggle { width: 32px; }
}
