/* =========================================================
   Offtrack mega menu (brand kit: Offtrack Field Kit)
   Active only when js/mega-menu.js adds html.ot-mm, so the
   theme's original CSS hover menu remains the no-JS fallback.
   ========================================================= */

html.ot-mm {
  --ot-chrome: #111111;
  --ot-ink: #4b4b4b;
  --ot-ink-strong: #393e41;
  --ot-heading: #115378;
  --ot-accent: #ad8a63;
  --ot-line: #dcdcdc;
  --ot-surface: #f7f7f7;
  --ot-muted: #8a8a8a;
}

/* ---------- open / close is class driven (hover intent in JS) ---------- */
html.ot-mm .header-desktop .sportfy-navigation ul.sportfy-navbar > li > ul.dropdown-menu,
html.ot-mm .header-desktop .sportfy-navigation ul.sportfy-navbar > li:hover > ul.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none !important;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
html.ot-mm .header-desktop .sportfy-navigation ul.sportfy-navbar > li.ot-open > ul.dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
/* nested lists are always visible inside an open panel */
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu ul ul,
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu:hover ul ul {
  opacity: 1;
  visibility: inherit;
  transform: none;
  animation: none;
  pointer-events: inherit;
}

/* caret turns when open, active item gets the tan underline */
html.ot-mm .header-desktop .sportfy-navbar > li > a .caret svg { transition: transform .2s ease; }
html.ot-mm .header-desktop .sportfy-navbar > li.ot-open > a .caret svg { transform: rotate(180deg); }
html.ot-mm .header-desktop .sportfy-navbar > li > a { position: relative; }
html.ot-mm .header-desktop .sportfy-navbar > li > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  height: 2px;
  background: var(--ot-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
html.ot-mm .header-desktop .sportfy-navbar > li.ot-open > a::after { transform: scaleX(1); }
html.ot-mm .header-desktop .sportfy-navbar > li.sale-menu > a::after { background: #e3261b; }

/* ---------- panel ---------- */
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu > ul.dropdown-menu.ot-mm-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 40px;
  padding: 32px 40px 36px !important;
  background: #fff !important;
  border-top: 2px solid var(--ot-accent);
  box-shadow: 0 24px 48px -20px rgba(17, 17, 17, .35);
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
}
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu.ot-mm-has-feature > ul.dropdown-menu.ot-mm-panel {
  grid-template-columns: minmax(0, 1fr) 280px;
}
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu > ul.ot-mm-panel > li::after,
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu > ul.ot-mm-panel li::after,
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu > ul.ot-mm-panel li::before { display: none !important; }

html.ot-mm .header-desktop .ot-mm-main { padding: 0 !important; width: auto !important; min-width: 0; }

/* masonry columns: no more ragged empty rows */
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols {
  position: static !important;
  display: block !important;
  column-count: var(--ot-mm-cols, 4);
  column-gap: 32px;
  column-rule: 1px solid #efefef;
  margin: 0; padding: 0 !important;
  list-style: none;
  background: none !important;
  box-shadow: none !important;
  width: auto !important;
  min-width: 0 !important;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li {
  display: block !important;
  break-inside: avoid;
  page-break-inside: avoid;
  width: auto !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: 0 !important;
}

/* group heading (sub-category) */
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-group > .ot-mm-heading,
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-group > a {
  display: block;
  padding: 0 0 8px !important;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--ot-line);
  font-family: stratos-lights, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--ot-heading) !important;
  transition: color .15s ease;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-group > a:hover { color: var(--ot-accent) !important; }

/* leaf sub-category without children: reads as a strong link, not a heading */
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-leaf { margin-bottom: 10px !important; }
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-leaf > a {
  display: inline-block;
  padding: 0 !important;
  font-family: stratos-lights, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  text-transform: none;
  color: var(--ot-ink-strong) !important;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols > li.ot-mm-leaf > a:hover { color: var(--ot-accent) !important; }

/* third level links */
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols ul.sub-menu {
  position: static !important;
  display: block !important;
  padding: 0 !important;
  margin: 0;
  box-shadow: none !important;
  border: 0 !important;
  background: none !important;
  min-width: 0 !important;
  width: auto !important;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols ul.sub-menu > li {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols ul.sub-menu > li > a {
  display: inline-block;
  padding: 3px 0 !important;
  font-family: stratos-lights, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ot-ink) !important;
  transition: color .15s ease, transform .15s ease;
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols ul.sub-menu > li > a:hover {
  color: var(--ot-accent) !important;
  transform: translateX(3px);
}
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols .caret { display: none !important; }

/* ---------- feature tile ---------- */
html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-panel > li.ot-mm-feature {
  display: block !important;
  width: auto !important;
  padding: 0 !important;
  align-self: start;
  position: sticky;
  top: 0;
}
html.ot-mm .header-desktop .ot-mm-feature > a {
  display: block;
  padding: 0 !important;
  background: var(--ot-chrome);
  color: #fff !important;
  text-decoration: none;
  overflow: hidden;
}
html.ot-mm .header-desktop .ot-mm-feature-img {
  display: block;
  aspect-ratio: 4 / 5;
  max-height: 320px;
  width: 100%;
  overflow: hidden;
  background: var(--ot-surface);
}
html.ot-mm .header-desktop .ot-mm-feature-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
html.ot-mm .header-desktop .ot-mm-feature > a:hover .ot-mm-feature-img img { transform: scale(1.04); }
html.ot-mm .header-desktop .ot-mm-feature-body {
  display: block;
  padding: 16px 18px 18px;
}
html.ot-mm .header-desktop .ot-mm-feature-title {
  display: block;
  font-family: stratos-lights, sans-serif !important;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}
html.ot-mm .header-desktop .ot-mm-feature-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: stratos-lights, sans-serif !important;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ot-accent);
}
html.ot-mm .header-desktop .ot-mm-count { color: #b5b5b5; font-weight: 400; letter-spacing: .06em; }
html.ot-mm .header-desktop .ot-mm-arrow {
  width: 18px; height: 1px;
  background: currentColor;
  position: relative;
  margin-left: auto;
  transition: width .2s ease;
}
html.ot-mm .header-desktop .ot-mm-arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
html.ot-mm .header-desktop .ot-mm-feature > a:hover .ot-mm-arrow { width: 28px; }

/* ---------- brands panel ---------- */
html.ot-mm .header-desktop li.ot-mm-brands > ul.dropdown-menu {
  border-top: 2px solid var(--ot-accent);
  box-shadow: 0 24px 48px -20px rgba(17, 17, 17, .35);
  padding: 28px 40px !important;
  background: #fff !important;
}
html.ot-mm .header-desktop li.ot-mm-brands .brand-mega-menu {
  max-height: calc(100vh - 260px);
  padding: 0;
  gap: 28px;
  column-gap: 32px;
}
html.ot-mm .header-desktop li.ot-mm-brands .brand-group strong {
  font-family: stratos-lights, sans-serif !important;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--ot-accent);
  border-bottom: 1px solid var(--ot-line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
html.ot-mm .header-desktop li.ot-mm-brands .brand-group a,
html.ot-mm .header-desktop li.ot-mm-brands .brand-column a {
  font-size: 14px !important;
  line-height: 1.45 !important;
  padding: 2px 0 !important;
  font-weight: 400 !important;
  text-transform: none !important;
  color: var(--ot-ink) !important;
}
html.ot-mm .header-desktop li.ot-mm-brands .brand-group a:hover,
html.ot-mm .header-desktop li.ot-mm-brands .brand-column a:hover { color: var(--ot-accent) !important; }

/* ---------- compact panels (only plain links, e.g. Trail Running) ---------- */
html.ot-mm .header-desktop li.ot-mm-compact > ul.ot-mm-panel { align-items: start; }
html.ot-mm .header-desktop .sportfy-navigation li.ot-mm-compact ul.ot-mm-cols { column-rule: 0; column-gap: 40px; max-width: 640px; }
html.ot-mm .header-desktop .sportfy-navigation li.ot-mm-compact ul.ot-mm-cols > li.ot-mm-leaf { margin: 0 !important; }
html.ot-mm .header-desktop .sportfy-navigation li.ot-mm-compact ul.ot-mm-cols > li.ot-mm-leaf > a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 2px !important;
  border-bottom: 1px solid var(--ot-line);
  font-size: 15px !important;
  font-weight: 400 !important;
}
html.ot-mm .header-desktop .sportfy-navigation li.ot-mm-compact ul.ot-mm-cols > li.ot-mm-leaf > a::after {
  content: "";
  display: block !important;
  position: static !important;
  width: 7px; height: 7px;
  border-top: 1px solid var(--ot-accent);
  border-right: 1px solid var(--ot-accent);
  background: none !important;
  transform: rotate(45deg);
  opacity: .7;
  transition: transform .15s ease, opacity .15s ease;
}
html.ot-mm .header-desktop .sportfy-navigation li.ot-mm-compact ul.ot-mm-cols > li.ot-mm-leaf > a:hover::after { opacity: 1; transform: translateX(3px) rotate(45deg); }
html.ot-mm .header-desktop li.ot-mm-compact .ot-mm-feature-img { aspect-ratio: 16 / 10; }
html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu.ot-mm-compact > ul.dropdown-menu.ot-mm-panel { grid-template-columns: minmax(0, 1fr) 320px; }

/* brands: balanced A-Z masonry instead of six pre-cut columns */
html.ot-mm .header-desktop li.ot-mm-brands > ul.dropdown-menu > li { width: 100% !important; grid-column: 1 / -1; }
html.ot-mm .header-desktop li.ot-mm-brands .brand-mega-menu {
  display: block !important;
  column-count: 6;
  column-gap: 32px;
  column-rule: 1px solid #efefef;
}
html.ot-mm .header-desktop li.ot-mm-brands .brand-column { display: contents; }
html.ot-mm .header-desktop li.ot-mm-brands .brand-group { break-inside: avoid; margin: 0 0 18px; }
html.ot-mm .header-desktop li.ot-mm-brands .brand-group li { margin: 0 !important; padding: 0 !important; display: block !important; }
html.ot-mm .header-desktop li.ot-mm-brands .brand-group a { display: inline-block; }

/* ---------- smaller desktops ---------- */
@media (max-width: 1280px) {
  html.ot-mm .header-desktop .sportfy-navigation ul li.mega-menu.ot-mm-has-feature > ul.dropdown-menu.ot-mm-panel { grid-template-columns: minmax(0, 1fr) 220px; padding: 26px 28px 30px !important; }
  html.ot-mm .header-desktop .sportfy-navigation ul.ot-mm-cols { column-count: min(var(--ot-mm-cols, 4), 3); }
  html.ot-mm .header-desktop li.ot-mm-brands .brand-mega-menu { column-count: 5; }
}

@media (prefers-reduced-motion: reduce) {
  html.ot-mm .header-desktop .sportfy-navigation ul.sportfy-navbar > li > ul.dropdown-menu,
  html.ot-mm .header-desktop .sportfy-navigation ul.sportfy-navbar > li.ot-open > ul.dropdown-menu,
  html.ot-mm .header-desktop .ot-mm-feature-img img,
  html.ot-mm .header-desktop .sportfy-navbar > li > a::after { transition: none !important; transform: none !important; }
}
