/**
 * Kalkulator nadruku — style.
 *
 * Paleta zbudowana wokół istniejącej identyfikacji: czarne logo,
 * ciepłe kremowe zdjęcia produktowe. Zaznaczenie = czerń, nie kolor —
 * dzięki temu kalkulator komponuje się z każdą fotografią.
 *
 * Blok "zabezpieczenia" na dole neutralizuje style Woodmart
 * (wersaliki na przyciskach, rozstrzelenie liter, zaokrąglenia).
 */

.ttk {
	/* Kolory dziedziczone z ustawień Woodmart.
	   Zmienisz je w Ustawienia motywu → Style i kolory,
	   a kalkulator dostosuje się sam. Wartości po przecinku
	   to awaryjne, gdyby motyw nie udostępnił zmiennych. */
	--ttk-accent: var(--wd-primary-color, #3f7a0f);
	--ttk-accent-2: var(--wd-alternative-color, #f0b429);
	--ttk-sum-bg: var(--ttk-accent);

	--ttk-ink: #191814;
	--ttk-muted: #7c7668;
	--ttk-rule: #e6e2d8;
	--ttk-rule-hair: #eeebe3;
	--ttk-surface: #fdfcfa;
	--ttk-sand: #f4f1e9;
	--ttk-sand-deep: #e5e0d2;
	--ttk-deal-bg: #fdf6e4;
	--ttk-deal-tx: #7a5407;
	--ttk-warn-bg: #fbf2e6;
	--ttk-warn-br: #ddb583;
	--ttk-warn-tx: #7d5218;
	--ttk-radius: 10px;

	margin: 24px 0;
	color: var(--ttk-ink);
	font-size: 15px;
	line-height: 1.5;
	max-width: 100%;
}

.ttk *,
.ttk *::before,
.ttk *::after { box-sizing: border-box; }

/* ---------- nagłówek "od X zł" ---------- */

.ttk-headline {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.ttk-headline-from {
	font-size: 13px;
	color: var(--ttk-muted);
	text-transform: uppercase;
	letter-spacing: .09em;
	font-weight: 600;
}

.ttk-headline-price {
	font-size: 27px;
	font-weight: 700;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: var(--ttk-ink);
}

.ttk-headline-unit {
	font-size: 13px;
	color: var(--ttk-muted);
}

/* ---------- przełącznik trybu ---------- */

.ttk-mode {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
	margin-bottom: 14px;
	background: var(--ttk-sand);
	padding: 3px;
	border-radius: var(--ttk-radius);
}

.ttk-mode-btn {
	background: transparent;
	border: none;
	padding: 13px 12px;
	min-height: 48px;
	cursor: pointer;
	color: var(--ttk-muted);
	border-radius: calc(var(--ttk-radius) - 3px);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	transition: background .2s, color .2s, box-shadow .2s;
}

.ttk-mode-btn:hover { color: var(--ttk-ink); }

.ttk-mode-btn[aria-pressed="true"] {
	background: #fff;
	color: var(--ttk-ink);
	box-shadow: 0 1px 2px rgba(25,24,20,.13);
}

/* ---------- jedna bryła zamiast trzech kart ---------- */

.ttk-body {
	background: var(--ttk-surface);
	border: 1px solid var(--ttk-rule);
	border-radius: var(--ttk-radius) var(--ttk-radius) 0 0;
	border-bottom: none;
	overflow: hidden;
}

.ttk-panel {
	padding: 20px;
	border-top: 1px solid var(--ttk-rule-hair);
}

.ttk-panel:first-child { border-top: none; }

.ttk-panel-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.ttk-num {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--ttk-accent);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ttk-panel-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--ttk-ink);
}

/* ---------- ilość ---------- */

.ttk-qty-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 2px;
}

.ttk-qty-field {
	display: flex;
	border: 1.5px solid var(--ttk-ink);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ttk-qty-step {
	width: 46px;
	min-height: 46px;
	border: none;
	background: transparent;
	font-size: 21px;
	color: var(--ttk-ink);
	cursor: pointer;
	line-height: 1;
	touch-action: manipulation;
}

.ttk-qty-step:active { background: var(--ttk-sand); }

.ttk-qty-input {
	width: 100px;
	border: none;
	border-left: 1px solid var(--ttk-rule);
	border-right: 1px solid var(--ttk-rule);
	text-align: center;
	font-size: 19px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ttk-ink);
	background: transparent;
	padding: 10px 4px;
	border-radius: 0;
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none;
}

.ttk-qty-input::-webkit-outer-spin-button,
.ttk-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ttk-qty-unit { font-size: 14px; color: var(--ttk-muted); }

/* ---------- schody cenowe ---------- */

.ttk-stairs-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin: 22px 0 10px;
	padding-top: 18px;
	border-top: 1px solid var(--ttk-rule-hair);
	font-size: 11.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ttk-ink);
	font-weight: 700;
}

.ttk-stairs-head span:last-child {
	color: var(--ttk-muted);
	font-weight: 600;
}

/* pasek cenowy — sześć komórek obok siebie, ceny na jednej linii bazowej */
.ttk-stairs {
	display: grid;
	gap: 0;
	border: 1px solid var(--ttk-rule);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ttk-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 9px 4px;
	background: none;
	border: none;
	border-left: 1px solid var(--ttk-rule-hair);
	cursor: pointer;
	touch-action: manipulation;
	min-height: 56px;
	transition: background .15s;
}

.ttk-cell:first-child { border-left: none; }

.ttk-cell:hover { background: var(--ttk-sand); }

.ttk-cell-range {
	font-size: 10px;
	color: var(--ttk-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	letter-spacing: -.01em;
	line-height: 1.2;
}

.ttk-cell-price {
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ttk-ink);
	white-space: nowrap;
	line-height: 1.1;
	letter-spacing: -.015em;
}

.ttk-cell.on {
	background: var(--ttk-accent);
}

.ttk-cell.on:hover { background: var(--ttk-accent); }

.ttk-cell.on .ttk-cell-range { color: rgba(255,255,255,.8); font-weight: 600; }
.ttk-cell.on .ttk-cell-price { color: #fff; }

/* ---------- podpowiedź o progu ---------- */

.ttk-nudge {
	display: none;
	margin-top: 12px;
	background: var(--ttk-deal-bg);
	border-left: 3px solid var(--ttk-accent-2);
	padding: 11px 14px;
	font-size: 13px;
	color: var(--ttk-deal-tx);
	border-radius: 0 6px 6px 0;
	line-height: 1.5;
}

.ttk-nudge.show { display: block; }

.ttk-nudge b { font-weight: 700; }

.ttk-nudge button {
	background: none;
	border: none;
	color: var(--ttk-deal-tx);
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	min-height: 0;
	touch-action: manipulation;
}

/* ---------- grupy opcji ---------- */

.ttk-group { margin-bottom: 18px; }
.ttk-group:last-child { margin-bottom: 0; }

.ttk-group-label {
	display: block;
	font-size: 10.5px;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ttk-muted);
	margin-bottom: 9px;
	font-weight: 700;
}

.ttk-opts { display: flex; flex-wrap: wrap; gap: 6px; }

.ttk-opt {
	font-size: 13.5px;
	padding: 11px 15px;
	min-height: 44px;
	border: 1px solid var(--ttk-rule);
	background: #fff;
	cursor: pointer;
	color: var(--ttk-ink);
	border-radius: 6px;
	touch-action: manipulation;
	transition: border-color .15s, background .15s, color .15s;
}

.ttk-opt:hover { border-color: var(--ttk-ink); }

.ttk-opt[aria-pressed="true"] {
	border-color: var(--ttk-accent);
	background: var(--ttk-accent);
	color: #fff;
	font-weight: 600;
}

/* ---------- checkboxy ---------- */

.ttk-check {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 14px 0;
	border-top: 1px solid var(--ttk-rule-hair);
	cursor: pointer;
	margin: 0;
	min-height: 54px;
	transition: opacity .2s;
}

.ttk-check:first-of-type { border-top: none; }

.ttk-check.ttk-off { opacity: .45; }
.ttk-check.ttk-off .ttk-check-d { opacity: 1; font-weight: 600; }
.ttk-check.ttk-off input { cursor: not-allowed; }

.ttk-check input {
	accent-color: var(--ttk-accent);
	width: 19px;
	height: 19px;
	cursor: pointer;
	flex: 0 0 auto;
	margin: 0;
}

.ttk-check-body { flex: 1 1 auto; min-width: 0; }

.ttk-check-t { display: block; font-weight: 600; font-size: 14px; }
.ttk-check-d { display: block; font-size: 12.5px; color: var(--ttk-muted); }

.ttk-check-p {
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ttk-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* ---------- podsumowanie ---------- */

.ttk-sum {
	background: var(--ttk-sum-bg);
	color: #fff;
	padding: 20px 22px;
	border-radius: 0 0 var(--ttk-radius) var(--ttk-radius);
}

.ttk-sum-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.ttk-sum-main { min-width: 0; }

.ttk-sum-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	flex: 0 0 auto;
	text-align: right;
}

/* linia oddzielająca podsumowanie od rozbicia kosztów */
.ttk-sum-rule {
	margin-top: 15px;
	border-top: 1px solid rgba(255,255,255,.22);
}

.ttk-sum-label {
	display: block;
	margin-bottom: 6px;
	font-size: 10.5px;
	letter-spacing: .09em;
	text-transform: uppercase;
	opacity: .6;
	font-weight: 700;
}

.ttk-vat {
	display: flex;
	border: 1px solid rgba(255,255,255,.32);
	border-radius: 6px;
	overflow: hidden;
	flex: 0 0 auto;
}

.ttk-vat-btn {
	font-size: 11.5px;
	padding: 7px 12px;
	min-height: 34px;
	background: none;
	border: none;
	color: #fff;
	opacity: .72;
	cursor: pointer;
	touch-action: manipulation;
}

.ttk-vat-btn[aria-pressed="true"] {
	background: #fff;
	color: var(--ttk-sum-bg);
	opacity: 1;
	font-weight: 700;
}

.ttk-total {
	font-size: 25px;
	font-weight: 800;
	letter-spacing: -.028em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	transition: opacity .13s;
}

.ttk-total.flash { opacity: .35; }

/* druga kwota — ta „przeciwna” do wybranej stawki */
.ttk-alt {
	font-size: 13px;
	font-weight: 600;
	opacity: .62;
	margin-top: 3px;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}

.ttk-alt:empty { display: none; }

/* cena za sztukę — pod przełącznikiem, ma rzucać się w oczy */
.ttk-per {
	display: block;
	line-height: 1.1;
}

.ttk-per-v {
	display: block;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -.028em;
	font-variant-numeric: tabular-nums;
}

.ttk-per-l {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	letter-spacing: .07em;
	text-transform: uppercase;
	opacity: .7;
	font-weight: 700;
}

.ttk-lines { margin-top: 14px; }

.ttk-line {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	font-size: 12.5px;
	padding: 5px 0;
}

.ttk-line-k { opacity: .75; min-width: 0; }
.ttk-line-v { font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }

.ttk-free { color: #ffe9a8; font-weight: 700; }

.ttk-form { margin: 0; }

.ttk-cta {
	display: block;
	width: 100%;
	background: #fff;
	color: var(--ttk-sum-bg);
	border: none;
	padding: 16px;
	min-height: 54px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 18px;
	border-radius: 7px;
	touch-action: manipulation;
	transition: background .15s, opacity .15s;
}

.ttk-cta:hover { background: rgba(255,255,255,.9); }
.ttk-cta:disabled { opacity: .35; cursor: not-allowed; }

.ttk-cta-alt {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,.35);
	margin-top: 8px;
	font-size: 13.5px;
	padding: 12px;
	min-height: 44px;
	font-weight: 500;
}

.ttk-cta-alt:hover { background: rgba(255,255,255,.12); }

.ttk-foot {
	font-size: 11px;
	opacity: .5;
	text-align: center;
	margin: 12px 0 0;
	line-height: 1.45;
}

.ttk-warn {
	display: none;
	background: var(--ttk-warn-bg);
	border: 1px solid var(--ttk-warn-br);
	color: var(--ttk-warn-tx);
	padding: 11px 13px;
	font-size: 12.5px;
	margin-top: 12px;
	border-radius: 6px;
}

.ttk-warn.show { display: block; }

.ttk-error {
	background: var(--ttk-warn-bg);
	border: 1px solid var(--ttk-warn-br);
	color: var(--ttk-warn-tx);
	padding: 12px 14px;
	border-radius: 6px;
}

/* ---------- koszyk ---------- */

.ttk-locked-qty { font-weight: 700; white-space: nowrap; }

/* ---------- focus ---------- */

.ttk button:focus-visible,
.ttk input:focus-visible {
	outline: 2px solid var(--ttk-accent);
	outline-offset: 2px;
}

/* ---------- plik do druku ---------- */

.ttk-file { position: relative; }

.ttk-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.ttk-file-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px dashed var(--ttk-rule);
	border-radius: 8px;
	background: #fff;
	color: var(--ttk-muted);
	font-size: 13.5px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, color .15s, background .15s;
}

.ttk-file-btn:hover,
.ttk-file-input:focus-visible + .ttk-file-btn,
.ttk-file-btn.is-over {
	border-color: var(--ttk-accent);
	color: var(--ttk-ink);
	background: var(--ttk-sand, #faf8f4);
}

.ttk-file-btn.is-busy { opacity: .55; pointer-events: none; }

.ttk-file-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	border-radius: 50%;
	background: var(--ttk-accent);
	color: #fff;
	font-size: 13px;
	line-height: 1;
}

.ttk-file-state {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	background: var(--ttk-sand, #faf8f4);
	border: 1px solid var(--ttk-rule);
	color: var(--ttk-ink);
}

.ttk-file-state.is-error {
	border-color: #d24b3c;
	background: #fdf1ef;
	color: #a33325;
}

.ttk-file-state.is-busy { color: var(--ttk-muted); }

.ttk-file-ok {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	border-radius: 50%;
	background: var(--ttk-accent);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.ttk-file-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.ttk-file-size {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--ttk-muted);
	font-variant-numeric: tabular-nums;
}

.ttk-file-del {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border: none;
	background: none;
	color: var(--ttk-muted);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background .15s, color .15s;
}

.ttk-file-del:hover { background: rgba(0,0,0,.07); color: var(--ttk-ink); }

/* ============================================================
   ZABEZPIECZENIA PRZED STYLAMI MOTYWU
   Woodmart wymusza wersaliki i rozstrzelenie liter na przyciskach.
   ============================================================ */

.ttk button,
.ttk .ttk-opt,
.ttk .ttk-cta,
.ttk .ttk-file-btn,
.ttk .ttk-file-del,
.ttk .ttk-mode-btn,
.ttk .ttk-vat-btn,
.ttk .ttk-addcolor,
.ttk .ttk-crow-del,
.ttk .ttk-nudge button {
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: inherit !important;
	line-height: 1.35 !important;
	box-shadow: none;
	text-shadow: none;
}

.ttk .ttk-headline-from,
.ttk .ttk-group-label,
.ttk .ttk-sum-label,
.ttk .ttk-per-l,
.ttk .ttk-stairs-head {
	/* tu wersaliki są zamierzone */
	text-transform: uppercase !important;
}

.ttk input[type="number"] {
	background-image: none;
	min-height: 0;
}

.ttk .ttk-panel-title,
.ttk .ttk-check-t {
	text-transform: none !important;
	letter-spacing: -.01em !important;
}

/* ---------- mobile ---------- */

@media (max-width: 782px) {
	/* 17 px zapobiega automatycznemu przybliżaniu na iOS */
	.ttk-qty-input { font-size: 17px; }
}

@media (max-width: 600px) {
	.ttk-panel { padding: 16px; }
	.ttk-sum { padding: 18px; }

	.ttk-headline-price { font-size: 24px; }

	.ttk-qty-field { flex: 1 1 auto; }
	.ttk-qty-input { width: 100%; }

	.ttk-cell { padding: 8px 2px; min-height: 52px; }
	.ttk-cell-range { font-size: 9px; }
	.ttk-cell-price { font-size: 13.5px; }
	.ttk-sum-top { flex-direction: column; align-items: stretch; gap: 12px; }
	.ttk-sum-side { align-items: stretch; text-align: left; }
	.ttk-vat { align-self: flex-start; }
	.ttk-total { font-size: 23px; }
	.ttk-per-v { font-size: 26px; }

	.ttk-check { gap: 10px; }
	.ttk-check-p { font-size: 11.5px; }

	.ttk-opt { font-size: 13px; padding: 11px 12px; }
}

@media (max-width: 380px) {
	.ttk-cell-range { font-size: 8px; }
	.ttk-cell-price { font-size: 12.5px; }
	.ttk-headline-price { font-size: 22px; }
	.ttk-total { font-size: 21px; }
	.ttk-per-v { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.ttk *, .ttk *::before, .ttk *::after { transition: none !important; }
}

/* ---------- krótki opis przeniesiony pod galerię ---------- */

.ttk-excerpt {
	margin: 22px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #4a463c;
	clear: both;
}

.ttk-excerpt p { margin: 0 0 10px; }
.ttk-excerpt p:last-child { margin-bottom: 0; }

.ttk-excerpt ul,
.ttk-excerpt ol { margin: 10px 0 10px 20px; }

@media (max-width: 768px) {
	.ttk-excerpt { margin-top: 16px; font-size: 14.5px; }
}

/* ---------- kolory torby (swatche) ---------- */

.ttk .ttk-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.ttk .ttk-group-hint {
	font-weight: 600;
	color: var(--ttk-ink);
	margin-left: 6px;
}

/* Próbka koloru = samo kółko. Nazwa pojawia się po najechaniu — przy
   kilkunastu kolorach lista podpisanych pigułek nie mieściła się na ekranie. */
.ttk .ttk-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
	touch-action: manipulation;
}

.ttk .ttk-swatch-dot {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .18);
	background-size: cover;
	background-position: center;
	transition: transform .12s;
}

.ttk .ttk-swatch:hover .ttk-swatch-dot { transform: scale(1.08); }

/* Próbka z kropką nie pokazuje nazwy w środku — nazwa jest w podpowiedzi.
   Reguła chroni też przed starym HTML-em z cache, gdzie etykieta była zawsze. */
.ttk .ttk-swatch:not(.ttk-swatch--text) .ttk-swatch-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* obwódka zaznaczenia — nie dotyka próbki, więc widać też jasne kolory */
.ttk .ttk-swatch::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid transparent;
	transition: border-color .15s;
}

.ttk .ttk-swatch[aria-pressed="true"]::before {
	border-color: var(--ttk-accent);
}

/* podpowiedź z nazwą koloru */
.ttk .ttk-swatch::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	padding: 6px 9px;
	border-radius: 6px;
	background: #26241f;
	color: #fff;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .12s;
	z-index: 30;
}

.ttk .ttk-swatch:hover::after,
.ttk .ttk-swatch:focus-visible::after { opacity: 1; visibility: visible; }

/* kolor bez znanej próbki — zostaje sama nazwa */
.ttk .ttk-swatch--text {
	width: auto;
	height: auto;
	min-height: 34px;
	padding: 7px 13px;
	border: 1px solid var(--ttk-rule);
	border-radius: 999px;
	background: #fff;
	color: var(--ttk-ink);
	font-size: 13px;
}

.ttk .ttk-swatch--text::before { border-radius: 999px; }
.ttk .ttk-swatch--text::after { content: none; }

.ttk .ttk-swatch-label { white-space: nowrap; }

/* Motyw i nasze własne reguły ustawiają display:flex, więc atrybut hidden
   musi mieć pierwszeństwo — inaczej „ukryte" elementy dalej się pokazują. */
.ttk [hidden] { display: none !important; }

/* ---------- rozbicie zamówienia na kolory ---------- */

.ttk-crows { margin-top: 14px; }

.ttk-crow {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 6px 8px 10px;
	border: 1px solid var(--ttk-rule);
	border-radius: 8px;
	background: #fff;
}

.ttk-crow + .ttk-crow { margin-top: 8px; }

.ttk-crow.is-active { border-color: var(--ttk-accent); }

.ttk-crow-dot {
	display: block;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .18);
	background-size: cover;
	background-position: center;
}

.ttk-crow-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ttk-ink);
}

.ttk-crow-qty {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	border: 1px solid var(--ttk-rule);
	border-radius: 7px;
	overflow: hidden;
}

.ttk-crow-qty .ttk-qty-step {
	width: 34px;
	min-height: 36px;
	border: 0;
	background: #fff;
	font-size: 17px;
	line-height: 1;
	color: var(--ttk-ink);
	cursor: pointer;
}

.ttk-crow-qty .ttk-qty-step:active { background: var(--ttk-sand); }

.ttk-crow-input {
	width: 62px;
	min-height: 36px;
	border: 0;
	border-left: 1px solid var(--ttk-rule);
	border-right: 1px solid var(--ttk-rule);
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	background: #fff;
	color: var(--ttk-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}

.ttk-crow-input::-webkit-outer-spin-button,
.ttk-crow-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ttk-crow-del {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border: 0;
	background: none;
	color: var(--ttk-muted);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background .15s, color .15s;
}

.ttk-crow-del:hover:not([disabled]) { background: rgba(0,0,0,.06); color: var(--ttk-ink); }
.ttk-crow-del[disabled] { opacity: .25; cursor: default; }

.ttk-crows-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
}

.ttk .ttk-addcolor {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px dashed var(--ttk-rule);
	border-radius: 8px;
	background: #fff !important;
	color: var(--ttk-ink);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	box-shadow: none;
	transition: border-color .15s, color .15s;
}

.ttk .ttk-addcolor:hover:not([disabled]) { border-color: var(--ttk-accent); color: var(--ttk-accent); }
.ttk .ttk-addcolor[disabled] { opacity: .4; cursor: default; }

.ttk-addcolor-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ttk-accent);
	color: #fff;
	font-size: 13px;
	line-height: 1;
}

.ttk-crows-sum {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ttk-muted);
	font-variant-numeric: tabular-nums;
}

.ttk-crows-note {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--ttk-muted);
}

/* ---------- łączna ilość w kroku „Ile sztuk?" ---------- */

.ttk-qty-sum {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 2px;
}

.ttk-qty-sum-v {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
	color: var(--ttk-ink);
}

.ttk-qty-sum-l {
	font-size: 12.5px;
	color: var(--ttk-muted);
}

@media (max-width: 480px) {
	.ttk .ttk-swatch-label { font-size: 12.5px; }
	.ttk-crow { gap: 8px; padding-left: 8px; }
	.ttk-crow-input { width: 52px; }
	.ttk-crow-qty .ttk-qty-step { width: 30px; }
	.ttk-crows-foot { flex-direction: column; align-items: stretch; gap: 8px; }
	.ttk-crows-sum { text-align: right; }
}
