/**
 * IPIS – przyklejony pasek „Dodaj do koszyka”
 */

.ipis-sticky-cart {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99990;
	width: 100%;
	padding-bottom: env(safe-area-inset-bottom, 0);
	border-top: 1px solid rgba(17, 24, 39, 0.08);
	background: #fff;
	box-shadow: 0 -8px 28px rgba(17, 24, 39, 0.12);
	transform: translateY(calc(100% + 16px));
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: transform 240ms ease, opacity 180ms ease, visibility 240ms;
}

.ipis-sticky-cart.is-visible {
	transform: translateY(0);
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.ipis-sticky-cart__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(100%, 1248px);
	min-height: 78px;
	margin: 0 auto;
	padding: 10px 24px;
}

.ipis-sticky-cart__product {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.ipis-sticky-cart__thumbnail {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #f4f5f7;
}

.ipis-sticky-cart__thumbnail img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: center;
}

.ipis-sticky-cart__details {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.ipis-sticky-cart__name {
	overflow: hidden;
	color: #111827;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipis-sticky-cart__price {
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	white-space: nowrap;
}

.ipis-sticky-cart__price p,
.ipis-sticky-cart__price .iworks-omnibus,
.ipis-sticky-cart__price .screen-reader-text {
	display: none !important;
}

.ipis-sticky-cart__price del {
	margin-right: 5px;
	color: #6b7280;
	font-weight: 500;
	opacity: 0.9;
}

.ipis-sticky-cart__price ins {
	color: #111827;
	font-weight: 700;
	text-decoration: none;
}

.ipis-sticky-cart__button,
.ipis-sticky-cart__button:hover,
.ipis-sticky-cart__button:focus {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	min-height: 50px;
	margin: 0;
	padding: 13px 28px;
	border: 1px solid #2d95dc;
	border-radius: 2px;
	background: #2d95dc;
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.ipis-sticky-cart__button:hover,
.ipis-sticky-cart__button:focus-visible {
	border-color: #237fbd;
	background: #237fbd;
	color: #fff;
}

.ipis-sticky-cart__button:focus-visible {
	outline: 2px solid #111827;
	outline-offset: 2px;
}

.ipis-sticky-cart__button:disabled {
	opacity: 0.48;
	cursor: not-allowed;
}

body.ipis-sticky-cart-visible {
	padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
	.ipis-sticky-cart__inner {
		gap: 12px;
		min-height: 70px;
		padding: 9px 12px;
	}

	.ipis-sticky-cart__product {
		gap: 10px;
	}

	.ipis-sticky-cart__thumbnail {
		flex-basis: 48px;
		width: 48px;
		height: 48px;
	}

	.ipis-sticky-cart__name {
		font-size: 13px;
	}

	.ipis-sticky-cart__price {
		font-size: 14px;
	}

	.ipis-sticky-cart__button,
	.ipis-sticky-cart__button:hover,
	.ipis-sticky-cart__button:focus {
		min-width: 0;
		min-height: 48px;
		padding: 12px 16px;
		font-size: 13px;
	}

	body.ipis-sticky-cart-visible {
		padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 420px) {
	.ipis-sticky-cart__thumbnail {
		display: none;
	}

	.ipis-sticky-cart__product {
		flex: 1 1 auto;
	}

	.ipis-sticky-cart__name {
		max-width: 42vw;
	}

	.ipis-sticky-cart__button,
	.ipis-sticky-cart__button:hover,
	.ipis-sticky-cart__button:focus {
		padding-right: 13px;
		padding-left: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ipis-sticky-cart,
	.ipis-sticky-cart__button {
		transition: none;
	}
}

