/* ============================================================================
   KOSZYK — redesign 2026-07 (wg design/OFFLINE Cucudo Koszyk.html).
   Ładowany TYLKO na is_cart() przez wp_body_open (musi drukować się PONIŻEJ
   hard-kodowanych <link> rodzica — patrz functions.php childa, dlatego nie enqueue).
   Tokeny: tło #F2F0EB, ciemny #12131A, zieleń #21FA90 / #0A7D45, karty #fff r14,
   szarości #4A4A4A/#767676, linie #EDEDED/#C6C6C6, font Ubuntu. CTA = orange
   #C2410C (spójnie z kasą — CTA sklepu bez zmian).
   ========================================================================== */

/* ---------- chrome ---------- */
body.woocommerce-cart {
	background: #F2F0EB;
	font-family: 'Ubuntu', sans-serif;
	color: #12131A;
}
body.woocommerce-cart .singlepage__heading,
body.woocommerce-cart .breadcrumb-section {
	display: none !important;
}
body.woocommerce-cart .singlepage__content {
	padding-top: 28px !important;
}

/* ---------- layout ---------- */
.ccd-cart {
	max-width: 1280px;
	margin: 0 auto;
	padding: 4px 0 40px;
}
.ccd-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 28px;
	align-items: start;
	margin: 0;
}
.ccd-cart__main { min-width: 0; }

/* ---------- nagłówek ---------- */
.ccd-cart__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 18px;
}
.ccd-cart__title {
	font-size: 34px;
	font-weight: 700;
	margin: 0;
	color: #12131A;
}
.ccd-cart__count {
	font-size: 15px;
	color: #767676;
}

/* ---------- pozycje ---------- */
.ccd-cart__items {
	background: #fff;
	border-radius: 14px;
	padding: 6px 24px;
}
.ccd-cart__item {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto auto 28px;
	align-items: center;
	gap: 18px;
	padding: 20px 0;
	border-bottom: 1px solid #EDEDED;
}
.ccd-cart__item:last-child { border-bottom: 0; }

.ccd-cart__thumb img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}
.ccd-cart__info { min-width: 0; }
.ccd-cart__name {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	margin: 0 0 4px;
}
.ccd-cart__name a { color: inherit; text-decoration: none; }
.ccd-cart__name a:hover { color: #0A7D45; }
.ccd-cart__price {
	font-size: 14px;
	color: #4A4A4A;
	margin: 0 0 6px;
}
.ccd-cart__per { color: #767676; }
/* Badge personalizacji — wygląd 1:1 z .ck-chip kasy (cucudo-child-kasa.css),
   skopiowane bo koszyk ładuje własny arkusz. */
.ccd-cart__meta { margin: 2px 0 0; }
.ccd-cart__meta .ck-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ccd-cart__meta .ck-chip {
	font-size: 12px;
	background: #F2F0EB;
	border-radius: 10px;
	padding: 5px 10px;
	color: #4A4A4A;
}
.ccd-cart__meta .ck-chip > span { color: #767676; }
.ccd-cart__meta .ck-chip strong { font-weight: 500; color: #12131A; }
.ccd-cart__meta .backorder_notification { font-size: 13px; color: #767676; margin: 6px 0 0; }

/* ---------- stepper ---------- */
.ccd-cart__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #C6C6C6;
	border-radius: 10px;
	overflow: hidden;
	height: 40px;
}
.ccd-cart__step {
	width: 36px;
	height: 100%;
	border: 0;
	background: #fff;
	color: #12131A;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.ccd-cart__step:hover { background: #21FA90; color: #12131A; }
.ccd-cart__qty .qty.ccd-cart__qty-input {
	width: 42px;
	height: 100%;
	border: 0;
	border-left: 1px solid #EDEDED;
	border-right: 1px solid #EDEDED;
	text-align: center;
	font-size: 15px;
	font-family: 'Ubuntu', sans-serif;
	background: #fff;
	color: #12131A;
	-moz-appearance: textfield;
	appearance: textfield;
	padding: 0;
	border-radius: 0;
}
.ccd-cart__qty .qty::-webkit-outer-spin-button,
.ccd-cart__qty .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ccd-cart__subtotal {
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
	text-align: right;
}
.ccd-cart__remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #767676;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.ccd-cart__remove a.remove:hover { background: #FDECEC; color: #B00020; }

/* subtelne wygaszenie podczas przeładowania po zmianie ilości */
.ccd-cart--updating .ccd-cart__items { opacity: .55; transition: opacity .2s; pointer-events: none; }

/* ---------- akcje pod listą ---------- */
.ccd-cart__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 2px 0;
}
.ccd-cart__continue {
	font-size: 14px;
	font-weight: 500;
	color: #12131A;
	text-decoration: none;
}
.ccd-cart__continue:hover { color: #0A7D45; }

/* ukryty submit — tylko dla no-JS / a11y (JS submituje formularz sam) */
.ccd-cart__update-fallback {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
body.woocommerce-no-js .ccd-cart__update-fallback {
	position: static;
	width: auto; height: auto;
	clip: auto; margin: 12px 0 0;
	padding: 10px 18px;
	border: 1px solid #12131A;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	font-family: 'Ubuntu', sans-serif;
}

/* ---------- sidebar / podsumowanie ---------- */
.ccd-cart__aside { position: sticky; top: 20px; }
.ccd-cart__summary {
	background: #fff;
	border-radius: 14px;
	padding: 24px 22px;
}
.ccd-cart__summary-title {
	font-size: 19px;
	font-weight: 500;
	margin: 0 0 18px;
}
.ccd-cart__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-size: 15px;
	margin: 0 0 12px;
}
.ccd-cart__row span:first-child { color: #4A4A4A; }
.ccd-cart__row--discount span { color: #0A7D45; }

.ccd-cart__ship {
	border-top: 1px solid #EDEDED;
	padding-top: 14px;
	margin-top: 2px;
}
.ccd-cart__ship-head {
	font-size: 13px;
	font-weight: 500;
	color: #767676;
	text-transform: uppercase;
	letter-spacing: .03em;
	margin-bottom: 8px;
}
.ccd-cart__ship-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: #4A4A4A;
	margin-bottom: 6px;
}
.ccd-cart__ship-note {
	font-size: 12px;
	color: #767676;
	margin: 8px 0 0;
}

/* kupon (natywny <details>) */
.ccd-cart__coupon {
	border-top: 1px solid #EDEDED;
	margin-top: 16px;
	padding-top: 14px;
}
.ccd-cart__coupon summary {
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #12131A;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ccd-cart__coupon summary::-webkit-details-marker { display: none; }
.ccd-cart__coupon summary::after {
	content: '▾';
	margin-left: auto;
	color: #767676;
	transition: transform .15s;
}
.ccd-cart__coupon[open] summary::after { transform: rotate(180deg); }
.ccd-cart__coupon-body {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}
.ccd-cart__coupon-body input {
	flex: 1;
	min-width: 0;
	border: 1px solid #C6C6C6;
	border-radius: 10px;
	font-size: 14px;
	padding: 11px 12px;
	font-family: 'Ubuntu', sans-serif;
	outline: none;
}
.ccd-cart__coupon-body input:focus { border-color: #0A7D45; }
.ccd-cart__coupon-apply {
	flex: 0 0 auto;
	border: 1px solid #12131A;
	background: #fff;
	color: #12131A;
	border-radius: 10px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	font-family: 'Ubuntu', sans-serif;
}
.ccd-cart__coupon-apply:hover { background: #12131A; color: #fff; }

/* razem */
.ccd-cart__row--total {
	border-top: 1px solid #EDEDED;
	margin-top: 16px;
	padding-top: 16px;
	font-size: 18px;
	font-weight: 700;
}
.ccd-cart__row--total span:first-child { color: #12131A; }
.ccd-cart__total-val { font-size: 22px; }
.ccd-cart__total-note {
	font-size: 12px;
	color: #767676;
	margin: 2px 0 0;
	text-align: right;
}

/* CTA — orange jak na kasie (CTA sklepu bez zmian) */
.ccd-cart__checkout {
	display: block;
	text-align: center;
	background: #C2410C;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	border-radius: 10px;
	padding: 16px 20px;
	margin-top: 18px;
	text-decoration: none;
	transition: background .15s;
}
.ccd-cart__checkout:hover { background: #9A3412; color: #fff; }

.ccd-cart__trust {
	list-style: none;
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid #EDEDED;
}
.ccd-cart__trust li {
	display: flex;
	gap: 8px;
	font-size: 13px;
	color: #4A4A4A;
	line-height: 1.45;
	margin-bottom: 10px;
}
.ccd-cart__trust li:last-child { margin-bottom: 0; }
.ccd-cart__tick { color: #0A7D45; font-weight: 700; flex: 0 0 auto; }

/* ---------- pusty koszyk ---------- */
.ccd-cart--empty { max-width: 620px; }
.ccd-cart__empty-card {
	background: #fff;
	border-radius: 14px;
	padding: 48px 32px;
	text-align: center;
}
.ccd-cart__empty-icon { font-size: 46px; margin-bottom: 12px; }
.ccd-cart__empty-title { font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.ccd-cart__empty-text { font-size: 15px; color: #4A4A4A; margin: 0 auto 24px; max-width: 420px; line-height: 1.5; }
.ccd-cart__empty-btn { display: inline-block; margin-top: 0; }

/* ---------- responsywnie ---------- */
@media (max-width: 900px) {
	.ccd-cart__grid { grid-template-columns: 1fr; }
	.ccd-cart__aside { position: static; }
}
@media (max-width: 560px) {
	.ccd-cart__item {
		/* 3. kolumna = auto (nie 28px): mieści krzyżyk (górny wiersz) ORAZ cenę pozycji
		   (dolny wiersz). Przy 28px cena „5,00 zł" wychodziła poza kolumnę i ucinała się. */
		grid-template-columns: 64px minmax(0, 1fr) auto;
		grid-template-areas:
			'thumb info remove'
			'thumb qty  subtotal';
		column-gap: 12px;
		row-gap: 12px;
	}
	.ccd-cart__thumb { grid-area: thumb; align-self: start; }
	.ccd-cart__thumb img { width: 64px; height: 64px; }
	.ccd-cart__info { grid-area: info; }
	.ccd-cart__qty { grid-area: qty; }
	.ccd-cart__subtotal { grid-area: subtotal; align-self: center; }
	.ccd-cart__remove { grid-area: remove; align-self: start; text-align: right; }
	.ccd-cart__title { font-size: 28px; }
}
