/* Phase W3 - product list page (client's prototype). Cards: hub-card.css (Phase W2). */
.hub-list-page { padding: 18px 0 56px; color: #202020; }
.hub-list-page .container { max-width: 1400px; }

.hub-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: #5A5F6E; margin: 0 0 14px; }
.hub-crumbs a { color: #29387D; text-decoration: none; }
.hub-crumbs a:hover { color: #EA2227; text-decoration: underline; }
.hub-crumb-sep { color: #8A8F9C; }

.hub-intro { border: 1px solid #E6E8EF; border-radius: 8px; padding: 22px 24px; margin: 0 0 22px; background: #fff; }
.hub-intro h1 { margin: 0 0 6px; font-family: "Gilroy-Bold", sans-serif; font-size: 30px; line-height: 1.2; color: #202020; }
.hub-intro p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: #5A5F6E; }
.hub-intro-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; }
.hub-intro-links a { font-size: 16px; color: #29387D; text-decoration: none; padding: 4px 0; }
.hub-intro-links a:hover, .hub-intro-links a.on { color: #EA2227; text-decoration: underline; }

.hub-list-layout { display: flex; align-items: flex-start; gap: 24px; }
.hub-results { flex: 1 1 0; min-width: 0; }

/* filter panel */
.hub-filters { flex: 0 0 280px; max-width: 280px; border: 1px solid #E6E8EF; border-radius: 8px; background: #fff; padding-bottom: 6px; }
.hub-filter-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.hub-filter-top h2 { margin: 0; font-family: "Gilroy-Bold", sans-serif; font-size: 19px; color: #202020; }
.hub-filter-clear { margin-left: auto; font-size: 14px; color: #29387D; text-decoration: underline; padding: 6px 0; }
.hub-filter-close { display: none; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: #202020; cursor: pointer; }
.hub-fg { border-top: 1px solid #E6E8EF; }
.hub-fg > summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; cursor: pointer; list-style: none; font-family: "Gilroy-Bold", sans-serif; font-size: 16px; color: #202020; }
.hub-fg > summary::-webkit-details-marker { display: none; }
.hub-fg > summary::before { content: ""; border-left: 6px solid #202020; border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform .15s; }
.hub-fg[open] > summary::before { transform: rotate(90deg); }
.hub-fg > summary:focus-visible { outline: 2px solid #29387D; outline-offset: -2px; }
.hub-fg-list, .hub-fg-sub { list-style: none; margin: 0; padding: 0 0 10px; }
.hub-fg-sub { padding: 0 0 4px 22px; }
.hub-opt-row { display: flex; align-items: center; justify-content: space-between; }
.hub-opt { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 2px 16px; margin: 0; font-size: 15px; color: #333; cursor: pointer; }
.hub-opt input { width: 17px; height: 17px; margin: 0; accent-color: #29387D; flex: 0 0 auto; }
.hub-sub-toggle { width: 34px; height: 34px; margin-right: 8px; border: 1px solid #D5D9E3; border-radius: 6px; background: #fff; font-size: 18px; line-height: 1; color: #29387D; cursor: pointer; }
.hub-price { padding: 4px 16px 14px; }
.hub-price .price-range-inputs { margin-bottom: 10px; }
.hub-price-fields { display: flex; gap: 10px; margin-bottom: 10px; }
.hub-price-fields label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5A5F6E; }
.hub-price-fields input { height: 38px; border: 1px solid #C9CEDB; border-radius: 6px; padding: 0 8px; font-size: 15px; width: 100%; }
.hub-price-apply { width: 100%; min-height: 42px; border: 1px solid #29387D; border-radius: 6px; background: #fff; color: #29387D; font-family: "Gilroy-Bold", sans-serif; cursor: pointer; }
.hub-price-apply:hover { background: #29387D; color: #fff; }

/* chips + toolbar */
.hub-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.hub-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #29387D; border-radius: 17px; background: #EEF0FA; color: #29387D; font-size: 14px; cursor: pointer; }
.hub-chip:hover { background: #E1E4F5; }
.hub-chip-clear { font-size: 14px; color: #EA2227; text-decoration: underline; padding: 6px 4px; }
.hub-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.hub-count { font-size: 15px; color: #5A5F6E; }
.hub-toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hub-view { display: flex; gap: 4px; }
.hub-view-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #D5D9E3; border-radius: 6px; background: #fff; color: #5A5F6E; cursor: pointer; }
.hub-view-btn[aria-pressed="true"] { border-color: #29387D; background: #EEF0FA; color: #29387D; }
.hub-sort { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: #5A5F6E; white-space: nowrap; }
.hub-sort select { height: 38px; border: 1px solid #D5D9E3; border-radius: 6px; padding: 0 10px; font-size: 15px; color: #202020; background: #fff; }
.hub-view-btn:focus-visible, .hub-sort select:focus-visible, .hub-chip:focus-visible { outline: 2px solid #29387D; outline-offset: 2px; }

/* the grid of cards */
.hub-results .product-listing-wrapper ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.hub-results .product-listing-wrapper ul > li { display: flex; min-width: 0; }
.hub-results .product-listing-wrapper ul > li > .product-card { width: 100%; }
.hub-results .product-listing-wrapper.list_view ul { grid-template-columns: 1fr; }
.hub-empty { padding: 48px 16px; text-align: center; color: #5A5F6E; font-size: 17px; border: 1px dashed #D5D9E3; border-radius: 8px; }
.hub-results .pagination-container { margin-top: 24px; }

/* phone and tablet: the filter panel slides in from the left */
.hub-filter-open { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin: 0 0 14px; border: 1px solid #29387D; border-radius: 6px; background: #fff; color: #29387D; font-family: "Gilroy-Bold", sans-serif; font-size: 15px; cursor: pointer; }
.hub-filter-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1040; }
body.hub-no-scroll { overflow: hidden; }

@media (max-width: 991.98px) {
    .hub-filter-open { display: inline-flex; }
    .hub-filters {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 1050;
        width: 86%; max-width: 340px; border-radius: 0; overflow-y: auto;
        transform: translateX(-105%); transition: transform .25s ease;
    }
    .hub-filters.open { transform: translateX(0); }
    .hub-filter-close { display: block; }
    .hub-intro h1 { font-size: 24px; }
}
/* phones: one card a row (two were too narrow for the dropdown and the prices) */
@media (max-width: 575.98px) {
    .hub-results .product-listing-wrapper ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .hub-toolbar-controls { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .hub-filters { transition: none; } }

/* ---------- C9: filter panel tidy-up ----------
   The old theme (style.css) makes every .filter-item a flex row, which put the sub-categories
   beside their parent and out of the panel. Here each item is a plain block again, the open/close
   control is a chevron at the right edge, sub-categories hang under their parent with a guide line,
   and a long category list scrolls inside the panel. */
.hub-fg-list li.filter-item, .hub-fg-sub li.filter-item { display: block; margin: 0; font-size: inherit; line-height: inherit; }
.hub-opt-row { gap: 4px; padding-right: 10px; }
.hub-opt-row .hub-opt { flex: 1 1 auto; min-width: 0; }
.hub-opt span { line-height: 1.3; overflow-wrap: anywhere; }
.hub-opt:hover span { color: #29387D; }
.hub-opt input:checked + span { color: #29387D; font-family: "Gilroy-Bold", sans-serif; }
.hub-sub-toggle { flex: 0 0 30px; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; font-size: 0; color: transparent; cursor: pointer; }
.hub-sub-toggle::before { content: ""; width: 8px; height: 8px; border-right: 2px solid #29387D; border-bottom: 2px solid #29387D; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.hub-sub-toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
.hub-sub-toggle:hover { background: #EEF0FA; }
.hub-sub-toggle:focus-visible { outline: 2px solid #29387D; outline-offset: 1px; }
.hub-fg-sub { margin: 0 12px 6px 24px; padding: 2px 0; border-left: 2px solid #E6E8EF; }
.hub-fg-sub[hidden] { display: none; }
.hub-fg-sub .hub-opt { min-height: 30px; padding: 2px 8px 2px 12px; font-size: 14px; color: #4A4F5C; }
#category-list { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #C9CEDB transparent; }
