/* B2B Katalog – style frontu. Kolory dziedziczone z motywu, gdzie to możliwe. */

:root {
	--b2bk-radius: 8px;
	--b2bk-border: rgba(0, 0, 0, .14);
	--b2bk-muted: rgba(0, 0, 0, .6);
	--b2bk-bg: #fff;
	--b2bk-text: #1e1e1e;
	--b2bk-accent: #1e1e1e;
	--b2bk-success: #0a7a33;
	--b2bk-error: #b32d2e;
}

/* Cena ukryta */
.b2bk-price-hidden {
	font-size: .9em;
	font-weight: 500;
	color: var(--b2bk-muted);
	font-style: normal;
}

/* Boks na karcie produktu */
.b2bk-single {
	--b2bk-h: 48px;
	margin: 1.5em 0;
	clear: both;
}
.b2bk-single__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: stretch;
}
.b2bk-single__qty {
	display: inline-flex;
	align-items: stretch;
	height: var(--b2bk-h);
	border: 1px solid var(--b2bk-border);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}
.b2bk-single .b2bk-qty {
	width: 3.2em;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	text-align: center;
	font: inherit;
	font-weight: 600;
	color: inherit;
	-moz-appearance: textfield;
	appearance: textfield;
}
.b2bk-single .b2bk-qty::-webkit-outer-spin-button,
.b2bk-single .b2bk-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.b2bk-qty-step {
	width: 38px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: .7;
	transition: opacity .15s, background-color .15s;
}
.b2bk-qty-step:hover { opacity: 1; background: rgba(0, 0, 0, .05); }

.b2bk-single .b2bk-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--b2bk-h);
	margin: 0 !important;
	padding: 0 22px !important;
	border-radius: 6px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: .01em;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	box-sizing: border-box;
	transition: filter .15s, background-color .15s, color .15s, transform .1s;
}
.b2bk-single .b2bk-btn:active { transform: translateY(1px); }
.b2bk-single .b2bk-btn--primary { flex: 1 1 220px; }
.b2bk-single .b2bk-btn--primary:hover { filter: brightness(1.08); }
.b2bk-single .b2bk-btn--secondary {
	flex: 0 1 auto;
	background: transparent !important;
	color: inherit !important;
	border: 1.5px solid currentColor !important;
	opacity: .85;
}
.b2bk-single .b2bk-btn--secondary:hover { opacity: 1; background: rgba(0, 0, 0, .04) !important; }
.b2bk-btn__icon { flex: 0 0 auto; }
.b2bk-login-hint { margin: 0 0 .75em; font-size: .95em; }
.b2bk-btn { cursor: pointer; text-align: center; }
.b2bk-btn--secondary {
	background: transparent !important;
	color: inherit !important;
	border: 1px solid currentColor !important;
}
.b2bk-block-button { text-align: center; }

/* Ukrycie koszyka w typowych motywach (uzupełnienie filtra menu i bloku mini-koszyka) */
.b2bk-hide-cart .site-header-cart,
.b2bk-hide-cart .header-cart,
.b2bk-hide-cart .cart-contents,
.b2bk-hide-cart .wc-block-mini-cart,
.b2bk-hide-cart .widget_shopping_cart,
.b2bk-hide-cart .ast-site-header-cart,
.b2bk-hide-cart .header-cart-link,
.b2bk-hide-cart .site-header .cart,
.b2bk-hide-cart .woocommerce-mini-cart,
.b2bk-hide-cart .kadence-header-cart,
.b2bk-hide-cart .header-item-cart,
.b2bk-hide-cart .elementor-menu-cart__wrapper,
.b2bk-hide-cart .xoo-wsc-modal,
.b2bk-hide-cart .xoo-wsc-basket { display: none !important; }

/* Okno */
html.b2bk-modal-open { overflow: hidden; }
.b2bk-modal[hidden] { display: none !important; }
.b2bk-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.b2bk-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}
.b2bk-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--b2bk-bg);
	color: var(--b2bk-text);
	border-radius: var(--b2bk-radius);
	padding: 0 28px 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	outline: none;
}
/* Nagłówek okna przypięty u góry – przycisk zamknięcia zawsze widoczny. */
.b2bk-modal__head {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 -28px 16px;
	padding: 18px 20px 12px 28px;
	background: var(--b2bk-bg);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.b2bk-modal__title {
	margin: 0;
	font-size: 1.4em;
	line-height: 1.25;
}

/* Wspólny przycisk zamykania – odporny na style motywu */
.b2bk-x {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #f1f1f1 !important;
	color: #1e1e1e !important;
	box-shadow: none !important;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s;
	-webkit-tap-highlight-color: transparent;
}
.b2bk-x:hover { background: #e4e4e4 !important; }
.b2bk-x:focus-visible { outline: 2px solid var(--b2bk-accent); outline-offset: 2px; }
.b2bk-x svg { display: block; width: 18px; height: 18px; }

/* Pozycje */
.b2bk-items { margin-bottom: 18px; }
.b2bk-items:empty { display: none; }
.b2bk-item {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 12px;
	align-items: start;
	border: 1px solid var(--b2bk-border);
	border-radius: var(--b2bk-radius);
	padding: 12px;
	margin-bottom: 10px;
	background: var(--b2bk-bg);
}
.b2bk-item__thumb {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f3f3;
}
.b2bk-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
}
.b2bk-item__main { min-width: 0; }
.b2bk-item__head {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 8px;
}
.b2bk-item__title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.b2bk-item__name { font-weight: 600; text-decoration: none; line-height: 1.3; overflow-wrap: anywhere; }
.b2bk-item__sku { font-size: .8em; color: var(--b2bk-muted); }
.b2bk-item__remove {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--b2bk-error);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}
.b2bk-item__fields { display: flex; flex-wrap: wrap; gap: 10px; }
.b2bk-empty { color: var(--b2bk-muted); margin: 0; }

/* Pola */
.b2bk-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
}
.b2bk-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .92em; }
.b2bk-field > span { font-weight: 500; }
.b2bk-field--full { grid-column: 1 / -1; }
.b2bk-field--inline { flex: 1 1 160px; }
.b2bk-field--qty { flex: 0 0 110px; }
.b2bk-field input,
.b2bk-field select,
.b2bk-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid var(--b2bk-border);
	border-radius: 6px;
	font: inherit;
	background: #fff;
	color: inherit;
}
.b2bk-field textarea { resize: vertical; }
.b2bk-field abbr.required, .b2bk-consent abbr.required { color: var(--b2bk-error); text-decoration: none; border: 0; }

.b2bk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.b2bk-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 16px 0 0;
	font-size: .85em;
	line-height: 1.45;
}
.b2bk-consent input { margin-top: 3px; flex: 0 0 auto; }

.b2bk-actions { margin-top: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.b2bk-modal .b2bk-cancel {
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--b2bk-border);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.b2bk-modal .b2bk-cancel:hover { background: rgba(0, 0, 0, .04); }
/* Przycisk wysyłki – styl wtyczki (kolor marki), niezależny od motywu */
.b2bk-form .b2bk-submit,
.b2bk-msg .b2bk-done {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	margin: 0 !important;
	padding: 0 26px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--b2bk-accent) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: .01em !important;
	white-space: nowrap;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .14) !important;
	cursor: pointer;
	transition: filter .15s, transform .1s, box-shadow .15s;
	-webkit-tap-highlight-color: transparent;
}
.b2bk-form .b2bk-submit:hover,
.b2bk-msg .b2bk-done:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(0, 0, 0, .18) !important; }
.b2bk-form .b2bk-submit:active,
.b2bk-msg .b2bk-done:active { transform: translateY(1px); }
.b2bk-form .b2bk-submit:focus-visible,
.b2bk-msg .b2bk-done:focus-visible { outline: 3px solid var(--b2bk-accent) !important; outline-offset: 2px; }
.b2bk-form .b2bk-submit[disabled] { opacity: .75; cursor: wait; filter: none; transform: none; }
.b2bk-submit__icon { flex: 0 0 auto; }
/* Kręciołek podczas wysyłania */
.b2bk-form .b2bk-submit.is-loading .b2bk-submit__icon { display: none; }
.b2bk-form .b2bk-submit.is-loading::before {
	content: '';
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: b2bk-spin .7s linear infinite;
}
@keyframes b2bk-spin { to { transform: rotate(360deg); } }
.b2bk-msg .b2bk-done { margin-top: 12px !important; }
/* „Anuluj” – ta sama wysokość i kształt, styl drugorzędny */
.b2bk-modal .b2bk-cancel {
	min-height: 46px;
	border-radius: 8px !important;
	font-weight: 600;
}

/* Komunikaty */
.b2bk-msg:empty { display: none; }
.b2bk-msg {
	padding: 12px 14px;
	border-radius: 6px;
	margin-bottom: 14px;
	font-size: .95em;
}
.b2bk-msg--info { background: #f0f4f8; }
.b2bk-msg--error { background: #fcf0f1; color: var(--b2bk-error); }
.b2bk-msg--success { background: #edf7ef; color: var(--b2bk-success); font-weight: 500; }

/* Panel listy zapytań – wysuwany z prawej, zwęża stronę */
:root { --b2bk-panel-w: 420px; }
html.b2bk-panel-open body {
	margin-right: var(--b2bk-panel-w) !important;
}
body { transition: margin-right .3s ease; }
html.b2bk-no-anim body,
html.b2bk-no-anim .b2bk-panel { transition: none !important; }

.b2bk-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99997;
	width: var(--b2bk-panel-w);
	max-width: 100vw;
	display: flex;
	flex-direction: column;
	background: var(--b2bk-bg);
	color: var(--b2bk-text);
	border-left: 1px solid var(--b2bk-border);
	box-shadow: -8px 0 30px rgba(0, 0, 0, .08);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .3s ease, visibility 0s linear .3s;
	outline: none;
}
.b2bk-panel.is-open {
	transform: translateX(0);
	visibility: visible;
	transition: transform .3s ease, visibility 0s;
}
.admin-bar .b2bk-panel { top: 32px; }
.b2bk-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--b2bk-border);
}
.b2bk-panel__title {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
	display: flex;
	align-items: center;
	gap: 8px;
}
.b2bk-panel__count {
	min-width: 24px;
	height: 24px;
	padding: 0 7px;
	border-radius: 12px;
	background: var(--b2bk-accent);
	color: #fff;
	font-size: 13px;
	line-height: 24px;
	text-align: center;
}
.b2bk-panel__close {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.b2bk-panel__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 20px 0;
}
.b2bk-panel .b2bk-grid { grid-template-columns: 1fr; gap: 10px; }
.b2bk-panel .b2bk-items { margin-bottom: 8px; }
.b2bk-panel .b2bk-items:empty { display: block; }
.b2bk-form__heading { margin: 18px 0 10px; font-size: 1em; }
.b2bk-panel .b2bk-actions {
	position: sticky;
	bottom: 0;
	margin: 16px -20px 0;
	padding: 14px 20px;
	background: var(--b2bk-bg);
	border-top: 1px solid var(--b2bk-border);
}
.b2bk-panel .b2bk-form .b2bk-submit { width: 100%; }

.b2bk-panel .b2bk-field--inline { flex: 1 1 120px; }
.b2bk-panel .b2bk-field--qty { flex: 0 0 90px; }
html.b2bk-panel-open .b2bk-toast { left: calc((100vw - var(--b2bk-panel-w)) / 2); }

/* Na wąskich ekranach panel nachodzi na stronę zamiast ją zwężać */
@media (max-width: 960px) {
	html.b2bk-panel-open body { margin-right: 0 !important; }
	html.b2bk-panel-open .b2bk-toast { left: 50%; }
	.b2bk-panel { box-shadow: -8px 0 40px rgba(0, 0, 0, .25); }
}
@media (max-width: 782px) {
	.admin-bar .b2bk-panel { top: 46px; }
}

/* ===================== Przycisk listy zapytań ===================== */
.b2bk-badge[hidden] { display: none !important; }
.b2bk-launcher {
	--b2bk-offset: 24px;
	position: fixed;
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	border: 0;
	background: var(--b2bk-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	-webkit-tap-highlight-color: transparent;
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s, box-shadow .2s, background-color .2s;
}
.b2bk-launcher:focus-visible { outline: 3px solid var(--b2bk-accent); outline-offset: 3px; }
.b2bk-launcher__icon { flex: 0 0 auto; display: block; }

/* Odznaka z liczbą (wspólna dla wariantów) */
.b2bk-launcher .b2bk-badge__count,
.b2bk-inline-icon__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: #fff;
	color: var(--b2bk-accent);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	box-sizing: border-box;
}

/* Wariant 1: okrągła ikona */
.b2bk-launcher--icon {
	bottom: var(--b2bk-offset);
	width: 52px;
	height: 52px;
	justify-content: center;
	padding: 0;
	border-radius: 50%;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	opacity: .92;
}
.b2bk-launcher--icon.b2bk-launcher--right { right: 20px; }
.b2bk-launcher--icon.b2bk-launcher--left { left: 20px; }
.b2bk-launcher--icon .b2bk-badge__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.b2bk-launcher--icon .b2bk-badge__count {
	position: absolute;
	top: -3px;
	right: -3px;
	box-shadow: 0 0 0 2px var(--b2bk-accent);
}
.b2bk-launcher--icon:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.b2bk-launcher--icon.is-away { transform: translateY(calc(100% + var(--b2bk-offset) + 10px)); opacity: 0; pointer-events: none; }

/* Wariant 2: języczek przy krawędzi */
.b2bk-launcher--tab {
	top: calc(50% + var(--b2bk-offset) - 24px);
	flex-direction: column;
	gap: 10px;
	padding: 14px 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
}
.b2bk-launcher--tab.b2bk-launcher--right {
	right: 0;
	border-radius: 12px 0 0 12px;
	align-items: flex-start;
	padding-left: 9px;
	padding-right: 24px;
	transform: translate(46%, -50%);
}
.b2bk-launcher--tab.b2bk-launcher--left {
	left: 0;
	border-radius: 0 12px 12px 0;
	align-items: flex-end;
	padding-right: 9px;
	padding-left: 24px;
	transform: translate(-46%, -50%);
}
.b2bk-launcher--tab .b2bk-badge__label {
	align-self: center;
	opacity: .35;
	transition: opacity .25s;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 13px;
	letter-spacing: .02em;
}
.b2bk-launcher--tab.b2bk-launcher--right .b2bk-badge__count { order: -1; }
.b2bk-launcher--tab:hover,
.b2bk-launcher--tab:focus-visible,
.b2bk-launcher--tab.is-bump { transform: translate(0, -50%); }
.b2bk-launcher--tab:hover .b2bk-badge__label,
.b2bk-launcher--tab:focus-visible .b2bk-badge__label,
.b2bk-launcher--tab.is-bump .b2bk-badge__label { opacity: 1; }
.b2bk-launcher--tab.is-away.b2bk-launcher--right { transform: translate(100%, -50%); opacity: 0; pointer-events: none; }
.b2bk-launcher--tab.is-away.b2bk-launcher--left { transform: translate(-100%, -50%); opacity: 0; pointer-events: none; }

/* Wariant 3: klasyczny przycisk */
.b2bk-launcher--pill {
	bottom: var(--b2bk-offset);
	padding: 11px 16px;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.b2bk-launcher--pill.b2bk-launcher--right { right: 20px; }
.b2bk-launcher--pill.b2bk-launcher--left { left: 20px; }
.b2bk-launcher--pill.is-away { transform: translateY(calc(100% + var(--b2bk-offset) + 10px)); opacity: 0; pointer-events: none; }

/* Podbicie po dodaniu produktu */
.b2bk-launcher.is-bump .b2bk-badge__count,
.b2bk-inline-icon.is-bump .b2bk-inline-icon__count { animation: b2bk-bump .6s ease; }
@keyframes b2bk-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* Ikona z krótkiego kodu (np. w nagłówku) */
.b2bk-inline-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
}
.b2bk-inline-icon .b2bk-launcher__icon { width: 24px; height: 24px; }
.b2bk-inline-icon__count {
	position: absolute;
	top: -2px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 11px;
	background: var(--b2bk-accent);
	color: #fff;
}
.b2bk-inline-icon.has-label .b2bk-inline-icon__count { position: static; }
.b2bk-inline-icon__count[data-zero="1"] { display: none; }

@media (max-width: 600px) {
	.b2bk-launcher--icon { width: 48px; height: 48px; }
	.b2bk-launcher--icon.b2bk-launcher--right, .b2bk-launcher--pill.b2bk-launcher--right { right: 14px; }
	.b2bk-launcher--icon.b2bk-launcher--left, .b2bk-launcher--pill.b2bk-launcher--left { left: 14px; }
	.b2bk-launcher--pill .b2bk-badge__label { display: none; }
	/* Na ekranach dotykowych języczek jest od razu wysunięty, ale wąski. */
	.b2bk-launcher--tab .b2bk-badge__label { display: none; }
	.b2bk-launcher--tab.b2bk-launcher--right, .b2bk-launcher--tab.b2bk-launcher--left { transform: translate(0, -50%); padding: 12px 8px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
	.b2bk-launcher { transition: none; }
	.b2bk-launcher.is-bump .b2bk-badge__count, .b2bk-inline-icon.is-bump .b2bk-inline-icon__count { animation: none; }
}

/* Toast */
.b2bk-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 999999;
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px 18px;
	border-radius: var(--b2bk-radius);
	background: #1e1e1e;
	color: #fff;
	font-size: .95em;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .25s, transform .25s;
}
.b2bk-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.b2bk-toast__link {
	border: 0;
	background: transparent;
	color: #fff;
	text-decoration: underline;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
}

@media (max-width: 600px) {
	.b2bk-grid { grid-template-columns: 1fr; }
	.b2bk-modal { padding: 0; align-items: flex-end; }
	.b2bk-modal__dialog {
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 16px 16px 0 0;
		padding: 0 18px calc(18px + env(safe-area-inset-bottom));
	}
	.b2bk-modal__head { margin: 0 -18px 12px; padding: 16px 14px 10px 18px; }
	.b2bk-modal__head::before {
		content: '';
		position: absolute;
		top: 6px;
		left: 50%;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 2px;
		background: rgba(0, 0, 0, .15);
	}
	.b2bk-modal__title { font-size: 1.2em; }
	.b2bk-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 18px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--b2bk-bg); box-shadow: 0 -1px 0 rgba(0, 0, 0, .06); }
	.b2bk-actions .b2bk-submit, .b2bk-modal .b2bk-cancel { flex: 1 1 0; text-align: center; justify-content: center; }
	.b2bk-actions .b2bk-submit, .b2bk-modal .b2bk-cancel { min-height: 46px; }
	.b2bk-form .b2bk-actions .b2bk-submit { flex: 2 1 0; padding: 0 14px !important; }
	.b2bk-modal .b2bk-actions .b2bk-cancel { flex: 1 1 0; }
	.b2bk-single .b2bk-btn--primary { flex: 1 1 calc(100% - 140px); }
	.b2bk-single .b2bk-btn--secondary { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.b2bk-toast { transition: none; }
}

@media (max-width: 480px) {
	:root { --b2bk-panel-w: 100vw; }
}

/* CAPTCHA (Turnstile) */
.b2bk-captcha { margin-top: 14px; min-height: 65px; }

/* Waluta rozliczenia – przełącznik */
.b2bk-currency { border: 0; margin: 0; padding: 0; min-width: 0; }
.b2bk-currency legend { padding: 0; margin-bottom: 4px; font-weight: 500; }
.b2bk-currency__options { display: flex; flex-wrap: wrap; gap: 8px; }
.b2bk-currency__option { position: relative; flex: 1 1 110px; margin: 0; cursor: pointer; }
.b2bk-currency__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.b2bk-currency__option span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--b2bk-border);
	border-radius: 6px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.b2bk-currency__option em { font-style: normal; color: var(--b2bk-muted); }
.b2bk-currency__option:hover span { border-color: rgba(0, 0, 0, .35); }
.b2bk-currency__option input:checked + span {
	border-color: var(--b2bk-accent);
	background: var(--b2bk-accent);
	color: #fff;
}
.b2bk-currency__option input:checked + span em { color: rgba(255, 255, 255, .75); }
.b2bk-currency__option input:focus-visible + span { outline: 2px solid var(--b2bk-accent); outline-offset: 2px; }

/* ===================== Panel klienta: zapytania i oferty ===================== */
.b2bk-account {
	--b2bk-line: #e8e8e8;
	--b2bk-soft: #f7f7f8;
	--b2bk-radius-lg: 12px;
	color: inherit;
	font-size: 15px;
	line-height: 1.5;
}
.b2bk-account *, .b2bk-account *::before, .b2bk-account *::after { box-sizing: border-box; }
.b2bk-account .b2bk-muted { color: var(--b2bk-muted); font-size: .9em; }
.b2bk-account .b2bk-num { text-align: right; white-space: nowrap; }
.b2bk-account img { max-width: none; box-shadow: none; }

.b2bk-account__empty {
	padding: 32px 24px;
	border: 1px dashed var(--b2bk-line);
	border-radius: var(--b2bk-radius-lg);
	text-align: center;
	background: var(--b2bk-soft);
}
.b2bk-account__empty p { margin: 0 0 14px; }

/* Karta zapytania */
.b2bk-inq-list { display: flex; flex-direction: column; gap: 12px; }
.b2bk-account .b2bk-inq {
	margin: 0;
	padding: 0;
	border: 1px solid var(--b2bk-line);
	border-radius: var(--b2bk-radius-lg);
	background: #fff;
	overflow: hidden;
	transition: box-shadow .2s, border-color .2s;
}
.b2bk-account .b2bk-inq[hidden] { display: none; }
.b2bk-account .b2bk-inq:hover { border-color: #d6d6d6; }
.b2bk-account .b2bk-inq[open] { border-color: #d0d0d0; box-shadow: 0 8px 28px rgba(0, 0, 0, .07); }
.b2bk-account .b2bk-inq.is-target { animation: b2bk-flash 1.6s ease-out 1; }
@keyframes b2bk-flash { 0% { box-shadow: 0 0 0 3px var(--b2bk-accent); } 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, .07); } }

.b2bk-account .b2bk-inq__summary {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto minmax(110px, auto) 20px;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 14px 18px;
	list-style: none;
	cursor: pointer;
	background: none;
	color: inherit;
	font: inherit;
	user-select: none;
}
.b2bk-account .b2bk-inq__summary::-webkit-details-marker { display: none; }
.b2bk-account .b2bk-inq__summary::marker { content: ''; }
.b2bk-account .b2bk-inq__summary:focus-visible { outline: 2px solid var(--b2bk-accent); outline-offset: -2px; border-radius: var(--b2bk-radius-lg); }

.b2bk-inq__thumbs { display: flex; padding-left: 10px; }
.b2bk-account .b2bk-inq__thumbs img,
.b2bk-inq__thumb-empty {
	width: 40px;
	height: 40px;
	margin: 0 0 0 -10px;
	border: 2px solid #fff;
	border-radius: 8px;
	object-fit: cover;
	background: var(--b2bk-soft);
}
.b2bk-inq__thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--b2bk-muted); font-weight: 700; }

.b2bk-inq__main { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; min-width: 0; }
.b2bk-inq__number { font-weight: 700; letter-spacing: .01em; }
.b2bk-inq__date { color: var(--b2bk-muted); font-size: .88em; align-self: center; }
.b2bk-inq__products {
	grid-column: 1 / -1;
	color: var(--b2bk-muted);
	font-size: .9em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.b2bk-inq__more-count { opacity: .8; }

.b2bk-inq__offer { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.25; }
.b2bk-inq__offer-label { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--b2bk-muted); }
.b2bk-inq__offer-amount { font-size: 1.05em; white-space: nowrap; }
.b2bk-inq__offer-wait { font-size: .85em; color: var(--b2bk-muted); white-space: nowrap; }

.b2bk-inq__chevron {
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	opacity: .5;
	transition: transform .2s;
	justify-self: center;
}
.b2bk-inq[open] .b2bk-inq__chevron { transform: rotate(-135deg) translate(-2px, -2px); }

/* Status */
.b2bk-status {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	font-size: .78em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	background: #f0f0f1;
	color: #50575e;
}
.b2bk-status--new { background: #fcf0e3; color: #94660c; }
.b2bk-status--in_progress { background: #e5f1fa; color: #135e96; }
.b2bk-status--quoted, .b2bk-status--won { background: #e6f4ea; color: #00702b; }
.b2bk-status--closed { background: #f0f0f1; color: #646970; }

/* Treść karty */
.b2bk-inq__body {
	padding: 18px;
	border-top: 1px solid var(--b2bk-line);
	background: var(--b2bk-soft);
}
.b2bk-inq__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.b2bk-account .b2bk-btn-soft,
.b2bk-account .b2bk-btn-solid {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--b2bk-line);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: .9em;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	transition: border-color .15s, background-color .15s;
}
.b2bk-account .b2bk-btn-soft:hover { border-color: #bdbdbd; }
.b2bk-account .b2bk-btn-solid { background: var(--b2bk-accent); border-color: var(--b2bk-accent); color: #fff; }
.b2bk-account .b2bk-btn-solid:hover { filter: brightness(1.08); }

.b2bk-inq__waiting {
	padding: 14px 16px;
	border-radius: 10px;
	background: #fff;
	border: 1px dashed var(--b2bk-line);
	color: var(--b2bk-muted);
}
.b2bk-account .b2bk-inq__heading { margin: 22px 0 10px; font-size: 1em; font-weight: 700; }

/* Oferta */
.b2bk-offer {
	margin: 0 0 14px;
	padding: 16px 18px;
	border: 1px solid var(--b2bk-line);
	border-left: 4px solid var(--b2bk-accent);
	border-radius: 10px;
	background: #fff;
}
.b2bk-offer.is-expired { border-left-color: #c3c3c3; }
.b2bk-offer__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.b2bk-offer__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.b2bk-offer__kicker { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--b2bk-muted); }
.b2bk-offer__valid { font-size: .78em; padding: 2px 9px; border-radius: 999px; background: #e6f4ea; color: #00702b; }
.b2bk-offer__valid.is-expired { background: #f0f0f1; color: #646970; }
.b2bk-offer__total { font-size: 1.4em; font-weight: 700; white-space: nowrap; }
.b2bk-offer__message { margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; background: var(--b2bk-soft); }
.b2bk-offer__foot { display: flex; justify-content: flex-end; margin-top: 14px; }

/* Lista pozycji */
.b2bk-lines { border: 1px solid var(--b2bk-line); border-radius: 10px; background: #fff; overflow: hidden; }
.b2bk-lines__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 80px;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-top: 1px solid var(--b2bk-line);
}
.b2bk-lines.has-price .b2bk-lines__row { grid-template-columns: minmax(0, 1fr) 70px 130px; }
.b2bk-lines__row--head {
	border-top: 0;
	padding-top: 8px;
	padding-bottom: 8px;
	background: var(--b2bk-soft);
	font-size: .78em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--b2bk-muted);
}
.b2bk-lines__product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.b2bk-account .b2bk-lines__product img { width: 44px; height: 44px; margin: 0; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.b2bk-lines__product > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.b2bk-account .b2bk-lines__product a { color: inherit; font-weight: 600; text-decoration: none; }
.b2bk-account .b2bk-lines__product a:hover { text-decoration: underline; }
.b2bk-lines__product small { color: var(--b2bk-muted); font-size: .82em; }
.b2bk-lines__label { display: none; }
.b2bk-lines__row--shipping { color: var(--b2bk-muted); }
.b2bk-lines__ship-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; background: var(--b2bk-soft); font-size: 20px; flex: 0 0 auto; }
.b2bk-lines__total {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 12px;
	padding: 12px 14px;
	border-top: 1px solid var(--b2bk-line);
	background: var(--b2bk-soft);
}
.b2bk-lines__total strong { font-size: 1.2em; }

/* Dane zapytania */
.b2bk-account .b2bk-inq__details {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px 20px;
	margin: 16px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--b2bk-line);
	border-radius: 10px;
	background: #fff;
}
.b2bk-inq__details-wide { grid-column: 1 / -1; }
.b2bk-account .b2bk-inq__details dt { margin: 0; font-size: .75em; text-transform: uppercase; letter-spacing: .05em; color: var(--b2bk-muted); font-weight: 600; }
.b2bk-account .b2bk-inq__details dd { margin: 2px 0 0; }

/* Pokaż starsze */
.b2bk-inq-more { text-align: center; margin-top: 14px; }
.b2bk-account .b2bk-inq-more__btn {
	padding: 9px 18px;
	border: 1px solid var(--b2bk-line);
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: .9em;
	cursor: pointer;
}

/* Układ zależny od szerokości samego panelu (np. obok bocznego menu konta). */
.b2bk-account { container-type: inline-size; container-name: b2bk-account; }
.b2bk-account.b2bk-account--modal { container-type: normal; }
.b2bk-inq__date { white-space: nowrap; }
@container b2bk-account (max-width: 620px) {
	.b2bk-account .b2bk-inq__summary {
		grid-template-columns: minmax(0, 1fr) auto 16px;
		grid-template-areas: "main main chev" "status offer offer";
		gap: 10px 12px;
		padding: 12px 14px;
	}
	.b2bk-account .b2bk-inq__thumbs { display: none; }
	.b2bk-account .b2bk-inq__main { grid-area: main; }
	.b2bk-account .b2bk-inq__status { grid-area: status; align-self: center; }
	.b2bk-account .b2bk-inq__offer { grid-area: offer; flex-direction: row; align-items: baseline; justify-content: flex-end; gap: 6px; }
	.b2bk-account .b2bk-inq__chevron { grid-area: chev; align-self: start; margin-top: 6px; }
	.b2bk-account .b2bk-inq__body { padding: 12px; }
	.b2bk-account .b2bk-offer { padding: 14px; }
	.b2bk-account .b2bk-offer__total { width: 100%; }
	.b2bk-account .b2bk-lines__row--head { display: none; }
	.b2bk-account .b2bk-lines__row,
	.b2bk-account .b2bk-lines.has-price .b2bk-lines__row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "prod prod" "qty price";
		gap: 6px 12px;
	}
	.b2bk-account .b2bk-lines__row > :nth-child(1) { grid-area: prod; }
	.b2bk-account .b2bk-lines__row > :nth-child(2) { grid-area: qty; text-align: left; color: var(--b2bk-muted); font-size: .88em; padding-left: 56px; }
	.b2bk-account .b2bk-lines__row > :nth-child(3) { grid-area: price; }
	.b2bk-account .b2bk-lines__row--shipping > :nth-child(2) { display: none; }
	.b2bk-account .b2bk-lines.has-price .b2bk-lines__row--shipping { grid-template-areas: "prod price"; align-items: center; }
	.b2bk-account .b2bk-lines__label { display: inline; }
	.b2bk-account .b2bk-lines__total { flex-wrap: wrap; }
	.b2bk-account .b2bk-offer__foot .b2bk-btn-solid { width: 100%; justify-content: center; }
}
/* Przeglądarki bez container queries */
@supports not (container-type: inline-size) {
	@media (max-width: 720px) {
	.b2bk-account .b2bk-inq__summary {
			grid-template-columns: minmax(0, 1fr) auto 16px;
			grid-template-areas: "main main chev" "status offer offer";
			gap: 10px 12px;
			padding: 12px 14px;
		}
		.b2bk-account .b2bk-inq__thumbs { display: none; }
		.b2bk-account .b2bk-inq__main { grid-area: main; }
		.b2bk-account .b2bk-inq__status { grid-area: status; align-self: center; }
		.b2bk-account .b2bk-inq__offer { grid-area: offer; flex-direction: row; align-items: baseline; justify-content: flex-end; gap: 6px; }
		.b2bk-account .b2bk-inq__chevron { grid-area: chev; align-self: start; margin-top: 6px; }
		.b2bk-account .b2bk-inq__body { padding: 12px; }
		.b2bk-account .b2bk-offer { padding: 14px; }
		.b2bk-account .b2bk-offer__total { width: 100%; }
		.b2bk-account .b2bk-lines__row--head { display: none; }
		.b2bk-account .b2bk-lines__row,
		.b2bk-account .b2bk-lines.has-price .b2bk-lines__row {
			grid-template-columns: minmax(0, 1fr) auto;
			grid-template-areas: "prod prod" "qty price";
			gap: 6px 12px;
		}
		.b2bk-account .b2bk-lines__row > :nth-child(1) { grid-area: prod; }
		.b2bk-account .b2bk-lines__row > :nth-child(2) { grid-area: qty; text-align: left; color: var(--b2bk-muted); font-size: .88em; padding-left: 56px; }
		.b2bk-account .b2bk-lines__row > :nth-child(3) { grid-area: price; }
		.b2bk-account .b2bk-lines__row--shipping > :nth-child(2) { display: none; }
		.b2bk-account .b2bk-lines.has-price .b2bk-lines__row--shipping { grid-template-areas: "prod price"; align-items: center; }
		.b2bk-account .b2bk-lines__label { display: inline; }
		.b2bk-account .b2bk-lines__total { flex-wrap: wrap; }
		.b2bk-account .b2bk-offer__foot .b2bk-btn-solid { width: 100%; justify-content: center; }
	}
}
}

/* Decyzja klienta w ofercie */
.b2bk-account .b2bk-offer__foot { gap: 8px; flex-wrap: wrap; }
.b2bk-account .b2bk-btn-reject:hover { border-color: #b32d2e; color: #b32d2e; }
.b2bk-account .b2bk-btn-accept { min-height: 40px; padding: 0 20px; font-size: .95em; }
.b2bk-inq__offer-label.is-pending { color: var(--b2bk-accent); font-weight: 700; }
.b2bk-offer__response {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: .92em;
}
.b2bk-offer__response--accepted { background: #e6f4ea; color: #0a5c26; }
.b2bk-offer__response--rejected { background: #fcf0f1; color: #8a2424; }
.b2bk-offer__response strong::before { margin-right: 6px; }
.b2bk-offer__response--accepted strong::before { content: '✓'; }
.b2bk-offer__response--rejected strong::before { content: '✕'; }
.b2bk-offer__response-note { font-style: italic; }
.b2bk-offer__response .b2bk-muted { color: inherit; opacity: .8; }

/* Okienko akceptacji / odrzucenia */
.b2bk-resp[hidden], .b2bk-resp [hidden] { display: none !important; }
.b2bk-resp {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.b2bk-resp__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.b2bk-resp__dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 28px 26px 22px;
	border-radius: 14px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
	text-align: center;
	outline: none;
}
.b2bk-account .b2bk-resp__close {
	position: sticky;
	float: right;
	top: 0;
	z-index: 2;
	margin: -14px -12px 0 0 !important;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.b2bk-resp__icon {
	display: inline-flex;
	width: 52px;
	height: 52px;
	margin-bottom: 10px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 24px;
	font-weight: 700;
}
.b2bk-resp[data-mode="accept"] .b2bk-resp__icon { background: #e6f4ea; color: #00702b; }
.b2bk-resp[data-mode="accept"] .b2bk-resp__icon::before { content: '✓'; }
.b2bk-resp[data-mode="reject"] .b2bk-resp__icon { background: #fcf0f1; color: #b32d2e; }
.b2bk-resp[data-mode="reject"] .b2bk-resp__icon::before { content: '✕'; }
.b2bk-account .b2bk-resp__title { margin: 0 0 4px; font-size: 1.3em; }
.b2bk-resp__offer { margin: 0 0 16px; color: var(--b2bk-muted); font-weight: 600; }
.b2bk-resp__info {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #f2f7fd;
	color: #1d3f63;
	font-size: .92em;
	text-align: left;
}
.b2bk-resp__info::before { content: 'ℹ'; display: inline-block; margin-right: 6px; font-weight: 700; }
.b2bk-resp__field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; text-align: left; font-size: .92em; }
.b2bk-resp__field > span { font-weight: 600; }
.b2bk-account .b2bk-resp__field input,
.b2bk-account .b2bk-resp__field textarea {
	width: 100%;
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--b2bk-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	box-shadow: none;
}
.b2bk-resp__field abbr.required { color: var(--b2bk-error); text-decoration: none; border: 0; }
.b2bk-resp__msg { min-height: 1em; margin: 0 0 10px; color: var(--b2bk-error); font-size: .9em; text-align: left; }
.b2bk-resp__buttons { display: flex; gap: 8px; justify-content: flex-end; }
.b2bk-account .b2bk-resp__buttons button { min-height: 42px; padding: 0 18px; }
.b2bk-resp[data-mode="reject"] .b2bk-resp__submit { background: #b32d2e; border-color: #b32d2e; }
.b2bk-resp__submit[disabled] { opacity: .6; cursor: wait; }
.b2bk-resp__done-text { margin: 4px 0 18px; line-height: 1.55; }
.b2bk-account .b2bk-resp__done .b2bk-btn-solid { min-height: 42px; padding: 0 28px; }
@media (max-width: 480px) {
	.b2bk-resp { padding: 0; align-items: flex-end; }
	.b2bk-resp__dialog { border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
	.b2bk-resp__buttons { flex-direction: column-reverse; }
	.b2bk-account .b2bk-resp__buttons button { width: 100%; justify-content: center; }
}
