/**
 * Sticky „Dodaj do koszyka” — dół ekranu, desktop + mobile.
 */

.ochaka-sticky-atc {
	--laki-sticky-atc-accent: var(--laki-accent, #c44e8c);
	--laki-sticky-atc-accent-hover: var(--laki-accent-hover, #b8447a);
	--laki-sticky-atc-text: var(--laki-text, #252525);
	--laki-sticky-atc-muted: var(--laki-muted, #727272);
	--laki-sticky-atc-border: var(--laki-border, #dadada);
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 996;
	padding: 12px 16px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, 0.92);
	border-top: 1px solid var(--laki-sticky-atc-border);
	box-shadow: 0 -8px 24px rgba(37, 37, 37, 0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transform: translateY(110%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		transform 0.28s ease,
		opacity 0.28s ease,
		visibility 0.28s ease;
}

.ochaka-sticky-atc.is-visible {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ochaka-sticky-atc__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	max-width: 1200px;
	margin: 0 auto;
}

.ochaka-sticky-atc__product {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
}

.ochaka-sticky-atc__thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border: 1px solid var(--laki-sticky-atc-border);
	border-radius: var(--laki-radius-sm, 4px);
	background: #fff;
}

.ochaka-sticky-atc__thumb img,
.ochaka-sticky-atc__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ochaka-sticky-atc__title {
	min-width: 0;
	overflow: hidden;
	color: var(--laki-sticky-atc-text);
	font-family: var(--laki-font-heading, 'Oswald', sans-serif);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ochaka-sticky-atc__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px 12px;
}

.ochaka-sticky-atc__variants {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.ochaka-sticky-atc__field {
	display: block;
	margin: 0;
	min-width: 0;
}

.ochaka-sticky-atc__select {
	min-width: 100px;
	max-width: 180px;
	height: 48px;
	padding: 0 36px 0 14px;
	border: 1px solid var(--laki-sticky-atc-border);
	border-radius: var(--laki-radius-sm, 4px);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23575757' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	color: var(--laki-sticky-atc-text);
	font-family: var(--laki-font-body, 'Lato', sans-serif);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.ochaka-sticky-atc__select:focus {
	outline: none;
	border-color: var(--laki-sticky-atc-accent);
	box-shadow: 0 0 0 1px var(--laki-sticky-atc-accent);
}

.ochaka-sticky-atc__price {
	display: flex;
	align-items: center;
	min-height: 48px;
	color: var(--laki-sticky-atc-text);
	font-family: var(--laki-font-body, 'Lato', sans-serif);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.ochaka-sticky-atc__price .price,
.ochaka-sticky-atc__price .amount,
.ochaka-sticky-atc__price del,
.ochaka-sticky-atc__price ins {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	text-decoration: none;
	background: none;
}

.ochaka-sticky-atc__price del {
	margin-right: 6px;
	color: var(--laki-sticky-atc-muted);
	font-size: 15px;
	font-weight: 400;
	text-decoration: line-through;
}

.ochaka-sticky-atc__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: var(--laki-radius-sm, 4px);
	background: var(--laki-sticky-atc-accent);
	color: #fff;
	font-family: var(--laki-font-body, 'Lato', sans-serif);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none !important;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.ochaka-sticky-atc__button:hover,
.ochaka-sticky-atc__button:focus {
	background: var(--laki-sticky-atc-accent-hover);
	color: #fff;
}

.ochaka-sticky-atc__button:focus-visible {
	outline: 2px solid var(--laki-sticky-atc-accent);
	outline-offset: 2px;
}

.ochaka-sticky-atc__button.is-disabled,
.ochaka-sticky-atc__button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ochaka-sticky-atc__button.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

body.ochaka-sticky-atc-open {
	padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

body.ochaka-sticky-atc-open .pls-back-to-top {
	bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
	.ochaka-sticky-atc {
		padding: 10px 12px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	}

	.ochaka-sticky-atc__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.ochaka-sticky-atc__product {
		gap: 10px;
	}

	.ochaka-sticky-atc__thumb {
		width: 44px;
		height: 44px;
	}

	.ochaka-sticky-atc__title {
		font-size: 15px;
		font-weight: 500;
		white-space: nowrap;
	}

	.ochaka-sticky-atc__actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto auto;
		gap: 8px;
		align-items: center;
	}

	.ochaka-sticky-atc__variants {
		min-width: 0;
	}

	.ochaka-sticky-atc__field,
	.ochaka-sticky-atc__select {
		width: 100%;
		max-width: none;
	}

	.ochaka-sticky-atc__select {
		min-width: 0;
		height: 44px;
		padding: 0 32px 0 12px;
		font-size: 14px;
		background-position: right 12px center;
	}

	.ochaka-sticky-atc__price {
		justify-content: flex-end;
		min-height: 44px;
		font-size: 16px;
	}

	.ochaka-sticky-atc__button {
		min-width: 0;
		min-height: 44px;
		padding: 10px 14px;
		font-size: 12px;
	}

	body.ochaka-sticky-atc-open {
		padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
	}

	body.ochaka-sticky-atc-open .pls-back-to-top {
		bottom: calc(140px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 380px) {
	.ochaka-sticky-atc__actions {
		grid-template-columns: 1fr 1fr;
	}

	.ochaka-sticky-atc__variants {
		grid-column: 1 / -1;
	}

	.ochaka-sticky-atc__button {
		justify-self: stretch;
	}
}
