/**
 * CalmPet – koszyk boczny 3.0.
 *
 * Jeden prosty widok na białym tle: pozycje, kod promocyjny, podsumowanie, „Do zapłaty” i przycisk kasy.
 * Wszystko w zasięgu .cpk, bo motyw ma własne style dla button, input, h2, h3 i p (hover przycisków też).
 * Montserrat jest wgrany tylko w wadze 400 i 600, więc nie używamy innych wag.
 */

.cpk {
	--cpk-ink: #123c3a;
	--cpk-text: #1d2428;
	--cpk-muted: #60706d;
	--cpk-line: #e4ebe2;
	--cpk-soft: #f5f8f3;
	--cpk-was: #d9534f;
	--cpk-good-bg: #e9f5ec;
	--cpk-good-ink: #146c2e;
	--cpk-ease: cubic-bezier(0.22, 1, 0.36, 1);

	position: fixed;
	inset: 0;
	z-index: 10050;
	visibility: hidden;
	pointer-events: none;
	color: var(--cpk-text);
	font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

.cpk.is-open {
	visibility: visible;
	pointer-events: auto;
}

.cpk *,
.cpk *::before,
.cpk *::after {
	box-sizing: border-box;
}

.cpk [hidden] {
	display: none !important;
}

body.cpk-lock {
	overflow: hidden;
}

.cpk .cpk-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Przyciski: reset stylów motywu (kolor, ramka, tło, wysokość linii także przy :hover i :focus). */
.cpk button,
.cpk .cpk-cta {
	font-family: inherit;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.cpk button:hover,
.cpk button:focus,
.cpk button:active {
	color: inherit;
	box-shadow: none;
}

.cpk :focus-visible {
	outline: 3px solid var(--cpk-ink);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Panel
 * ------------------------------------------------------------------------- */

.cpk .cpk__overlay {
	position: absolute;
	inset: 0;
	background: rgba(18, 32, 32, 0.46);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.cpk.is-open .cpk__overlay {
	opacity: 1;
}

.cpk .cpk__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, 100%);
	background: #fff;
	box-shadow: -16px 0 40px rgba(18, 60, 58, 0.16);
	outline: none;
	transform: translateX(102%);
	transition: transform 0.3s var(--cpk-ease);
}

.cpk.is-open .cpk__panel {
	transform: none;
}

.cpk .cpk__head {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px 12px 20px;
	border-bottom: 1px solid var(--cpk-line);
	background: #fff;
}

.cpk .cpk__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	color: var(--cpk-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	clear: none;
}

.cpk .cpk__title svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.cpk .cpk__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	border-radius: 50%;
	background: var(--cpk-soft);
	color: var(--cpk-ink);
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
}

.cpk .cpk__close:hover,
.cpk .cpk__close:focus {
	background: var(--cpk-line);
	color: var(--cpk-ink);
}

.cpk .cpk__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 0 20px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.cpk .cpk__error {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fdf0ef;
	color: #9b2c2a;
	font-size: 13px;
	line-height: 1.4;
}

.cpk .cpk__foot {
	flex: 0 0 auto;
	padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--cpk-line);
	background: #fff;
	box-shadow: 0 -10px 22px rgba(18, 60, 58, 0.06);
}

.cpk .cpk__busy {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.62);
}

.cpk.is-busy .cpk__busy {
	display: flex;
}

.cpk .cpk__busy span {
	width: 32px;
	height: 32px;
	border: 3px solid var(--cpk-line);
	border-top-color: var(--cpk-ink);
	border-radius: 50%;
	animation: cpk-spin 0.8s linear infinite;
}

@keyframes cpk-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------------------------------------------------------------------------
 * Pozycje
 * ------------------------------------------------------------------------- */

.cpk .cpk-item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--cpk-line);
}

.cpk .cpk-item__img {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 96px;
	border-radius: 12px;
	background: var(--cpk-soft);
}

.cpk .cpk-item__img img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	padding: 6px 4px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
	object-position: center bottom;
}

.cpk .cpk-item__main {
	min-width: 0;
}

.cpk .cpk-item__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.cpk .cpk-item__name {
	margin: 0;
	padding: 0;
	color: var(--cpk-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	clear: none;
}

.cpk .cpk-item__remove {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: -7px -7px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cpk-muted);
}

.cpk .cpk-item__remove:hover,
.cpk .cpk-item__remove:focus {
	background: var(--cpk-soft);
	color: var(--cpk-was);
}

.cpk .cpk-item__remove svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.cpk .cpk-item__meta {
	margin: 1px 0 0;
	padding: 0;
	color: var(--cpk-muted);
	font-size: 12.5px;
	line-height: 1.35;
}

.cpk .cpk-item__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-top: 10px;
}

.cpk .cpk-item__qty {
	color: var(--cpk-text);
	font-size: 13px;
	font-weight: 600;
}

.cpk .cpk-item__price {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin: 0 0 0 auto;
	padding: 0;
	white-space: nowrap;
}

.cpk .cpk-item__was {
	color: var(--cpk-was);
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
}

.cpk .cpk-item__now {
	color: var(--cpk-ink);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.1;
}

.cpk .cpk-item__hint {
	margin: 8px 0 0;
	padding: 0;
}

.cpk .cpk-item__hint-btn {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cpk-good-ink);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cpk .cpk-item__hint-btn:hover,
.cpk .cpk-item__hint-btn:focus {
	background: transparent;
	color: var(--cpk-good-ink);
}

/* Przełącznik 1 / 2 butelki */
.cpk .cpk-seg {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--cpk-line);
	border-radius: 999px;
	background: var(--cpk-soft);
}

.cpk .cpk-seg__btn {
	min-height: 32px;
	margin: 0;
	padding: 5px 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cpk-text);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cpk .cpk-seg__btn:hover,
.cpk .cpk-seg__btn:focus {
	background: var(--cpk-line);
	color: var(--cpk-ink);
}

.cpk .cpk-seg__btn.is-active,
.cpk .cpk-seg__btn.is-active:hover,
.cpk .cpk-seg__btn.is-active:focus {
	background: var(--cpk-ink);
	color: #fff;
	cursor: default;
}

/* ---------------------------------------------------------------------------
 * Kod promocyjny
 * ------------------------------------------------------------------------- */

.cpk .cpk-promo {
	padding: 6px 0 4px;
	border-bottom: 1px solid var(--cpk-line);
}

.cpk .cpk-promo__toggle {
	margin: 0;
	padding: 10px 0;
	border: 0;
	background: transparent;
	color: var(--cpk-ink);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cpk .cpk-promo__toggle:hover,
.cpk .cpk-promo__toggle:focus {
	background: transparent;
	color: var(--cpk-ink);
}

.cpk .cpk-promo__form {
	display: flex;
	gap: 8px;
	margin: 6px 0 10px;
}

.cpk .cpk-promo__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #cfd8cc;
	border-radius: 10px;
	background: #fff;
	color: var(--cpk-text);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: normal;
	text-transform: uppercase;
	box-shadow: none;
}

.cpk .cpk-promo__input::placeholder {
	color: #8b9a96;
	text-transform: none;
}

.cpk .cpk-promo__input:focus {
	border-color: var(--cpk-ink);
	outline: none;
	box-shadow: 0 0 0 3px rgba(18, 60, 58, 0.14);
}

.cpk .cpk-promo__apply {
	flex: 0 0 auto;
	height: 46px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 10px;
	background: var(--cpk-ink);
	color: #fff;
	font-size: 14px;
	line-height: 1;
}

.cpk .cpk-promo__apply:hover,
.cpk .cpk-promo__apply:focus {
	background: var(--cpk-ink);
	color: #fff;
	filter: brightness(1.15);
}

.cpk .cpk-promo__applied {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 2px;
	padding: 0;
	list-style: none;
}

.cpk .cpk-chip {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0 4px 0 12px;
	border-radius: 999px;
	background: var(--cpk-good-bg);
	color: var(--cpk-good-ink);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.cpk .cpk-chip__x {
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cpk-good-ink);
	font-size: 18px;
	line-height: 1;
}

.cpk .cpk-chip__x:hover,
.cpk .cpk-chip__x:focus {
	background: rgba(20, 108, 46, 0.12);
	color: var(--cpk-good-ink);
}

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

.cpk .cpk-sum {
	margin: 0;
	padding: 14px 0 6px;
}

.cpk .cpk-sum__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 5px 0;
}

.cpk .cpk-sum dt {
	margin: 0;
	padding: 0;
	color: var(--cpk-muted);
	font-weight: 400;
}

.cpk .cpk-sum dd {
	margin: 0;
	padding: 0;
	color: var(--cpk-text);
	font-weight: 600;
	text-align: right;
}

.cpk .cpk-sum__row--discount dd,
.cpk .cpk-sum dd.is-free {
	color: var(--cpk-good-ink);
}

.cpk .cpk-sum dd.is-pending {
	color: var(--cpk-muted);
	font-weight: 400;
}

.cpk .cpk-sum__row--muted dt,
.cpk .cpk-sum__row--muted dd {
	font-size: 12.5px;
}

.cpk .cpk-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 8px 0 0;
	padding: 12px 0 0;
	border-top: 1px dashed var(--cpk-line);
	list-style: none;
}

.cpk .cpk-trust li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	color: var(--cpk-muted);
	font-size: 12.5px;
	line-height: 1.3;
}

.cpk .cpk-trust svg {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	color: var(--cpk-good-ink);
}

/* ---------------------------------------------------------------------------
 * Stopka: do zapłaty i przycisk
 * ------------------------------------------------------------------------- */

.cpk .cpk-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}

.cpk .cpk-total__label {
	color: var(--cpk-ink);
	font-size: 15px;
	font-weight: 600;
}

.cpk .cpk-total__value {
	display: inline-flex;
	align-items: baseline;
	gap: 9px;
}

.cpk .cpk-total__was {
	color: var(--cpk-was);
	font-size: 13px;
	font-weight: 600;
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
}

.cpk .cpk-total__now {
	color: var(--cpk-ink);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.1;
}

.cpk .cpk-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 14px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--cpk-ink);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: 0 10px 22px rgba(18, 60, 58, 0.22);
	transition: filter 0.2s ease, transform 0.2s ease;
}

.cpk a.cpk-cta:hover,
.cpk a.cpk-cta:focus,
.cpk a.cpk-cta:visited,
.cpk a.cpk-cta:active {
	background: var(--cpk-ink);
	color: #fff;
	text-decoration: none;
}

.cpk a.cpk-cta:hover {
	filter: brightness(1.15);
	transform: translateY(-1px);
}

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

.cpk .cpk-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 56px 12px 24px;
	text-align: center;
}

.cpk .cpk-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--cpk-soft);
	color: var(--cpk-ink);
}

.cpk .cpk-empty__icon svg {
	width: 32px;
	height: 32px;
	fill: currentColor;
}

.cpk .cpk-empty__title {
	margin: 0 0 4px;
	padding: 0;
	color: var(--cpk-ink);
	font-size: 17px;
	font-weight: 600;
}

.cpk .cpk-empty__text {
	margin: 0;
	padding: 0;
	color: var(--cpk-muted);
	font-size: 14px;
}

/* ---------------------------------------------------------------------------
 * Wąskie ekrany
 * ------------------------------------------------------------------------- */

@media (max-width: 480px) {
	.cpk .cpk__panel {
		width: 100%;
		box-shadow: none;
	}

	.cpk .cpk__head {
		padding: 10px 12px 10px 16px;
	}

	.cpk .cpk__body {
		padding: 0 16px 16px;
	}

	.cpk .cpk__foot {
		padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
	}

	.cpk .cpk-item {
		grid-template-columns: 68px minmax(0, 1fr);
		gap: 12px;
	}

	.cpk .cpk-item__img {
		height: 88px;
	}
}

@media (max-width: 360px) {
	.cpk .cpk-seg__btn {
		padding: 5px 9px;
		font-size: 12px;
	}

	.cpk .cpk-item__now {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpk .cpk__panel,
	.cpk .cpk__overlay,
	.cpk .cpk-cta,
	.cpk .cpk-seg__btn {
		transition: none;
	}

	.cpk .cpk__busy span {
		animation-duration: 2s;
	}
}
