/* Preserve the theme tree spacing, bullets and collapse controls. */
body#category .steelcore-category-nav .title_block {
    font-size: 14px;
    line-height: 1.4;
    text-transform: none;
    margin: 0 0 4px;
    padding: 0; 
}
body#category .steelcore-category-nav .title_block a {
    color: var(--steelcore-camo, #69643a);
    font-weight: 600;
}
body#category .steelcore-category-nav .title_block a::before,
body#category .steelcore-category-nav .title_block a::after {
    display: none;
}
/* Leave space for the theme's existing bullet and the collapse control. */
body#category .steelcore-category-nav .category-sub-menu > li {
    position: relative;
    padding-left: 20px;
}
body#category .steelcore-category-nav .category-sub-menu > li > a {
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 24px;
    line-height: 20px;
}
.steelcore-category-description [hidden] { display: none !important; }
#category-description.steelcore-category-description { max-height: none; overflow: visible; }
.steelcore-category-description .steelcore-description-preview { margin: 0 0 6px; }
.steelcore-category-description .steelcore-description-toggle {
    display: inline-block;
    padding: 3px 0;
    margin: 4px 0 0;
    border: 0;
    background: none;
    color: var(--steelcore-camo, #535b3e);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.steelcore-category-description button:focus-visible,
body#category .steelcore-category-nav a:focus-visible,
body#category .steelcore-category-nav [role="button"]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Match the live theme's 10px bullet to the compact 36px row. */
body#category .steelcore-category-nav .category-sub-menu > li::after {
    top: 13px;
}
body#category .steelcore-category-nav .collapse-icons,
body#category .steelcore-category-nav .arrows {
    height: 36px;
    line-height: 36px;
}

body#category .steelcore-category-back {
    margin-bottom: 14px;
}
body#category .steelcore-category-back > a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--steelcore-black, #202215);
    background: transparent;
    color: var(--steelcore-black, #202215);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-transform: uppercase;
    text-decoration: none;
}
body#category .steelcore-category-back > a:hover {
    background: var(--steelcore-camo, #69643a);
    border-color: var(--steelcore-camo, #69643a);
    color: var(--steelcore-white, #fff);
}
body#category .steelcore-category-back > a::before,
body#category .steelcore-category-back > a::after {
    display: none;
}

/* Keep breadcrumbs below the real header, including the dev environment banner. */
body#category #wrapper .steelcore-breadcrumb {
    height: auto;
    margin: 0 0 40px;
    padding: var(--steelcore-breadcrumb-offset, 160px) 0 24px;
    text-align: center;
}
body#category #wrapper .steelcore-breadcrumb ol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}
body#category #wrapper .steelcore-breadcrumb li {
    display: inline-flex;
    align-items: center;
}
body#category #wrapper .steelcore-breadcrumb a {
    color: inherit;
    text-decoration: none;
}
body#category #wrapper .steelcore-breadcrumb a:hover {
    text-decoration: underline;
}

body#category #wrapper .steelcore-breadcrumb li {
    margin: 0;
    padding: 0;
}
body#category #wrapper .steelcore-breadcrumb li::after {
    margin: 0 12px;
}
.block-category #category-description .steelcore-description-preview {
    margin: 0;
}
.block-category #category-description .steelcore-description-toggle {
    margin-top: 6px;
}
.steelcore-mobile-category-nav {
    display: none;
}
@media (max-width: 767px) {
    /* The original mobile header is in normal flow: do not apply desktop offsets. */
    body#category #wrapper .steelcore-breadcrumb {
        display: none !important;
        padding: 0;
        margin: 0;
    }
    body#category #left-column .steelcore-category-nav {
        display: none !important;
    }
    body#category #left-column .steelcore-mobile-category-nav {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 0 14px;
        padding: 0;
    }
    .steelcore-mobile-category-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 10px;
        font-size: 13px;
        line-height: 20px;
    }
    .steelcore-mobile-category-back {
        flex: 0 0 auto;
        padding: 6px 10px;
        border: 1px solid #d8d8d8;
        color: var(--steelcore-black, #202215);
        text-decoration: none;
    }
    .steelcore-mobile-category-title {
        min-width: 0;
        font-weight: 600;
        text-align: right;
        overflow-wrap: anywhere;
        color: var(--steelcore-camo, #69643a);
    }
    .steelcore-mobile-category-children {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    .steelcore-mobile-category-children > li {
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .steelcore-mobile-category-children > li > a {
        display: block;
        padding: 6px 9px;
        border: 1px solid #dedede;
        background: #f7f7f7;
        color: var(--steelcore-black, #202215);
        font-size: 13px;
        line-height: 18px;
        text-decoration: none;
        overflow-wrap: anywhere;
    }
    body#category .block-category,
    body#category .steelcore-category-description {
        min-width: 0;
        max-width: 100%;
    }
    body#category #category-description img,
    body#category #category-description video {
        max-width: 100%;
        height: auto;
    }
    body#category #category-description table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}

/* Compact sidebar title: override the theme's 20px title padding. */
body#category .steelcore-category-nav > .block_content {
    padding-top: 0;
}
body#category .steelcore-category-nav .category-top-menu {
    margin-top: 0;
}
/* Explicit separators; do not rely on positioned anchor pseudo-elements. */
body#category #wrapper .steelcore-breadcrumb li > a {
    padding: 0;
}
body#category #wrapper .steelcore-breadcrumb li > a::after,
body#category #wrapper .steelcore-breadcrumb li::after {
    content: none;
    display: none;
}
body#category #wrapper .steelcore-breadcrumb li + li::before {
    content: "/";
    display: inline-block;
    position: static;
    margin: 0 12px;
    padding: 0;
    color: #888;
    font-family: inherit;
    font-size: 8px;
    font-weight: 400;
    line-height: 20px;
}

/* Temporarily hide Back; retain the links for later use. */
body#category .steelcore-category-back,
body#category .steelcore-mobile-category-back {
    display: none !important;
}
body#category .steelcore-mobile-category-title {
    margin-left: auto;
}
/* Override the theme's first-paragraph margin, including :first-child. */
.block-category #category-description p.steelcore-description-preview,
.block-category #category-description p.steelcore-description-preview:first-child {
    margin: 0;
    padding: 0;
}
.block-category #category-description .steelcore-description-toggle {
    margin: 2px 0 0;
    padding: 0;
    font-size: calc(1em - 2px);
}

/* Back occupies the left column; equal side columns keep breadcrumbs centered. */
body#category #wrapper .steelcore-breadcrumb-row {
    display: grid;
    grid-template-columns: minmax(85px, 1fr) minmax(0, auto) minmax(85px, 1fr);
    align-items: center;
    column-gap: 12px;
    width: 100%;
}
body#category #wrapper .steelcore-breadcrumb-row > ol {
    min-width: 0;
    margin: 0 auto;
}
body#category #wrapper .steelcore-breadcrumb-row > .steelcore-breadcrumb-back {
    justify-self: start;
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--steelcore-black, #202215);
    color: var(--steelcore-black, #202215);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}
body#category #wrapper .steelcore-breadcrumb-row > .steelcore-breadcrumb-back::before,
body#category #wrapper .steelcore-breadcrumb-row > .steelcore-breadcrumb-back::after {
    display: none;
}
body#category #wrapper .steelcore-breadcrumb-row > .steelcore-breadcrumb-back:hover {
    color: var(--steelcore-white, #fff);
    background: var(--steelcore-camo, #69643a);
    border-color: var(--steelcore-camo, #69643a);
}
@media (max-width: 767px) {
    /* Mobile breadcrumbs remain hidden; Back uses the compact category bar. */
    body#category .steelcore-mobile-category-back {
        display: inline-block !important;
    }
}
