/* ==========================================================================
   Koszyk (klasyczny) – woocommerce/cart/cart.php, cart-totals.php, cart-empty.php
   Stonowany: białe karty z cienką ramką, kolor marki tylko w akcentach.
   ========================================================================== */

.woocommerce-cart {
	--pkc-brown: #ab5f2e;
	--pkc-brown-dark: #8f4c22;
	--pkc-ink: #212121;
	--pkc-text: #545454;
	--pkc-muted: #8a8079;
	--pkc-line: #ece6df;
	--pkc-soft: #f9f5f1;
	--pkc-green: #23704a;
	--pkc-radius: 14px;
}

/* --- Komunikaty ------------------------------------------------------------ */

.woocommerce-cart .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid var(--pkc-line);
	border-left: 3px solid var(--pkc-green);
	border-radius: 10px;
	background: #fff;
	color: var(--pkc-ink);
	font-size: 14px;
	list-style: none;
}
.woocommerce-cart .woocommerce-info { border-left-color: var(--pkc-brown); }
.woocommerce-cart .woocommerce-error { border-left-color: #b3261e; }
.woocommerce-cart .woocommerce-error li { margin: 0; }
.woocommerce-cart .woocommerce-message a,
.woocommerce-cart .woocommerce-info a { color: var(--pkc-brown); font-weight: 600; text-decoration: underline; }
.woocommerce-cart .woocommerce-message .button { order: 2; margin-left: auto; }

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

.pk-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	font-family: 'Poppins', sans-serif;
	color: var(--pkc-text);
}

.pk-cart__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pk-cart__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--pkc-ink);
	font-family: 'League Spartan', sans-serif;
	font-size: 24px;
	font-weight: 700;
}
.pk-cart__count {
	display: inline-grid;
	place-items: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--pkc-soft);
	color: var(--pkc-brown);
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.pk-cart__items { display: grid; gap: 10px; }

/* --- Pozycja --------------------------------------------------------------- */

.pk-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb info remove"
		"thumb qty total";
	align-items: center;
	gap: 8px 14px;
	padding: 12px;
	border: 1px solid var(--pkc-line);
	border-radius: var(--pkc-radius);
	background: #fff;
	transition: opacity .2s, border-color .2s;
}
.pk-cart-item.is-removing { opacity: .5; }

.pk-cart-item__thumb { grid-area: thumb; align-self: start; }
.pk-cart-item__thumb a,
.pk-cart-item__thumb img {
	display: block;
	width: 76px;
	height: 76px;
	border-radius: 10px;
	background: var(--pkc-soft);
	object-fit: contain;
	mix-blend-mode: multiply;
}

.pk-cart-item__info { grid-area: info; min-width: 0; }
.pk-cart-item__cat {
	display: block;
	margin-bottom: 2px;
	color: var(--pkc-muted);
	font-size: 11px;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.pk-cart-item__name {
	margin: 0;
	color: var(--pkc-ink);
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}
.pk-cart-item__name a { color: inherit; text-decoration: none; }
.pk-cart-item__name a:hover { color: var(--pkc-brown); }
.pk-cart-item__name br { display: none; }
.pk-cart-item__info dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 0 6px;
	margin: 2px 0 0;
	color: var(--pkc-muted);
	font-size: 12px;
}
.pk-cart-item__info dl.variation dt,
.pk-cart-item__info dl.variation dd,
.pk-cart-item__info dl.variation p { margin: 0; font-weight: 400; }
.pk-cart-item__unit { display: block; margin-top: 4px; color: var(--pkc-muted); font-size: 12px; }
.pk-cart-item__unit del { margin-right: 4px; }
.pk-cart-item__unit ins { text-decoration: none; }

.pk-cart-item__qty { grid-area: qty; }
.pk-cart-item__total {
	grid-area: total;
	color: var(--pkc-ink);
	font-size: 15px;
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}
.pk-cart-item .product-remove { grid-area: remove; align-self: start; justify-self: end; }

.pk-cart-item__remove {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--pkc-muted);
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.pk-cart-item__remove:hover { background: #fbeae8; color: #b3261e; }

/* Ilość: − 2 + */
.pk-qty {
	display: inline-flex;
	align-items: center;
	height: 36px;
	border: 1px solid var(--pkc-line);
	border-radius: 999px;
	background: #fff;
}
.pk-qty .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pk-qty__btn {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--pkc-ink);
	font-family: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.pk-qty__btn:hover { background: var(--pkc-soft); color: var(--pkc-brown); }
.pk-qty input.qty {
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--pkc-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.pk-qty input.qty::-webkit-outer-spin-button,
.pk-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pk-qty input.qty:focus { outline: none; }

/* --- Kupon + ukryty „Aktualizuj” ------------------------------------------- */

.pk-cart__actions { margin-top: 12px; }
.pk-cart__update { display: none !important; }

.pk-cart__coupon {
	border: 1px solid var(--pkc-line);
	border-radius: var(--pkc-radius);
	background: #fff;
}
.pk-cart__coupon summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	color: var(--pkc-ink);
	font-size: 14px;
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}
.pk-cart__coupon summary::-webkit-details-marker { display: none; }
.pk-cart__coupon summary::after {
	content: '';
	width: 8px;
	height: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .2s;
}
.pk-cart__coupon[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.pk-cart__coupon-row { display: flex; gap: 8px; padding: 0 16px 16px; }
.pk-cart__coupon-row .input-text {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--pkc-line);
	border-radius: 10px;
	font-family: inherit;
	font-size: 16px;
	text-transform: uppercase;
}
.pk-cart__coupon-row .input-text:focus { border-color: var(--pkc-brown); outline: none; }
.pk-cart__coupon-btn {
	height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--pkc-ink);
	border-radius: 10px;
	background: #fff;
	color: var(--pkc-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.pk-cart__coupon-btn:hover { background: var(--pkc-ink); color: #fff; }

/* --- Podsumowanie ---------------------------------------------------------- */

.pk-summary {
	padding: 20px;
	border: 1px solid var(--pkc-line);
	border-radius: var(--pkc-radius);
	background: #fff;
}
.pk-summary__title {
	margin: 0 0 12px;
	color: var(--pkc-ink);
	font-family: 'League Spartan', sans-serif;
	font-size: 22px;
	font-weight: 700;
}
.pk-summary__table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 14px; }
.pk-summary__table th,
.pk-summary__table td {
	padding: 9px 0;
	border: 0;
	background: none;
	color: var(--pkc-text);
	font-weight: 400;
	text-align: left;
	vertical-align: top;
}
.pk-summary__table td { text-align: right; color: var(--pkc-ink); }
.pk-summary__table .cart-discount td,
.pk-summary__table .pk6-savings-row td,
.pk-summary__table .pk6-savings-row th { color: var(--pkc-green); }
.pk-summary__table .woocommerce-remove-coupon { margin-left: 4px; color: var(--pkc-muted); font-size: 12px; }

/* Wysyłka */
.pk-summary__table .woocommerce-shipping-totals td { text-align: left; }
.pk-summary__table .woocommerce-shipping-totals th { padding-bottom: 4px; }
.pk-summary__table tr.woocommerce-shipping-totals { display: flex; flex-direction: column; }
.pk-summary__table #shipping_method { margin: 0; padding: 0; list-style: none; }
.pk-summary__table #shipping_method li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 13px;
}
.pk-summary__table #shipping_method input[type="radio"] { accent-color: var(--pkc-brown); margin: 0; }
.pk-summary__table #shipping_method label { flex: 1; display: flex; justify-content: space-between; gap: 8px; color: var(--pkc-ink); }
.pk-summary__table .woocommerce-shipping-destination,
.pk-summary__table .woocommerce-shipping-calculator { margin: 4px 0 0; color: var(--pkc-muted); font-size: 12px; }
.pk-summary__table .shipping-calculator-button { color: var(--pkc-brown); }

.pk-summary__table .order-total th,
.pk-summary__table .order-total td {
	padding-top: 14px;
	border-top: 1px solid var(--pkc-line);
	color: var(--pkc-ink);
	font-weight: 600;
}
.pk-summary__table .order-total td strong,
.pk-summary__table .order-total td .amount { font-family: 'League Spartan', sans-serif; font-size: 26px; font-weight: 700; }
.pk-summary__table .order-total .includes_tax { display: block; color: var(--pkc-muted); font-size: 11px; font-weight: 400; }
.pk-summary__table .order-total .includes_tax .amount { font-family: inherit; font-size: inherit; font-weight: inherit; }

.pk-summary .wc-proceed-to-checkout { margin-top: 16px; }
.pk-summary .checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: var(--pkc-brown);
	color: #fff !important;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s;
}
.pk-summary .checkout-button:hover { background: var(--pkc-brown-dark); }

.pk-summary__trust {
	display: flex;
	justify-content: center;
	gap: 18px;
	margin: 14px 0 0;
	padding: 0;
	color: var(--pkc-muted);
	font-size: 12px;
	list-style: none;
}
.pk-summary__trust li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* Pasek mobilny */
.pk-summary__bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--pkc-line);
	background: #fff;
}
.pk-summary__bar-total { display: grid; color: var(--pkc-ink); font-weight: 700; line-height: 1.2; }
.pk-summary__bar-total small { color: var(--pkc-muted); font-size: 11px; font-weight: 400; }
.pk-summary__bar-total .amount { font-family: 'League Spartan', sans-serif; font-size: 20px; }
.pk-summary__bar-total .includes_tax { display: none; }
.pk-summary__bar-btn {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 28px;
	border-radius: 999px;
	background: var(--pkc-brown);
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.woocommerce-cart .standard-template { padding-bottom: 110px; }

/* --- Cross-sell ------------------------------------------------------------ */

.pk-cart .cross-sells { margin-top: 36px; }
.pk-cart .cross-sells > h2 {
	margin: 0 0 14px;
	color: var(--pkc-ink);
	font-family: 'League Spartan', sans-serif;
	font-size: 22px;
	font-weight: 700;
}
.pk-cart .cross-sells ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pk-cart .cross-sells ul.products li { width: auto; margin: 0; }

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

.woocommerce-cart .cart-empty.woocommerce-info { display: none; }
.pk-cart-empty {
	max-width: 520px;
	margin: 0 auto;
	padding: 48px 24px;
	border: 1px solid var(--pkc-line);
	border-radius: 20px;
	background: #fff;
	text-align: center;
	font-family: 'Poppins', sans-serif;
}
.pk-cart-empty__icon {
	display: inline-grid;
	place-items: center;
	width: 88px;
	height: 88px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--pkc-soft);
	color: var(--pkc-brown);
}
.pk-cart-empty__title { margin: 0 0 6px; color: var(--pkc-ink); font-family: 'League Spartan', sans-serif; font-size: 26px; }
.pk-cart-empty__text { margin: 0 0 22px; color: var(--pkc-text); font-size: 15px; }
.pk-cart-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pk-cart-empty__btn {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 24px;
	border: 1px solid var(--pkc-brown);
	border-radius: 999px;
	background: var(--pkc-brown);
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.pk-cart-empty__btn--alt { background: #fff; color: var(--pkc-brown) !important; }

/* --- Ładowanie (blockUI z cart.js) ---------------------------------------- */

.woocommerce-cart .blockUI.blockOverlay { border-radius: var(--pkc-radius); background: rgba(255, 255, 255, .6) !important; }

/* ==========================================================================
   Tablet / desktop
   ========================================================================== */

@media (min-width: 768px) {
	.pk-cart-item {
		grid-template-columns: 88px minmax(0, 1fr) auto 96px 36px;
		grid-template-areas: "thumb info qty total remove";
		gap: 16px;
		padding: 14px 16px;
	}
	.pk-cart-item__thumb a,
	.pk-cart-item__thumb img { width: 88px; height: 88px; }
	.pk-cart-item__thumb { align-self: center; }
	.pk-cart-item .product-remove { align-self: center; }
	.pk-cart-item__name { font-size: 15px; }
	.pk-cart .cross-sells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1024px) {
	.pk-cart { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 32px; }
	.pk-cart__aside { position: sticky; top: 110px; }
	.pk-summary { padding: 24px; }
	.pk-summary__bar { display: none; }
	.woocommerce-cart .standard-template { padding-bottom: 100px; }
	.pk-cart .cross-sells ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Metody wysyłki z logo (np. Paczkomat) – etykieta w jednej linii z ceną */
.pk-summary__table #shipping_method label { flex-wrap: wrap; align-items: center; }
.pk-summary__table #shipping_method label img { max-height: 18px; width: auto; }

/* Dostawa liczona w checkoutcie */
.pk-summary__table .pk-summary__delivery td { color: var(--pkc-muted); font-size: 13px; }
