/* Sub-category selector - shown under the category header on category pages, listing the
   current category's real subcategories (Category.ParentId). See _SubCategorySelector.cshtml
   and sub-category-selector.js for the pushState/AJAX navigation wired to each item. */

/* Items float in a centered row and wrap onto more rows as needed - no breakpoint tuning:
   .sub-category-item has a fixed width below, so however many fit per row at the current
   screen width, they stay uniform regardless of caption length. */
.sub-category-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 0.75rem;
    margin: 0.5rem 0 1.5rem;
}

.sub-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 84px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.sub-category-item:hover {
    text-decoration: none;
    color: inherit;
}

.sub-category-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-light);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* slicons.css sprites are 48x48 natively; scaling via transform (rather than width/height)
   keeps the sprite's background-position lookup correct so it doesn't bleed into the
   neighboring icon in the strip. Scaled down to ~38px so it sits inside the 60px circle with
   visible padding, rather than filling it edge-to-edge. */
.sub-category-icon-circle .slicon {
    transform: scale(0.8);
}

.sub-category-caption {
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    opacity: 0.85;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.sub-category-item:hover .sub-category-icon-circle {
    box-shadow: 0 0 0 2px var(--highlight-color);
}

.sub-category-item:hover .sub-category-caption {
    opacity: 1;
}

.sub-category-item:focus-visible .sub-category-icon-circle {
    outline: none;
    box-shadow: 0 0 0 2px var(--highlight-color);
}

.sub-category-item.selected .sub-category-icon-circle {
    background-color: var(--highlight-color);
}

.sub-category-item.selected .sub-category-caption {
    color: var(--highlight-color);
    opacity: 1;
}
