.souve-category-nav{--souve-category-fade-width:28px;--souve-category-scrollbar-width:none;--souve-category-scrollbar-display:none;--souve-category-bg:var(--souve-bg-surface,#fff);--souve-category-subtle:var(--souve-bg-surface-sunken,#f3f4f6);--souve-category-text:var(--souve-text-primary,#151218);--souve-category-muted:var(--souve-text-secondary,#6b7280);--souve-category-border:var(--souve-border,rgba(20,16,24,.14));--souve-category-active-bg:var(--souve-accent,var(--souve-text-primary,#1f1724));--souve-category-active-text:var(--souve-accent-contrast,var(--souve-bg-surface,#fff));--souve-category-active-row-bg:var(--souve-category-subtle);--souve-category-fade-color:var(--souve-bg-page,#fff);--souve-category-pill-bg:var(--souve-category-bg);--souve-category-pill-text:var(--souve-category-text);--souve-category-pill-border:var(--souve-category-border);--souve-category-pill-active-bg:var(--souve-category-active-bg);--souve-category-pill-active-text:var(--souve-category-active-text);--souve-category-tree-indent:22px;--souve-category-tree-line:color-mix(in srgb,var(--souve-category-border) 58%,transparent);--souve-category-active-accent:var(--souve-category-active-bg);--souve-category-active-accent-width:2px;position:relative;width:100%;min-width:0;box-sizing:border-box;color:var(--souve-category-text)}
.souve-category-nav[hidden],.souve-category-nav.is-empty{display:none!important}
/* Horizontal pills */
.souve-category-nav__scroller{width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scroll-behavior:smooth;scrollbar-width:var(--souve-category-scrollbar-width)}
.souve-category-nav__scroller::-webkit-scrollbar{display:var(--souve-category-scrollbar-display)}
.souve-category-nav__track{display:flex;align-items:center;width:max-content;min-width:100%;gap:8px}
.souve-category-nav__pill{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;min-height:38px;padding:9px 15px;border:1px solid var(--souve-category-pill-border);border-radius:999px;background:var(--souve-category-pill-bg);color:var(--souve-category-pill-text);text-decoration:none!important;line-height:1.2;white-space:nowrap;scroll-snap-align:start;transition:background-color .16s ease,color .16s ease,border-color .16s ease,opacity .16s ease}
.souve-category-nav__pill:is(:hover,:focus-visible){border-color:var(--souve-border-strong,currentColor)}
.souve-category-nav__pill.is-active,.souve-category-nav__pill[aria-current=page]{background:var(--souve-category-pill-active-bg);color:var(--souve-category-pill-active-text);border-color:var(--souve-category-pill-active-bg)}
.souve-category-nav__pill.is-loading{opacity:.6;pointer-events:none}
.souve-category-nav.has-edge-fade:before,.souve-category-nav.has-edge-fade:after{content:"";position:absolute;z-index:2;top:0;bottom:0;width:var(--souve-category-fade-width);pointer-events:none;opacity:0;transition:opacity .15s ease}
.souve-category-nav.has-edge-fade:before{left:0;background:linear-gradient(90deg,var(--souve-category-fade-color),transparent)}.souve-category-nav.has-edge-fade:after{right:0;background:linear-gradient(270deg,var(--souve-category-fade-color),transparent)}
.souve-category-nav.has-edge-fade.has-overflow-start:before,.souve-category-nav.has-edge-fade.has-overflow-end:after{opacity:1}

/* Desktop accordion tree — selected layout #5, final visual parity. */
.souve-category-nav--accordion-tree{
  --souve-category-tree-indent:18px;
  --souve-category-tree-top-row:44px;
  --souve-category-tree-child-row:30px;
  --souve-category-tree-highlight:color-mix(in srgb,var(--souve-category-active-bg) 7%,var(--souve-category-bg));
  --souve-category-tree-active:color-mix(in srgb,var(--souve-category-active-bg) 10%,var(--souve-category-bg));
  display:block;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  color:var(--souve-category-text);
  font-size:13px;
  line-height:1.25;
}
.souve-category-nav--accordion-tree ul,
.souve-category-nav--accordion-tree li{
  margin:0!important;
  padding:0!important;
  list-style:none!important;
  list-style-type:none!important;
  background:none!important;
  border:0!important;
}
.souve-category-nav--accordion-tree li::marker{content:""!important;font-size:0!important}
.souve-category-nav--accordion-tree li::before,
.souve-category-nav--accordion-tree li::after{content:none!important;display:none!important}
.souve-category-tree,
.souve-category-tree__children{display:block;width:100%;min-width:0}
.souve-category-tree__item{position:relative}
.souve-category-tree__row{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 24px;
  align-items:center;
  gap:7px;
  width:100%;
  min-width:0;
  min-height:var(--souve-category-tree-child-row);
  margin:0;
  padding:0 4px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--souve-category-text);
  box-shadow:none;
  transition:background-color .14s ease,color .14s ease;
}
.souve-category-tree__row.has-icon{grid-template-columns:22px minmax(0,1fr) auto 24px}
.souve-category-tree__item--depth-1>.souve-category-tree__row{
  min-height:var(--souve-category-tree-top-row);
  padding:0 4px;
  border-bottom:1px solid var(--souve-category-tree-line);
  font-weight:650;
}
.souve-category-tree__item--depth-1>.souve-category-tree__row.has-icon{grid-template-columns:22px minmax(0,1fr) auto 26px}
.souve-category-tree__item--depth-1:last-child>.souve-category-tree__row{border-bottom-color:transparent}
.souve-category-tree__link{
  display:flex;
  align-items:center;
  align-self:stretch;
  min-width:0;
  margin:0;
  padding:0;
  color:inherit!important;
  background:transparent!important;
  text-decoration:none!important;
  box-shadow:none!important;
}
.souve-category-tree__label{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.souve-category-tree__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  min-width:20px;
  margin:0;
  padding:0;
  overflow:visible;
  color:var(--souve-category-text);
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.souve-category-tree__icon img,
.souve-category-tree__icon svg,
.souve-category-tree__icon .souve-category-nav__icon-image{
  display:block!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.souve-category-tree__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:18px;
  min-height:18px;
  margin:0;
  padding:0 6px;
  border:0;
  border-radius:999px;
  background:var(--souve-category-subtle);
  color:var(--souve-category-muted);
  font-size:10px;
  font-weight:600;
  line-height:18px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.souve-category-tree__toggle,
.souve-category-tree__toggle-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  min-width:24px;
  margin:0;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--souve-category-muted);
  box-shadow:none;
}
.souve-category-tree__toggle{cursor:pointer}
.souve-category-tree__toggle:is(:hover,:focus-visible){
  background:var(--souve-category-subtle);
  color:var(--souve-category-text);
  outline:none;
}
.souve-category-tree__toggle:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb,var(--souve-category-active-bg) 28%,transparent)}
.souve-category-tree__toggle svg{display:block;width:12px;height:12px;transition:transform .15s ease}
/* Top-level chevron sits on the right; collapsed points right, expanded points up/down naturally. */
.souve-category-tree__item--depth-1>.souve-category-tree__row>.souve-category-tree__toggle svg{transform:rotate(-90deg)}
.souve-category-tree__item--depth-1.is-expanded>.souve-category-tree__row>.souve-category-tree__toggle svg{transform:rotate(0deg)}
/* Nested branch chevrons are placed before the label, matching layout #5. */
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__toggle,
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__toggle-placeholder{grid-column:1;grid-row:1}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__link{grid-column:2;grid-row:1}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__count{grid-column:3;grid-row:1}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__toggle svg{transform:rotate(-90deg)}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1).is-expanded>.souve-category-tree__row:not(.has-icon)>.souve-category-tree__toggle svg{transform:rotate(0deg)}
.souve-category-tree__children{
  position:relative;
  display:block;
  width:100%;
  margin:0!important;
  padding:3px 0 5px var(--souve-category-tree-indent)!important;
  overflow:visible;
}
.souve-category-tree__children[hidden]{display:none!important}
/* Vertical spine for each nested branch. */
.souve-category-tree.has-tree-lines .souve-category-tree__children::before{
  content:""!important;
  display:block!important;
  position:absolute;
  top:2px;
  bottom:8px;
  left:8px;
  width:1px;
  border:0;
  background:var(--souve-category-tree-line);
  pointer-events:none;
}
/* Horizontal elbow into each child row. */
.souve-category-tree.has-tree-lines .souve-category-tree__children>.souve-category-tree__item>.souve-category-tree__row::after{
  content:""!important;
  display:block!important;
  position:absolute;
  top:50%;
  left:calc(var(--souve-category-tree-indent) * -1 + 8px);
  width:10px;
  height:1px;
  background:var(--souve-category-tree-line);
  transform:translateY(-.5px);
  pointer-events:none;
}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row{
  min-height:var(--souve-category-tree-child-row);
  padding-right:2px;
  border:0;
  font-size:12px;
  font-weight:450;
}
.souve-category-tree__item:not(.souve-category-tree__item--depth-1)>.souve-category-tree__row:is(:hover,:focus-within){
  border-radius:6px;
  background:color-mix(in srgb,var(--souve-category-subtle) 72%,transparent);
}
.souve-category-tree__item--depth-1.is-expanded>.souve-category-tree__row,
.souve-category-tree__item--depth-1.is-active-path>.souve-category-tree__row{
  border-bottom-color:transparent;
  border-radius:6px;
  background:var(--souve-category-tree-highlight);
}
.souve-category-tree__item.is-active>.souve-category-tree__row{
  border-radius:6px;
  background:var(--souve-category-tree-active);
  font-weight:650;
}
.souve-category-tree__item.is-active>.souve-category-tree__row::before{
  content:"";
  position:absolute;
  top:6px;
  bottom:6px;
  left:0;
  width:var(--souve-category-active-accent-width,2px);
  border-radius:999px;
  background:var(--souve-category-active-accent,var(--souve-category-active-bg));
}
.souve-category-tree__item.is-active-path:not(.is-active)>.souve-category-tree__row>.souve-category-tree__link{font-weight:600}
.souve-category-tree__item--depth-1.is-expanded>.souve-category-tree__children{padding-bottom:7px!important}
html[data-souve-theme=dark] .souve-category-nav--accordion-tree{
  --souve-category-tree-line:color-mix(in srgb,var(--souve-category-border) 72%,transparent);
  --souve-category-tree-highlight:color-mix(in srgb,var(--souve-category-active-bg) 14%,var(--souve-category-bg));
  --souve-category-tree-active:color-mix(in srgb,var(--souve-category-active-bg) 18%,var(--souve-category-bg));
}
@media(prefers-reduced-motion:reduce){
  .souve-category-tree__row,.souve-category-tree__toggle svg{transition:none}
}
