/* ===== KMS NAV v38 (2026-09-14, KAN-540 / KAN-541 / KAN-542) =================
   Header in two zones: catalog on the left (main-menu-v38, six doors, mega menu
   rendered by the theme), money on the right (MCP / Pricing / Get
   All-Access, snippets/kms-header-actions.liquid). Loaded from that snippet,
   i.e. in <body> after every head stylesheet, so it wins over kms-polish.css,
   kms-nav-polish.css and the inline card styles in sections/kms-announcement-bar.liquid.

   Most legacy nav overrides (curly braces, TOP badge, 3-column clamp) are keyed
   on .header__column--center. The menu now lives in .header__column--left, so
   they stop matching by themselves; the rules below are the full v38 set for
   the left column and do not depend on them.
   ============================================================================ */

/* ---------- 1. Top-level doors -------------------------------------------- */
#header-component .header__column--left header-menu nav .menu-list {
  --menu-horizontal-gap: 4px;
}
#header-component .header__column--left header-menu nav overflow-list > li > a {
  position: relative;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  padding-inline: 9px !important;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
  transition: color .15s, background-color .15s !important;
}
#header-component .header__column--left header-menu nav overflow-list > li > a,
#header-component .header__column--left header-menu nav overflow-list > li > a .menu-list__link-title {
  font-family: 'VT323', ui-monospace, monospace !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  letter-spacing: .3px !important;
  text-transform: none !important;
  color: #9E9BBD !important;
}
#header-component .header__column--left header-menu nav overflow-list > li > a .menu-list__link-title {
  padding-inline: 0 !important;
}
/* no braces, no TOP pill: v38 spends the width on the right zone instead */
#header-component .header__column--left header-menu nav overflow-list > li > a .menu-list__link-title::before {
  content: none !important;
}
#header-component .header__column--left header-menu nav overflow-list > li > a .menu-list__link-title::after {
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}
/* caret on doors that open a panel */
#header-component .header__column--left header-menu nav overflow-list > li:has(.menu-list__submenu) > a::after {
  content: '' !important;
  display: inline-block !important;
  position: static !important;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55;
}
#header-component .header__column--left header-menu nav overflow-list > li > a:hover,
#header-component .header__column--left header-menu nav overflow-list > li > a:hover .menu-list__link-title,
#header-component .header__column--left header-menu nav overflow-list > li > a[aria-expanded='true'],
#header-component .header__column--left header-menu nav overflow-list > li > a[aria-expanded='true'] .menu-list__link-title {
  color: #FFFFFF !important;
}
#header-component .header__column--left header-menu nav overflow-list > li > a:hover,
#header-component .header__column--left header-menu nav overflow-list > li > a[aria-expanded='true'] {
  background: rgba(255, 255, 255, .06) !important;
}
/* Skills keeps the flagship gold identity */
#header-component .header__column--left header-menu nav overflow-list > li > a[href*='/collections/claude-skills'],
#header-component .header__column--left header-menu nav overflow-list > li > a[href*='/collections/claude-skills'] .menu-list__link-title {
  color: #FFD37A !important;
}
/* Bundles: amber + "-70%" pill instead of the old brace trick */
#header-component .header__column--left header-menu nav overflow-list > li > a[href*='/collections/bundles'],
#header-component .header__column--left header-menu nav overflow-list > li > a[href*='/collections/bundles'] .menu-list__link-title {
  color: #FFB020 !important;
}
#header-component .header__column--left header-menu nav overflow-list > li > a[href*='/collections/bundles'] .menu-list__link-title::after {
  content: 'SAVE' !important; /* 2026-09-24: was '-70%', not true for the $49 agent bundles (48%) */
  display: inline-block !important;
  margin-left: 6px;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .5px;
  line-height: 1.5;
  padding: 0 5px;
  border-radius: 4px;
  background: #FFB020 !important;
  color: #0E0D14 !important;
  -webkit-text-fill-color: #0E0D14 !important;
  vertical-align: middle;
}
/* the theme's own "More" overflow item: hidden unless the list really overflows */
#header-component .header__column--left header-menu nav overflow-list > li[slot='more'] .menu-list__link-title {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 19px;
  color: #9E9BBD;
}

/* ---------- 2. Mega menu panel: N link columns + 1 card ------------------- */
/* The theme keeps the panel at content-visibility:auto and paints the dark
   card on the panel itself; with a max-content panel that box collapses while
   skipped, so the card look moves onto the inner element and the panel is a
   transparent, plainly-sized wrapper. */
#header-component .header__column--left .menu-list__list-item {
  position: static;
}
#header-component .header__column--left .menu-list__list-item:not([slot='overflow']) > .menu-list__submenu {
  top: calc(100% - 1px) !important;
  left: var(--page-margin, 24px) !important;
  right: auto !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: min(94vw, 1180px) !important;
  height: auto !important;
  transform: none !important;
  clip-path: none !important;
  content-visibility: visible !important;
  contain-intrinsic-size: auto none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
#header-component .header__column--left .menu-list__submenu .menu-list__submenu-inner {
  display: block !important;
  position: static !important;
  transform: none !important;
  width: max-content !important;
  max-width: min(94vw, 1180px) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 22px 28px 26px !important;
  background: #14131C !important;
  border: 1px solid rgba(255, 255, 255, .11) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55) !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu.section {
  display: block !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu__grid[data-menu-grid-id] {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 28px !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu__grid[data-menu-grid-id] .mega-menu__list {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 28px !important;
  width: max-content !important;
  margin: 0 !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu__column {
  width: 184px !important;
  flex: none !important;
  order: 0 !important; /* kms-polish.css pushes lone-link columns to the end; v38 has none */
}
#header-component .header__column--left .menu-list__submenu .mega-menu__column > div > ul {
  column-count: 1 !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu__column > div > ul > li {
  break-after: auto !important;
}
/* group heading */
#header-component .header__column--left .menu-list__submenu .mega-menu a.mega-menu__link--parent {
  font-family: 'VT323', ui-monospace, monospace !important;
  font-size: 13px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: #7E7A9C !important;
  opacity: 1 !important;
  border-bottom: 0 !important;
  padding: 0 0 6px !important;
  margin: 0 0 4px !important;
  pointer-events: none;
}
/* links */
#header-component .header__column--left .menu-list__submenu .mega-menu a.mega-menu__link:not(.mega-menu__link--parent) {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #C9C7E0 !important;
  padding: 5px 0 !important;
  white-space: nowrap !important;
  max-width: 184px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#header-component .header__column--left .menu-list__submenu .mega-menu a.mega-menu__link:hover {
  color: #FFFFFF !important;
}
/* "All ... →" hub links, last in the group */
#header-component .header__column--left .menu-list__submenu .mega-menu__column li:last-child a.mega-menu__link[href*='/collections/claude-skills'],
#header-component .header__column--left .menu-list__submenu .mega-menu__column li:last-child a.mega-menu__link[href*='/collections/all-'],
#header-component .header__column--left .menu-list__submenu .mega-menu__column li:first-child a.mega-menu__link[href='/collections/ai-generators'] {
  color: #B6ACFF !important;
  font-weight: 600 !important;
  margin-top: 4px;
}
/* the theme's optional featured products/collections block is off in v38 */
#header-component .header__column--left .menu-list__submenu .mega-menu__content {
  display: none !important;
}

/* ---------- 3. Featured card ---------------------------------------------- */
/* the panel lives inside .menu-list__list-item{white-space:nowrap}; undo it for card text */
#header-component .kms-mega-card,
#header-component .kms-mega-card * {
  white-space: normal !important;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
#header-component .kms-mega-card { overflow: hidden; box-sizing: border-box; }
.kms-mega-card {
  width: 250px;
  min-width: 0 !important;
  flex: none;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: linear-gradient(160deg, #1D1B34, #16151F);
}
.kms-mega-card__eyebrow {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #B6ACFF;
}
.kms-mega-card__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #F5F4FB;
}
.kms-mega-card__body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #A9A6C4;
}
#header-component .kms-mega-card a.kms-mega-card__cta {
  white-space: nowrap !important;
  align-self: flex-start;
  margin-top: 4px;
  padding: 7px 14px !important;
  border-radius: 999px !important;
  background: #534AB7 !important;
  color: #FFFFFF !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  width: auto !important;
  overflow: visible !important;
}
#header-component .kms-mega-card a.kms-mega-card__cta:hover {
  background: #6B63D4 !important;
  color: #FFFFFF !important;
}
.kms-mega-card__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #7E7A9C;
}
#header-component .kms-mega-card .kms-mega-card__sub a {
  display: inline !important;
  font-size: 12px !important;
  padding: 0 !important;
  color: #A9A6C4 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  white-space: normal !important;
}

/* ---------- 4. Right zone: MCP / Pricing / Get All-Access ---------------- */
.kms-hz {
  display: none;
  align-items: center;
  gap: 6px;
  margin-inline-end: 6px;
}
@media screen and (min-width: 990px) {
  .kms-hz { display: flex; }
}
.kms-hz__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 19px;
  letter-spacing: .3px;
  color: #9E9BBD;
  text-decoration: none;
  white-space: nowrap;
}
.kms-hz__link:hover { color: #FFFFFF; }
.kms-hz__badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(61, 220, 151, .16);
  color: #3DDC97;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
  vertical-align: middle;
}
.kms-hz__pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s;
}
.kms-hz__pill:hover { border-color: #8B82E8; color: #FFFFFF; }
.kms-hz__cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #534AB7;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s;
}
.kms-hz__cta:hover { background: #6B63D4; color: #FFFFFF; }
@media screen and (max-width: 1279px) {
  .kms-hz .kms-hz__cta { display: none; }
}
/* the right column must not steal width from the menu at 990-1279 */
@media screen and (min-width: 750px) {
  #header-component .header__columns:has(.header__column--left header-menu) {
    --header-right: max-content;
  }
  #header-component .header__column--right { gap: var(--gap-md); }
}

/* ---------- 5. Mobile drawer: Plans block + sticky CTA -------------------- */
.kms-drawer-plans {
  margin: 16px 0 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  overflow: hidden;
}
.kms-drawer-plans__eyebrow {
  display: block;
  padding: 10px 14px 0;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7E7A9C;
}
.kms-drawer-plans__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.kms-drawer-plans__row:last-child { border-bottom: 0; }
.kms-drawer-plans__meta {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 15px;
  color: #7E7A9C;
}
.kms-drawer-cta {
  position: sticky;
  bottom: 0;
  margin: 12px -4px 0;
  padding: 12px 4px 8px;
  background: linear-gradient(transparent, var(--color-background, #0E0D14) 35%);
}
.kms-hz__cta--drawer {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
}
@media screen and (min-width: 990px) {
  .kms-drawer-plans, .kms-drawer-cta { display: none; }
}
