/* Catalogue emphasis. Navigation markup and hierarchy are unchanged. */
.purchase-tree {
    --ink: #253f58;
    --muted: #486278;
    --line: #cad7e2;
    --accent: #8b4514;
    border-color: #c5d2df;
    border-radius: 10px;
    background: #eef3f7;
    box-shadow: 0 5px 16px rgba(35, 61, 85, .10);
}
.purchase-tree h2 {
    gap: 11px;
    padding: 19px 16px 17px;
    border-bottom: 3px solid #f58220;
    border-radius: 9px 9px 0 0;
    background: #2b4667;
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
}
.purchase-tree h2 svg { width: 21px; height: 21px; color: #ffbc80; }
.purchase-tree .catalogue-groups { padding: 9px; }
.purchase-tree .catalogue-groups > li + li { margin-top: 6px; }
.purchase-tree .catalogue-group > summary {
    min-height: 58px;
    padding: 11px 12px;
    gap: 9px;
    border: 1px solid #d5dfe8;
    border-radius: 6px;
    background: #fff;
    color: #263f56;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.35;
    transition: background-color .15s ease, border-color .15s ease;
}
.purchase-tree .catalogue-group > summary > span:first-child { min-width: 0; }
.purchase-tree .catalogue-group > summary::after {
    width: 7px;
    height: 7px;
    border-width: 0 2px 2px 0;
    border-color: #496883;
    margin-right: 1px;
}
.purchase-tree .catalogue-count {
    flex: none;
    min-width: 27px;
    padding: 3px 6px;
    border-radius: 5px;
    background: #e9eff5;
    color: #3d5970;
    font-size: 12px;
    font-weight: bold;
}
.purchase-tree .catalogue-group > summary:hover {
    background: #f8fbfd;
    border-color: #849fb6;
}
.purchase-tree .catalogue-group:has(a[aria-current="page"]) > summary,
.purchase-tree .catalogue-group[open] > summary {
    border-color: #e5b68d;
    background: #fff0e1;
    color: #753b11;
    box-shadow: inset 4px 0 #ed8226;
}
.purchase-tree .catalogue-group:has(a[aria-current="page"]) > summary .catalogue-count,
.purchase-tree .catalogue-group[open] > summary .catalogue-count {
    background: #ffe0bf;
    color: #753b11;
}
.purchase-tree .catalogue-group:has(a[aria-current="page"]) > summary::after,
.purchase-tree .catalogue-group[open] > summary::after { border-color: #9a4f15; }
.purchase-tree .catalogue-panel { padding: 8px; }
.purchase-tree .catalogue-panel-heading {
    margin: 0 0 7px;
    padding: 13px 12px 10px;
    border: 0;
    border-bottom: 2px solid #ed8226;
    border-radius: 5px 5px 0 0;
    background: #edf3f8;
}
.purchase-tree .catalogue-panel-heading strong { font-size: 19px; }
.purchase-tree .catalogue-kicker { color: #4f687d; }
.purchase-tree .catalogue-panel-heading a { margin-top: 6px; font-size: 14px; }
.purchase-tree .catalogue-material > summary,
.purchase-tree .catalogue-leaf { min-height: 44px; font-size: 15px; }
.purchase-tree .catalogue-material[open] > summary { background: #eaf0f6; color: #253f58; }
.purchase-tree .catalogue-products { border-left-color: #c0cfdd; }
.purchase-tree .catalogue-products a { min-height: 38px; font-size: 14px; }
.purchase-tree a[aria-current="page"] { background: #fff0e1; color: #753b11; }
.purchase-tree summary:focus-visible,
.purchase-tree a:focus-visible { outline: 3px solid #2b638d; outline-offset: -3px; }
@media (min-width: 981px) {
    .purchase-tree[data-flyouts] .catalogue-panel {
        border-color: #b9cbd9;
        border-radius: 9px;
        box-shadow: 0 10px 32px rgba(29, 51, 72, .20);
    }
}
@media (max-width: 980px) {
    .purchase-mobile-catalogue > summary {
        min-height: 52px;
        padding: 14px 16px;
        border: 1px solid #2b4667;
        border-bottom: 3px solid #f58220;
        border-radius: 7px;
        background: #2b4667;
        color: #fff;
        font-size: 17px;
        line-height: 1.4;
        font-weight: bold;
    }
    .purchase-mobile-catalogue > summary::after { color: #ffbc80; font-size: 22px; line-height: 1; }
    .purchase-mobile-catalogue > summary:focus-visible { outline-color: #c36a1f; }
    .purchase-mobile-catalogue[open] > summary { border-radius: 7px 7px 0 0; }
    .purchase-mobile-catalogue[open] > .purchase-tree { border-top: 0; border-radius: 0 0 9px 9px; }
    .purchase-mobile-catalogue[open] > .purchase-tree h2 { display: none; }
    .purchase-tree .catalogue-panel { margin: 5px 2px 8px 7px; padding: 6px; border-left: 2px solid #c5d3df; border-radius: 0 0 5px 5px; }
    .purchase-tree .catalogue-panel-heading { margin: 0 0 6px; padding: 5px 6px 8px; }
    .purchase-tree .catalogue-panel-heading a { margin-top: 0; }
    .purchase-tree .catalogue-products a { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .purchase-tree .catalogue-group > summary { transition: none; }
}

/* Desktop uses two independent flyout columns; touch layouts stay inline. */
@media (min-width: 981px) {
    .purchase-tree[data-flyouts] .catalogue-products {
        position: fixed;
        z-index: 26;
        box-sizing: border-box;
        margin: 0;
        padding: 8px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid #b9cbd9;
        border-top: 3px solid #ed8226;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 10px 32px rgba(29, 51, 72, .20);
    }
    .purchase-tree[data-flyouts] .catalogue-products a { padding: 10px 12px; }
    .purchase-tree[data-flyouts] .catalogue-products .catalogue-overview {
        margin-bottom: 5px;
        border-bottom: 1px solid #d5dfe8;
        border-radius: 4px 4px 0 0;
        background: #edf3f8;
    }
    .purchase-tree[data-flyouts] .catalogue-group > summary::after,
    .purchase-tree[data-flyouts] .catalogue-material > summary::after {
        transform: rotate(-45deg);
    }
    .purchase-tree[data-flyouts] details[open][data-flyout-side="left"] > summary::after {
        transform: rotate(135deg);
    }
}

@media (min-width: 981px) and (max-width: 1199px) {
    .purchase-tree .catalogue-group > summary {
        padding-right: 10px;
        padding-left: 10px;
        gap: 6px;
        font-size: 14px;
    }
    .purchase-tree .catalogue-group > summary > span:first-child {
        overflow-wrap: normal;
        word-break: normal;
    }
    .purchase-tree .catalogue-count { min-width: 24px; padding-right: 4px; padding-left: 4px; }
}
