/* Product navigation: scoped presentation using the storefront theme tokens. */
.hmn-enabled {
  --hmn-muted: var(--muted);
  --hmn-sidebar: clamp(212px, 19vw, 250px);
  --hmn-line: var(--home-border, #d7e3f7);
  --hmn-soft: var(--home-art-surface, #f6f9fe);
  --hmn-active: var(--home-surface, #f3f7ff);
  --hmn-frame: var(--home-frame, min(1280px, calc(100% - 2 * clamp(24px, 5.55vw, 80px))));
}
.hmn-enabled .header { background: var(--white); }
.hmn-enabled .main-nav > .hmn-product-menu > summary {
  position: relative;
  cursor: pointer;
}
.hmn-enabled .main-nav > .hmn-product-menu[open] > summary { color: var(--blue); }
.hmn-enabled .main-nav > .hmn-product-menu[open] > summary::after {
  content: ""; position: absolute; bottom: -10px; left: 4px; right: 18px;
  height: 3px; background: var(--blue);
}
.hmn-enabled .header .hmn-product-menu > .managed-submenu.hmn-panel {
  left: 0; right: 0; top: 100%; width: 100%; max-height: none;
  padding: 0; display: block; border: 0; border-top: 1px solid var(--line);
  border-radius: 0; overflow: visible;
  box-shadow: 0 14px 24px rgb(27 43 76 / 7%);
}
.hmn-panel {
  color: var(--ink); background: var(--white); font-weight: 400;
  --hmn-height: min(536px, calc(100vh - var(--hmn-header-bottom, 76px) - 16px));
  --hmn-height: min(536px, calc(100dvh - var(--hmn-header-bottom, 76px) - 16px));
}
.hmn-panel [hidden] { display: none; }
.hmn-panel button, .hmn-panel input { font: inherit; }
.hmn-panel button { cursor: pointer; }
.hmn-panel button, .hmn-panel a { -webkit-tap-highlight-color: transparent; }
.hmn-panel :is(a, button, input):focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.hmn-layout {
  position: relative; display: grid; grid-template-columns: var(--hmn-sidebar) minmax(0, 1fr);
  width: var(--hmn-frame); max-height: var(--hmn-height);
  margin-inline: auto; padding-block: 18px;
}
.hmn-sidebar {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 12px;
  background: var(--hmn-soft); border-radius: var(--home-radius, 8px);
}
.hmn-search {
  display: flex; align-items: center; gap: 8px; height: 42px; flex-shrink: 0;
  padding: 0 12px; border: 1px solid var(--hmn-line); border-radius: 5px; background: var(--white);
}
.hmn-search:focus-within { border-color: var(--blue); }
.hmn-search input {
  display: block; width: 100%; min-width: 0; height: 100%; padding: 0;
  color: var(--ink); background: transparent; border: 0; outline: none; font-size: 14px;
}
.hmn-search input::placeholder { color: var(--hmn-muted); opacity: 1; }
.hmn-search input:focus-visible { outline: none; }
.hmn-search input::-webkit-search-cancel-button { display: none; }
.hmn-search > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--hmn-muted); }
.hmn-search-clear {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 32px;
  flex: 0 0 28px; padding: 0; border: 0; background: transparent; color: var(--hmn-muted);
}
.hmn-search-clear svg { width: 16px; height: 16px; }
.hmn-categories { display: flex; flex-direction: column; gap: 3px; margin-block: 12px 8px; }
.hmn-panel .hmn-category {
  display: block; min-height: 42px; text-align: left; padding: 8px 12px;
  border: 0; border-radius: 4px; background: transparent;
  color: var(--hmn-muted); font-size: 15px; font-weight: 500;
}
.hmn-panel .hmn-category[aria-selected="true"] {
  color: var(--blue); background: var(--white); box-shadow: inset 3px 0 var(--blue); font-weight: 650;
}
.hmn-all {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 8px 12px; border-top: 1px solid var(--hmn-line);
  font-size: 13px; font-weight: 600;
}
.hmn-all svg { width: 16px; height: 16px; }
.hmn-content {
  min-width: 0; min-height: 0; padding: 5px 4px 8px clamp(20px, 2.3vw, 36px);
  overflow-y: auto; overscroll-behavior: contain;
}
.hmn-content-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 44px; padding-right: 48px; margin-bottom: 10px;
}
.hmn-panel h2 { font-size: 26px; line-height: 1.25; font-weight: 700; margin: 0; }
.hmn-intro { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; color: var(--blue); }
.hmn-intro svg { width: 15px; height: 15px; flex-shrink: 0; }
.hmn-section-title { margin: 0 0 7px; font-size: 13px; line-height: 1.6; color: var(--hmn-muted); font-weight: 500; }
.hmn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.hmn-entry {
  position: relative; display: block; min-width: 0; min-height: 54px;
  padding: 12px 28px 12px 10px; border-top: 1px solid var(--hmn-line); border-radius: 0 0 4px 4px;
  color: var(--ink); white-space: normal; text-decoration: none;
}
.hmn-entry::after {
  content: ""; position: absolute; top: 20px; right: 12px; width: 6px; height: 6px;
  border: solid var(--hmn-muted); border-width: 1px 1px 0 0; transform: rotate(45deg);
}
.hmn-entry strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
.hmn-entry p { margin: 4px 0 0; color: var(--hmn-muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.hmn-entry[aria-current="page"] { background: var(--hmn-active); color: var(--blue); }
.hmn-close {
  position: absolute; right: 0; top: 23px; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: var(--hmn-muted); border: 0; border-radius: 4px; background: transparent;
}
.hmn-close svg { width: 21px; height: 21px; stroke-width: 1.3; }
.hmn-mobile-back { display: none; }
.hmn-empty { margin: 0; padding: 16px 0; color: var(--hmn-muted); font-size: 14px; line-height: 1.8; }
.hmn-backdrop { position: fixed; z-index: 25; inset: 64px 0 0; background: rgb(27 43 76 / 10%); }
.hmn-backdrop[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hmn-entry:hover, .hmn-entry:focus-visible { background: var(--hmn-active); color: var(--blue); }
  .hmn-entry:hover::after { border-color: var(--blue); }
  .hmn-all:hover, .hmn-panel .hmn-category:hover { color: var(--blue); }
  .hmn-intro:hover { text-decoration: underline; }
  .hmn-close:hover, .hmn-search-clear:hover { color: var(--blue); background: var(--paper); }
}
@media (max-width: 1100px) {
  .hmn-enabled .header .mobile-menu.hmn-products-open > nav { padding: 0; overflow: hidden; }
  .hmn-enabled .header .mobile-menu.hmn-products-open > nav > :not(.hmn-mobile-product) { display: none; }
  .hmn-enabled .header .hmn-mobile-product[open] { border: 0; }
  .hmn-enabled .header .hmn-mobile-product[open] > summary { display: none; }
  .hmn-panel { --hmn-height: calc(var(--mobile-nav-height, calc(100dvh - 64px)) - 1px); }
  .hmn-layout { width: 100%; height: var(--hmn-height); padding: 53px 18px 12px; }
  .hmn-mobile-back {
    display: flex; align-items: center; gap: 6px; position: absolute; left: 20px; top: 7px;
    min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: var(--hmn-muted); font-size: 14px;
  }
  .hmn-mobile-back svg { width: 18px; height: 18px; }
  .hmn-sidebar .hmn-all { display: none; }
  .hmn-content { padding-left: 20px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .hmn-content-head { padding-right: 0; }
  .hmn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
}
@media (max-width: 600px) {
  .hmn-layout { display: flex; flex-direction: column; padding: 53px 0 0; }
  .hmn-sidebar { flex: 0 0 auto; padding: 0 16px; overflow: visible; background: var(--white); }
  .hmn-search { height: 44px; }
  .hmn-search input { font-size: 16px; }
  .hmn-categories {
    flex-direction: row; gap: 4px; margin: 8px 0 0; padding: 4px 0;
    border-bottom: 1px solid var(--hmn-line); overflow-x: auto; scroll-padding-inline: 4px;
  }
  .hmn-panel .hmn-category { flex: 1 0 auto; min-height: 44px; padding: 8px 4px; text-align: center; font-size: 13px; white-space: nowrap; }
  .hmn-panel .hmn-category[aria-selected="true"] { background: var(--hmn-active); box-shadow: inset 0 -2px var(--blue); }
  .hmn-panel .hmn-category:focus-visible { outline-offset: -3px; }
  .hmn-content { flex: 1 1 auto; padding: 10px 16px max(16px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
  .hmn-panel h2 { font-size: 21px; }
  .hmn-content-head { gap: 10px; margin-bottom: 4px; }
  .hmn-intro { min-height: 44px; }
  .hmn-grid { grid-template-columns: minmax(0, 1fr); }
  .hmn-entry { padding-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hmn-entry strong, .hmn-category { transition: color .15s ease; }
}

/* Theme-console visibility must override category layout in every viewport. */
.hmn-panel .hmn-category[hidden], .hmn-panel .hmn-search[hidden] { display: none; }
