/* ============================================================
   Collibre — Koszyk (Faza 1). Wygląd 1:1 z „Koszyk-standalone/Koszyk.html".
   Szablon: woocommerce/cart/cart.php · logika: inc/koszyk.php · JS: koszyk.js.
   ============================================================ */

/* ---------- wskaźnik kroków (współdzielony koszyk+checkout) ---------- */
.tech-steps {
	border-bottom: 1px solid var(--tech-border);
	background: var(--tech-white);
}
.tech-steps__list {
	/* równaj do szerokości treści koszyka (tytuł/karty/podsumowanie pod spodem),
	   żeby kroki rozkładały się na pełną sekcję, nie wąski wyśrodkowany pasek. */
	max-width: var(--tech-container);
	margin: 0 auto;
	padding: 1.25rem var(--tech-gutter);
	display: flex;
	align-items: flex-start;
	list-style: none;
}
.tech-steps__item {
	position: relative;
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
	gap: 0.375rem;
}
.tech-steps__link { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; text-decoration: none; }
/* łącznik: linia w przerwie między tą a następną kropką (równe kolumny → równe odstępy),
   z marginesem od kropek, żeby ich nie dotykała. „done" = linia ink (przebyta droga). */
.tech-steps__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 0.875rem; /* środek kropki 1.75rem */
	left: calc(50% + 1.5rem);
	width: calc(100% - 3rem);
	height: 1px;
	background: #E5E7EB;
}
.tech-steps__item--done::after { background: var(--tech-ink); }
.tech-steps__dot {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: var(--tech-radius-pill);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--tech-fs-xs);
	font-weight: var(--tech-fw-bold);
	border: 1px solid var(--tech-gray-300);
	color: var(--tech-slate);
	background: var(--tech-white);
}
.tech-steps__check { width: 0.8rem; height: 0.8rem; }
.tech-steps__item--current .tech-steps__dot,
.tech-steps__item--done .tech-steps__dot {
	background: var(--tech-ink);
	color: var(--tech-white);
	border-color: var(--tech-ink);
}
.tech-steps__label {
	font-size: var(--tech-fs-xs);
	font-weight: var(--tech-fw-medium);
	color: var(--tech-slate);
	line-height: 1.2;
}
.tech-steps__item--current .tech-steps__label,
.tech-steps__item--done .tech-steps__label { color: var(--tech-ink); font-weight: var(--tech-fw-semibold); }

@media (min-width: 640px) {
	.tech-steps__list { padding-left: var(--tech-gutter-sm); padding-right: var(--tech-gutter-sm); }
	.tech-steps__label { font-size: var(--tech-fs-sm); }
}

/* ---------- układ koszyka ---------- */
.tech-cart__inner {
	max-width: var(--tech-container);
	margin: 0 auto;
	padding: 2rem var(--tech-gutter) 2.5rem;
}
.tech-cart__title { font-size: var(--tech-fs-3xl); font-weight: var(--tech-fw-extrabold); letter-spacing: var(--tech-tracking-tight); }
.tech-cart__grid {
	margin-top: 1.75rem;
	display: grid;
	gap: 1.5rem;
	align-items: start;
}
.tech-cart__main { display: flex; flex-direction: column; gap: 1.25rem; }
.tech-cart__listhead { display: flex; align-items: baseline; justify-content: space-between; }
.tech-cart__subtitle { font-size: var(--tech-fs-lg); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); }
.tech-cart__count { font-size: var(--tech-fs-sm); color: var(--tech-slate); }
.tech-cart__list { display: flex; flex-direction: column; gap: 1rem; }
.tech-cart.is-busy { opacity: 0.6; pointer-events: none; transition: opacity 0.15s ease; }

@media (min-width: 640px) {
	.tech-cart__inner { padding-left: var(--tech-gutter-sm); padding-right: var(--tech-gutter-sm); padding-top: 2.5rem; }
	.tech-cart__title { font-size: var(--tech-fs-4xl); }
}
@media (min-width: 1024px) {
	.tech-cart__grid { grid-template-columns: 2fr 1fr; gap: 2rem; }
	.tech-cart__aside { position: sticky; top: 7rem; display: flex; flex-direction: column; gap: 1.25rem; }
}

/* ---------- pasek darmowej dostawy ---------- */
.tech-cart-ship {
	border-radius: var(--tech-radius);
	background: var(--tech-mist);
	border: 1px solid var(--tech-border);
	padding: 1.25rem;
}
.tech-cart-ship__row { display: flex; align-items: center; gap: 0.75rem; }
.tech-cart-ship__ico { width: 1.375rem; height: 1.375rem; color: var(--tech-ink); flex: 0 0 auto; }
.tech-cart-ship__msg { font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-medium); color: var(--tech-ink); }
.tech-cart-ship__track {
	margin-top: 0.75rem;
	height: 0.625rem;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-white);
	border: 1px solid var(--tech-border);
	overflow: hidden;
}
.tech-cart-ship__fill {
	height: 100%;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-mint);
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- karta pozycji ---------- */
.tech-cart-item {
	border-radius: var(--tech-radius);
	border: 1px solid var(--tech-border);
	padding: 1rem;
}
.tech-cart-item__main { display: flex; gap: 1rem; }
.tech-cart-item__thumb {
	width: 5rem;
	height: 5rem;
	border-radius: 0.75rem;
	background: var(--tech-mist);
	overflow: hidden;
	flex: 0 0 auto;
}
.tech-cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tech-cart-item__body { flex: 1 1 auto; min-width: 0; }
.tech-cart-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.tech-cart-item__info { min-width: 0; }
.tech-cart-item__name { font-weight: var(--tech-fw-bold); color: var(--tech-ink); letter-spacing: var(--tech-tracking-tight); }
.tech-cart-item__name a { color: inherit; text-decoration: none; }
.tech-cart-item__desc { font-size: var(--tech-fs-sm); color: var(--tech-slate); margin-top: 0.125rem; }
.tech-cart-item__subtag { margin-top: 0.375rem; display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.tech-cart-item__subbadge {
	display: inline-flex;
	align-items: center;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-mint-100);
	color: var(--tech-ink);
	font-size: var(--tech-fs-xs);
	font-weight: var(--tech-fw-bold);
	padding: 0.25rem 0.625rem;
}
.tech-cart-item__switch {
	background: none; border: 0; padding: 0; cursor: pointer;
	font-size: var(--tech-fs-xs);
	font-weight: var(--tech-fw-semibold);
	color: var(--tech-slate);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.tech-cart-item__switch:hover { color: var(--tech-ink); }
.tech-cart-item__remove {
	background: none; border: 0; padding: 0.25rem; margin: -0.25rem; cursor: pointer;
	color: var(--tech-slate); flex: 0 0 auto; line-height: 0;
}
.tech-cart-item__remove:hover { color: var(--tech-ink); }
.tech-cart-item__remove .tech-icon { width: 1.25rem; height: 1.25rem; }
.tech-cart-item__bottom { margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tech-cart-item__price { font-size: var(--tech-fs-lg); font-weight: var(--tech-fw-extrabold); color: var(--tech-ink); text-align: right; }
.tech-cart-item__price del { color: var(--tech-slate); font-weight: var(--tech-fw-medium); font-size: var(--tech-fs-sm); margin-right: 0.4rem; }
.tech-cart-item__price ins { text-decoration: none; }

/* stepper ilości (kontrować Astrę: gołe <button>) */
.tech-qty { display: inline-flex; align-items: center; border: 1px solid #E5E7EB; border-radius: var(--tech-radius-pill); }
.tech-qty__btn {
	width: 2.25rem !important; height: 2.25rem !important; min-width: 0 !important;
	padding: 0 !important; border: 0 !important; background: transparent !important;
	display: flex; align-items: center; justify-content: center;
	font-size: var(--tech-fs-lg); color: var(--tech-ink); cursor: pointer; line-height: 1;
}
.tech-qty__btn:hover { background: var(--tech-mist) !important; }
.tech-qty__btn:first-child { border-radius: var(--tech-radius-pill) 0 0 var(--tech-radius-pill); }
.tech-qty__btn:last-child { border-radius: 0 var(--tech-radius-pill) var(--tech-radius-pill) 0; }
.tech-qty__val { width: 2.25rem; text-align: center; font-weight: var(--tech-fw-bold); color: var(--tech-ink); }

/* nudge subskrypcji */
.tech-cart-nudge {
	margin-top: 0.75rem;
	border-radius: var(--tech-radius);
	background: var(--tech-mint-50);
	border: 1px solid var(--tech-mint-200);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.tech-cart-nudge__badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-mint);
	color: var(--tech-ink);
	font-size: var(--tech-fs-sm);
	font-weight: var(--tech-fw-extrabold);
	padding: 0.375rem 0.75rem;
	flex: 0 0 auto;
}
.tech-cart-nudge__text { flex: 1 1 auto; min-width: 0; }
.tech-cart-nudge__title { font-weight: var(--tech-fw-bold); color: var(--tech-ink); }
.tech-cart-nudge__sub { margin-top: 0.125rem; font-size: var(--tech-fs-sm); color: var(--tech-slate); }
.tech-cart-nudge__old { text-decoration: line-through; }
.tech-cart-nudge__sub strong { color: var(--tech-ink); }
.tech-cart-nudge__btn {
	width: 100%;
	padding: 0.75rem 1.5rem;
	border: 0; cursor: pointer;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-ink);
	color: var(--tech-white);
	font-size: var(--tech-fs-sm);
	font-weight: var(--tech-fw-semibold);
	transition: background 0.15s ease;
	flex: 0 0 auto;
}
.tech-cart-nudge__btn:hover { background: var(--tech-ink-hover); }

@media (min-width: 640px) {
	.tech-cart-item { padding: 1.25rem; }
	.tech-cart-item__thumb { width: 6rem; height: 6rem; }
	.tech-cart-nudge { flex-direction: row; align-items: center; padding: 1.25rem; }
	.tech-cart-nudge__btn { width: auto; }
}

/* ---------- podsumowanie ---------- */
.tech-cart-sum {
	border-radius: var(--tech-radius-lg);
	border: 1px solid #E5E7EB;
	padding: 1.5rem;
}
.tech-cart-sum__title { font-size: var(--tech-fs-lg); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); }
.tech-cart-sum__rows { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: var(--tech-fs-sm); }
.tech-cart-sum__row { display: flex; align-items: center; justify-content: space-between; }
.tech-cart-sum__row dt { color: var(--tech-slate); }
.tech-cart-sum__row dd { font-weight: var(--tech-fw-semibold); color: var(--tech-ink); }
.tech-cart-sum__field label { display: block; font-size: var(--tech-fs-sm); color: var(--tech-slate); margin-bottom: 0.375rem; }
.tech-cart-sum__select { position: relative; }
.tech-cart-sum__select select {
	appearance: none; -webkit-appearance: none;
	width: 100%;
	border-radius: 0.75rem;
	border: 1px solid #E5E7EB;
	background: var(--tech-white);
	padding: 0.625rem 2.25rem 0.625rem 1rem;
	font-size: var(--tech-fs-sm);
	font-weight: var(--tech-fw-semibold);
	color: var(--tech-ink);
	cursor: pointer;
	transition: border-color 0.15s ease;
}
.tech-cart-sum__select select:hover,
.tech-cart-sum__select select:focus { outline: none; border-color: var(--tech-ink); }
.tech-cart-sum__chev { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); width: 0.875rem; height: 0.875rem; pointer-events: none; color: var(--tech-ink); }
.tech-cart-sum__coupons { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-cart-coupon {
	display: inline-flex; align-items: center; gap: 0.4rem;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-mist);
	border: 1px solid var(--tech-border);
	padding: 0.3rem 0.75rem;
	font-size: var(--tech-fs-xs);
	font-weight: var(--tech-fw-semibold);
	color: var(--tech-ink);
}
.tech-cart-coupon__rm { background: none; border: 0; cursor: pointer; color: var(--tech-slate); font-size: 1rem; line-height: 1; padding: 0; }
.tech-cart-coupon__rm:hover { color: var(--tech-ink); }
.tech-cart-sum__total {
	margin-top: 1.25rem; padding-top: 1.25rem;
	border-top: 1px solid var(--tech-border);
	display: flex; align-items: baseline; justify-content: space-between;
}
.tech-cart-sum__total > span:first-child { font-weight: var(--tech-fw-bold); color: var(--tech-ink); }
.tech-cart-sum__totalval { font-size: var(--tech-fs-2xl); font-weight: var(--tech-fw-extrabold); color: var(--tech-ink); }
.tech-cart-sum__checkout {
	margin-top: 1.25rem;
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 3.5rem;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-ink);
	color: var(--tech-white);
	font-weight: var(--tech-fw-semibold);
	text-decoration: none;
	transition: background 0.15s ease;
}
.tech-cart-sum__checkout:hover { background: var(--tech-ink-hover); color: var(--tech-white); }
.tech-cart-sum__note {
	margin-top: 0.75rem;
	display: flex; align-items: center; justify-content: center; gap: 0.5rem;
	font-size: var(--tech-fs-xs); color: var(--tech-slate);
}
.tech-cart-sum__note .tech-icon { width: 0.95rem; height: 0.95rem; }

/* ---------- kod rabatowy ---------- */
.tech-cart-promo {
	border-radius: var(--tech-radius-lg);
	border: 1px solid #E5E7EB;
	padding: 1.5rem;
}
.tech-cart-promo__title { font-weight: var(--tech-fw-bold); color: var(--tech-ink); }
.tech-cart-promo__row { margin-top: 0.75rem; display: flex; gap: 0.5rem; }
.tech-cart-promo__input {
	flex: 1 1 auto; min-width: 0;
	border-radius: var(--tech-radius-pill) !important; /* Astra nadpisuje radius input → !important */
	border: 1px solid #E5E7EB;
	padding: 0.75rem 1.25rem;
	font-size: var(--tech-fs-sm);
	transition: border-color 0.15s ease;
}
.tech-cart-promo__input:focus { outline: none; border-color: var(--tech-ink); }
.tech-cart-promo__btn {
	flex: 0 0 auto;
	border: 0; cursor: pointer;
	padding: 0.75rem 1.5rem;
	border-radius: var(--tech-radius-pill);
	background: var(--tech-ink);
	color: var(--tech-white);
	font-size: var(--tech-fs-sm);
	font-weight: var(--tech-fw-semibold);
	transition: background 0.15s ease;
}
.tech-cart-promo__btn:hover { background: var(--tech-ink-hover); }
.tech-cart-promo__msg { margin-top: 0.5rem; font-size: var(--tech-fs-sm); }
.tech-cart-promo__msg--success { color: var(--tech-mint); }
.tech-cart-promo__msg--error { color: #b42318; }
.tech-cart-promo__msg--info { color: var(--tech-slate); }

/* ---------- cross-sell ---------- */
.tech-cart-cross { margin-top: 3.5rem; }
.tech-cart-cross__title { font-size: var(--tech-fs-2xl); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); }
.tech-cart-cross__lead { margin-top: 0.5rem; color: var(--tech-slate); }
.tech-cart-cross__row {
	margin-top: 1.5rem;
	display: flex; gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: 0.5rem;
	-ms-overflow-style: none; scrollbar-width: none;
}
.tech-cart-cross__row::-webkit-scrollbar { display: none; }
.tech-cart-cross__card {
	scroll-snap-align: start;
	flex: 0 0 auto;
	width: 11rem;
	border-radius: var(--tech-radius-lg);
	border: 1px solid var(--tech-border);
	padding: 0.75rem;
	display: flex; flex-direction: column;
	background: var(--tech-white);
	transition: box-shadow 0.15s ease;
}
.tech-cart-cross__card:hover { box-shadow: var(--tech-shadow-lg); }
.tech-cart-cross__media {
	border-radius: var(--tech-radius);
	background: var(--tech-mist);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	margin-bottom: 0.75rem;
	display: block;
}
.tech-cart-cross__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tech-cart-cross__name { font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-bold); color: var(--tech-ink); letter-spacing: var(--tech-tracking-tight); }
.tech-cart-cross__name a { color: inherit; text-decoration: none; }
.tech-cart-cross__price { margin-top: 0.25rem; font-size: var(--tech-fs-base); font-weight: var(--tech-fw-extrabold); color: var(--tech-ink); }
.tech-cart-cross__price .tech-card__from { font-size: var(--tech-fs-xs); font-weight: var(--tech-fw-semibold); color: var(--tech-slate); }
.tech-cart-cross__btn {
	margin-top: 0.75rem;
	display: inline-flex; align-items: center; justify-content: center;
	width: 100%;
	padding: 0.625rem 1rem;
	border-radius: var(--tech-radius-pill);
	border: 1px solid var(--tech-ink);
	background: transparent;
	color: var(--tech-ink);
	font-size: var(--tech-fs-sm);
	font-weight: var(--tech-fw-semibold);
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.tech-cart-cross__btn:hover { background: var(--tech-ink); color: var(--tech-white); }

@media (min-width: 640px) {
	.tech-cart-cross { margin-top: 4rem; }
	.tech-cart-cross__title { font-size: var(--tech-fs-3xl); }
	.tech-cart-cross__card { width: 13rem; }
}

/* ---------- pusty koszyk ---------- */
.tech-cart__empty {
	border-radius: var(--tech-radius);
	border: 1px dashed #E5E7EB;
	padding: 4rem 1.5rem;
	text-align: center;
	color: var(--tech-slate);
	margin-top: 1.75rem;
}
.tech-cart__empty-link { color: var(--tech-ink); font-weight: var(--tech-fw-semibold); text-decoration: none; }
.tech-cart__empty-link:hover { opacity: 0.7; }
