.catalog-root-tiles__cell {
    box-sizing: border-box;
    padding-inline: .75rem;
    margin-bottom: 1.5rem;
    width: 50%;
}

@media (min-width: 880px) {
    .catalog-root-tiles__cell {
        width: 25%;
    }
}

@media (min-width: 992px) {
    .catalog-root-tiles__cell {
        width: 16.666667%;
    }
}

.catalog-root-tiles--mobile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.25rem), 1fr));
    gap: .75rem;
    margin-block: 1rem;
}

.catalog-root-tiles--mobile .catalog-root-tiles__cell {
    width: auto;
    padding: 0;
    margin: 0;
}

.catalog-root-tile {
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #dedfe1;
    border-radius: .375rem;
    background: white;
    color: #001d3a;
    text-align: center;
    text-decoration: none;
}

.catalog-root-tile:hover,
.catalog-root-tile:focus-visible {
    border-color: #3275ee;
    color: #225eca;
}

.catalog-root-tile__image {
    display: block;
    position: relative;
    aspect-ratio: 1;
    background: white url("/resources/portal/img/icon-category.svg") center / 2.5rem no-repeat;
}

.catalog-root-tile__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    background: white;
}

.catalog-root-tile__label {
    box-sizing: border-box;
    height: 61px;
    padding: 0 .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    font-weight: 500;
    line-height: 1.25;
}

.catalog-root-tile__label > span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.catalog-metal-tree {
    overflow-wrap: anywhere;
}

.catalog-metal-tree__toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding-right: .75rem;
    cursor: pointer;
    list-style: none;
}

/* Match the 2px .btn border inset used by adjacent sidebar arrows. */
.sidebar .catalog-metal-tree__toggle {
    padding-right: 2px;
}

.catalog-metal-tree__toggle::-webkit-details-marker {
    display: none;
}

summary.catalog-metal-tree__toggle::after {
    content: "";
    width: .75rem;
    height: .4375rem;
    background: url("/resources/portal/img/icon-down.svg") center / contain no-repeat;
}

summary.catalog-metal-tree__toggle::after {
    flex: none;
    margin-left: auto;
}

.catalog-metal-tree details[open] > summary::after {
    transform: rotate(180deg);
}

.catalog-metal-tree__children {
    padding-left: .875rem;
}

.catalog-metal-tree__standalone {
    display: flex;
    align-items: center;
    gap: .25em;
    min-height: 2.75rem;
}

.catalog-metal-tree__toggle,
.catalog-metal-tree__standalone {
    color: #001d3a;
    font-weight: 500;
}

.sidebar .catalog-metal-tree :is(.catalog-metal-tree__toggle, .catalog-metal-tree__standalone) {
    font-family: inherit;
    font-size: 16px;
    line-height: 26px;
}

.catalog-metal-tree__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-metal-tree__links > .sidebar__links__item {
    margin-bottom: 0;
}

.catalog-metal-tree__sublink {
    display: block;
    box-sizing: border-box;
    padding-block: .5rem;
    font-size: 14px;
    line-height: 22px;
}

.catalog-metal-tree__sublink span {
    color: #646464;
    white-space: nowrap;
}

.catalog-metal-tree a[aria-current="page"],
.catalog-metal-tree .is-active {
    color: #225eca;
    font-weight: 600;
}

.catalog-metal-tree__toggle:hover {
    color: #225eca;
}

.catalog-metal-tree :is(summary, a):focus-visible {
    outline: 2px solid #276eea;
    outline-offset: -2px;
}
