/* ToolsForge — WooCommerce Layout v0.2.12
   Struktura: własne szablony PHP, bez kopiowania tabel przez JavaScript.
   Mobile: jeden blok reguł, oparty o klasy faktycznie obecne na stronie.
*/

.tfwc-page {
	--tf-red: #b23434;
	--tf-blue: #2f4a68;
	--tf-slate: #2f3742;
	--tf-text: #5f6874;
	--tf-soft: #f7f8fa;
	--tf-line: #e3e6ea;
}

.tfwc-cart,
.tfwc-checkout {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

.tfwc-cart *,
.tfwc-checkout * {
	box-sizing: border-box;
}

/* === KOSZYK === */

.tfwc-cart-form {
	margin: 0;
	padding: 0;
}

.tfwc-cart-items {
	display: grid;
	gap: 10px;
}

.tfwc-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 48%);
	gap: 18px;
	align-items: center;
	margin: 0;
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--tf-line);
	background: transparent;
}

.tfwc-cart-item__main {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	min-width: 0;
}

.tfwc-cart-item__thumb img {
	display: block;
	width: 88px;
	height: auto;
	margin: 0;
}

.tfwc-cart-item__thumb {
	position: relative;
	display: inline-block;
	width: fit-content;
	max-width: 100%;
}

.tfwc-cart-item__title,
.tfwc-cart-item__title a {
	color: var(--tf-blue);
	font-weight: 800;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.tfwc-cart-item__title dl.variation,
.tfwc-cart-item__title .wc-item-meta {
	margin: 5px 0 0;
	font-size: 12px;
	font-weight: 400;
	color: var(--tf-text);
}

.tfwc-cart-item__remove {
	position: absolute;
	z-index: 2;
	top: -7px;
	left: -7px;
}

.tfwc-cart-item__remove a.remove {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 20px !important;
	height: 20px !important;
	margin: 0 !important;
	border-radius: 0 !important;
	background: var(--tf-red) !important;
	color: #fff !important;
	font-size: 13px !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.tfwc-cart-item__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.tfwc-fact {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.tfwc-fact__label {
	color: var(--tf-blue);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}

.tfwc-fact__value {
	color: var(--tf-text);
	font-size: 14px;
	line-height: 1.3;
}

.tfwc-fact__value .quantity {
	margin: 0;
}

.tfwc-fact__value input.qty {
	width: 66px !important;
	min-height: 38px;
	padding: 5px;
	text-align: center;
}

/* === AKCJE KOSZYKA === */

.tfwc-cart-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	margin: 12px 0 0;
	padding: 10px;
	background: var(--tf-soft);
}

.tfwc-coupon {
	display: grid;
	grid-template-columns: minmax(140px, 250px) minmax(150px, 210px);
	gap: 8px;
	align-items: stretch;
	min-width: 0;
}

.tfwc-coupon__input,
.tfwc-coupon__button,
.tfwc-update-cart {
	min-height: 42px !important;
	height: 42px;
	margin: 0 !important;
	padding: 8px 12px !important;
	border-radius: 0 !important;
	font-size: 12px !important;
	line-height: 1.15 !important;
}

.tfwc-coupon__input {
	width: 100% !important;
}

.tfwc-coupon__button,
.tfwc-update-cart {
	white-space: nowrap !important;
	font-weight: 800 !important;
	text-transform: uppercase;
}

.tfwc-coupon__button {
	background: var(--tf-blue) !important;
	color: #fff !important;
}

.tfwc-update-cart {
	justify-self: end;
	min-width: 190px;
}

/* === PODSUMOWANIA === */

.tfwc-cart-collaterals {
	margin: 20px 0 0;
	padding: 0;
}

.tfwc-totals {
	float: none !important;
	width: 100% !important;
	max-width: 620px;
	margin-left: auto;
}

.tfwc-section-title {
	margin: 0 0 10px !important;
	padding: 0 0 8px !important;
	border-bottom: 2px solid var(--tf-blue);
	color: var(--tf-blue) !important;
	font-size: 22px !important;
	line-height: 1.15 !important;
}

.tfwc-summary {
	width: 100%;
	border-top: 1px solid var(--tf-line);
}

.tfwc-summary-row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	padding: 10px 0;
	border-bottom: 1px solid var(--tf-line);
}

.tfwc-summary-label {
	color: var(--tf-blue);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}

.tfwc-summary-value {
	min-width: 0;
	color: var(--tf-text);
	font-size: 14px;
	line-height: 1.4;
	text-align: right;
}

.tfwc-summary-row--total {
	align-items: center;
}

.tfwc-summary-row--total .tfwc-summary-value,
.tfwc-summary-row--total .woocommerce-Price-amount,
.tfwc-summary-row--total strong {
	color: var(--tf-red) !important;
	font-size: 25px !important;
	font-weight: 800 !important;
	white-space: nowrap;
}

/* === WYSYŁKA === */

.tfwc-shipping-methods {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tfwc-shipping-methods li {
	display: grid !important;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 8px;
	align-items: start;
	margin: 0 0 8px !important;
	padding: 0 !important;
	text-align: left;
}

.tfwc-shipping-methods li:last-child {
	margin-bottom: 0 !important;
}

.tfwc-shipping-methods input[type="radio"] {
	width: 17px;
	height: 17px;
	margin: 2px 0 0;
}

.tfwc-shipping-methods label {
	margin: 0 !important;
	font-size: 13px;
	line-height: 1.35;
	cursor: pointer;
}

.tfwc-shipping-value .woocommerce-shipping-destination,
.tfwc-shipping-value .woocommerce-shipping-contents {
	margin: 7px 0 0;
	font-size: 11px;
	line-height: 1.35;
	text-align: left;
}

.tfwc-proceed {
	padding: 12px 0 0 !important;
}

.tfwc-proceed .checkout-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 48px !important;
	margin: 0 !important;
	padding: 10px 14px !important;
	border-radius: 0 !important;
	background: var(--tf-red) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	text-transform: uppercase;
}

/* === CHECKOUT === */

.tfwc-checkout {
	margin-top: 0 !important;
}

.tfwc-checkout .woocommerce-form-login-toggle,
.tfwc-checkout .woocommerce-form-coupon-toggle {
	margin: 0 0 8px !important;
}

.tfwc-checkout .woocommerce-info {
	margin: 0 0 8px !important;
	padding: 10px 12px !important;
	font-size: 13px !important;
	line-height: 1.3 !important;
}

.tfwc-customer-details {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
	margin: 12px 0 20px;
}

.tfwc-customer-panel {
	min-width: 0;
}

.tfwc-checkout form .form-row {
	margin: 0 0 9px !important;
	padding: 0 !important;
}

.tfwc-checkout form .form-row label {
	margin: 0 0 4px !important;
	color: var(--tf-slate);
	font-size: 11px !important;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}

.tfwc-checkout form .form-row input.input-text,
.tfwc-checkout form .form-row select,
.tfwc-checkout .select2-container .select2-selection {
	min-height: 44px !important;
	border-radius: 0 !important;
}

.tfwc-checkout form .form-row textarea {
	min-height: 90px;
	border-radius: 0 !important;
}

.tfwc-review-section {
	margin: 0;
	padding: 0;
}

.tfwc-order-review {
	margin: 0 !important;
	padding: 0 !important;
}

.tfwc-review-products {
	border-top: 1px solid var(--tf-line);
}

.tfwc-review-product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	padding: 9px 0;
	border-bottom: 1px solid var(--tf-line);
}

.tfwc-review-product__name {
	color: var(--tf-text);
	font-size: 13px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.tfwc-review-product__price {
	color: var(--tf-text);
	font-size: 13px;
	line-height: 1.4;
	text-align: right;
	white-space: nowrap;
}

.tfwc-review-summary {
	margin-top: 0;
}

.tfwc-checkout #payment {
	margin-top: 12px !important;
}

.tfwc-checkout #payment .payment_methods,
.tfwc-checkout #payment .place-order {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.tfwc-checkout #payment .woocommerce-privacy-policy-text {
	font-size: 12px !important;
	line-height: 1.4 !important;
}

.tfwc-checkout #place_order {
	float: none !important;
	width: 100% !important;
	min-height: 48px !important;
	margin: 8px 0 0 !important;
	border-radius: 0 !important;
	background: var(--tf-red) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	text-transform: uppercase;
}

/* === ZAMÓWIENIE OTRZYMANE === */

body.tfwc-page-thankyou .woocommerce-order-details,
body.tfwc-page-thankyou .woocommerce-customer-details {
	margin-top: 28px !important;
}

body.tfwc-page-thankyou .woocommerce-order-details__title,
body.tfwc-page-thankyou .woocommerce-customer-details .woocommerce-column__title {
	margin: 0 0 10px !important;
	padding: 0 0 8px !important;
	border-bottom: 2px solid var(--tf-blue) !important;
	border-radius: 0 !important;
	color: var(--tf-blue) !important;
}

body.tfwc-page-thankyou table.woocommerce-table--order-details {
	border: 1px solid var(--tf-line) !important;
	border-collapse: collapse !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.tfwc-page-thankyou table.woocommerce-table--order-details th,
body.tfwc-page-thankyou table.woocommerce-table--order-details td {
	border-radius: 0 !important;
}

body.tfwc-page-thankyou table.woocommerce-table--order-details thead th {
	background: var(--tf-soft) !important;
	color: var(--tf-blue) !important;
	font-weight: 800 !important;
	text-transform: uppercase;
}

body.tfwc-page-thankyou .woocommerce-customer-details .woocommerce-columns--addresses,
body.tfwc-page-thankyou .woocommerce-customer-details .woocommerce-column,
body.tfwc-page-thankyou .woocommerce-customer-details address {
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.tfwc-page-thankyou .woocommerce-customer-details address {
	margin: 0 !important;
	padding: 16px 18px !important;
	border: 1px solid var(--tf-line) !important;
	border-top: 2px solid var(--tf-blue) !important;
	background: #fff !important;
	color: var(--tf-text) !important;
	font-style: normal !important;
	line-height: 1.55 !important;
}

/* Regulamin sklepu: wyłącznie właściwy link zgody checkoutu. */
body.tfwc-page-checkout .tfwc-checkout .woocommerce-terms-and-conditions-checkbox-text a.woocommerce-terms-and-conditions-link,
body.tfwc-page-checkout .tfwc-checkout .woocommerce-terms-and-conditions-checkbox-text a.woocommerce-terms-and-conditions-link:visited,
body.tfwc-page-checkout .tfwc-checkout .woocommerce-terms-and-conditions-checkbox-text a.woocommerce-terms-and-conditions-link:hover,
body.tfwc-page-checkout .tfwc-checkout .woocommerce-terms-and-conditions-checkbox-text a.woocommerce-terms-and-conditions-link:focus {
	color: var(--tf-red) !important;
	font-weight: 800 !important;
	text-decoration-color: var(--tf-red) !important;
}

/* === MOBILE — JEDYNY BLOK DOCELOWY === */

@media (max-width: 768px) {
	/*
	 * Cała strona dostaje dwa delikatne poziomy oddechu:
	 * 8 px na zewnątrz oraz 8 px wewnątrz wspólnej ramy.
	 * Korekta -7 px kompensuje połowę 15-pikselowego marginesu Bootstrapa.
	 */
	body.tfwc-page-cart.tfwc-style-mobile .tf-cart-page,
	body.tfwc-page-checkout.tfwc-style-mobile .tf-checkout-page {
		width: calc(100% + 14px) !important;
		max-width: none !important;
		margin-left: -7px !important;
		margin-right: -7px !important;
		padding-left: 8px !important;
		padding-right: 8px !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tf-cart-wrap,
	body.tfwc-page-checkout.tfwc-style-mobile .tf-checkout-wrap {
		width: 100% !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tf-cart-woo-wrap,
	body.tfwc-page-checkout.tfwc-style-mobile .tf-checkout-woo-wrap {
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-top: 12px !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/*
	 * Wersja testowa koszyka bez zewnętrznej tabeli/pudełka.
	 * Zostają wyłącznie właściwa treść i jej wewnętrzne linie podziału.
	 */
	body.tfwc-page-cart.tfwc-style-mobile .tf-cart-woo-box {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page.tfwc-style-mobile .woocommerce,
	body.tfwc-page.tfwc-style-mobile .tfwc-cart,
	body.tfwc-page.tfwc-style-mobile .tfwc-checkout {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.tfwc-cart,
	.tfwc-checkout {
		margin-top: 0 !important;
		padding-top: 0 !important;
	}

	.tfwc-cart-item {
		display: block;
		padding: 8px 0;
	}

	.tfwc-cart-item__remove {
		top: -5px;
		left: -5px;
	}

	.tfwc-cart-item__remove a.remove {
		width: 18px !important;
		height: 18px !important;
		font-size: 12px !important;
	}

	.tfwc-cart-item__main {
		grid-template-columns: 58px minmax(0, 1fr);
		gap: 9px;
		align-items: start;
	}

	.tfwc-cart-item__thumb img {
		width: 58px;
	}

	.tfwc-cart-item__title,
	.tfwc-cart-item__title a {
		font-size: 13px !important;
		line-height: 1.3;
	}

	.tfwc-cart-item__facts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
		margin-top: 6px;
		padding-top: 6px;
		border-top: 1px solid var(--tf-line);
	}

	.tfwc-fact__label {
		font-size: 9px !important;
	}

	.tfwc-fact__value {
		font-size: 12px !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-fact__value .quantity {
		display: inline-flex !important;
		align-items: center !important;
		margin: 0 !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-fact__value .quantity input.qty {
		width: 36px !important;
		height: 36px !important;
		min-height: 36px !important;
		max-height: 36px !important;
		margin: 0 !important;
		padding: 0 4px !important;
		border-radius: 0 !important;
		font-size: 12px !important;
		line-height: 36px !important;
		text-align: center !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-cart-actions {
		display: block !important;
		margin-top: 6px !important;
		padding: 4px !important;
		background: var(--tf-soft);
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-coupon {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 6px !important;
		width: 100% !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-coupon input.tfwc-coupon__input,
	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-coupon button.tfwc-coupon__button,
	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart button.tfwc-update-cart[name="update_cart"] {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		height: 36px !important;
		min-height: 36px !important;
		max-height: 36px !important;
		margin: 0 !important;
		padding: 6px 10px !important;
		border-radius: 0 !important;
		font-size: 10px !important;
		line-height: 1.1 !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-coupon input.tfwc-coupon__input {
		display: block !important;
		justify-content: initial !important;
		text-align: left !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart .tfwc-coupon button.tfwc-coupon__button,
	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart button.tfwc-update-cart[name="update_cart"] {
		white-space: normal !important;
		text-align: center !important;
	}

	body.tfwc-page-cart.tfwc-style-mobile .tfwc-cart button.tfwc-update-cart[name="update_cart"] {
		margin-top: 6px !important;
	}

	.tfwc-cart-collaterals {
		margin-top: 14px;
	}

	.tfwc-totals {
		max-width: none;
		margin: 0;
	}

	.tfwc-section-title {
		margin-bottom: 7px !important;
		padding-bottom: 6px !important;
		font-size: 18px !important;
	}

	.tfwc-summary-row {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 8px;
		padding: 7px 0;
	}

	.tfwc-summary-label {
		font-size: 11px;
	}

	.tfwc-summary-value {
		font-size: 12px;
	}

	.tfwc-summary-row--total .tfwc-summary-value,
	.tfwc-summary-row--total .woocommerce-Price-amount,
	.tfwc-summary-row--total strong {
		font-size: 21px !important;
	}

	.tfwc-shipping-methods label {
		font-size: 12px;
	}

	.tfwc-proceed {
		padding-top: 8px !important;
	}

	.tfwc-proceed .checkout-button {
		min-height: 44px !important;
		font-size: 12px !important;
	}

	.tfwc-customer-details {
		display: block;
		margin: 8px 0 14px;
	}

	.tfwc-customer-panel {
		margin: 0 0 12px;
	}

	.tfwc-checkout form .form-row-first,
	.tfwc-checkout form .form-row-last {
		float: none !important;
		width: 100% !important;
	}

	.tfwc-checkout form .form-row input.input-text,
	.tfwc-checkout form .form-row select,
	.tfwc-checkout .select2-container .select2-selection {
		min-height: 40px !important;
		height: 40px !important;
		font-size: 13px !important;
	}

	/* Checkout: nagłówek kuponu i przycisk są osobnymi wierszami. */
	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout .woocommerce-form-coupon-toggle {
		margin: 8px 0 10px !important;
		text-align: center !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
		display: block !important;
		margin: 0 !important;
		padding: 0 0 8px !important;
		border: 0 !important;
		background: transparent !important;
		color: var(--tf-slate) !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		line-height: 1.3 !important;
		text-align: center !important;
		box-shadow: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
		display: none !important;
		content: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		height: 38px !important;
		min-height: 38px !important;
		margin: 8px 0 0 !important;
		padding: 6px 10px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: var(--tf-blue) !important;
		color: #fff !important;
		font-size: 10px !important;
		font-weight: 800 !important;
		line-height: 1.15 !important;
		text-align: center !important;
		text-decoration: none !important;
		text-transform: uppercase !important;
		white-space: normal !important;
		box-shadow: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout form.checkout_coupon {
		width: 100% !important;
		margin: 0 0 10px !important;
		padding: 6px !important;
		border: 0 !important;
		background: var(--tf-soft) !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout form.checkout_coupon .form-row {
		float: none !important;
		width: 100% !important;
		margin: 0 0 6px !important;
		padding: 0 !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout form.checkout_coupon .form-row:last-of-type {
		margin-bottom: 0 !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout form.checkout_coupon .form-row input.input-text {
		display: block !important;
		width: 100% !important;
		height: 38px !important;
		min-height: 38px !important;
		max-height: 38px !important;
		margin: 0 !important;
		padding: 6px 10px !important;
		border-radius: 0 !important;
		font-size: 11px !important;
		line-height: normal !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-checkout.tfwc-style-mobile .tfwc-checkout form.checkout_coupon .form-row button.button[name="apply_coupon"] {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		height: 38px !important;
		min-height: 38px !important;
		max-height: 38px !important;
		margin: 0 !important;
		padding: 6px 10px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: var(--tf-blue) !important;
		color: #fff !important;
		font-size: 11px !important;
		font-weight: 800 !important;
		line-height: 1.15 !important;
		text-transform: uppercase !important;
		box-shadow: none !important;
	}

	.tfwc-review-product {
		gap: 8px;
		padding: 7px 0;
	}

	.tfwc-review-product__name,
	.tfwc-review-product__price {
		font-size: 12px;
	}

	.tfwc-checkout #payment .woocommerce-privacy-policy-text {
		font-size: 11px !important;
	}

	.tfwc-checkout #place_order {
		min-height: 44px !important;
		font-size: 12px !important;
	}
}

/* === OPCJONALNY STYL TF DESKTOP === */

@media (min-width: 769px) {
	.tfwc-style-desktop .tfwc-cart-item {
		grid-template-columns: minmax(0, 1fr) minmax(420px, 40%);
		padding-left: 14px;
		background: #fff;
	}

	/* Więcej miejsca na nazwę; wartości ceny, ilości i kwoty w jednej skali. */
	.tfwc-style-desktop .tfwc-cart-item__facts {
		width: 100%;
		margin-left: auto;
	}

	.tfwc-style-desktop .tfwc-cart-item__facts .tfwc-fact__value,
	.tfwc-style-desktop .tfwc-cart-item__facts .tfwc-fact__value .woocommerce-Price-amount,
	.tfwc-style-desktop .tfwc-cart-item__facts .tfwc-fact__value input.qty {
		font-size: 16px !important;
	}

	.tfwc-style-desktop .tfwc-cart-actions {
		border-top: 2px solid var(--tf-blue);
	}

	/* Oba przyciski akcji koszyka mają wysokość pola „Kod kuponu” (42 px). */
	body.tfwc-page-cart.tfwc-style-desktop .tfwc-cart .tfwc-coupon button.tfwc-coupon__button,
	body.tfwc-page-cart.tfwc-style-desktop .tfwc-cart button.tfwc-update-cart[name="update_cart"] {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		height: 42px !important;
		min-height: 42px !important;
		max-height: 42px !important;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		padding-top: 8px !important;
		padding-bottom: 8px !important;
		line-height: 1.15 !important;
		box-sizing: border-box !important;
	}

	.tfwc-style-desktop .tfwc-customer-panel {
		padding: 18px;
		border: 1px solid var(--tf-line);
		background: #fff;
	}

	.tfwc-style-desktop .tfwc-review-section {
		padding: 18px;
		border: 1px solid var(--tf-line);
		background: #fff;
	}

	/* Checkout: kupon w spójnym stylu ToolsForge. */
	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout .woocommerce-form-coupon-toggle {
		margin: 0 0 14px !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
		display: block !important;
		margin: 0 !important;
		padding: 12px 14px !important;
		border: 0 !important;
		border-top: 2px solid var(--tf-blue) !important;
		border-radius: 0 !important;
		background: var(--tf-soft) !important;
		color: var(--tf-slate) !important;
		font-size: 18px !important;
		font-weight: 700 !important;
		line-height: 1.3 !important;
		text-align: center !important;
		box-shadow: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
		display: none !important;
		content: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 44px !important;
		min-height: 44px !important;
		margin: 10px 0 0 !important;
		padding: 8px 14px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: var(--tf-blue) !important;
		color: #fff !important;
		font-size: 12px !important;
		font-weight: 800 !important;
		line-height: 1.15 !important;
		text-align: center !important;
		text-decoration: none !important;
		text-transform: uppercase !important;
		box-shadow: none !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout form.checkout_coupon {
		width: 100% !important;
		margin: 0 0 22px !important;
		padding: 12px !important;
		border: 1px solid var(--tf-line) !important;
		border-radius: 0 !important;
		background: var(--tf-soft) !important;
		box-shadow: none !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout form.checkout_coupon .form-row-first {
		float: left !important;
		width: calc(100% - 244px) !important;
		margin: 0 14px 0 0 !important;
		padding: 0 !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout form.checkout_coupon .form-row-last {
		float: right !important;
		width: 230px !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout form.checkout_coupon input.input-text {
		display: block !important;
		width: 100% !important;
		height: 44px !important;
		min-height: 44px !important;
		max-height: 44px !important;
		margin: 0 !important;
		padding: 8px 12px !important;
		border: 1px solid var(--tf-line) !important;
		border-radius: 0 !important;
		background: #fff !important;
		font-size: 13px !important;
		box-shadow: none !important;
		box-sizing: border-box !important;
	}

	body.tfwc-page-checkout.tfwc-style-desktop .tfwc-checkout form.checkout_coupon button.button[name="apply_coupon"] {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		height: 44px !important;
		min-height: 44px !important;
		max-height: 44px !important;
		margin: 0 !important;
		padding: 8px 14px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: var(--tf-blue) !important;
		color: #fff !important;
		font-size: 12px !important;
		font-weight: 800 !important;
		line-height: 1.15 !important;
		text-transform: uppercase !important;
		box-shadow: none !important;
	}
}

/* === v0.2.13: STRONA „OPŁAĆ ZAMÓWIENIE” / ORDER-PAY === */
body.tfwc-page-pay-order .tfwc-pay-order {
	--tf-pay-bg: #fff;
	max-width: 920px;
	margin: 14px auto 30px;
	padding: 0 14px;
	color: var(--tf-text);
}

body.tfwc-page-pay-order .tfwc-pay-card {
	margin: 0 0 18px;
	padding: 0;
	border: 1px solid var(--tf-line);
	border-top: 4px solid var(--tf-red);
	border-radius: 0;
	background: var(--tf-pay-bg);
	box-shadow: none;
	overflow: hidden;
}

body.tfwc-page-pay-order .tfwc-pay-card__heading {
	padding: 16px 18px;
	border-bottom: 1px solid var(--tf-line);
	color: var(--tf-blue);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

body.tfwc-page-pay-order .tfwc-pay-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 190px;
	gap: 24px;
	padding: 18px;
	border-bottom: 1px solid var(--tf-line);
}

body.tfwc-page-pay-order .tfwc-pay-item__name {
	margin: 0 0 8px;
	color: var(--tf-slate);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
}

body.tfwc-page-pay-order .tfwc-pay-item__meta,
body.tfwc-page-pay-order .tfwc-pay-item__meta p,
body.tfwc-page-pay-order .tfwc-pay-item__meta dl,
body.tfwc-page-pay-order .tfwc-pay-item__meta dt,
body.tfwc-page-pay-order .tfwc-pay-item__meta dd {
	font-size: 14px;
	line-height: 1.45;
}

body.tfwc-page-pay-order .tfwc-pay-item__meta dl {
	margin: 0;
}

body.tfwc-page-pay-order .tfwc-pay-item__meta dt,
body.tfwc-page-pay-order .tfwc-pay-item__meta dd {
	display: inline;
	float: none;
	margin: 0;
}

body.tfwc-page-pay-order .tfwc-pay-item__meta dd::after {
	content: "";
	display: block;
	margin-bottom: 3px;
}

body.tfwc-page-pay-order .tfwc-pay-item__facts {
	display: grid;
	grid-template-columns: 60px minmax(110px, 1fr);
	align-content: start;
	gap: 8px 14px;
}

body.tfwc-page-pay-order .tfwc-pay-fact {
	display: contents;
}

body.tfwc-page-pay-order .tfwc-pay-fact__label {
	color: var(--tf-text);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

body.tfwc-page-pay-order .tfwc-pay-fact__value {
	color: var(--tf-slate);
	font-size: 16px;
	font-weight: 800;
	text-align: right;
	white-space: nowrap;
}

body.tfwc-page-pay-order .woocommerce-Price-amount,
body.tfwc-page-pay-order .woocommerce-Price-currencySymbol {
	white-space: nowrap !important;
}

body.tfwc-page-pay-order .tfwc-pay-totals {
	padding: 4px 18px 12px;
}

body.tfwc-page-pay-order .tfwc-pay-total-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--tf-line);
}

body.tfwc-page-pay-order .tfwc-pay-total-row:last-child {
	border-bottom: 0;
}

body.tfwc-page-pay-order .tfwc-pay-total-row__label {
	color: var(--tf-slate);
	font-size: 15px;
	font-weight: 700;
}

body.tfwc-page-pay-order .tfwc-pay-total-row__value {
	color: var(--tf-slate);
	font-size: 17px;
	font-weight: 800;
	text-align: right;
	white-space: nowrap;
}

body.tfwc-page-pay-order .tfwc-pay-total-row--grand {
	margin-top: 4px;
	border-top: 2px solid var(--tf-blue);
}

body.tfwc-page-pay-order .tfwc-pay-total-row--grand .tfwc-pay-total-row__label,
body.tfwc-page-pay-order .tfwc-pay-total-row--grand .tfwc-pay-total-row__value,
body.tfwc-page-pay-order .tfwc-pay-total-row--grand .woocommerce-Price-amount {
	font-size: 22px;
	font-weight: 900;
	color: var(--tf-blue);
}

body.tfwc-page-pay-order .tfwc-pay-card--payment {
	padding: 18px;
	border-top-color: var(--tf-blue);
}

body.tfwc-page-pay-order .tfwc-pay-card--payment #payment {
	margin: 0 !important;
	background: transparent !important;
	border-radius: 0 !important;
}

body.tfwc-page-pay-order .tfwc-pay-card--payment #payment .payment_methods,
body.tfwc-page-pay-order .tfwc-pay-card--payment #payment .form-row {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.tfwc-page-pay-order .tfwc-pay-submit #place_order {
	float: none !important;
	width: 100% !important;
	min-height: 50px !important;
	margin: 12px 0 0 !important;
	border: 1px solid var(--tf-red) !important;
	border-radius: 0 !important;
	background: var(--tf-red) !important;
	color: #fff !important;
	font-weight: 800 !important;
	text-transform: uppercase !important;
}

@media (max-width: 767px) {
	body.tfwc-page-pay-order .tfwc-pay-order {
		margin-top: 8px;
		padding: 0 8px;
	}

	body.tfwc-page-pay-order .tfwc-pay-card__heading {
		padding: 13px 14px;
		font-size: 18px;
	}

	body.tfwc-page-pay-order .tfwc-pay-item {
		display: block;
		padding: 14px;
	}

	body.tfwc-page-pay-order .tfwc-pay-item__name {
		font-size: 16px;
	}

	body.tfwc-page-pay-order .tfwc-pay-item__meta,
	body.tfwc-page-pay-order .tfwc-pay-item__meta p,
	body.tfwc-page-pay-order .tfwc-pay-item__meta dl,
	body.tfwc-page-pay-order .tfwc-pay-item__meta dt,
	body.tfwc-page-pay-order .tfwc-pay-item__meta dd {
		font-size: 13px;
	}

	body.tfwc-page-pay-order .tfwc-pay-item__facts {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin-top: 14px;
		padding-top: 12px;
		border-top: 1px solid var(--tf-line);
	}

	body.tfwc-page-pay-order .tfwc-pay-fact {
		display: flex;
		flex-direction: column;
		gap: 3px;
		min-width: 0;
	}

	body.tfwc-page-pay-order .tfwc-pay-fact--amount {
		text-align: right;
	}

	body.tfwc-page-pay-order .tfwc-pay-fact__value {
		font-size: 16px;
	}

	body.tfwc-page-pay-order .tfwc-pay-totals {
		padding: 2px 14px 10px;
	}

	body.tfwc-page-pay-order .tfwc-pay-total-row {
		gap: 10px;
		padding: 10px 0;
	}

	body.tfwc-page-pay-order .tfwc-pay-total-row__label {
		font-size: 13px;
	}

	body.tfwc-page-pay-order .tfwc-pay-total-row__value {
		font-size: 16px;
	}

	body.tfwc-page-pay-order .tfwc-pay-total-row--grand .tfwc-pay-total-row__label,
	body.tfwc-page-pay-order .tfwc-pay-total-row--grand .tfwc-pay-total-row__value,
	body.tfwc-page-pay-order .tfwc-pay-total-row--grand .woocommerce-Price-amount {
		font-size: 19px;
	}

	body.tfwc-page-pay-order .tfwc-pay-card--payment {
		padding: 14px;
	}
}
