/* ==========================================================================
   Tyre catalogue (.bp-cat): filter sidebar + product list.
   Products are shown as horizontal rows (photo | details | price + button),
   the way tyre shops list results, so sizes and labels can be compared quickly.
   Colours / sizes can still be overridden from the Elementor widget's Style tab.
   Responsive: desktop (sidebar + rows), tablet (filters on top), mobile (compact rows).
   ========================================================================== */
.bp-cat {
  --bp-sidebar: 270px;
  --bp-blue: var(--color-primary-blue, #0a5cff);
  --bp-deep: var(--color-brand-deep, #0b2a6b);
  --bp-line: #dde2ea;
  --bp-ink: #14213d;
  --bp-muted: #66748a;
  padding: 36px 20px 64px; background: #f4f6f9; box-sizing: border-box; color: var(--bp-ink);
}
.bp-cat *, .bp-cat *::before, .bp-cat *::after { box-sizing: border-box; }
.bp-cat__head { max-width: 1320px; margin: 0 auto 24px; padding-bottom: 16px; border-bottom: 1px solid var(--bp-line); }
.bp-cat__title { margin: 0 0 6px; font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--bp-deep); }
.bp-cat__subtitle { margin: 0; color: var(--bp-muted); font-size: 1rem; }

.bp-cat__layout { display: grid; grid-template-columns: var(--bp-sidebar) minmax(0, 1fr); gap: 28px; max-width: 1320px; margin: 0 auto; align-items: start; }
.bp-cat--filters-right .bp-cat__layout { grid-template-columns: minmax(0, 1fr) var(--bp-sidebar); }
.bp-cat--filters-right .bp-cat__filters { order: 2; }
.bp-cat--filters-top .bp-cat__layout { grid-template-columns: 1fr; }

/* ---- Filters: plain white panel, separated sections ---- */
.bp-cat__filters { background: #fff; border: 1px solid var(--bp-line); border-radius: 6px; padding: 0; position: sticky; top: 90px; }
.bp-cat--filters-top .bp-cat__filters { position: static; }
.bp-cat__filters-box { margin: 0; }
.bp-cat__filters-title { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--bp-line); font-size: .95rem; font-weight: 800; color: var(--bp-deep); cursor: default; list-style: none; }
.bp-cat__filters-title::-webkit-details-marker { display: none; }
.bp-cat .icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-cat__badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--bp-blue); color: #fff; font-size: .72rem; font-weight: 700; }
.bp-cat__fields { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.bp-cat--filters-top .bp-cat__fields { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 16px 18px 0; }
.bp-cat--filters-top .bp-cat__field--wide { grid-column: span 2; }
.bp-cat__field { margin: 0; padding: 14px 18px; border: 0; border-bottom: 1px solid #edf0f5; min-width: 0; }
.bp-cat--filters-top .bp-cat__field { padding: 0; border: 0; }
.bp-cat__field label, .bp-cat__field legend { display: block; margin: 0 0 7px; padding: 0; font-size: .8rem; font-weight: 700; color: #3b4a63; }
.bp-cat__field select, .bp-cat__field input[type=search], .bp-cat__field input[type=number], .bp-cat__field input[type=text] {
  width: 100%; height: 40px; padding: 0 10px; font: inherit; font-size: .92rem; color: var(--bp-ink); background-color: #fff;
  border: 1px solid #c5ccd8; border-radius: 4px; }
.bp-cat__field select:focus, .bp-cat__field input:focus { outline: 2px solid var(--bp-blue); outline-offset: 0; border-color: var(--bp-blue); }
.bp-cat__pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-cat__pill { margin: 0 !important; font-weight: 400 !important; cursor: pointer; position: relative; }
.bp-cat__pill input { position: absolute; opacity: 0; pointer-events: none; }
.bp-cat__pill span { display: inline-block; padding: 7px 11px; font-size: .84rem; font-weight: 600; border: 1px solid #c5ccd8; border-radius: 4px; background: #fff; color: #3b4a63; transition: background .12s, border-color .12s; }
.bp-cat__pill:hover span { border-color: #8d99ad; }
.bp-cat__pill input:focus-visible + span { outline: 2px solid var(--bp-blue); outline-offset: 2px; }
.bp-cat__pill input:checked + span { background: var(--bp-deep); border-color: var(--bp-deep); color: #fff; }
.bp-cat__range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.bp-cat__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 18px 18px; }
.bp-cat--filters-top .bp-cat__actions { padding: 16px 18px 18px; }
.bp-cat__apply { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 800; color: #14213d; background: var(--yellow, #ffb000); }
.bp-cat__apply:hover { background: var(--yellow-hover, #f5a300); color: #14213d; }
.bp-cat__filters .bp-cat__apply { flex: 1 1 auto; }
.bp-cat__reset { font-size: .86rem; font-weight: 600; color: var(--bp-blue); text-decoration: underline; }

/* ---- Results bar ---- */
.bp-cat__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--bp-line); border-radius: 6px; }
.bp-cat__count { margin: 0; font-weight: 700; color: var(--bp-ink); }
.bp-cat__sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.bp-cat__sort label { font-size: .84rem; font-weight: 600; color: var(--bp-muted); }
.bp-cat__sort select { height: 36px; padding: 0 10px; font: inherit; font-size: .9rem; border: 1px solid #c5ccd8; border-radius: 4px; background: #fff; }
.bp-cat__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bp-cat__chip { padding: 4px 10px; border: 1px solid #c9d4ec; border-radius: 4px; background: #eaf0fb; color: #1e3a8a; font-size: .82rem; }
.bp-cat__chip strong { margin-right: 2px; }

/* ---- Product list: one row per tyre ---- */
.bp-cat__grid { display: grid; grid-template-columns: 1fr !important; gap: 12px; }
.bp-cat__empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed #c5ccd8; border-radius: 6px; }
.bp-cat__empty p { margin: 0 0 16px; color: var(--bp-muted); }
.bp-cat__pagination { margin-top: 24px; text-align: center; }
.bp-cat .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; margin: 2px; border: 1px solid var(--bp-line); border-radius: 4px; background: #fff; text-decoration: none; font-weight: 700; color: var(--bp-ink); }
.bp-cat .page-numbers.current { background: var(--bp-blue); border-color: var(--bp-blue); color: #fff; }
.bp-cat a.page-numbers:hover { border-color: var(--bp-blue); }

.bp-cat .card {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); min-width: 0;
  background: #fff; border: 1px solid var(--bp-line); border-radius: 6px; overflow: hidden;
  transition: border-color .15s;
}
.bp-cat .card:hover { border-color: #9fb1d1; }
.bp-cat .card__media { position: relative; min-height: 170px; background: #fff; border-right: 1px solid #edf0f5; overflow: hidden; }
.bp-cat .card__media a { display: block; position: absolute; inset: 0; }
.bp-cat .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 14px; display: block; }
.bp-cat .card__season { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 3px; background: #f1f4f9; border: 1px solid #dde2ea; font-size: .7rem; font-weight: 700; color: #3b4a63; }
.bp-cat .card__season .icon { width: 12px; height: 12px; }
.bp-cat .card__season--ete .icon { color: #e08a00; }
.bp-cat .card__season--hiver .icon { color: #2563eb; }
.bp-cat .card__season--4saisons .icon { color: #0f766e; }

.bp-cat .card__body { display: grid; grid-template-columns: minmax(0, 1fr) 210px; column-gap: 24px; align-content: center; padding: 16px 20px; }
.bp-cat .card__body > * { grid-column: 1; }
.bp-cat .card__brand { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--bp-muted); }
.bp-cat .card__title { margin: 2px 0 4px; font-size: 1.1rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.bp-cat .card__title a { color: var(--bp-ink); text-decoration: none; }
.bp-cat .card__title a:hover { color: var(--bp-blue); }
.bp-cat .card__size { font-size: .95rem; font-weight: 700; color: #2b3a55; }
.bp-cat .card__note { font-size: .82rem; color: var(--bp-muted); }
.bp-cat .labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.bp-cat .label-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #dde2ea; border-radius: 4px; background: #f7f9fc; font-size: .78rem; font-weight: 700; color: var(--bp-ink); line-height: 1.4; }
.bp-cat .label-badge .icon { width: 14px; height: 14px; }
.bp-cat .label-badge--fuel .icon { color: #16a34a; }
.bp-cat .label-badge--wet .icon { color: #2563eb; }
.bp-cat .label-badge--noise .icon { color: #dc2626; }

/* price + button column, set apart by a hairline */
.bp-cat .card__foot { grid-column: 2; grid-row: 1 / span 8; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 0 0 0 24px; border-left: 1px solid #edf0f5; margin: 0; }
.bp-cat .price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--bp-ink); white-space: nowrap; line-height: 1.1; }
.bp-cat .price del { display: block; font-size: .8rem; font-weight: 500; color: #94a3b8; }
.bp-cat .price ins { text-decoration: none; background: none; }
.bp-cat .btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; padding: 11px 14px; text-decoration: none; }
.bp-cat .btn--primary { background: var(--yellow, #ffb000); color: #14213d; }
.bp-cat .btn--primary:hover, .bp-cat .btn--primary:focus-visible { background: var(--yellow-hover, #f5a300); }
.bp-cat .btn--block { width: 100%; }
.bp-cat a.added_to_cart { display: block; text-align: center; font-size: .82rem; font-weight: 700; color: var(--bp-blue); text-decoration: underline; }

.bp-cat--no-season .card__season,
.bp-cat--no-brand .card__brand,
.bp-cat--no-size .card__size,
.bp-cat--no-note .card__note,
.bp-cat--no-labels .labels,
.bp-cat--no-button .card__foot .btn { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 1280px) { .bp-cat__title { font-size: 1.8rem; } }
@media (max-width: 1024px) {
  .bp-cat { padding: 24px 16px 48px; }
  .bp-cat__layout, .bp-cat--filters-right .bp-cat__layout { grid-template-columns: 1fr; gap: 16px; }
  .bp-cat--filters-right .bp-cat__filters { order: 0; }
  .bp-cat__filters { position: static; }
  .bp-cat__filters-title { cursor: pointer; }
  .bp-cat__filters-title::after { content: ''; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
  .bp-cat__badge + .bp-cat__filters-title::after, .bp-cat__badge { margin-left: auto; }
  .bp-cat__filters-box[open] .bp-cat__filters-title::after { transform: rotate(-135deg) translateY(-2px); }
  .bp-cat__fields, .bp-cat--filters-top .bp-cat__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; }
  .bp-cat__field, .bp-cat--filters-top .bp-cat__field { padding: 14px 18px; border-bottom: 1px solid #edf0f5; }
  .bp-cat__field--wide, .bp-cat--filters-top .bp-cat__field--wide { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  /* compact row: photo left, details right, price + button underneath */
  .bp-cat .card { grid-template-columns: 130px minmax(0, 1fr); }
  .bp-cat .card__media { min-height: 150px; }
  .bp-cat .card__body { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 0; }
  .bp-cat .card__foot { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 14px; margin-top: 12px; border-left: 0; border-top: 1px solid #edf0f5; }
}
@media (max-width: 767px) {
  .bp-cat { padding: 18px 12px 40px; }
  .bp-cat__title { font-size: 1.5rem; }
  .bp-cat__subtitle { font-size: .92rem; }
  .bp-cat__bar { flex-direction: column; align-items: stretch; }
  .bp-cat__sort { justify-content: space-between; }
  .bp-cat__sort select { flex: 1; }
  .bp-cat__filters .bp-cat__apply { width: 100%; }
}
@media (max-width: 560px) {
  .bp-cat__fields, .bp-cat--filters-top .bp-cat__fields { grid-template-columns: 1fr; }
  .bp-cat .card { grid-template-columns: 104px minmax(0, 1fr); }
  .bp-cat .card__media { min-height: 130px; }
  .bp-cat .card__media img { padding: 8px; }
  .bp-cat .card__season { top: 6px; left: 6px; }
  .bp-cat .card__title { font-size: 1rem; }
  .bp-cat .price { font-size: 1.3rem; }
  .bp-cat .card__foot .btn { padding: 10px 12px; }
  .bp-cat .card__foot { padding: 12px 0; flex-wrap: wrap; }
  .bp-cat .card__foot .btn { flex: 1 1 100%; }
  .bp-cat .card__body { padding: 12px 12px 0; }
  .bp-cat .labels { gap: 4px; }
  .bp-cat .label-badge { padding: 2px 6px; font-size: .72rem; }
}

/* "Nothing found" */
.bp-cat__empty-title { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; color: inherit; }
