.masthead {
  --mast-height: 172px;
  position: relative;
  z-index: 5;
  background: #ff1717;
  color: #fff;
}
.mast-inner {
  display: flex;
  min-height: var(--mast-height);
  align-items: center;
  gap: 2.5vw;
  padding-inline: 2% 3.4%;
}
.mast-logo { display: block; position: relative; top: 12px; flex: 0 0 clamp(210px,20.8vw,340px); }
.mast-logo img { width: 100%; height: auto; }
.apex-nav { transform: translateY(-6px); flex: 1; display: flex; align-items: center; justify-content: space-between; gap: clamp(10px,1.45vw,26px); min-width: 0; }
.apex-nav > a, .catalog-trigger, .no-js-mobile a {
  padding: 6px 0; color: white; font-size: 16px; font-weight: 400; line-height: 1.45; text-decoration: none;
}
.apex-nav > a:hover, .catalog-trigger:hover, .no-js-mobile a:hover { color: #ffdf9d; text-decoration: underline; }
.catalog-trigger { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; white-space: nowrap; }
.caret { width: 0; height: 0; border-inline: 5px solid transparent; border-top: 6px solid currentColor; }
.catalog-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }
.masthead :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.menu-toggle { display: none; }
.no-js-mobile { display: none; }

.catalog-search {
  display: flex; align-items: center; flex: 0 1 279px; min-width: 135px; max-width: 279px;
  height: 36px; margin: 0; padding: 0 6px 0 12px; border: 2px solid #e5e7eb; border-radius: 6px; background: #fff;
}
.catalog-search:focus-within { outline: 2px solid #232323; outline-offset: 2px; }
.catalog-search input {
  height: 100%; width: 100%; min-width: 0; margin: 0; padding: 3px 5px; border: 0; outline: 0; box-shadow: none;
  font: inherit; font-size: 16px; color: #1f2937; background: transparent;
}
.catalog-search input::placeholder { color: #687282; opacity: 1; }
.catalog-search input::-webkit-search-cancel-button { display: none; }
.catalog-search button {
  flex: none; display: inline-grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #a72121;
}
.catalog-search button:hover, .catalog-search button:focus-visible { color: white; background: #b91c1c; }
.catalog-search button:focus-visible { outline-color: #111; }
.catalog-search button[type="reset"] { display: none; }
.catalog-search:focus-within button[type="reset"], .catalog-search:has(input:not(:placeholder-shown)) button[type="reset"] { display: inline-grid; }
.search-icon { position: relative; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { position: absolute; width: 7px; height: 2px; content: ""; background: currentColor; bottom: -3px; right: -5px; transform: rotate(45deg); }
.clear-icon { width: 14px; height: 2px; background: currentColor; box-shadow: 2px -4px currentColor, -2px 4px currentColor; }

.inventory-menu {
  position: absolute; inset: calc(100% - 56px) 0 auto auto; width: 65%; max-width: min(1300px,100%);
  max-height: none; margin: 0; padding: 0; border: 0; border-radius: 5px;
  background: #f00; color: #fff; box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
.inventory-menu:not([open]) { display: none; }
.inventory-menu[open] { display: flex; flex-direction: column; }
.menu-scroll {
  overflow-y: auto; overscroll-behavior: contain; max-height: min(760px,calc(100dvh - 126px));
  padding: 9px clamp(28px,3.1vw,55px) 17px; scrollbar-width: thin;
}
.menu-top h2 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.menu-close {
  position: absolute; top: 3px; right: 3px; width: 30px; height: 30px; display: grid; place-items: center;
  padding: 0; border: 0; background: transparent; color: white; font-size: 24px; line-height: 1;
}
.menu-close:hover { color: #ffda8c; }
.drawer-search, .drawer-links { display: none; }
.menu-columns { display: grid; align-items: start; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(20px,3.6vw,62px); }
[data-menu-view]:not([data-menu-view="primary"]) .menu-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.menu-column { min-width: 0; }
.menu-column h3 { margin: 0 0 16px; color: #ffc865; font-size: 25px; line-height: 1.2; font-weight: 500; letter-spacing: normal; }
.menu-column input {
  width: 100%; height: 33px; padding: 4px 8px; border: 1px solid #ddd; border-radius: 0;
  background: #fff; color: #1f2937; font: inherit; font-size: 16px;
}
.menu-column input:focus-visible { outline-color: #262626; outline-offset: 1px; }
.menu-column input::placeholder { color: #687282; opacity: 1; }
.menu-column ul { list-style: none; margin: 16px 0 0; padding: 0; }
.menu-column li a { display: block; padding: 1px 0; color: #fff; font-size: 18px; font-weight: 400; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.menu-column li a:hover, .menu-column li a:focus-visible, .drawer-links a:hover { color: #ffe8bc; text-decoration: underline; }
.menu-pages, .menu-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.menu-pages { margin-top: 10px; }
.menu-pages span, .menu-status { font-size: 14px; line-height: 1.35; color: white; }
.menu-status:not(:empty) { margin: 10px 0; }
.menu-pages button, .menu-actions button, .menu-retry {
  padding: 7px 12px; min-height: 32px; border: 1px solid white; background: transparent;
  color: #fff; font: inherit; font-size: 14px; line-height: 1.1;
}
.menu-pages button:disabled { cursor: default; opacity: .55; }
.menu-pages button:enabled:hover, .menu-actions button:hover, .menu-retry:hover { color: #ffdf9d; border-color: #ffdf9d; }
.menu-actions { justify-content: center; padding: 12px 0 8px; }
.menu-actions:first-child { padding: 7px 0 18px; }
@media (min-width: 1024px) {
  .masthead a.compact-only { display: none; }
}
@media (min-width: 1200px) and (max-width: 1299px) {
  .masthead { --mast-height: 120px; }
  .mast-logo { flex-basis: 200px; }
  .mast-inner { gap: 24px; }
  .catalog-search { flex-basis: 210px; }
  .inventory-menu { top: calc(100% - 27px); width: 71%; }
}
@media (max-width: 1199px) {
  .masthead { --mast-height: 160px; }
  .mast-inner { position: relative; justify-content: center; padding-inline: 64px 16px; gap: 0; }
  .mast-logo { top: 7px; flex: 0 1 308px; }
  .apex-nav { display: none; }
  .menu-toggle {
    display: grid; place-items: center; position: absolute; left: 9px; top: calc(50% - 9px); transform: translateY(-50%);
    width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #fff;
  }
  .menu-toggle span { width: 32px; height: 4px; border-radius: 2px; background: currentColor; box-shadow: 0 -10px currentColor, 0 10px currentColor; }
  .no-js-mobile { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 15px; padding: 0 15px 15px; }
  .inventory-menu {
    position: fixed; inset: 0 auto 0 0; width: min(90vw,360px); max-width: 100%; height: 100vh; height: 100dvh;
    max-height: 100%; border-radius: 0; background: #050505; overflow: hidden;
  }
  .inventory-menu::backdrop { background: rgba(0,0,0,.75); }
  body:has(.inventory-menu[open]) { overflow: hidden; }
  .menu-top { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 65px; padding: 13px 22px; border-bottom: 1px solid #1c1c1c; }
  .menu-top h2 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; color: #fff; font-size: 18.4px; font-weight: 600; }
  .menu-close { position: static; width: 36px; height: 36px; font-size: 28px; }
  .drawer-search { display: block; flex: none; padding: 12px 24px 16px; border-bottom: 1px solid #1c1c1c; }
  .drawer-search h3, .menu-column h3 { margin: 0 0 8px; color: #e6e6e6; font-size: 15.2px; font-weight: 600; }
  .drawer-search .catalog-search { height: 36px; max-width: none; border: 1px solid #2c2c2c; background: #121212; }
  .drawer-search .catalog-search:focus-within { outline-color: #ff1717; }
  .drawer-search input, .drawer-search .catalog-search button { color: white; }
  .drawer-search input::placeholder, .menu-column input::placeholder { color: #a1a1a1; }
  .menu-scroll { flex: 1; min-height: 0; max-height: none; padding: 17px 24px 28px; }
  .menu-columns, [data-menu-view]:not([data-menu-view="primary"]) .menu-columns { display: grid; grid-template-columns: 1fr; gap: 27px; }
  .menu-column input { height: 42px; padding: 8px 12px; border: 1px solid #2c2c2c; border-radius: 6px; background: #121212; color: white; font-size: 16px; }
  .menu-column input:focus-visible { outline-color: #ff1717; }
  .menu-column ul { margin-top: 10px; padding-left: clamp(26px,12.3vw,48px); }
  .menu-column li a { padding-block: 4px; color: #f0f0f0; font-size: 14.4px; line-height: 1.45; }
  .menu-actions { justify-content: flex-start; }
  .drawer-links { margin-top: 20px; padding-top: 12px; border-top: 1px solid #2c2c2c; display: flex; flex-wrap: wrap; gap: 2px 16px; }
  .drawer-links a { padding: 6px 0; color: white; font-size: 14px; text-decoration: none; }
}
@media (forced-colors: active) {
  .menu-toggle span { border: 2px solid ButtonText; box-shadow: none; }
  .menu-toggle::after { content: "☰"; position: absolute; color: ButtonText; font-size: 24px; }
}
