/* BRAID — widok kategorii: hero, filtry, pasek narzędzi, kafelki */

.bc { font-family: var(--f-body); background: var(--b-white); }
.bc__in { max-width: var(--b-in); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

/* Hero kategorii */
.bc-hero { position: relative; overflow: hidden; background: var(--b-navy); color: #fff; }
.bc--offroad .bc-hero { background: #6c522e; }
.bc--performance .bc-hero { background: #161616; }
.bc-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.bc-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20, 26, 46, .92) 0%, rgba(20, 26, 46, .55) 55%, rgba(20, 26, 46, .1) 100%); }
.bc--shop .bc-hero::after { background: var(--b-grad); opacity: .95; }
.bc-hero__in { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 48px; }
.bc-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; opacity: .8; }
.bc-crumbs a { color: #fff; text-decoration: none; }
.bc-crumbs a:hover { text-decoration: underline; }
.bc-hero__title { margin: 16px 0 10px; color: #fff; font: italic 800 clamp(52px, 8vw, 104px)/.88 var(--f-head); text-transform: uppercase; letter-spacing: .005em; }
.bc-hero__desc { max-width: 640px; font-size: 15px; line-height: 1.6; opacity: .88; }
.bc-hero__desc p { margin: 0; }

/* Układ */
.bc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 80px; align-items: start; }

.bc-scrim { display: none; }

/* Filtry */
.bc-filters { align-self: start; }
.bc-filters__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid var(--b-navy); }
.bc-filters__head h2 { margin: 0; font: italic 800 30px/1 var(--f-head); text-transform: uppercase; color: var(--b-navy); }
.bc-filters__x, .bc-filters__foot { display: none; }

.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--b-line); }
.bc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; border-radius: 4px; background: var(--b-navy); color: #fff; font: 500 12px/1.2 var(--f-ui); text-decoration: none; }
.bc-chip:hover { background: var(--b-blue); color: #fff; }
.bc-chip .woocommerce-Price-amount { color: inherit; }
.bc-chips__clear { align-self: center; margin-left: 4px; font: 500 12px/1 var(--f-ui); color: var(--b-muted); }

.bc-group { border-bottom: 1px solid var(--b-line); }
.bc-group > summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 16px 0;
	font: 600 13px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--b-ink);
}
.bc-group > summary::-webkit-details-marker { display: none; }
.bc-group > summary .bi { margin-left: auto; transition: transform .2s; color: var(--b-muted); }
.bc-group[open] > summary .bi { transform: rotate(180deg); }
.bc-sel { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--b-blue); color: #fff; font: 700 11px/1 var(--f-ui); letter-spacing: 0; }

.bc-list { list-style: none; margin: 0; padding: 0 0 16px; display: grid; gap: 2px; }
.bc-list--long > .is-more { display: none; }
.bc-group.is-expanded .bc-list--long > .is-more { display: list-item; }
.bc-more { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 2px; padding: 0; border: 0; background: none; color: var(--b-blue); font: 600 13px/1 var(--f-ui); letter-spacing: 0; text-transform: none; cursor: pointer; }
.bc-more:hover, .bc-more:focus { background: none; color: var(--b-navy); }
.bc-more .bi { transition: transform .2s; }
.bc-more [data-less], .bc-group.is-expanded .bc-more [data-more] { display: none; }
.bc-group.is-expanded .bc-more [data-less] { display: inline; }
.bc-group.is-expanded .bc-more .bi { transform: rotate(180deg); }
.bc-list--chips { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; mask-image: none; }
.bc-list--links a { display: flex; justify-content: space-between; padding: 6px 0; color: var(--b-text); text-decoration: none; font-size: 14px; }
.bc-list--links a:hover { color: var(--b-blue); }

.bc-check { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 4px; cursor: pointer; font: 400 14px/1.3 var(--f-ui); color: var(--b-text); }
.bc-check:hover { background: var(--b-soft); }
.bc-check input { position: absolute; opacity: 0; pointer-events: none; }
.bc-box { flex: none; width: 18px; height: 18px; border: 1.5px solid #b9bdca; border-radius: 3px; background: #fff; transition: background .15s, border-color .15s; }
.bc-check input:checked + .bc-box { background: var(--b-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--b-navy); }
.bc-check input:focus-visible + .bc-box { outline: 2px solid var(--b-blue); outline-offset: 2px; }
.bc-label { flex: 1; }
.bc-n { color: var(--b-muted); font-size: 12px; }
.bc-check.is-zero { opacity: .45; }

/* ET jako siatka kafelków z liczbą — ponad 70 wartości czyta się lepiej niż długa lista */
.bc-list--chips .bc-check { justify-content: center; flex-direction: column; gap: 2px; padding: 7px 2px; border: 1px solid var(--b-line); text-align: center; }
.bc-list--chips .bc-box { display: none; }
.bc-list--chips .bc-label { font-weight: 600; font-size: 13px; }
.bc-list--chips .bc-n { font-size: 10px; }
.bc-list--chips .bc-check:has(input:checked) { background: var(--b-navy); border-color: var(--b-navy); color: #fff; }
.bc-list--chips .bc-check:has(input:checked) .bc-n { color: rgba(255, 255, 255, .7); }

.bc-price { display: flex; align-items: center; gap: 8px; }
.bc-price label { position: relative; flex: 1; }
.bc-price label > span:first-child { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font: 400 12px/1 var(--f-ui); color: var(--b-muted); }
.bc-price input { box-sizing: border-box; width: 100%; height: 42px; padding: 0 28px 0 30px; border: 1px solid #cfd2dc; border-radius: var(--b-r); font: 500 14px/1 var(--f-ui); color: var(--b-ink); background: #fff; -moz-appearance: textfield; }
.bc-price input::-webkit-outer-spin-button, .bc-price input::-webkit-inner-spin-button { -webkit-appearance: none; }
.bc-price input:focus { outline: none; border-color: var(--b-navy); box-shadow: 0 0 0 3px rgba(34, 53, 103, .12); }
.bc-cur { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 400 12px/1 var(--f-ui); color: var(--b-muted); }
.bc-price__dash { color: var(--b-muted); }
.bc-price__go { box-sizing: border-box; display: block; width: 100%; margin: 10px 0 16px; height: 40px; border: 1px solid var(--b-navy); border-radius: var(--b-r); background: #fff; color: var(--b-navy); font: 600 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.bc-price__go:hover { background: var(--b-navy); color: #fff; }

/* Pasek narzędzi */
.bc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--b-line); }
.bc-toolbar__count { margin: 0 auto 0 0; font: 400 14px/1.3 var(--f-ui); color: var(--b-muted); }
.bc-toolbar__filters { display: none; }
.bc-select { display: flex; align-items: center; gap: 8px; white-space: nowrap; font: 400 13px/1 var(--f-ui); color: var(--b-muted); }
.bc-select select {
	height: 40px; padding: 0 34px 0 12px; border: 1px solid #cfd2dc; border-radius: var(--b-r); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23223567' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat;
	-webkit-appearance: none; appearance: none; font: 500 13px/1 var(--f-ui); color: var(--b-ink); cursor: pointer;
}
.bc-view { display: flex; border: 1px solid #cfd2dc; border-radius: var(--b-r); overflow: hidden; }
.bc-view button { display: grid; place-items: center; width: 40px; height: 38px; border: 0; background: #fff; color: var(--b-muted); cursor: pointer; padding: 0; border-radius: 0; }
.bc-view button[aria-pressed="true"] { background: var(--b-navy); color: #fff; }

/* Siatka i kafelek */
.bc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 22px; transition: opacity .2s; }
.is-loading .bc-grid, .is-loading .bc-filters__body { opacity: .45; pointer-events: none; }

.bp { position: relative; display: flex; flex-direction: column; }
.bp__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--b-r); background: radial-gradient(circle at 50% 45%, #fff 0%, #eef0f4 75%); }
.bp__img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; padding: 8%; transition: opacity .35s, transform .5s cubic-bezier(.2, .7, .2, 1); mix-blend-mode: multiply; }
.bp__img--alt { opacity: 0; }
.bp:hover .bp__img { transform: scale(1.04); }
.bp:hover .bp__img--alt { opacity: 1; }
.bp:hover .bp__media:has(.bp__img--alt) .bp__img:not(.bp__img--alt) { opacity: 0; }
.bp__badge { position: absolute; top: 12px; left: 12px; padding: 5px 9px; background: var(--b-blue); color: #fff; font: 700 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; border-radius: 3px; }

.bp__body { display: flex; flex-direction: column; flex: 1; padding-top: 14px; }
.bp__brand { font: 600 11px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--b-blue); }
.bp__title { margin: 6px 0 4px; font: 600 15px/1.35 var(--f-ui); }
.bp__title a { color: var(--b-ink); text-decoration: none; }
.bp__title a:hover { color: var(--b-blue); }
.bp__title a::after { content: ''; position: absolute; inset: 0 0 64px; } /* cały kafelek klikalny, przycisk zostaje osobno */
.bp__sku { font: 400 12px/1 var(--f-ui); color: var(--b-muted); }
.bp__specs { display: none; }
.bp__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.bp__price { font: 700 18px/1.1 var(--f-ui); color: var(--b-navy); }
.bp__price del { font-size: 13px; color: var(--b-muted); font-weight: 400; }
.bp__price ins { text-decoration: none; }
.bp-from { font-size: 13px; font-weight: 500; color: var(--b-muted); }
.bp__stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 500 12px/1 var(--f-ui); color: var(--b-muted); }
.bp__stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bp__stock--in { color: var(--b-ok); }
.bp__stock--back { color: var(--b-warn); }
.bp__btn {
	position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
	border-radius: var(--b-r); background: var(--b-navy); color: #fff !important; text-decoration: none;
	font: 600 12px/1 var(--f-body) !important; letter-spacing: .08em; text-transform: uppercase; transition: background .2s;
}
.bp__btn:hover { background: var(--b-blue); }
.bp__btn--ghost { background: #fff; color: var(--b-navy) !important; box-shadow: inset 0 0 0 1.5px var(--b-navy); }
.bp__btn--ghost:hover { background: var(--b-navy); color: #fff !important; }
.bp__btn.loading { opacity: .6; }
.bp__btn.added span::after { content: ' ✓'; }
.bp .added_to_cart { display: none; }

/* Widok listy */
.bc-grid[data-view="list"] { grid-template-columns: 1fr; gap: 0; }
.bc-grid[data-view="list"] .bp { flex-direction: row; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--b-line); }
.bc-grid[data-view="list"] .bp__media { width: 180px; flex: none; }
.bc-grid[data-view="list"] .bp__body { padding-top: 4px; }
.bc-grid[data-view="list"] .bp__title { font-size: 17px; }
.bc-grid[data-view="list"] .bp__title a::after { inset: 0; right: 180px; }
.bc-grid[data-view="list"] .bp__specs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; }
.bc-grid[data-view="list"] .bp__specs div { display: flex; gap: 6px; font: 400 13px/1.3 var(--f-ui); }
.bc-grid[data-view="list"] .bp__specs dt { color: var(--b-muted); }
.bc-grid[data-view="list"] .bp__specs dd { margin: 0; color: var(--b-ink); font-weight: 600; }

/* Paginacja i pusty stan */
.bc-pages { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.bc-pages .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--b-line); border-radius: var(--b-r); font: 600 14px/1 var(--f-ui); color: var(--b-ink); text-decoration: none; }
.bc-pages .page-numbers.current { background: var(--b-navy); border-color: var(--b-navy); color: #fff; }
.bc-pages a.page-numbers:hover { border-color: var(--b-navy); }
.bc-pages .dots { border: 0; }
.bc-empty { padding: 56px 32px; text-align: center; background: var(--b-soft); border-radius: var(--b-r); }
.bc-empty h2 { margin: 0 0 8px; font: italic 800 40px/1 var(--f-head); text-transform: uppercase; color: var(--b-navy); }
.bc-empty p { max-width: 460px; margin: 0 auto 20px; font: 400 15px/1.6 var(--f-ui); }
.bc-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px; border: 0; border-radius: var(--b-r); background: var(--b-navy); color: #fff !important; text-decoration: none; font: 600 13px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.bc-btn:hover { background: var(--b-blue); }

/* Telefon i tablet: filtry w wysuwanej szufladzie */
@media (max-width: 1024px) {
	.bc-layout { grid-template-columns: 1fr; padding-top: 20px; }
	.bc-toolbar__filters { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1.5px solid var(--b-navy); border-radius: var(--b-r); background: #fff; color: var(--b-navy); font: 600 13px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
	.bc-toolbar__count { order: 5; flex-basis: 100%; }
	.bc-filters {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 10000; width: min(380px, 90vw); max-height: none;
		display: flex; flex-direction: column; background: #fff; padding: 0;
		transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
	}
	.bc-filters.is-open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
	.bc-filters__head { padding: 16px 20px; flex: none; }
	.bc-filters__x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: var(--b-soft); border-radius: 50%; color: var(--b-ink); cursor: pointer; padding: 0; }
	.bc-filters__body { flex: 1; overflow-y: auto; padding: 0 20px; scrollbar-width: none; }
	.bc-filters__body::-webkit-scrollbar { display: none; }
	.bc-filters__foot { display: block; flex: none; padding: 14px 20px; border-top: 1px solid var(--b-line); }
	.bc-filters__foot .bc-btn { width: 100%; }
	.bc-scrim { display: block; position: fixed; inset: 0; z-index: 9999; background: rgba(20, 26, 46, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
	.bc-filters.is-open ~ .bc-scrim, .bc-layout.filters-open .bc-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
}
@media (max-width: 600px) {
	.bc-grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
	.bc-select span, .bc-view { display: none; }
	.bc-toolbar { gap: 10px; }
	.bc-select select { max-width: 150px; }
	.bp__foot { flex-direction: column; align-items: stretch; }
	.bp__btn { justify-content: center; }
	.bp__title { font-size: 14px; }
	.bp__title a::after { inset: 0 0 100px; }
	.bc-hero__in { padding-top: 28px; padding-bottom: 32px; }
}
