/* Koszyk i zamówienie na jednej stronie (/kasa/) + podziękowanie – styl Brendz */

.checkout-page {
	padding-bottom: 56px;
	background: #f6f9fc;
}
.checkout-page .container { padding-top: 28px; }

.checkout-page__title {
	margin: 0 0 20px;
	font-family: "Baloo 2", var(--font);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a1b1d;
}
@media (min-width: 768px) { .checkout-page__title { font-size: 35px; } }

/* ---------- Układ ---------- */

.checkout-layout {
	display: grid;
	gap: 20px;
	align-items: start;
}
@media (min-width: 992px) {
	.checkout-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; }
	.checkout-summary { position: sticky; top: 140px; }
	body.admin-bar .checkout-summary { top: 172px; }
}
@media (min-width: 1200px) { .checkout-layout { grid-template-columns: minmax(0, 1fr) 460px; } }

@media (max-width: 991px) {
	/* Na telefonie podsumowanie (koszyk) jest nad formularzem. */
	.checkout-summary { order: -1; }
}

.checkout-main { display: grid; gap: 20px; min-width: 0; }

/* ---------- Karty ---------- */

.checkout-card,
.checkout-summary {
	padding: 22px 20px;
	border-radius: 14px;
	background: #fff;
}
@media (min-width: 768px) {
	.checkout-card, .checkout-summary { padding: 28px 30px; }
}
.checkout-card[hidden] { display: none; }

.checkout-card__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-family: "Baloo 2", var(--font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1b1d;
}
.checkout-card__step {
	display: inline-block;
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--green);
	/* line-height 26px przy wysokości 28px: font acumin-pro ma cyfry optycznie niżej – ta różnica podnosi je na środek koła */
	font: 700 14px/26px var(--font);
	text-align: center;
	color: #fff;
}
.checkout-card__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 7px;
	border-radius: 12px;
	background: #eaf7ec;
	font: 700 13px/1 var(--font);
	color: var(--green);
}
.checkout-summary .checkout-card__title { justify-content: flex-start; }

/* ---------- Powiadomienia WooCommerce ---------- */

.checkout-page .woocommerce-message .button { display: none; }

.checkout-error {
	margin: -8px 0 14px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fdf1f1;
	font-size: 13px;
	color: #9c2a2a;
}

/* ---------- Informacja o logowaniu / kupon ---------- */

.checkout-login-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 14px;
	background: #fff;
	color: var(--text);
}
.checkout-login-note p { flex: 1 1 220px; margin: 0; font-size: 14px; line-height: 22px; }
.checkout-login-note .icon { color: var(--green); }
.checkout-login-note__link { font-weight: 700; color: var(--green); text-underline-offset: 2px; }
.checkout-login-note__link:hover { text-decoration: none; }

/* Kupon: komunikat z linkiem + formularz z polem na kod */
.checkout-page .woocommerce-form-coupon-toggle .woocommerce-info { margin-bottom: 12px; }
.checkout-page form.checkout_coupon {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
	margin: 0 0 20px;
	padding: 18px;
	border-radius: 14px;
	background: #fff;
}
.checkout-page form.checkout_coupon p { margin: 0; padding: 0; }
.checkout-page form.checkout_coupon p:first-child { flex: 0 0 100%; font-size: 14px; line-height: 22px; color: var(--text-soft); }
.checkout-page form.checkout_coupon .form-row-first { flex: 1 1 200px; width: auto; float: none; }
.checkout-page form.checkout_coupon .form-row-last { flex: 0 0 auto; width: auto; float: none; }
.checkout-page form.checkout_coupon .input-text {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--border-strong);
	border-radius: 5px;
	background: #fff;
	font: 400 15px/44px var(--font);
	color: var(--text);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.checkout-page form.checkout_coupon .input-text::placeholder { color: var(--muted); }
.checkout-page form.checkout_coupon .input-text:focus {
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(43, 176, 57, 0.15);
	outline: 0;
}
.checkout-page form.checkout_coupon .button { height: 46px; padding: 0 24px; }
@media (max-width: 575px) {
	.checkout-page form.checkout_coupon .form-row-last,
	.checkout-page form.checkout_coupon .form-row-last .button { flex: 1 1 100%; width: 100%; }
}

/* ---------- Pola formularza ---------- */

.checkout-card .woocommerce-billing-fields h3,
.checkout-card .woocommerce-shipping-fields h3,
.checkout-card .woocommerce-additional-fields h3 {
	margin: 24px 0 14px;
	font-family: "Baloo 2", var(--font);
	font-size: 17px;
	font-weight: 700;
	color: #1a1b1d;
}
.checkout-card .woocommerce-billing-fields h3:first-child { display: none; }

.checkout-card .woocommerce-billing-fields__field-wrapper,
.checkout-card .woocommerce-shipping-fields__field-wrapper,
.checkout-card .woocommerce-additional-fields__field-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}
.checkout-card .form-row {
	display: block;
	width: 100%;
	margin: 0 0 16px;
	padding: 0;
	float: none;
}
@media (min-width: 576px) {
	.checkout-card .form-row-first,
	.checkout-card .form-row-last { width: calc(50% - 8px); }
}

.checkout-card label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 20px;
	color: var(--text);
}
.checkout-card label .required { color: #d33; text-decoration: none; }
.checkout-card label .optional { font-weight: 400; color: var(--muted); }

.checkout-card input[type="text"],
.checkout-card input[type="email"],
.checkout-card input[type="tel"],
.checkout-card input[type="password"],
.checkout-card input[type="number"],
.checkout-card textarea,
.checkout-card select,
.checkout-card .select2-container .select2-selection--single {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--border-strong);
	border-radius: 5px;
	background: #fff;
	font: 400 15px/44px var(--font);
	color: var(--text);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.checkout-card textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 22px; resize: none; }
.checkout-card .select2-container .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 44px; color: var(--text); }
.checkout-card .select2-container .select2-selection--single .select2-selection__arrow { top: 0; right: 8px; height: 44px; }
.checkout-card input:focus,
.checkout-card textarea:focus,
.checkout-card select:focus,
.checkout-card .select2-container--open .select2-selection--single,
.checkout-card .select2-container--focus .select2-selection--single {
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(43, 176, 57, 0.15);
	outline: 0;
}
.checkout-card .woocommerce-invalid input,
.checkout-card .woocommerce-invalid select,
.checkout-card .woocommerce-invalid .select2-selection--single { border-color: #d33; }
.checkout-card .woocommerce-validated input { border-color: var(--border-strong); }

.checkout-card input[type="checkbox"],
.checkout-card input[type="radio"] { accent-color: var(--green); }
.checkout-card .woocommerce-form__label-for-checkbox,
.checkout-card .create-account label,
.checkout-card #ship-to-different-address label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 400;
	cursor: pointer;
}
.checkout-card .woocommerce-account-fields { margin-top: 4px; }
.checkout-card .woocommerce-account-fields p.create-account { margin: 8px 0 16px; padding: 12px 14px; border-radius: 8px; background: #eef9ef; }
.checkout-card #ship-to-different-address { margin: 8px 0 16px; font-family: inherit; }
.checkout-card #ship-to-different-address label { font-size: 14px; }
.checkout-card .woocommerce-shipping-fields .shipping_address { margin-top: 16px; }

/* ---------- Dostawa ---------- */

.shipping-options { display: grid; gap: 10px; }
.shipping-option input { position: absolute; opacity: 0; pointer-events: none; }
.shipping-option label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 14px 16px 14px 48px;
	position: relative;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}
.shipping-option label::before {
	content: "";
	position: absolute;
	left: 16px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid var(--border-strong);
	border-radius: 50%;
	background: #fff;
}
.shipping-option input:checked + label { border-color: var(--green); background: #f4fbf5; }
.shipping-option input:checked + label::before { border-color: var(--green); background: radial-gradient(var(--green) 0 4px, #fff 5px); }
.shipping-option input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }
.shipping-option__price { font-weight: 700; color: var(--green); white-space: nowrap; }
.checkout-note { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Płatność ---------- */

.checkout-card--payment .wc_payment_methods { display: grid; gap: 10px; margin: 0 0 20px; }
.checkout-card--payment .wc_payment_method {
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s, background-color 0.2s;
}
.checkout-card--payment .wc_payment_method:has(> input:checked) { border-color: var(--green); background: #f4fbf5; }
.checkout-card--payment .wc_payment_method > input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-card--payment .wc_payment_method > label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 14px 16px 14px 48px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.checkout-card--payment .wc_payment_method > label::before {
	content: "";
	position: absolute;
	left: 16px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid var(--border-strong);
	border-radius: 50%;
	background: #fff;
}
.checkout-card--payment .wc_payment_method > input:checked + label::before { border-color: var(--green); background: radial-gradient(var(--green) 0 4px, #fff 5px); }
.checkout-card--payment .wc_payment_method > input:focus-visible + label { outline: 2px solid var(--green); outline-offset: -2px; }
.checkout-card--payment .payment_box {
	margin: 0;
	padding: 0 16px 14px 48px;
	font-size: 14px;
	line-height: 22px;
	color: var(--text-soft);
}
.checkout-card--payment .payment_box p { margin: 0; }
.checkout-card--payment .payment_box::before { display: none; }

.checkout-card--payment .woocommerce-privacy-policy-text,
.checkout-card--payment .woocommerce-terms-and-conditions-wrapper { margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--muted); }
.checkout-card--payment .woocommerce-privacy-policy-text p { margin: 0; }
.checkout-card--payment .woocommerce-privacy-policy-text a,
.checkout-card--payment .woocommerce-terms-and-conditions-wrapper a { color: var(--green); text-underline-offset: 2px; }
.checkout-card--payment .woocommerce-privacy-policy-text a:hover,
.checkout-card--payment .woocommerce-terms-and-conditions-wrapper a:hover { text-decoration: none; }

.checkout-card--payment #place_order {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 54px;
	padding: 0 24px;
	border: 0;
	border-radius: 5px;
	background: var(--green);
	font: 700 16px/1 var(--font);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s;
}
.checkout-card--payment #place_order:hover { background: #249a31; }
.checkout-card--payment #place_order:disabled { opacity: 0.6; cursor: wait; }

/* Blokada interfejsu podczas przeliczania. */
.checkout-page .blockUI.blockOverlay { border-radius: 14px; background: rgba(255, 255, 255, 0.65) !important; }

/* ---------- Podsumowanie (koszyk) ---------- */

.checkout-summary.is-updating { opacity: 0.6; pointer-events: none; transition: opacity 0.15s; }

.order-items { margin: 0 0 6px; }
.order-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--border);
}
.order-item:first-child { padding-top: 0; }
.order-item__thumb { display: block; width: 72px; height: 72px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #f6f9fc; }
.order-item__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.order-item__info { min-width: 0; }
.order-item__name { display: block; font-family: "Baloo 2", var(--font); font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); }
.order-item__name a { color: inherit; text-decoration: none; }
.order-item__name a:hover { color: var(--green); }
.order-item .variation { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.order-item .variation dt, .order-item .variation dd { display: inline; margin: 0; }
.order-item .variation dd p { display: inline; margin: 0; }
.order-item__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.order-item__price { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }
.order-item__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
.order-item__remove .icon { width: 18px; height: 18px; }
.order-item__remove:hover { background: #fdf1f1; color: #d33; }

/* Licznik ilości */
.qty {
	display: inline-flex;
	align-items: center;
	margin-top: 8px;
	border: 1px solid var(--border-strong);
	border-radius: 5px;
	overflow: hidden;
}
.qty__btn {
	position: relative;
	flex: none;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: #f6f9fc;
	font-size: 0;
	color: var(--text);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
/* Kreska „−” i krzyżyk „+” rysowane geometrią – dokładnie na środku przycisku */
.qty__btn::before,
.qty__btn::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transform: translate(-50%, -50%);
}
.qty__btn::after { transform: translate(-50%, -50%) rotate(90deg); }
.qty__btn[data-qty-step="-1"]::after { display: none; }
.qty__btn:hover { background: #eaf7ec; color: var(--green); }
.qty .qty__input {
	width: 44px;
	height: 32px;
	padding: 0;
	border: 0;
	border-inline: 1px solid var(--border-strong);
	border-radius: 0;
	background: #fff;
	font: 700 14px/32px var(--font);
	text-align: center;
	color: var(--text);
	-moz-appearance: textfield;
	appearance: textfield;
}
.qty .qty__input::-webkit-outer-spin-button,
.qty .qty__input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* Sumy */
.order-totals { width: 100%; margin: 0; border-collapse: collapse; }
.order-totals th,
.order-totals td { padding: 8px 0; border: 0; font-size: 14px; line-height: 22px; text-align: left; color: var(--text-soft); }
.order-totals th { font-weight: 400; }
.order-totals td { font-weight: 700; text-align: right; color: var(--text); }
.order-totals .cart-discount td { color: var(--green); }
.order-totals .order-total th,
.order-totals .order-total td {
	padding-top: 14px;
	border-top: 1px solid var(--border);
	font-family: "Baloo 2", var(--font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1b1d;
}
.order-totals .order-total small { font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--muted); }

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

.checkout-empty {
	max-width: 520px;
	margin: 40px auto 20px;
	padding: 48px 0;
	text-align: center;
}
.checkout-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: #eaf7ec;
	color: var(--green);
}
.checkout-empty__icon .icon { width: 32px; height: 32px; }
.checkout-empty h1 { margin: 0 0 8px; font-family: "Baloo 2", var(--font); font-size: 26px; font-weight: 700; line-height: 1.3; color: #1a1b1d; }
.checkout-empty p { margin: 0 0 24px; font-size: 15px; color: var(--text-soft); }

/* ---------- Podziękowanie ---------- */

.thankyou { max-width: 820px; margin-inline: auto; }

.thankyou__hero {
	margin-bottom: 20px;
	padding: 40px 24px 34px;
	border-radius: 14px;
	background: #fff;
	text-align: center;
}
.thankyou__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--green);
	color: #fff;
}
.thankyou__icon .icon { width: 32px; height: 32px; }
.thankyou__hero--failed .thankyou__icon { background: #d33; }
.thankyou__hero h2 { margin: 0 0 8px; font-family: "Baloo 2", var(--font); font-size: 28px; font-weight: 700; line-height: 1.3; color: #1a1b1d; }
.thankyou__hero p { max-width: 520px; margin: 0 auto; font-size: 15px; line-height: 24px; color: var(--text-soft); }

.thankyou ul.order_details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 0 0 20px;
	overflow: hidden;
	border-radius: 14px;
	background: var(--border);
}
@media (min-width: 768px) { .thankyou ul.order_details { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.thankyou ul.order_details li {
	margin: 0;
	padding: 16px 18px;
	background: #fff;
	font-size: 12px;
	line-height: 18px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.thankyou ul.order_details li strong { display: block; margin-top: 2px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); overflow-wrap: anywhere; }

.thankyou section { margin-bottom: 20px; padding: 24px 22px; border-radius: 14px; background: #fff; }
.thankyou section h2,
.thankyou .woocommerce-column__title { margin: 0 0 16px; font-family: "Baloo 2", var(--font); font-size: 20px; font-weight: 700; line-height: 1.3; color: #1a1b1d; }
.thankyou section p { margin: 0 0 12px; font-size: 14px; line-height: 22px; color: var(--text-soft); }
.thankyou .wc-bacs-bank-details { display: block; margin: 0; padding: 0; list-style: none; }
.thankyou .wc-bacs-bank-details li { margin: 0 0 4px; font-size: 14px; color: var(--text-soft); }
.thankyou .wc-bacs-bank-details strong { color: var(--text); }
.thankyou .wc-bacs-bank-details-heading,
.thankyou .wc-bacs-bank-details-account-name { margin: 0 0 12px; font-family: "Baloo 2", var(--font); font-size: 17px; font-weight: 700; color: #1a1b1d; }

.thankyou .woocommerce-table--order-details { width: 100%; border-collapse: collapse; }
.thankyou .woocommerce-table--order-details th,
.thankyou .woocommerce-table--order-details td { padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 22px; text-align: left; vertical-align: middle; color: var(--text-soft); }
.thankyou .woocommerce-table--order-details thead th { padding-top: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.thankyou .woocommerce-table--order-details th:last-child,
.thankyou .woocommerce-table--order-details td:last-child { text-align: right; }
.thankyou .woocommerce-table--order-details tfoot th { font-weight: 400; }
.thankyou .woocommerce-table--order-details tfoot td { font-weight: 700; color: var(--text); }
.thankyou .woocommerce-table--order-details tbody .product-name { display: flex; align-items: center; gap: 14px; border-bottom: 0; }
.thankyou .woocommerce-table--order-details tbody tr { border-bottom: 1px solid var(--border); }
.thankyou .woocommerce-table--order-details tbody td { border-bottom: 0; }
.thankyou .product-thumb { flex: none; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; }
.thankyou .product-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thankyou .product-total { font-weight: 700; color: var(--text); }
.thankyou section section { margin: 0; padding: 0; border: 0; border-radius: 0; }
.thankyou .product-name a { font-weight: 700; color: var(--text); text-decoration: none; }
.thankyou .product-name a:hover { color: var(--green); }
.thankyou .product-quantity { font-weight: 400; color: var(--muted); }

.thankyou .woocommerce-customer-details .col2-set { display: grid; gap: 20px; }
@media (min-width: 768px) { .thankyou .woocommerce-customer-details .col2-set { grid-template-columns: 1fr 1fr; } }
.thankyou address { font-style: normal; font-size: 14px; line-height: 24px; color: var(--text-soft); }

.thankyou__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.thankyou__hero .thankyou__actions { margin-top: 22px; }
.thankyou__actions .button { padding: 17px 28px; font-size: 15px; }

/* ---------- Hasło (konto powstaje przy zakupie) ---------- */

.checkout-card .woocommerce-input-wrapper { display: block; }
.checkout-card .password-input { position: relative; }
.checkout-card .password-input input { padding-right: 80px; }
.checkout-card .show-password-input {
	position: absolute;
	top: 0;
	right: 0;
	height: 46px;
	padding: 0 14px;
	border: 0;
	background: transparent;
	font: 700 13px/46px var(--font);
	color: var(--green);
	cursor: pointer;
}
.checkout-card .show-password-input::after { content: "Pokaż"; }
.checkout-card .show-password-input.display-password::after { content: "Ukryj"; }
.checkout-card .create-account .form-row { margin-bottom: 4px; }
.checkout-card .create-account::after { content: "Konto utworzymy przy składaniu zamówienia – zobaczysz w nim historię zamówień."; display: block; margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--muted); }
