/* ─── Category landing page ─────────────────────────────────────────────────── */

.category-page {
    padding: 0;
    display: flow-root;
}

/* Breadcrumb — Bootstrap handles separators; just tune the look */
.breadcrumb-nav {
    margin-bottom: var(--section-margin-top, 20px);
}

.breadcrumb-list {
    --bs-breadcrumb-divider: '/';
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    background: none;
}

.breadcrumb-item,
.breadcrumb-item a {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #111827;
}

.breadcrumb-item.active {
    color: #111827;
    font-weight: 500;
}

/* Hero */
.category-hero {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: var(--section-margin-top, 20px);
}

.category-hero__title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.category-hero__count {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
    white-space: nowrap;
}

/* Subcategory tiles */
.category-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--section-margin-top, 20px);
}

.category-tile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 100px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.category-tile:hover {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.category-tile__count {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.6;
}

.category-tile:hover .category-tile__count {
    opacity: 0.75;
}

.category-tile.active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.category-tile.active .category-tile__count {
    opacity: 0.75;
}

/* Subgroup sections (grouped mode) */
.category-subgroup {
    margin-bottom: var(--product-group-gap);
    scroll-margin-top: 110px;
}

.category-subgroup + .category-subgroup {
    margin-top: var(--product-group-gap);
}

.category-subgroup:last-child {
    margin-bottom: 0;
}

.category-subgroup__header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: var(--section-margin-top, 20px);
}

.category-subgroup__title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.category-subgroup__view-all {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.category-subgroup__view-all:hover {
    color: #111827;
}

/* Pagination */
.category-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
}

.category-pagination__btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.category-pagination__btn:hover {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.category-pagination__info {
    font-size: 14px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 640px) {
    .category-hero__title {
        font-size: 22px;
    }

    .category-tiles {
        gap: 8px;
    }

    .category-tile {
        font-size: 13px;
        padding: 7px 14px;
    }
}

/* Sort bar */
.category-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: var(--section-margin-top, 20px);
    gap: 12px;
}

.category-sort-bar__count {
    font-size: 14px;
    color: #6b7280;
}

.category-sort-bar__form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-sort-bar__label {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.category-sort-bar__select {
    font-size: 14px;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 28px 6px 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
    appearance: none;
    cursor: pointer;
}

.category-sort-bar__select:focus {
    outline: none;
    border-color: #185FA5;
    box-shadow: 0 0 0 2px rgba(24,95,165,0.15);
}

@media (max-width: 480px) {
    .category-sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
