/* PandaDigit v1.3.2: desktop root-hover menu, one root rail + two descendant columns. */
.pd-header .pd-cat-nav__mega { display: none; }
@media (min-width: 841px) {
  .pd-header .pd-cat-nav__panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: min(900px, calc(100vw - 28px));
    max-height: min(64vh, 550px);
    overflow: hidden;
    padding: 0;
    border-radius: 14px;
  }
  /* The same data feeds both views, but the mobile accordion is hidden on desktop. */
  .pd-header .pd-cat-nav__panel > .pd-cat-nav__mobile-list { display: none !important; }
  .pd-header .pd-cat-nav__mega { display: block; width: 100%; }
  .pd-header .pd-cat-nav__mega-shell {
    display: grid;
    grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
    min-height: 250px;
    height: min(64vh, 550px);
    max-height: min(64vh, 550px);
    direction: rtl;
  }
  .pd-header .pd-cat-nav__mega ul {
    position: static;
    display: block;
    width: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    list-style: none;
    overflow: visible;
  }
  .pd-header .pd-cat-nav__mega li,
  .pd-header .pd-cat-nav__mega li:hover,
  .pd-header .pd-cat-nav__mega li:focus-within {
    position: static;
    display: block;
    min-width: 0;
  }
  .pd-header .pd-cat-nav__mega li > ul,
  .pd-header .pd-cat-nav__mega li:hover > ul,
  .pd-header .pd-cat-nav__mega li:focus-within > ul { display: block; }
  .pd-header .pd-cat-nav__mega a {
    display: block;
    min-width: 0;
    flex: none;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .pd-header .pd-cat-nav__mega .pd-cat-nav__roots {
    min-height: 0;
    align-self: stretch;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--border, #e9eaf2);
    background: var(--surface, #f8f9fc);
    scrollbar-width: thin;
  }
  .pd-header .pd-cat-nav__mega a.pd-cat-nav__root-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    border-right: 3px solid transparent;
    color: var(--ink, #13213c);
    direction: rtl;
  }
  .pd-header .pd-cat-nav__root-link .pd-cat-nav__root-label {
    text-align: right;
    min-width: 0;
    flex: 1 1 auto;
  }
  .pd-header .pd-cat-nav__root-link .pd-cat-nav__root-chevron {
    display: inline-flex;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
    margin-inline-start: auto;
    color: var(--muted, #7b8499);
    line-height: 1;
  }
  .pd-header .pd-cat-nav__root-link .pd-cat-nav__root-chevron svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: none;
  }
  .pd-header .pd-cat-nav__root.is-active > .pd-cat-nav__root-link,
  .pd-header .pd-cat-nav__root-link:hover,
  .pd-header .pd-cat-nav__root-link:focus-visible {
    background: #fff;
    color: var(--violet, #9b51e0);
    border-right-color: var(--violet, #9b51e0);
  }
  .pd-header .pd-cat-nav__content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    background: #fff;
    min-width: 0;
  }
  .pd-header .pd-cat-nav__pane[hidden] { display: none !important; }
  .pd-header .pd-cat-nav__pane { padding: 18px 20px; }
  .pd-header .pd-cat-nav__pane-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--divider, #edf0f6);
  }
  .pd-header .pd-cat-nav__pane-header strong { font-size: 14px; font-weight: 800; }
  .pd-header .pd-cat-nav__pane-header a {
    font-size: 11px;
    color: var(--violet, #9b51e0);
    padding: 0;
  }
  .pd-header .pd-cat-nav__branches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: start;
  }
  .pd-header .pd-cat-nav__branch { min-width: 0; break-inside: avoid; }
  .pd-header .pd-cat-nav__branch-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink, #13213c);
    padding: 3px 6px 7px;
    line-height: 1.7;
  }
  .pd-header .pd-cat-nav__mega .pd-cat-nav__descendants { padding-right: 10px; }
  .pd-header .pd-cat-nav__descendants a {
    padding: 5px 7px;
    font-size: 12px;
    font-weight: 450;
    color: var(--ink, #13213c);
    border-radius: 6px;
    line-height: 1.65;
  }
  .pd-header .pd-cat-nav__descendants .pd-cat-nav__descendants {
    margin-right: 8px;
    padding-right: 10px;
    border-right: 1px solid var(--divider, #edf0f6);
  }
  .pd-header .pd-cat-nav__mega a:hover,
  .pd-header .pd-cat-nav__mega a:focus-visible { color: var(--violet, #9b51e0); }
  .pd-header .pd-cat-nav__branch-title:hover,
  .pd-header .pd-cat-nav__descendants a:hover,
  .pd-header .pd-cat-nav__descendants a:focus-visible {
    background: var(--surface, #f8f9fc);
  }
  .pd-header .pd-cat-nav__empty { color: var(--muted, #7b8499); font-size: 12px; }
}
/* No desktop columns are introduced at mobile widths; preserve the original accordion. */
@media (max-width: 840px) {
  .pd-header .pd-cat-nav__mega { display: none !important; }
  .pd-header .pd-cat-nav__panel > .pd-cat-nav__mobile-list { display: block; }
  .pd-header .pd-cat-nav__mobile-list li li > a { padding-right: 15px; }
  .pd-header .pd-cat-nav__mobile-list li li li > a { padding-right: 22px; }
}
