/* BRAID — karta produktu (układ jak tegiwa.com: karty na szarym tle, galeria po lewej, zakup po prawej) */

.single-product .site-content { background: var(--b-soft); }
.bpd { font-family: var(--f-ui); color: var(--b-text); padding: 24px 0 72px; }
.bpd__in { max-width: var(--b-in); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.bpd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--b-muted); }
.bpd-crumbs a { color: var(--b-muted); text-decoration: none; }
.bpd-crumbs a:hover { color: var(--b-blue); }
.bpd .woocommerce-error, .bpd .woocommerce-message, .bpd .woocommerce-info { border-radius: 8px; margin-bottom: 18px; font-size: 14px; }

.bpd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.bpd-left { display: grid; gap: 24px; }
.bpd-right { position: sticky; top: 20px; }
.bpd-card { background: #fff; border: 1px solid var(--b-line); border-radius: 6px; padding: 28px 30px; }
.bpd-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; font: 600 19px/1.2 var(--f-ui); color: var(--b-ink); }

/* Galeria */
.bpd-gallery { display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 18px; }
.bpd-gallery:not(:has(.bpd-thumbs)) { grid-template-columns: 1fr; }
.bpd-thumbs { display: flex; flex-direction: column; gap: 10px; }
.bpd-thumb { width: 72px; height: 72px; padding: 4px; border: 1px solid var(--b-line); border-radius: 4px; background: #fff; cursor: pointer; }
.bpd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bpd-thumb.is-active { border: 2px solid var(--b-blue); padding: 3px; }
.bpd-main { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px; cursor: zoom-in; background: #fff; }
.bpd-main__img { width: 100% !important; height: 100% !important; object-fit: contain; transition: opacity .2s; }
.bpd-main.is-zoom { background: #fff var(--zoom) no-repeat; background-size: 220%; background-position: var(--zx, 50%) var(--zy, 50%); }
.bpd-main.is-zoom .bpd-main__img { opacity: 0; }
.bpd-hint { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 12px; color: var(--b-muted); }

/* Opis, specyfikacja, „dlaczego”, płatności */
.bpd-desc { position: relative; font-size: 14px; line-height: 1.7; }
.bpd-desc.is-clamped { max-height: 130px; overflow: hidden; }
.bpd-desc.is-clamped::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.bpd-desc p:first-child { margin-top: 0; }
.bpd-more { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--b-blue); font: 600 14px/1 var(--f-ui); cursor: pointer; text-transform: none; letter-spacing: 0; }
.bpd-more:hover { background: none; color: var(--b-navy); }
.bpd-more [data-less], .bpd-more.is-open [data-more] { display: none; }
.bpd-more.is-open [data-less] { display: inline; }
.bpd-specs { margin: 0; display: grid; }
.bpd-specs div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--b-line); font-size: 14px; }
.bpd-specs div:last-child { border-bottom: 0; }
.bpd-specs dt { color: var(--b-muted); }
.bpd-specs dd { margin: 0; color: var(--b-ink); font-weight: 500; }
.bpd-why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bpd-why li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 4px; background: var(--b-soft); font-size: 13px; color: var(--b-ink); }
.bpd-why .bi { color: var(--b-navy); }
.bpd-pay { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bpd-pay span { padding: 6px 9px; border: 1px solid var(--b-line); border-radius: 4px; font: 600 11px/1 var(--f-ui); color: var(--b-ink); }
.bpd-muted { margin: 0; font-size: 13px; line-height: 1.6; color: var(--b-muted); }

/* Zakup */
.bpd-title { margin: 0 0 12px; font: 400 26px/1.3 var(--f-ui); color: var(--b-ink); letter-spacing: -.01em; text-transform: none; }
.bpd-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--b-line); font-size: 12px; color: var(--b-muted); text-transform: uppercase; letter-spacing: .04em; }
.bpd-brand { color: var(--b-blue); font-weight: 700; }
.bpd-form { margin: 0; }
.bpd-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; margin-bottom: 22px; }
.bpd-row--col { grid-template-columns: 1fr; gap: 10px; }
.bpd-label { font: 600 14px/1.4 var(--f-ui); color: var(--b-ink); padding-top: 4px; }
.bpd-label strong { font-weight: 400; color: var(--b-muted); }
.bpd-select { width: 100%; height: 46px; border: 1px solid #d5d7de; border-radius: 4px; padding: 0 12px; }
.bpd-select.is-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.bpd-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bpd-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 8px; border: 1px solid var(--b-line); border-radius: 4px; background: #fff; color: var(--b-ink); text-align: left; cursor: pointer; text-transform: none; letter-spacing: 0; transition: border-color .15s, box-shadow .15s; }
.bpd-tile:hover { border-color: #b9bdca; background: #fff; color: var(--b-ink); }
.bpd-tile[aria-pressed="true"] { border-color: var(--b-blue); box-shadow: inset 0 0 0 1px var(--b-blue); }
.bpd-tile img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.bpd-tile__name { font: 500 11px/1.25 var(--f-ui); }
.bpd-tile__price { font: 400 11px/1 var(--f-ui); color: var(--b-muted); }
.bpd-tile__price .woocommerce-Price-amount { color: inherit; }

.bpd-price { font: 600 28px/1 var(--f-ui); color: var(--b-ok); }
.bpd-price .woocommerce-Price-amount { color: inherit; }
.bpd-price del { font-size: 16px; color: var(--b-muted); font-weight: 400; margin-right: 8px; }
.bpd-price ins { text-decoration: none; }
.bpd-price .bp-from { font-size: 15px; color: var(--b-muted); font-weight: 400; }
.bpd-note { display: block; margin-top: 6px; font-size: 12px; color: var(--b-muted); }
.bpd-stock { display: grid; gap: 4px; padding-top: 4px; font-size: 15px; }
.bpd-stock strong { font-weight: 600; }
.bpd-stock--order { color: #d4541c; }
.bpd-stock--in { color: var(--b-ok); }
.bpd-stock--out { color: #c0392b; }

.bpd-qty { display: inline-flex; border: 1px solid #d5d7de; border-radius: 4px; overflow: hidden; }
.bpd-qty button { width: 44px; height: 44px; padding: 0; border: 0; background: #fff; color: var(--b-muted); font: 400 20px/1 var(--f-ui); cursor: pointer; }
.bpd-qty button:hover { background: var(--b-soft); color: var(--b-ink); }
.bpd-qty input { width: 56px; height: 44px; border: 0 !important; border-left: 1px solid #d5d7de !important; border-right: 1px solid #d5d7de !important; border-radius: 0 !important; text-align: center; font: 500 15px/1 var(--f-ui); -moz-appearance: textfield; padding: 0 !important; }
.bpd-qty input::-webkit-outer-spin-button, .bpd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.bpd-vehicle { margin: 4px 0 22px; padding: 20px 0 0; border: 0; border-top: 1px solid var(--b-line); }
.bpd-vehicle legend { padding: 0; margin-bottom: 14px; font: 600 15px/1.3 var(--f-ui); color: var(--b-ink); float: left; width: 100%; }
.bpd-vehicle legend span { font-weight: 400; color: var(--b-muted); font-size: 13px; }
.bpd-field { clear: both; margin-bottom: 14px; }
.bpd-field label { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; font: 500 14px/1.3 var(--f-ui); color: var(--b-ink); }
.bpd-field abbr { color: #c0392b; text-decoration: none; }
.bpd-opt-label { font-weight: 400; color: var(--b-muted); font-size: 13px; }
.bpd-ral { margin: 14px 0 0; }
.bpd-color-note { margin: 10px 0 0; line-height: 1.5; }
.bpd-field input, .bpd-field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d5d7de !important; border-radius: 4px !important; background: #fff; font: 400 15px/1 var(--f-ui); color: var(--b-ink); box-shadow: none; }
.bpd-field input:focus, .bpd-field select:focus { outline: none; border-color: var(--b-navy) !important; box-shadow: 0 0 0 3px rgba(34, 53, 103, .12); }
.bpd-field input::placeholder { color: #a5a9b6; }
.bpd-field.is-invalid input, .bpd-field.is-invalid select { border-color: #c0392b !important; }
.bpd-tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 4px; border: 1.5px solid var(--b-muted); border-radius: 50%; color: var(--b-muted); font: 600 10px/1 var(--f-ui); cursor: help; }
.bpd-tip:hover::after, .bpd-tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5; width: 260px; padding: 10px 12px; border-radius: 6px; background: var(--b-ink); color: #fff; font: 400 12px/1.5 var(--f-ui); }

.bpd-btn { width: 100%; height: 56px; border: 0; border-radius: 4px; background: var(--b-navy); color: #fff; font: 600 15px/1 var(--f-ui); letter-spacing: .02em; text-transform: none; cursor: pointer; transition: background .2s; }
.bpd-btn:hover { background: var(--b-blue); color: #fff; }
.bpd-btn.disabled, .bpd-btn:disabled { background: #9aa0b2; cursor: not-allowed; }
.bpd .single_variation_wrap .woocommerce-variation { display: none !important; }
.bpd .reset_variations { display: none !important; }

.bpd-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.bpd-perks div { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 4px; background: var(--b-navy); color: rgba(255, 255, 255, .75); font-size: 11px; line-height: 1.35; }
.bpd-perks .bi { color: #fff; margin-bottom: 4px; }
.bpd-perks strong { color: #fff; font-size: 12px; font-weight: 600; }
.bpd-perks a { color: #fff; }
.bpd-legal { margin: 16px 0 0; font-size: 12px; line-height: 1.55; color: var(--b-muted); }
.bpd-legal a { color: var(--b-blue); }

/* Podobne */
.bpd-related { margin-top: 48px; }
.bpd-related__title { margin: 0 0 18px; font: 600 21px/1.2 var(--f-ui); color: var(--b-ink); }
.bpd-related__grid { grid-template-columns: repeat(6, 1fr); gap: 0; background: #fff; border: 1px solid var(--b-line); border-radius: 6px; overflow: hidden; }
.bpd-related__grid .bp { padding: 16px; border-right: 1px solid var(--b-line); }
.bpd-related__grid .bp:last-child { border-right: 0; }
.bpd-related__grid .bp__foot { flex-direction: column; align-items: stretch; }
.bpd-related__grid .bp__btn { justify-content: center; }

@media (max-width: 1100px) { .bpd-related__grid { grid-template-columns: repeat(3, 1fr); } .bpd-related__grid .bp { border-bottom: 1px solid var(--b-line); } }
@media (max-width: 960px) {
	.bpd-grid { grid-template-columns: 1fr; }
	.bpd-right { position: static; grid-row: 2; }
	.bpd-left { display: contents; }
	.bpd-gallery { grid-row: 1; }
	.bpd-left > .bpd-card:not(.bpd-gallery) { grid-row: auto; }
}
@media (max-width: 600px) {
	.bpd-card { padding: 20px; }
	.bpd-gallery { grid-template-columns: 1fr; padding: 12px; }
	.bpd-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
	.bpd-thumb { flex: none; width: 60px; height: 60px; }
	.bpd-tiles { grid-template-columns: repeat(3, 1fr); }
	.bpd-row { grid-template-columns: 90px 1fr; }
	.bpd-why, .bpd-perks { grid-template-columns: 1fr; }
	.bpd-specs div { grid-template-columns: 130px 1fr; }
	.bpd-related__grid { grid-template-columns: 1fr 1fr; }
	.bpd-title { font-size: 22px; }
}
.bpd-qty { justify-self: start; }
@media (hover: none) { .bpd-hint { display: none; } }

/* Rozmiar: przyciski szerokości / średnicy */
.bpd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bpd-chip { min-width: 52px; padding: 8px 10px; border: 1px solid var(--b-line); border-radius: 4px; background: #fff; color: var(--b-ink); font: 600 13px/1 var(--f-ui); letter-spacing: 0; text-transform: none; cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.bpd-chip:hover { border-color: #b9bdca; background: #fff; color: var(--b-ink); }
.bpd-chip[aria-pressed="true"] { border-color: var(--b-blue); box-shadow: inset 0 0 0 1px var(--b-blue); color: var(--b-blue); background: #f4f5ff; }
.bpd-chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* Kolor / wykończenie z dopłatą */
.bpd-tiles--opt { grid-template-columns: repeat(3, 1fr); }
.bpd-opt { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 8px; }
.bpd-opt .bpd-tile__name { flex: 1 1 0; min-width: 0; }
.bpd-opt .bpd-tile__price { flex-basis: 100%; padding-left: 26px; }
.bpd-opt[aria-checked="true"] { border-color: var(--b-blue); box-shadow: inset 0 0 0 1px var(--b-blue); }
.bpd-swatch { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.bpd-row.is-invalid .bpd-tiles--opt { outline: 2px solid #d33; outline-offset: 4px; border-radius: 4px; }
@media (max-width: 560px) { .bpd-tiles--opt { grid-template-columns: repeat(2, 1fr); } }

/* Opcje dodatkowe (extras.php) */
.bpd-extras { margin: 4px 0 18px; padding: 18px 0 0; border: 0; border-top: 1px solid var(--b-line); }
.bpd-extras legend { padding: 0; margin-bottom: 10px; font: 600 15px/1.3 var(--f-ui); color: var(--b-ink); float: left; width: 100%; }
.bpd-extras legend span { font-weight: 400; color: var(--b-muted); font-size: 13px; }
.bpd-extra { clear: both; display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef0f4; font: 400 14px/1.35 var(--f-ui); color: var(--b-ink); }
.bpd-extra input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--b-navy); cursor: pointer; }
.bpd-extra__name { flex: 1; display: flex; align-items: center; gap: 2px; }
.bpd-extra__name label { cursor: pointer; }
.bpd-extra__price { flex: none; font-weight: 600; white-space: nowrap; cursor: pointer; }
.bpd-extra--select { flex-wrap: wrap; gap: 8px; }
.bpd-extra--select .bpd-extra__name { flex-basis: 100%; font-weight: 500; }
.bpd-extra--select select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d5d7de !important; border-radius: 4px !important; background: #fff; font: 400 14px/1 var(--f-ui); color: var(--b-ink); }
.bpd-extras .bpd-note { clear: both; margin: 8px 0 0; }
