:root{
  --maxw: 1000px;

  /* Page */
  --bg: #ffffff;
  --ink: #1b1f24;
  --muted: #6b7280;

  /* Panels / lines */
  --line: #e7edf5;
  --panelBlue: #eef6ff;

  /* Dark L1 nav (matched to your screenshot-ish) */
  --navBg: #1f232b;
  --navInk: #e8edf6;
  --navMuted: rgba(232,237,246,.78);

  /* Brand accent (sampled orange from your header button) */
  --accent: #ee9337;
  --accentInk: #15181e;

  /* L1 blocks on dark */
  --block: rgba(255,255,255,.04);
  --blockHover: rgba(255,255,255,.07);
  --blockActive: rgba(255,255,255,.10);

  --pillBorder: #d8e2f0;

  --r: 10px;
  --t: 160ms;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.apmWrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px;
}


.apmTop{
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.apmTopRow{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.apmBrand{ font-weight: 800; letter-spacing: .2px; }
.apmSmall{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

/* Menu shell */
.apmMenu{
  margin-bottom: 7px;
  overflow: clip;
  min-width: 1000px;
}

/* ===========================
   L1 bar (dark, block tabs)
   =========================== */
.apmL1Bar{
  position: relative;
  margin-top: 7px;  
}

/* List layout: no borders, use gaps */
.apmL1List{
  list-style: none;
  margin: 0;
  padding: 10px 58px 0px 0px; 
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center
}

.apmL1Item{
  margin: 0;
  margin-bottom: 10px;
  padding: 0;
  border: 0; 
}

/* hide extra L1 until expanded */
.apmMenu:not(.is-expanded) .apmL1Item.is-extra{
  display: none;
}

/* L1 button look */
.apmL1Btn{
  border: 0;
  background: var(--block);
  color: var(--navInk);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t) ease, box-shadow var(--t) ease, color var(--t) ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  white-space: nowrap;
}

.apmL1Btn:hover{
  background: var(--blockHover);
}

/* Active L1: subtle bright + orange underline */
.apmL1Btn.is-active{
  background: var(--blockActive);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 -3px 0 0 var(--accent);
}

/* More/Less fixed right */
.apmMoreBtn{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  

  border: 0;
  background: #1f232b00;
  cursor: pointer;

  display:flex;
  align-items: center;
  justify-content: center;

  transition: background var(--t) ease;
  
}

.apmMoreBtn:hover{ background: rgba(255,255,255,.04); }

.apmMoreIcon{
  font-size: 17px;
  color: var(--navMuted);
  line-height: 10px;
  border: 1px solid;
  border-radius: 10px;
  width: 35px;
}



.apmMoreBtn.is-less .apmMoreIcon{
  color: var(--accent);
}

/* ===========================
   L2 panel (light strip + pills)
   =========================== */
.apmL2Panel{  
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  
  transition:
    max-height 260ms ease,
    opacity 220ms ease,
    transform 220ms ease;
}

.apmL2Panel.is-open{
  max-height: 340px;
  opacity: 1;
  transform: translateY(0);
}

.apmL2Inner{
  padding: 4px 14px 16px;
  margin-top: 5px;
  border: 1px rgb(56, 61, 77) solid;
  border-radius: 10px;
  background: #151922; 
  border-left: 4px solid #575d6a;
}

.apmL2Title{
  font-size: 13px;
  color: #667085;
  margin-bottom: 10px;
}

.apmL2Pills{
  list-style: none;
  margin: 0;
  padding: 0;

  display: grid;
  gap: 12px 16px;

  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}


.apmPill{
  width: 100%;
  text-align: left;
  border: 1px solid var(--pillBorder);
  background: #fff;
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  transition: background var(--t) ease, border-color var(--t) ease, color var(--t) ease, transform var(--t) ease;
  height: 50px;
  display: flex;
  align-items: center;
  white-space: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 16px;
}

.apmPill:hover{
  border-color: #bcd2f5;
  background-color: #d7dadf;
  
}

/* L2 active: FULL highlight (orange) */
.apmPill.is-active{
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accentInk);
  font-weight: 800;
  transform: none;
}

/* ===========================
   L3 panel (breadcrumb + row)
   =========================== */
.apmL3Panel{
  
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--t) ease, opacity var(--t) ease;
}

.apmL3Panel.is-open{
  max-height: 240px;
  opacity: 1;
}

.apmL3Inner{
  padding: 18px 14px 16px;
  border-left: 4px solid var(--accent);
  margin-top: 5px;
  border: 1px solid black;
  border-radius: 10px;
}

.apmL3Inner{
  background:
    radial-gradient(900px 220px at 0% 0%,
      rgba(31,35,43,.10) 0%,
      rgba(31,35,43,0) 55%),
    radial-gradient(900px 260px at 18% 0%,
      rgba(238,147,55,.16) 0%,
      rgba(238,147,55,0) 60%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
  border-left: 4px solid var(--accent);
}

.apmCrumb{
  font-size: 14px;
  margin-bottom: 12px;
}
.apmCrumbMuted{ color: var(--muted); }
.apmCrumbStrong{ 
  color: #000;
  font-weight: 700; 
}
.apmCrumbPick{ color: var(--accent); font-weight: 800; }
.apmCrumbSep{ margin: 0 8px; color: #c3cbd8; }

.apmL3Row{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.apmL3Btn{
  background: #1e2332;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: color var(--t) ease;
  border: 1px solid #000;
  padding: 4px 12px;
  border-radius: 10px;
  box-shadow:0 2px 6px rgba(0,0,0,.45);
}

.apmL3Btn:hover{
  color: var(--accent);
  text-decoration: none;  
}

.apmL3Btn.is-active{
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Content (demo only) */
.apmContent{ margin: 16px 0 70px; }
.apmCard{
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  background: #fff;
}
.apmH2{ margin: 0 0 8px; font-size: 16px; }
.apmP{ margin: 0 0 12px; color: var(--muted); line-height: 1.45; }

.apmFakeGrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.apmFakeProduct{
  height: 64px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #f8fafc;
}

/* Responsive */
@media (max-width: 980px){
  .apmL2Pills{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apmMenu { min-width: auto;}
}
@media (max-width: 760px){
  .apmL2Pills{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apmFakeGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apmSmall{ max-width: 55%; }
  .apmL1Btn{ padding: 10px 10px; font-size: 13px; }
}

/* APM: make sure HTML [hidden] always wins (prevents "open but hidden" bugs) */
.apmMenu [hidden] { display: none !important; }


/* stack the chevrons vertically */
#apmMoreBtn .apmMoreIcon{
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}

/* default order: up then down */
#apmMoreBtn .apmMoreIconUp   { order: 1; }
#apmMoreBtn .apmMoreIconDown { order: 2; }

/* expanded order: down then up */
#apmMoreBtn[aria-expanded="true"] .apmMoreIconUp   { order: 2; }
#apmMoreBtn[aria-expanded="true"] .apmMoreIconDown { order: 1; }

/* ===== APM Category Side Nav (modern) ===== */
.apmCatNav{
  --apmNavBg: #ffffff;
  --apmNavBorder: rgba(16, 24, 40, .10);
  --apmNavText: #0f172a;
  --apmNavMuted: rgba(15, 23, 42, .70);
  --apmNavHover: rgba(15, 23, 42, .04);

  /* your existing page vibe: dark header + orange accent */
  --apmNavActiveBg: #111827;         /* near your header dark */
  --apmNavAccent: #f59e0b;           /* close to your orange button */

  background: linear-gradient(180deg, var(--apmNavBg), #f8fafc);
  border: 1px solid var(--apmNavBorder);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(2, 6, 23, .06);
}

/* optional: keep it nicely visible while scrolling */
@media (min-width: 992px){
  .apmCatNav{
    
    
  }
}

.apmCatNav__item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 11px 12px;
  text-decoration: none;
  color: var(--apmNavText);

  border-bottom: 1px solid rgba(16, 24, 40, .06);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.apmCatNav__item:last-child{ border-bottom: 0; }

.apmCatNav__item:hover{
  background: var(--apmNavHover);
  
}

.apmCatNav__label{
  font-weight: 650;
  font-size: 13px;
  line-height: 1.2;
}

.apmCatNav__chev{
  color: var(--apmNavMuted);
  font-size: 17px;
  line-height: 1;
  
}

/* Active state = dark pill feel + orange left bar */
.apmCatNav__item.is-active{
  background: linear-gradient(371deg, #1f2435, #eaeaea);
  color: #ffffff;
  position: relative;
}

.apmCatNav__item.is-active .apmCatNav__chev{
  color: var(--apmNavAccent);
}

.apmCatNav__item.is-active::before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: var(--apmNavAccent);
}

/* Children block: subtle inset panel so it feels “grouped” */
.apmCatNav__children{
  padding: 6px 8px 10px 8px;
  background: rgba(15, 23, 42, .02);
  border-bottom: 1px solid rgba(16, 24, 40, .06);
}

.apmCatNav__l2{
  border-radius: 10px;
  margin: 4px 0;
  border-bottom: 0;
  padding: 9px 10px 9px 34px;
  color: var(--apmNavMuted);
  background: transparent;
  position: relative;
  font-weight: 600;
}

/* small “dot” marker for L2 */
.apmCatNav__l2::after{
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, .25);
}

.apmCatNav__l2:hover{
  background: rgba(15, 23, 42, .05);
  color: var(--apmNavText);
}

.apmCatNav__l2.is-active{
  background: linear-gradient(180deg, #0b0d12eb, #38405b);
  color: #ffffff;
}

.apmCatNav__l2.is-active::after{
  background: var(--apmNavAccent);
}

/* keyboard focus (so it doesn’t look dead for non-mouse users) */
.apmCatNav__item:focus-visible{
  outline: 2px solid rgba(245, 158, 11, .65);
  outline-offset: -2px;
}
