/* Category rail — redesigned as image-led category tiles */

body:not(:has(.admin-shell)) .quick-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    overflow: visible;
    padding: 2px 2px 4px;
    margin-bottom: 24px;
}

body:not(:has(.admin-shell)) .quick-category {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 104px;
    min-height: 104px;
    padding: 12px 8px;
    gap: 8px;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    background: #fff;
    color: #1d1d1f;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 27, 46, 0.02);
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

body:not(:has(.admin-shell)) .quick-category span {
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}

body:not(:has(.admin-shell)) .quick-category small {
    display: none;
}

body:not(:has(.admin-shell)) .quick-category-thumb {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

body:not(:has(.admin-shell)) .quick-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

body:not(:has(.admin-shell)) .quick-category-thumb.is-glyph svg {
    width: 24px;
    height: 24px;
    color: #6a7c92;
    transition: transform 0.2s ease, color 0.2s ease;
}

body:not(:has(.admin-shell)) .quick-category:hover {
    transform: translateY(-2px);
    border-color: #c9d6ea;
    box-shadow: 0 6px 12px rgba(21, 42, 82, 0.05);
}
body:not(:has(.admin-shell)) .quick-category:hover .quick-category-thumb img {
    transform: scale(1.08);
}
body:not(:has(.admin-shell)) .quick-category:hover .quick-category-thumb.is-glyph svg {
    transform: scale(1.08);
    color: var(--primary);
}

body:not(:has(.admin-shell)) .quick-category:focus-visible {
    outline: 2px solid #2f6fe4;
    outline-offset: 2px;
}

body:not(:has(.admin-shell)) .quick-category.active,
body:not(:has(.admin-shell)) .quick-category[aria-current="page"] {
    background: #f4f8fe;
    border-color: #a3c2ea;
    box-shadow: inset 0 0 0 1px #e3edfa;
    color: var(--primary);
}

body:not(:has(.admin-shell)) .quick-category.active .quick-category-thumb.is-glyph svg {
    color: var(--primary);
}

@media (max-width: 640px) {
    body:not(:has(.admin-shell)) .quick-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-bottom: 6px;
        margin-bottom: 14px;
    }
    body:not(:has(.admin-shell)) .quick-categories::-webkit-scrollbar { display: none; }
    body:not(:has(.admin-shell)) .quick-category {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

