.categories-page {
    background: #f7f8fa;
    min-height: 60vh;
}

.categories-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.categories-toolbar h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #191c1f;
}

.categories-search {
    position: relative;
    width: min(320px, 100%);
}

.categories-search .form-control {
    padding-right: 42px;
    background: #fff;
    border-radius: 10px;
    min-height: 44px;
}

.categories-search i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #878787;
}

.categories-explorer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.categories-nav {
    display: none;
}

.category-block {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(16, 39, 64, 0.04);
}

.category-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.category-hero:hover {
    color: inherit;
}

.category-hero h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #191c1f;
}

.category-hero img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
}

.category-hero-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 24px;
}

.category-see-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    background: #004d8c;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.category-see-all:hover {
    background: #003a6b;
    color: #fff;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    border-left: 1px solid #f0f2f5;
}

.subcategory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 18px 14px;
    border-right: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    text-decoration: none;
    background: #fff;
    min-height: 180px;
    color: #191c1f;
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.subcategory-card:hover {
    background: #f8fbff;
    color: #004d8c;
}

.subcategory-card img,
.subcategory-card-placeholder {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    background: #f8fafc;
}

.subcategory-card-placeholder {
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa3af;
}

.subcategory-card span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.subcategory-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #6b7280;
    font-size: 14px;
}

.categories-empty {
    background: #fff;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
}

.category-block.is-filtered-out {
    display: none !important;
}

@media (max-width: 991.98px) {
    .categories-page {
        background: #fff;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .categories-page .container {
        padding-left: 0;
        padding-right: 0;
        max-width: none;
    }

    .categories-breadcrumb,
    .categories-toolbar {
        display: none;
    }

    .categories-explorer {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
        min-height: calc(100vh - 120px);
    }

    .categories-nav {
        display: flex;
        flex-direction: column;
        flex: 0 0 92px;
        width: 92px;
        background: #f4f6f8;
        overflow-y: auto;
        max-height: calc(100vh - 56px);
        position: sticky;
        top: 56px;
    }

    .categories-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 12px 8px;
        border: 0;
        border-left: 3px solid transparent;
        background: transparent;
        color: #5b6168;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
        text-align: center;
        cursor: pointer;
        pointer-events: auto;
    }

    .categories-nav-item img,
    .categories-nav-item-placeholder {
        width: 36px;
        height: 36px;
        object-fit: cover;
        border-radius: 8px;
        background: #fff;
    }

    .categories-nav-item-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        color: #9aa3af;
        font-size: 14px;
    }

    .categories-nav-item.is-active {
        background: #fff;
        color: #00aeef;
        border-left-color: #00aeef;
    }

    .categories-panels {
        flex: 1;
        min-width: 0;
        background: #fff;
        position: relative;
        z-index: 2;
    }

    .category-block {
        display: none;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .category-block.is-active {
        display: block;
    }

    .category-hero {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 14px;
        background: #f8fafc !important;
        border-bottom: 1px solid #eef1f4;
    }

    .category-hero h2 {
        font-size: 15px;
        text-align: left;
    }

    .category-hero img,
    .category-hero-placeholder {
        display: none;
    }

    .subcategory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-left: 0;
    }

    .subcategory-card {
        min-height: 132px;
        padding: 12px 8px;
        border-right: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .subcategory-card img,
    .subcategory-card-placeholder {
        width: 64px;
        height: 64px;
    }

    .subcategory-card span {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}