/* Mekona – Konfigurator tkanin
 * Kolory i czcionka zgodne ze stroną (Elementor: DM Sans, czerwień #A72039,
 * ramki wariantów #c9c9c9 / 10px). Zmiana: nadpisz zmienne w Elementorze → Własny CSS.
 */

.mfc-field,
.mfc-modal {
	--mfc-accent: #a72039;
	--mfc-accent-text: #ffffff;
	--mfc-accent-soft: rgba(167, 32, 57, 0.06);
	--mfc-bg: #ffffff;
	--mfc-surface: #f5f5f5;
	--mfc-line: #c9c9c9;
	--mfc-line-soft: #e6e6e6;
	--mfc-text: #212121;
	--mfc-label: #333333;
	--mfc-muted: #6b6b6b;
	--mfc-error: #a72039;
	--mfc-radius: 10px;
	--mfc-font: "DM Sans", sans-serif;
}

/* ---------- Pole „Tkanina” – wygląda jak kolejny wariant ---------- */

form.cart:has(> .mfc-field) {
	flex-wrap: wrap;
}

.mfc-field {
	display: block;
	flex: 0 0 100%;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 20px;
	color: var(--mfc-text);
	font-family: var(--mfc-font);
}

.mfc-field__label {
	margin-bottom: 8px;
	color: var(--mfc-label);
	font-weight: 700;
}

.mfc-field__value {
	font-weight: 400;
}

.mfc-field__meta {
	color: var(--mfc-muted);
	font-weight: 400;
}

/* Przycisk „Konfigurator produktu”: białe tło, czerwona obwódka 2,25 px, czarny pogrubiony napis,
   ikonka suwaków. !important – motyw/Elementor nadpisuje style przycisków. */
body .mfc-field button.mfc-field__trigger {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	width: auto;
	height: auto;
	min-height: 0;
	max-width: 100%;
	margin: 0;
	padding: 16px 32px 16px 28px;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #000000 !important;
	border: 2.25px solid var(--mfc-accent) !important; /* 3 px − 25% */
	border-radius: 12px !important;
	box-shadow: none !important;
	font-family: var(--mfc-font);
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

body .mfc-field button.mfc-field__trigger:hover,
body .mfc-field button.mfc-field__trigger:focus {
	background: #fbeef0 !important;
	background-color: #fbeef0 !important;
	color: #000000 !important;
}

body .mfc-field button.mfc-field__trigger:focus-visible {
	outline: 2px solid var(--mfc-accent);
	outline-offset: 3px;
}

.mfc-field .mfc-field__icon {
	display: block;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	color: var(--mfc-accent);
}

.mfc-field .mfc-field__name {
	display: block;
	color: #000000;
	line-height: 1.2;
}

@media (max-width: 380px) {
	body .mfc-field button.mfc-field__trigger {
		gap: 10px;
		padding: 14px 24px 14px 20px;
		font-size: 18px;
	}
}

.mfc-field__summary {
	display: grid;
	gap: 3px;
	margin-top: 10px;
	font-size: 15px;
	line-height: 1.4;
}

.mfc-field__summary[hidden] {
	display: none;
}

.mfc-field__key {
	color: var(--mfc-label);
	font-weight: 700;
}

.mfc-field__val {
	color: var(--mfc-text);
}

.mfc-field__extra {
	color: var(--mfc-muted);
}

.mfc-field__price {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 600;
}

.mfc-field__price[hidden],
.mfc-field__error[hidden] {
	display: none;
}

.mfc-field__error {
	margin: 8px 0 0;
	color: var(--mfc-error);
	font-size: 14px;
}

.mfc-field.has-error .mfc-field__label {
	color: var(--mfc-error);
}

.mfc-open-button {
	cursor: pointer;
}

/* ---------- Okno konfiguratora ---------- */

html.mfc-lock,
html.mfc-lock body {
	overflow: hidden;
}

/* Awaryjnie ukryj dymek tawk.to, gdy okno konfiguratora jest otwarte. */
html.mfc-lock iframe[title="chat widget"],
html.mfc-lock .widget-visible iframe {
	display: none !important;
}

.mfc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	color: var(--mfc-text);
	font-family: var(--mfc-font);
	font-size: 15px;
	line-height: 1.4;
}

.mfc-modal[hidden],
.mfc-modal [hidden] {
	display: none !important;
}

.mfc-modal *,
.mfc-modal *::before,
.mfc-modal *::after {
	box-sizing: border-box;
	font-family: var(--mfc-font);
}

.mfc-modal button {
	margin: 0;
	font-size: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

.mfc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(33, 33, 33, 0.55);
}

.mfc-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--mfc-bg);
	animation: mfc-in 0.22s ease-out;
}

@keyframes mfc-in {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mfc-modal__panel,
	.mfc-float { animation: none !important; }
}

@media (min-width: 768px) {
	.mfc-modal {
		align-items: center;
		padding: 24px;
	}
	.mfc-modal__panel {
		max-width: 860px;
		height: min(88vh, 920px);
		border-radius: 16px;
		box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
	}
}

/* Górny panel */

.mfc-modal__controls {
	display: grid;
	gap: 8px;
	padding: 10px 12px;
	padding-top: max(10px, env(safe-area-inset-top));
	border-bottom: 1px solid var(--mfc-line-soft);
}

.mfc-row {
	display: flex;
	gap: 8px;
	min-width: 0;
}

.mfc-modal .mfc-select,
.mfc-modal .mfc-search {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	background-color: var(--mfc-bg);
	color: var(--mfc-text);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	box-shadow: none;
	font-size: 16px; /* bez zoomu na iOS */
	-webkit-appearance: none;
	appearance: none;
}

.mfc-modal .mfc-select {
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23212121' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 5.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.mfc-modal .mfc-search {
	padding-left: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23212121' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 11px center;
}

.mfc-modal .mfc-select:focus,
.mfc-modal .mfc-search:focus {
	border-color: var(--mfc-accent);
	outline: none;
}

.mfc-modal .mfc-icon-btn,
.mfc-modal .mfc-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 42px;
	padding: 0 12px;
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	font-weight: 500;
	cursor: pointer;
}

.mfc-modal .mfc-icon-btn {
	width: 42px;
	padding: 0;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
}

.mfc-modal .mfc-toggle::after {
	content: "";
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23212121' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") center no-repeat;
	transition: transform 0.15s;
}

.mfc-modal .mfc-toggle.is-open::after {
	transform: rotate(180deg);
}

.mfc-modal .mfc-icon-btn:hover,
.mfc-modal .mfc-toggle:hover,
.mfc-modal .mfc-toggle.is-open {
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border-color: var(--mfc-accent);
}

.mfc-toggle__count:not(:empty) {
	min-width: 18px;
	padding: 0 5px;
	background: var(--mfc-accent);
	color: var(--mfc-accent-text);
	border-radius: 9px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}

@media (max-width: 400px) {
	.mfc-modal .mfc-toggle { padding: 0 9px; font-size: 14px; gap: 4px; }
}

.mfc-filters {
	display: grid;
	gap: 8px;
	max-height: 40vh;
	overflow-y: auto;
	padding: 2px 0;
}

.mfc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mfc-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 7px 12px;
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	font-size: 14px;
	cursor: pointer;
	user-select: none;
}

.mfc-chip input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.mfc-chip.is-on {
	background: var(--mfc-accent-soft);
	border-color: var(--mfc-accent);
}

.mfc-chip:has(input:focus-visible) {
	outline: 2px solid var(--mfc-accent);
	outline-offset: 2px;
}

.mfc-filters .mfc-link {
	justify-self: start;
	font-size: 13px;
}

/* Lista tkanin */

.mfc-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 0 12px 24px;
}

.mfc-modal__panel.has-float .mfc-modal__body {
	padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.mfc-group__head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 10px;
	padding: 14px 0 10px;
	background: var(--mfc-bg);
}

.mfc-modal .mfc-group__title {
	margin: 0;
	color: var(--mfc-label);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.mfc-group__count {
	color: var(--mfc-muted);
	font-size: 13px;
	font-weight: 400;
}

.mfc-group__price {
	color: var(--mfc-text);
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

/* Promocja: przekreślona cena regularna obok aktualnej */
.mfc-price__old {
	margin-right: 2px;
	color: var(--mfc-muted);
	font-weight: 400;
	text-decoration: line-through;
}

.mfc-group__price .mfc-price__old {
	font-size: 13px;
}

.is-sale .mfc-price__now {
	color: var(--mfc-accent);
}

/* Rodzaj tkaniny – nagłówek z właściwością i cechami nad odcieniami */
.mfc-kind + .mfc-kind {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--mfc-line-soft);
}

.mfc-kind__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.mfc-kind__info {
	min-width: 0;
}

.mfc-modal .mfc-kind__more {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.mfc-modal .mfc-kind__more::after {
	content: "";
	width: 10px;
	height: 10px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%23212121' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 1.5h4.5V6M8.5 1.5 3 7M7 9H1V3'/%3E%3C/svg%3E") center no-repeat;
}

.mfc-modal .mfc-kind__more:hover,
.mfc-modal .mfc-kind__more:focus {
	color: var(--mfc-text);
	border-color: var(--mfc-accent);
	text-decoration: none;
}

.mfc-modal .mfc-kind__name {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: 0;
	color: var(--mfc-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.mfc-kind__type {
	padding: 1px 7px;
	background: var(--mfc-surface);
	border-radius: 6px;
	color: var(--mfc-label);
	font-size: 12px;
	font-weight: 500;
}

.mfc-kind__feats {
	margin-top: 2px;
	color: var(--mfc-muted);
	font-size: 12px;
	line-height: 1.35;
}

/* Siatka: odstęp wewnętrzny, żeby obramowanie zaznaczonego kafelka nie było ucinane */
.mfc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 8px;
	margin: 0 -3px;
	padding: 3px 3px 8px;
}

@media (min-width: 560px) {
	.mfc-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
	.mfc-kind__feats { font-size: 13px; }
}

.mfc-modal .mfc-swatch {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	min-width: 0;
	padding: 0;
	background: none;
	color: var(--mfc-text);
	border: 0;
	text-align: center;
	cursor: pointer;
}

.mfc-modal .mfc-swatch:hover,
.mfc-modal .mfc-swatch:focus {
	background: none;
	color: var(--mfc-text);
}

.mfc-swatch__img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	margin-bottom: 4px;
	overflow: hidden;
	background: var(--mfc-surface);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mfc-modal .mfc-swatch__img img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}

.mfc-swatch:hover .mfc-swatch__img {
	border-color: var(--mfc-muted);
}

.mfc-swatch.is-selected .mfc-swatch__img,
.mfc-swatch:focus-visible .mfc-swatch__img {
	border-color: var(--mfc-accent);
	box-shadow: 0 0 0 1px var(--mfc-accent);
}

.mfc-swatch:focus-visible {
	outline: none;
}

.mfc-swatch.is-selected::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	width: 20px;
	height: 20px;
	background: var(--mfc-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 6.5 2.6 2.6L10 3'/%3E%3C/svg%3E") center no-repeat;
	border-radius: 6px;
}

/* Nazwy odcieni zawijają się w obrębie kafelka (motyw ustawia przyciskom nowrap). */
.mfc-modal .mfc-swatch,
.mfc-modal .mfc-swatch * {
	white-space: normal !important;
}

.mfc-swatch__name {
	display: block;
	min-width: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.25;
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: none;
}

.mfc-modal .mfc-swatch .mfc-swatch__num {
	white-space: nowrap !important;
}

/* Dłuższa nazwa: numer odcienia zawsze w osobnej linii. */
.mfc-swatch__name.is-long .mfc-swatch__num {
	display: block;
}

.mfc-swatch.is-selected .mfc-swatch__name {
	font-weight: 700;
}

@media (min-width: 560px) {
	.mfc-swatch__name { font-size: 13px; }
}

.mfc-empty {
	padding: 48px 0;
	color: var(--mfc-muted);
	text-align: center;
}

.mfc-modal .mfc-link {
	padding: 0;
	background: none;
	color: var(--mfc-text);
	border: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Przycisk „Zatwierdź wybór” nad kafelkami */

.mfc-float {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: flex;
	justify-content: center;
	padding: 10px 12px;
	padding-bottom: max(10px, env(safe-area-inset-bottom));
	/* Półprzezroczysty, rozmyty pasek pod przyciskiem: kafelki prześwitują, a Safari na iOS
	   (który barwi swój dolny pasek kolorem elementu przy krawędzi) dostaje jasny kolor zamiast czerwieni.
	   W pełni przezroczysty: background-color: transparent; i usuń oba backdrop-filter. */
	background-color: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	backdrop-filter: blur(12px) saturate(1.4);
	pointer-events: none;
	animation: mfc-float-in 0.18s ease-out;
}

@keyframes mfc-float-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.mfc-modal .mfc-confirm {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	width: 100%;
	max-width: 420px;
	min-height: 54px;
	padding: 8px 20px;
	background: var(--mfc-accent);
	color: var(--mfc-accent-text);
	border: 0;
	border-radius: var(--mfc-radius);
	box-shadow: none;
	cursor: pointer;
	pointer-events: auto;
}

.mfc-modal .mfc-confirm:hover,
.mfc-modal .mfc-confirm:focus {
	background: var(--mfc-accent);
	color: var(--mfc-accent-text);
	filter: brightness(1.12);
}

.mfc-confirm__label {
	font-size: 16px;
	font-weight: 600;
}

.mfc-confirm__price {
	font-size: 13px;
	opacity: 0.9;
}

.mfc-confirm__price:empty {
	display: none;
}

.mfc-modal .mfc-confirm:focus-visible,
.mfc-modal .mfc-icon-btn:focus-visible,
.mfc-modal .mfc-toggle:focus-visible {
	outline: 2px solid var(--mfc-accent);
	outline-offset: 2px;
}

.mfc-zoom {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	background: rgba(33, 33, 33, 0.92);
	cursor: zoom-out;
}

.mfc-zoom img {
	width: min(100%, 560px);
	max-height: 70vh;
	border-radius: var(--mfc-radius);
	object-fit: cover;
}

.mfc-zoom__caption {
	color: #ffffff;
	font-weight: 600;
}

/* ---------- Krok 2: dodatkowe opcje ---------- */

.mfc-row--center {
	align-items: center;
	justify-content: space-between;
}

.mfc-modal .mfc-back {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	min-width: 0;
	padding: 4px 0;
	background: none;
	color: var(--mfc-text);
	border: 0;
	text-align: left;
	cursor: pointer;
}

.mfc-modal .mfc-back:hover,
.mfc-modal .mfc-back:focus {
	background: none;
	color: var(--mfc-accent);
}

.mfc-back__label {
	font-size: 15px;
	font-weight: 600;
}

.mfc-back__fabric {
	color: var(--mfc-muted);
	font-size: 13px;
}

.mfc-modal .mfc-steptwo__title {
	margin: 2px 0 0;
	color: var(--mfc-label);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.mfc-opt + .mfc-opt {
	margin-top: 6px;
	border-top: 1px solid var(--mfc-line-soft);
}

.mfc-opt__missing {
	color: var(--mfc-error);
	font-size: 13px;
	font-weight: 600;
}

.mfc-opt.is-missing .mfc-choice,
.mfc-opt.is-missing .mfc-swatch__img {
	border-color: var(--mfc-error);
}

.mfc-choice__price {
	color: var(--mfc-muted);
	font-size: 12px;
	line-height: 1.25;
}

.mfc-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 3px 0 10px;
}

.mfc-modal .mfc-choice {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	min-width: 120px;
	padding: 10px 14px;
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border: 1px solid var(--mfc-line);
	border-radius: var(--mfc-radius);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.mfc-modal .mfc-choice:hover,
.mfc-modal .mfc-choice:focus {
	background: var(--mfc-bg);
	color: var(--mfc-text);
	border-color: var(--mfc-muted);
}

.mfc-modal .mfc-choice.is-selected {
	background: var(--mfc-accent-soft);
	border-color: var(--mfc-accent);
	box-shadow: 0 0 0 1px var(--mfc-accent);
}

.mfc-choice__name {
	font-size: 15px;
	font-weight: 600;
}

.mfc-choice-tile .mfc-choice__price {
	text-align: center;
}

/* ---------- Od ręki ---------- */

.mfc-modal .mfc-badge {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 1;
	display: inline-block;
	padding: 2px 6px;
	background: #2e7d32 !important;
	color: #ffffff !important;
	border-radius: 5px;
	font-family: var(--mfc-font);
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.02em;
	text-transform: none;
	white-space: nowrap !important;
	pointer-events: none;
}

.mfc-modal .mfc-choice {
	position: relative;
}

.mfc-modal .mfc-choice .mfc-badge {
	position: static;
	margin-top: 4px;
}

.mfc-field__line.is-stock .mfc-field__val {
	color: #1e5e22;
	font-weight: 700;
}

/* Informacja „Od ręki” pod przyciskiem konfiguratora (otwiera konfigurator). */
body .mfc-field button.mfc-field__stock {
	display: flex !important;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 4px 8px;
	flex-wrap: nowrap !important;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	overflow: visible !important;
	white-space: normal !important;
	margin: 10px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--mfc-text) !important;
	font-family: var(--mfc-font) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
}

body .mfc-field .mfc-field__stock-badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 4px;
	background: #2e7d32;
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .02em;
	text-transform: uppercase;
	white-space: nowrap;
	flex: 0 0 auto;
	margin-top: 1px;
}

/* Tekst zawija się do kolejnych linii (motyw ustawia przyciskom white-space: nowrap). */
body .mfc-field .mfc-field__stock-text {
	flex: 1 1 0;
	min-width: 0;
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: normal;
}

body .mfc-field button.mfc-field__stock:hover .mfc-field__stock-text,
body .mfc-field button.mfc-field__stock:focus-visible .mfc-field__stock-text {
	text-decoration: underline;
}

/* Omnibus: najniższa cena z 30 dni przed obniżką */
.mfc-omnibus {
	margin: 4px 0 0;
	color: var(--mfc-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

.mfc-group__head .mfc-omnibus {
	flex: 0 0 100%;
	margin: 0;
	font-size: 12px;
	text-align: right;
}

/* Rozmiar nad przyciskiem konfiguratora – lista tej samej szerokości co przycisk. */
.mfc-field__box {
	display: inline-grid;
	grid-template-columns: minmax(0, auto);
	row-gap: 12px;
	max-width: 100%;
}

body .mfc-field .mfc-field__box > button.mfc-field__trigger {
	width: 100%;
}

.mfc-field__size {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.mfc-field__size-label {
	margin: 0;
	color: var(--mfc-label);
	font-family: var(--mfc-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

body .mfc-field select.mfc-field__size-select {
	box-sizing: border-box;
	width: 0;
	min-width: 100%;
	max-width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 40px 0 14px;
	border: 1px solid #cfcfcf !important;
	border-radius: 12px !important;
	background-color: #ffffff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23212121' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 16px center !important;
	background-size: 12px 8px !important;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
	color: var(--mfc-text) !important;
	font-family: var(--mfc-font);
	font-size: 16px;
	line-height: 1.2;
	text-overflow: ellipsis;
	cursor: pointer;
}

body .mfc-field select.mfc-field__size-select:focus {
	border-color: var(--mfc-accent) !important;
	outline: none;
}

/* Grupa niedostępna w wybranym rozmiarze */
.mfc-group.is-off .mfc-group__head {
	position: static;
}

.mfc-group.is-off .mfc-group__title,
.mfc-group.is-off .mfc-group__price {
	color: var(--mfc-muted);
	font-weight: 400;
}

.mfc-modal .mfc-size-note {
	margin: 12px 0 0;
	color: var(--mfc-muted);
	font-size: 14px;
	line-height: 1.4;
}

.mfc-modal .mfc-size-note strong {
	color: var(--mfc-text);
}

/* Przycisk na dole okna bez wybranej tkaniny – widoczny, ale nieaktywny. */
.mfc-modal .mfc-confirm.is-empty {
	cursor: default;
	opacity: 0.6;
}

.mfc-modal .mfc-confirm.is-empty:hover,
.mfc-modal .mfc-confirm.is-empty:focus {
	filter: none;
}

/* Napisy na przycisku zawijają się (motyw ustawia przyciskom white-space: nowrap). */
.mfc-modal button.mfc-confirm {
	box-sizing: border-box;
	max-width: min(420px, 100%);
	height: auto !important;
	white-space: normal !important;
	text-align: center;
	overflow: hidden;
}

.mfc-modal .mfc-confirm__label,
.mfc-modal .mfc-confirm__price {
	display: block;
	max-width: 100%;
	white-space: normal !important;
	overflow-wrap: anywhere;
	line-height: 1.3;
}
