/* Parent categories contain native WHMCS product-group links. */
/* Native cart categories stay open, including after WHMCS's mobile minimise pass.
   The menu-name fallback also covers markup rendered by the parent order form. */
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) {
    padding:18px 14px; border:1px solid var(--pa-border); border-radius:18px;
    background:var(--pa-surface); box-shadow:0 6px 24px rgb(22 54 89 / 4%);
    overflow:hidden;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) > .panel-heading {
    padding:0 4px 14px; margin:0 0 12px; background:transparent;
    border:0; border-bottom:1px solid var(--pa-border); border-radius:0;
    color:var(--pa-primary); cursor:default;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .panel-title {
    margin:0; font-size:15px; font-weight:700; line-height:1.7; color:inherit;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) > .panel-heading i {
    display:none !important;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) > :is(.list-group,.panel-body) {
    display:block !important; height:auto !important; max-height:none !important;
    opacity:1 !important; overflow:visible !important; margin:0; padding:0;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .list-group-item {
    display:flex; align-items:center; gap:10px; min-height:46px;
    padding:10px 14px; margin:0 0 6px; border:1px solid transparent;
    border-inline-start:3px solid transparent; border-radius:11px;
    background:var(--pa-subtle); color:var(--pa-primary);
    font-size:13px; line-height:1.7; overflow-wrap:anywhere; text-decoration:none;
    transition:background-color .18s,border-color .18s,color .18s;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .list-group-item:last-child { margin-bottom:0; }
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .list-group-item:is(:hover,:focus-visible,.active) {
    background:color-mix(in srgb,var(--brand-blue) 10%,var(--pa-surface));
    color:var(--brand-blue); border-color:var(--pa-border);
    border-inline-start-color:var(--brand-green); box-shadow:none;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .list-group-item:focus-visible {
    outline:2px solid var(--brand-blue); outline-offset:2px;
}
.pa-theme .panel-sidebar:is(.pa-store-group-panel,[menuItemName="Categories"]) .list-group-item.active { font-weight:700; }
.pa-theme #order-standard_cart .panel:has(select[onchange*="selectChangeNavigate"]) { display:none !important; }
.pa-theme .panel-sidebar[menuItemName="Store Actions"],
.pa-theme .panel-sidebar:has(> .list-group > a:only-child[href*="cart.php?a=view"]) { display:none !important; }
.pa-theme .phm-store-categories { margin:16px 0 24px; padding:22px 16px; background:#fff; border:1px solid #edf0f2; border-radius:20px; box-shadow:0 8px 25px #18365804; }
.pa-theme .phm-store-categories h2 { margin:0 0 18px; font-size:17px; font-weight:600; color:#152d44; }
.pa-theme .phm-store-categories ul { list-style:none; padding:0; margin:0; }
.pa-theme .phm-store-category { margin:0 0 2px; border-radius:10px; background:var(--category-bg,#fff); color:var(--category-text,#173858); }
.pa-theme .phm-store-parent,.pa-theme .phm-store-category a { display:flex; align-items:center; gap:11px; padding:7px 3px; min-height:42px; line-height:1.6; font-size:13px; color:inherit; text-decoration:none; }
.pa-theme .phm-store-parent { font-weight:400; cursor:pointer; list-style:none; }
.pa-theme .phm-store-parent::-webkit-details-marker { display:none; }
.pa-theme .phm-category-chevron { margin-inline-start:auto; color:var(--pa-muted); font-size:10px; }
.pa-theme details[open]>.phm-store-parent .phm-category-chevron { transform:rotate(180deg); }
.pa-theme .phm-store-symbol svg { display:block; width:26px; height:26px; max-width:26px; max-height:26px; overflow:hidden; flex:none; }
.pa-theme .phm-store-symbol>i { width:26px; text-align:center; font-size:22px; line-height:1; }
.pa-theme .phm-store-category>details>ul { margin-inline-start:15px; padding-inline-start:10px; }
.pa-theme .phm-store-symbol { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; padding:0; box-sizing:border-box; line-height:1; background:var(--category-accent,#4775ff); color:var(--category-icon,#fff); border-radius:50%; font-size:13px; }
.pa-theme .phm-store-category a { border-radius:10px; padding-inline:7px; background:transparent; }
.pa-theme .phm-store-parent>span:not(.phm-store-symbol) { flex:1; min-width:0; overflow-wrap:anywhere; }
.pa-theme .phm-store-child .phm-store-symbol { background:color-mix(in srgb,var(--category-accent) 14%,var(--pa-surface,#fff)); color:var(--category-accent); }
.pa-theme .phm-store-category a:hover,.pa-theme .phm-store-category a[aria-current=page] { box-shadow:inset 0 0 0 1px var(--child-accent,var(--category-accent)); }
.pa-theme .phm-store-category a:focus-visible { outline:2px solid var(--child-accent,var(--category-accent)); outline-offset:2px; }
.pa-theme .phm-store-parent>span:last-child,.pa-theme .phm-store-category a>span:last-child { overflow-wrap:anywhere; }
.pa-theme .phm-store-parent:focus-visible { outline:2px solid var(--category-accent); outline-offset:2px; border-radius:10px; }
/* Fallback placement before the shared navigation script mounts categories. */
.pa-theme #paStoreCategoriesMount { margin-block:0 20px; }
.pa-theme #order-standard_cart .cart-sidebar>.phm-store-categories { margin:0; padding:20px 14px; background:var(--pa-surface); border-color:var(--pa-border); }
.pa-theme #order-standard_cart .phm-store-categories h2 { color:var(--pa-primary); font-size:15px; }
.pa-theme #order-standard_cart .phm-store-category { background:transparent; }
.pa-theme #order-standard_cart .phm-store-child { color:var(--pa-primary); background:var(--pa-subtle); margin-block:4px; }
.pa-theme #order-standard_cart .phm-store-child-custom { color:var(--category-text); background:var(--category-bg); }
.pa-theme #order-standard_cart .phm-store-child[aria-current=page] { font-weight:700; box-shadow:inset 0 0 0 1px var(--child-accent,var(--category-accent)); }
.pa-theme #order-standard_cart .phm-store-child .phm-store-symbol { color:var(--category-icon); background:var(--category-accent); }
.pa-theme .phm-category-chevron { transition:transform .22s ease; }
.pa-theme .phm-store-category details.pa-category-animating { overflow:hidden; }
.pa-theme .pa-directory-card.pa-group-custom-style { background:var(--group-bg); color:var(--group-text); }
.pa-theme .pa-directory-card.pa-group-custom-style h3 a { color:var(--group-text); }
.pa-theme .pa-directory-card.pa-group-custom-style .pa-directory-icon { background:var(--group-accent); color:var(--group-icon); }
.pa-theme .pa-directory-card.pa-group-custom-style .pa-directory-plans { color:var(--group-accent); background:color-mix(in srgb,var(--group-accent) 10%,var(--pa-surface)); }
.pa-theme :is(.pa-directory-icon,.phm-group-icon) svg { display:block; width:22px; height:22px; max-width:22px; max-height:22px; }
@media (max-width:800px) {
    .pa-theme #order-standard_cart>.row>.cart-sidebar.pa-grouped-cart-sidebar { display:block; flex:none; width:100%; }
}
@media (prefers-reduced-motion:reduce) {
    .pa-theme .phm-category-chevron { transition:none; }
}
