/* All shopping categories remain reachable in the expanded catalog menu. */
.pm-mega{max-height:min(70vh,680px);overflow:auto;overscroll-behavior:contain;align-items:start}
@media(max-width:760px){.pm-mega{max-height:calc(100dvh - 170px)}}

@media(max-width:760px){.pm-landing-links>div{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:5px;scrollbar-width:thin}.pm-landing-links a{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}}

/* Each category flows independently; a short list no longer reserves a tall grid row. */
.pm-mega{display:block;overflow-x:hidden;overflow-y:auto}
.pm-mega-quick{display:flex;align-items:center;flex-wrap:wrap;gap:10px 24px;margin-bottom:22px;padding-bottom:16px;border-bottom:1px solid var(--pm-border)}
.pm-mega-quick>a:first-child{font-size:14px;font-weight:600}
.pm-mega-quick>a:last-child{font-size:12px;color:var(--pm-muted)}
.pm-mega-groups{column-count:3;column-gap:28px}
.pm-mega-groups>section{break-inside:avoid;page-break-inside:avoid;margin:0 0 24px;min-width:0}
.pm-mega-groups>section a{overflow-wrap:anywhere}
@media(max-width:760px){
  .pm-mega-quick{gap:8px 18px;margin-bottom:18px;padding-bottom:12px}
  .pm-mega-quick>a:first-child{font-size:12px}
  .pm-mega-quick>a:last-child{font-size:11px}
  .pm-mega-groups{column-count:2;column-gap:20px}
  .pm-mega-groups>section{margin-bottom:20px}
  /* Explicit viewport bounds are needed with align-self:start on the fixed sidebar. */
  .pm-sidebar{height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;min-height:0;align-self:stretch;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))}
  .pm-filter-heading{position:sticky;top:-22px;z-index:5;background:var(--pm-paper);padding:16px 0 12px;margin-top:-16px}
}
