/* Category Page reference: scoped so home, search, shop and PDP stay unchanged. */
.rep-category-page { padding-block: 24px 40px; }
.rep-category-page > .rep-container--wide { max-width: 1600px; }
.rep-category-page .rep-breadcrumbs { font-size: 12px; margin-bottom: 16px; }
.rep-category-page .rep-breadcrumbs > span { padding-inline: 6px; }
.rep-category-page .rep-product-archive__header { margin-bottom: 24px; max-width: 100%; }
.rep-category-page .woocommerce-products-header__title { font-size: 24px; line-height: 1.3; margin: 0 0 8px; }
.rep-category-page .term-description { font-size: 14px; line-height: 1.6; max-width: 768px; }
.rep-category-navigation { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.rep-category-navigation > span { color: #64748b; font-size: 12px; }
.rep-category-navigation a { background: #fff; border: 1px solid #d8e1ec; border-radius: 20px; color: #34465f; font-size: 12px; padding: 6px 12px; text-decoration: none; }
.rep-category-navigation a:hover { border-color: #075ff7; color: #075ff7; }
.rep-category-page .rep-shop-layout { align-items: start; gap: 16px 24px; grid-template-columns: 240px minmax(0, 1fr); }
.rep-category-page .rep-shop-filters { min-width: 0; }
.rep-category-page .rep-shop-filters__form { border: 1px solid #d8e1ec; border-radius: 8px; box-shadow: none; gap: 16px; padding: 16px; }
.rep-category-page .rep-shop-filters__form h2 { font-size: 16px; }
.rep-category-page .rep-shop-filters__form fieldset { border-top: 0; gap: 10px; padding-top: 15px; position: relative; }
.rep-category-page .rep-shop-filters__form fieldset::before { border-top: 1px solid #d8e1ec; content: ''; left: 0; position: absolute; right: 0; top: 0; }
.rep-category-page .rep-shop-filters__form legend { float: left; font-size: 13px; margin: 0 0 2px; padding: 0; text-transform: lowercase !important; width: 100%; }
.rep-category-page .rep-shop-filters__form fieldset label { color: #475569; font-size: 12px; gap: 8px; }
.rep-category-page .rep-shop-filters__form input[type='checkbox'] { accent-color: #075ff7; height: 14px; width: 14px; }
.rep-category-page .rep-shop-filters__form :where(select, input[type='number']) { background: #fff; border: 1px solid #d8e1ec; border-radius: 4px; font-size: 12px; min-height: 36px; padding: 6px 8px; }
.rep-category-page .rep-shop-filters__form input[type='number'] { box-sizing: border-box; height: 36px; min-height: 36px; min-width: 0; padding: 6px 8px; width: 100%; }
.rep-category-page .rep-shop-filters__price { gap: 8px; }
.rep-category-page .rep-shop-filters__actions { font-size: 12px; }
.rep-category-page .rep-shop-filters__actions .rep-button[type='submit'] { box-sizing: border-box; flex: 0 0 auto; width: auto; min-width: 112px; height: 36px; min-height: 36px; border-radius: 4px; font-size: 12px; line-height: 18px; padding: 8px 14px; }
.rep-category-page .rep-active-filters { font-size: 12px; }
.rep-category-page .rep-active-filters__item { background: #eff6ff; border-color: #c8ddff; color: #075ff7; font-size: 12px; }
.rep-category-page .rep-product-archive__toolbar { border-radius: 8px; display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; min-height: 60px; padding: 10px 12px; }
.rep-category-page .rep-product-archive__toolbar .woocommerce-notices-wrapper { flex-basis: 100%; }
.rep-category-page .rep-product-archive__toolbar .woocommerce-notices-wrapper:empty { display: none; }
.rep-category-page .woocommerce-result-count { color: #0a192f; font-size: 13px; font-weight: 600; }
.rep-category-page .woocommerce-ordering { margin-left: auto; order: 3; }
.rep-category-page .woocommerce-ordering select { border: 0; font-size: 12px; min-height: 36px; padding: 6px 24px 6px 8px; }
.rep-category-page .rep-category-ordering { align-items: center; display: flex; flex-wrap: wrap; gap: 16px; }
.rep-category-ordering__field { align-items: center; display: flex; gap: 6px; }
.rep-category-page .rep-category-ordering label { color: #64748b; font-size: 12px; font-weight: 400; margin: 0; white-space: nowrap; }
.rep-category-page .rep-category-ordering select { background-color: transparent; border: 0; box-shadow: none; color: #0a192f; cursor: pointer; font-size: 14px; font-weight: 600; height: 32px; min-height: 32px; padding: 4px 22px 4px 4px; width: auto; }
.rep-category-view:not([hidden]) { background: #f1f5f9; border-radius: 4px; display: flex; gap: 2px; padding: 3px; }
.rep-category-view button { background: transparent; border: 0; border-radius: 3px; color: #64748b; height: 30px; min-height: 0; padding: 6px; width: 32px; }
.rep-category-view button[aria-pressed='true'] { background: #fff; box-shadow: 0 1px 3px #0a192f15; color: #075ff7; }
.rep-category-view svg { fill: none; height: 18px; stroke: currentColor; stroke-width: 1.8; width: 18px; }
.rep-category-page .rep-shop-layout .rep-product-grid { gap: 16px; grid-template-columns: repeat(4, minmax(0, 240px)); }
.rep-category-page :where(a, button, input, select):focus-visible { outline: 2px solid #075ff7; outline-offset: 3px; }
.rep-category-page .rep-product-archive__pagination { margin-top: 24px; }
.rep-category-page .woocommerce-pagination ul.page-numbers { gap: 6px; }
.rep-category-page .woocommerce-pagination ul.page-numbers li > .page-numbers { align-items: center; display: inline-flex; justify-content: center; text-align: center; vertical-align: middle; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; box-sizing: border-box; color: #334155; font-size: 14px; font-weight: 400; height: 32px; line-height: 1; min-height: 32px; min-width: 32px; padding: 0 8px; }
.rep-category-page .woocommerce-pagination ul.page-numbers li > .current { background: #2450e8; border-color: #2450e8; color: #fff; font-weight: 600; }
.rep-category-page .woocommerce-pagination ul.page-numbers li > a:hover { background: #eff6ff; border-color: #93b4fa; color: #2450e8; }
.rep-category-page .woocommerce-pagination ul.page-numbers li > :is(.prev, .next) { font-size: 0; width: 32px; }
.rep-category-page .woocommerce-pagination :is(.prev, .next)::before { border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; content: ''; height: 7px; transform: rotate(45deg); width: 7px; }
.rep-category-page .woocommerce-pagination .prev::before { transform: rotate(-135deg); }
.rep-category-page .woocommerce-pagination ul.page-numbers li > [aria-disabled='true'] { color: #94a3b8; cursor: default; }
.rep-category-page .woocommerce-pagination ul.page-numbers li > .dots { background: transparent; border-color: transparent; }
.rep-category-page--list .rep-shop-layout .rep-product-grid { grid-template-columns: minmax(0, 1fr); }
.rep-category-page--list .rep-product-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.rep-category-page--list .rep-product-card__content { padding: 16px; }
.rep-category-page--list .rep-product-card__title { min-height: 0; }
.rep-category-page--list .rep-product-card__actions { max-width: 240px; }
@media (min-width: 64.01rem) {
    .rep-category-page .rep-shop-filters { overflow: visible; position: sticky; top: 16px; }
    .admin-bar .rep-category-page .rep-shop-filters { top: 48px; }
}
@media (min-width: 100rem) {
    .rep-category-page > .rep-container--wide { padding-inline: 24px; }
    .rep-category-page:not(.rep-category-page--list) .rep-shop-layout .rep-product-grid { grid-template-columns: repeat(5, minmax(0, 240px)); }
}
@media (min-width: 64.01rem) and (max-width: 79.99rem) {
    .rep-category-page .rep-shop-layout .rep-product-grid { grid-template-columns: repeat(3, minmax(0, 240px)); }
    .rep-category-page--list .rep-shop-layout .rep-product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 64rem) {
    .rep-category-page .rep-shop-layout { display: block; }
    .rep-category-page .rep-shop-filters__disclosure { background: #fff; margin-bottom: 16px; }
    .rep-category-page .rep-shop-filters__form { border: 0; }
    .rep-category-page .rep-active-filters { margin-bottom: 16px; }
    .rep-category-page .rep-shop-layout .rep-product-grid { grid-template-columns: repeat(2, minmax(0, 240px)); }
    .rep-category-page--list .rep-shop-layout .rep-product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 48rem) and (max-width: 64rem) {
    .rep-category-page:not(.rep-category-page--list) .rep-shop-layout .rep-product-grid {
        gap: 12px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
    }
}
@media (max-width: 35.99rem) {
    .rep-category-page { padding-block: 16px 32px; }
    .rep-category-page .woocommerce-products-header__title { font-size: 22px; }
    .rep-category-page .woocommerce-ordering { width: 100%; }
    .rep-category-page .woocommerce-ordering select { width: 100%; }
    .rep-category-view { margin-left: auto; }
    .rep-category-page:not(.rep-category-page--list) .rep-shop-layout .rep-product-grid { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card { min-height: 0; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__media { height: 116px; padding: 8px; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__content { padding: 0 9px 9px; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__title { font-size: 12px; line-height: 15px; min-height: 30px; }
    .rep-category-page:not(.rep-category-page--list) :is(.rep-product-card__sku, .rep-product-card__upc) { font-size: 10px; line-height: 13px; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__price { font-size: 16px; }
    .rep-category-page:not(.rep-category-page--list) .rep-card-quantity { display: none !important; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__actions--quantity > a.rep-product-card__action { flex-basis: 100%; width: 100%; }
    .rep-category-page:not(.rep-category-page--list) .rep-product-card__footer { align-items: flex-start; flex-direction: column; gap: 4px; }
    .rep-category-page--list .rep-shop-layout .rep-product-grid { grid-template-columns: minmax(0, 1fr); }
    .rep-category-page--list .rep-product-card { grid-template-columns: 112px minmax(0, 1fr); }
    .rep-category-page--list .rep-product-card__media { height: 140px; padding: 8px; }
    .rep-category-page--list .rep-product-card__content { padding: 12px; }
}

/* Product search uses the same catalogue shell as product categories. */
.rep-product-search-results .rep-search-breadcrumbs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.45;
}
.rep-product-search-results .rep-search-breadcrumbs > span { padding-inline: 0; }
.rep-product-search-results .rep-search-breadcrumbs > span[aria-hidden='true'] { color: #94a3b8; }
.rep-product-search-results .rep-search-breadcrumbs a { color: #526681; text-decoration: none; }
.rep-product-search-results .rep-search-breadcrumbs a:hover { color: #075ff7; text-decoration: underline; }
.rep-product-search-results .rep-search-breadcrumbs .rep-breadcrumbs__current { color: #334155; font-weight: 600; }
.rep-product-search-results .rep-shop-layout__results { min-width: 0; }
/* Catalogue mobile pagination and filter containment fixes. */
.rep-category-page .rep-shop-filters,
.rep-category-page .rep-shop-filters__disclosure,
.rep-category-page .rep-shop-filters__form,
.rep-category-page .rep-shop-filters__form > *,
.rep-category-page .rep-shop-filters__form fieldset {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}
.rep-category-page .rep-shop-filters { overflow: visible; }
.rep-category-page .rep-shop-filters__form { width: 100%; }
.rep-category-page .rep-shop-filters__form select {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}
.rep-category-page .rep-filter-term > span:not(.rep-filter-term__count) {
    min-width: 0;
    overflow-wrap: anywhere;
}


@media (max-width: 35.99rem) {
    .rep-category-page .rep-product-archive__pagination { max-width: 100%; overflow: hidden; }
    .rep-category-page .woocommerce-pagination { max-width: 100%; }
    .rep-category-page .woocommerce-pagination ul.page-numbers {
        flex-wrap: nowrap;
        gap: 4px;
        justify-content: safe center;
        max-width: 100%;
        overflow-x: auto;
        padding: 2px 1px 6px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .rep-category-page .woocommerce-pagination ul.page-numbers li { flex: 0 0 auto; }
    .rep-category-page .woocommerce-pagination ul.page-numbers li > .page-numbers {
        font-size: 12px;
        height: 28px;
        min-height: 28px;
        min-width: 28px;
        padding: 0 6px;
    }
    .rep-category-page .woocommerce-pagination ul.page-numbers li > :is(.prev, .next) { width: 28px; }
    .rep-category-page .rep-shop-filters__disclosure { max-width: 100%; overflow: hidden; }
    .rep-category-page .rep-shop-filters__form { padding: 14px 12px; }
}
/* Restore the complete mobile filter card border. */
@media (max-width: 64rem) {
    .rep-category-page .rep-shop-filters__disclosure {
        background: #fff;
        border: 1px solid #d8e1ec !important;
        border-radius: 8px;
        box-sizing: border-box;
        overflow: hidden;
    }
    .rep-category-page .rep-shop-filters__disclosure > summary {
        background: #fff;
        border: 0;
        box-sizing: border-box;
        margin: 0;
        width: 100%;
    }
    .rep-category-page .rep-shop-filters__disclosure[open] > summary {
        border-bottom: 1px solid #e2e8f0;
    }
}
/* iPad Mini/tablet toolbar: keep result, view, sort and page size on one row. */
@media (min-width: 48rem) and (max-width: 64rem) {
    .rep-category-page .rep-product-archive__toolbar {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .rep-category-page .woocommerce-result-count {
        flex: 0 0 auto;
        font-size: 12px;
        white-space: nowrap;
    }
    .rep-category-page .rep-category-view {
        flex: 0 0 auto;
    }
    .rep-category-page .woocommerce-ordering {
        flex: 0 1 auto;
        margin-left: auto;
        min-width: 0;
    }
    .rep-category-page .rep-category-ordering {
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }
    .rep-category-page .rep-category-ordering__field {
        gap: 3px;
        min-width: 0;
    }
    .rep-category-page .rep-category-ordering select {
        font-size: 13px;
        max-width: 10.75rem;
        min-width: 0;
        padding-left: 2px;
    }
    .rep-category-page #rep-category-per-page {
        max-width: 8.5rem;
    }
}
