/* Approved Grouped navigation; scoped to the existing desktop shell. */
.vgm-sidebar,
.vgm-brand {
  --vgm-surface: #fff;
  --vgm-text: #526078;
  --vgm-heading: #241d32;
  --vgm-purple: #9069ae;
  --vgm-highlight: #f3ecfc;
  --vgm-hover: #faf7fd;
  --vgm-line: #ebe4f2;
  --vgm-muted: #80738d;
}
html[data-vrool-theme="dark"] :is(.vgm-sidebar,.vgm-brand),
body[data-theme="dark"] :is(.vgm-sidebar,.vgm-brand) {
  --vgm-surface: #211e28;
  --vgm-text: #e1dbe9;
  --vgm-heading: #f4eefb;
  --vgm-purple: #c3a0e1;
  --vgm-highlight: #392c49;
  --vgm-hover: #2a2533;
  --vgm-line: #43374f;
  --vgm-muted: #b8aabe;
}
.vgm-sidebar .vgm-panel[hidden] { display: none !important; }
.vshell-sidebar.vgm-sidebar { display:none; }
.vgm-icon,
.vgm-chevron,
.vgm-brand-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (min-width:768px) {
  /* The same primary navigation serves every desktop section. Local filters remain in the page. */
  body:not(#home):has(.vgm-sidebar) {
    --vshell-offset:0px;
    padding-left:var(--vsw,clamp(198px,14vw,232px)) !important;
    padding-right:0 !important;
    box-sizing:border-box;
  }
  body:not(#home):not(#vrool-search):not(.vrool-view):has(.vgm-sidebar) { padding-top:64px !important; }
  body:not(#home):has(.vgm-sidebar) > header.vshell-topbar { display:flex !important;top:0 !important; }
  body:has(.vgm-sidebar) :is(.vapp-nav,.spd-lnav,.vstream-nav) { display:none !important; }
  .vshell-topbar-logo.vgm-brand,
  .vshell-topbar-logo.vgm-brand:hover,
  .vshell-topbar-logo.vgm-brand:focus {
    gap: 8px;
    color: var(--vgm-purple);
    text-decoration: none;
  }
  .vgm-brand .vgm-brand-icon { width: 25px; height: 25px; flex: 0 0 25px; }
  .vgm-brand .vgm-wordmark { font: italic 500 34px/1.1 Georgia,serif; letter-spacing: -1.5px; }
  .vshell-sidebar.vgm-sidebar {
    display:flex !important;
    flex-direction:column;
    position:fixed;
    top:var(--vgm-header-height,64px);
    bottom:0;
    left:var(--vshell-offset,0px);
    width:var(--vsw,clamp(198px,14vw,232px));
    z-index:1000;
    overflow-y:auto;
    box-sizing:border-box;
    border-right:1px solid var(--vgm-line);
    background: var(--vgm-surface);
    color: var(--vgm-text);
    border-right-color: var(--vgm-line);
    padding: 16px 12px;
  }
  .vgm-sidebar .vgm-caption {
    margin: 0;
    padding: 0 10px 9px;
    color: var(--vgm-muted);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .vgm-sidebar .vgm-nav { display:flex;flex-direction:column;gap:3px; }
  .vgm-sidebar .vgm-item {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--vgm-text);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-decoration: none !important;
  }
  .vgm-sidebar button.vgm-item { cursor: pointer; }
  .vgm-sidebar .vgm-item:hover { background: var(--vgm-hover); color: var(--vgm-purple); }
  .vgm-sidebar .vgm-item.is-active { background: var(--vgm-highlight); color: var(--vgm-purple); font-weight: 500; }
  .vgm-sidebar .vgm-label { min-width: 0; flex: 1 1 auto; }
  .vgm-sidebar .vgm-icon { width: 21px; height: 21px; flex: 0 0 21px; }
  .vgm-sidebar .vgm-chevron { width: 13px; height: 13px; flex: 0 0 13px; margin-left: auto; transition: transform .16s ease; }
  .vgm-sidebar .vgm-toggle.is-open > .vgm-chevron { transform: rotate(180deg); }
  .vgm-sidebar .vgm-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 9px;
    margin: 5px 2px 8px 19px;
    border-left: 1px solid var(--vgm-line);
  }
  .vgm-sidebar .vgm-child { min-height: 36px; padding: 8px; gap: 8px; border-radius: 8px; font-size: 12px; }
  .vgm-sidebar .vgm-child .vgm-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .vgm-sidebar .vgm-shop { margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--vgm-line); }
  .vgm-sidebar .vgm-shop > .vgm-item { font-size: 12px; gap: 8px; }
  .vgm-sidebar .vgm-account {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 8px 0;
    margin-top: 13px;
    border-top: 1px solid var(--vgm-line);
    color: var(--vgm-heading);
    text-decoration: none !important;
  }
  .vgm-sidebar .vgm-account-avatar { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: 0 0 30px; background: var(--vgm-highlight); color: var(--vgm-purple); border-radius: 50%; }
  .vgm-sidebar .vgm-account-avatar .vgm-icon { width: 17px; height: 17px; }
  .vgm-sidebar .vgm-account-label { font-size: 12px; min-width: 0; }
  .vgm-sidebar .vgm-account-label small { display: block; margin-top: 1px; font-size: 10px; color: var(--vgm-muted); }
  .vgm-sidebar .vshell-badge {margin-left:auto;background:#b48bda;color:#fff;font-size:10px;font-weight:800;min-width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;font-style:normal;}
  .vgm-sidebar .vshell-pro {display:block;flex:0 0 auto;margin-top:17px;padding:14px;border-radius:14px;background:linear-gradient(160deg,#f6edff,#ede9fe);border:1px solid #e9d5ff;text-decoration:none;}
  .vgm-sidebar .vshell-pro-t {font-size:12px;font-weight:800;color:#6b3fa0;display:flex;align-items:center;gap:6px;}
  .vgm-sidebar .vshell-pro-s {font-size:10.5px;color:#b48bda;margin:3px 0 9px;}
  .vgm-sidebar .vshell-pro-btn {display:inline-block;padding:6px 14px;border-radius:999px;background:#b48bda;color:#fff;font-size:11.5px;font-weight:700;}
  .vgm-sidebar::-webkit-scrollbar {width:1px;}
  .vgm-sidebar::-webkit-scrollbar-track {background:transparent;}
  .vgm-sidebar::-webkit-scrollbar-thumb {background:#e2d8f5;border-radius:999px;}
}
@media (min-width:901px) {
  body:has(.vgm-sidebar) .vstream-left { display:none !important; }
  body:has(.vgm-sidebar) .vstream-wrap { grid-template-columns:minmax(0,1fr) 300px !important; }
  body:has(.vgm-sidebar) .vstream-main { grid-column:1 !important; }
  body:has(.vgm-sidebar) .vstream-right { grid-column:2 !important; }
}
@media (min-width:768px) and (max-width:1050px) {
  /* Keep Community actions readable beside both navigation and local filters. */
  body:has(.vgm-sidebar) .cp-post-actions { flex-wrap:wrap;row-gap:8px; }
  body:has(.vgm-sidebar) .cp-actions-left { flex:1 1 100%;min-width:0;flex-wrap:wrap; }
  body:has(.vgm-sidebar) .cp-actions-right { flex:1 1 100%;min-width:0;justify-content:flex-end; }
  body:has(.vgm-sidebar) :is(.cp-act-btn,.cp-share-wrap) { flex:0 0 auto;white-space:nowrap; }
}
@media (max-width:767px) {
  .vshell-sidebar.vgm-sidebar { display:none !important; }
}
@media (min-width:768px) and (pointer:coarse) {
  .vgm-sidebar .vgm-child { min-height: 44px; }
}
@media (prefers-reduced-motion:reduce) {
  .vgm-sidebar .vgm-chevron { transition: none; }
}

/* Item details use the full content band beside the listing information. */
@media (min-width:768px) {
  body#item:has(.vgm-sidebar) { padding-left:0 !important; }
  body#item .vshell-sidebar.vgm-sidebar { display:none !important; }
}
