.zp-dock {
	--dock-h: 5.1rem;
	--dock-r: 1.25rem;
	position: fixed;
	right: 1.4rem;
	bottom: 1.4rem;
	z-index: 9998;
	display: inline-flex;
	align-items: stretch;
	gap: 0.65rem;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
	transform: translateY(120%);
	opacity: 0;
	pointer-events: none;
	filter: drop-shadow(0 14px 28px rgba(74, 143, 133, 0.22));
	transition:
		transform 0.32s cubic-bezier(.2, .8, .2, 1),
		opacity 0.24s ease-out;
}

.zp-dock.is-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.zp-dock[hidden] {
	display: none !important;
}

.zp-dock__cart,
.zp-dock__buy {
	appearance: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--dock-h);
	min-height: var(--dock-h);
	border-radius: var(--dock-r);
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		filter 0.18s ease,
		background 0.18s ease;
}

.zp-dock__cart:hover,
.zp-dock__buy:hover {
	transform: translateY(-2px);
}

.zp-dock__cart:active,
.zp-dock__buy:active {
	transform: translateY(0);
}

.zp-dock__cart:disabled,
.zp-dock__buy:disabled {
	cursor: wait;
	transform: none;
	pointer-events: none;
}

.zp-dock__buy:disabled {
	opacity: 0.65;
}

.zp-dock__cart-tip {
	position: relative;
	flex: 0 0 var(--dock-h);
	width: var(--dock-h);
	height: var(--dock-h);
}

/* Pink cart tile (añadir) — siempre sólido */
.zp-dock__cart {
	--zp-pink: var(--theme-secondary-dark, #f1a2bd);
	--zp-pink-deep: color-mix(in srgb, var(--zp-pink) 88%, #b85a7a);
	width: 100%;
	height: 100%;
	flex: none;
	opacity: 1 !important;
	background: var(--zp-pink-deep);
	color: #fff;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		0 8px 18px color-mix(in srgb, var(--zp-pink) 35%, transparent);
}

.zp-dock__cart.zp-atc-btn--in-cart,
.zp-dock__cart:disabled {
	opacity: 1 !important;
	background: var(--zp-pink-deep);
	color: #fff;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		0 8px 18px color-mix(in srgb, var(--zp-pink) 35%, transparent);
	cursor: not-allowed;
	transform: none !important;
	filter: none;
}

.zp-dock__cart:hover {
	background: var(--zp-pink-deep);
}

.zp-dock__cart-icon {
	display: inline-flex;
	line-height: 0;
	z-index: 1;
}

.zp-dock__cart-icon svg {
	width: 1.7rem;
	height: 1.7rem;
	display: block;
	fill: currentColor;
}

.zp-dock__count,
.zp-dock__cart .js-cart-count,
.zp-dock__cart .badge {
	position: absolute;
	top: -0.45rem;
	right: -0.45rem;
	z-index: 2;
	min-width: 1.75rem;
	height: 1.75rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: var(--theme-primary-dark, #4a8f85) !important;
	color: #fff !important;
	font-size: 0.92rem;
	font-weight: 800;
	line-height: 1.75rem;
	text-align: center;
	box-shadow:
		0 0 0 2px #fff,
		0 4px 10px rgba(74, 143, 133, 0.35);
	pointer-events: none;
}

/* Mint buy CTA (comprar) */
.zp-dock__buy {
	flex: 1 1 auto;
	gap: 1rem;
	padding: 0 1.55rem 0 1.55rem;
	background: linear-gradient(
		135deg,
		var(--theme-primary, #6fb3a9) 0%,
		var(--theme-primary-dark, #4a8f85) 100%
	);
	color: #fff;
	border: none;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		0 8px 18px color-mix(in srgb, var(--theme-primary, #6fb3a9) 32%, transparent);
	text-align: center;
	text-shadow: 0 1px 1px rgba(40, 70, 65, 0.18);
	overflow: visible;
	justify-content: center;
}

.zp-dock__buy:hover {
	filter: none;
}

/* Mini sello de descuento — sustituye la flecha (puede sobresalir del botón) */
.zp-dock__seal {
	--seal: var(--theme-secondary-dark, #d4789a);
	position: relative;
	top: auto;
	right: auto;
	left: auto;
	z-index: 2;
	flex: 0 0 auto;
	width: 3.85rem;
	height: 3.85rem;
	margin: -0.35rem -0.15rem -0.35rem 0;
	display: grid;
	place-items: center;
	pointer-events: none;
	filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .22));
}

.zp-dock__seal-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
	transform-origin: 50% 50%;
	animation: zpDockSealSpin 2.4s ease-in-out infinite;
}

.zp-dock__seal-shape {
	fill: var(--seal);
	stroke: #fff;
	stroke-width: 8;
	stroke-linejoin: round;
	stroke-linecap: round;
	paint-order: stroke fill;
}

.zp-dock__seal-pct {
	position: relative;
	z-index: 1;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1;
	animation: zpDockSealPct 2.4s ease-in-out infinite;
}

@keyframes zpDockSealSpin {
	0%, 100% { transform: rotate(-12deg) scale(1); }
	50% { transform: rotate(12deg) scale(1.06); }
}

@keyframes zpDockSealPct {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
	.zp-dock__seal-svg,
	.zp-dock__seal-pct {
		animation: none;
	}
}

.zp-dock__buy-copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.22rem;
	line-height: 1.05;
	min-width: 0;
	text-align: center;
	flex: 1 1 auto;
}

.zp-dock__buy-label {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.zp-dock__buy-price {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0.4rem;
	font-size: 1.25rem;
	font-weight: 700;
	opacity: 0.98;
	white-space: nowrap;
	max-width: 100%;
	line-height: 1;
}

/* Tachado centrado sobre el precio normal (.old) */
.zp-dock__buy-price del {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	font-size: inherit;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	color: inherit;
}

.zp-dock__buy-price span.woocommerce-Price-amount.amount.old {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: #ebebeb;
	text-decoration: none !important;
}

.zp-dock__buy-price span.woocommerce-Price-amount.amount.old bdi,
.zp-dock__buy-price span.woocommerce-Price-amount.amount.old .woocommerce-Price-currencySymbol {
	text-decoration: none !important;
	line-height: 1;
}

.zp-dock__buy-price span.woocommerce-Price-amount.amount.old::after {
	content: "";
	position: absolute;
	left: -1px;
	right: -1px;
	top: 50%;
	height: 1.5px;
	background: currentColor;
	transform: translateY(-50%);
	pointer-events: none;
}

.zp-dock__buy-price del::after {
	display: none;
}

.zp-dock__buy-price ins,
.zp-dock__buy-price-current {
	text-decoration: none;
	font-weight: 800;
	font-size: 1em;
	line-height: 1;
}

.zp-dock__buy-price ins .woocommerce-Price-amount,
.zp-dock__buy-price-current .woocommerce-Price-amount {
	color: #fff;
}

.zp-dock--sale .zp-dock__buy,
.zp-dock__buy--sale {
	padding-right: 1.15rem;
	padding-left: 1.55rem;
}

.zp-dock__buy-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	flex: 0 0 auto;
	transition: transform 0.2s ease, background 0.2s ease;
}

.zp-dock__buy:hover .zp-dock__buy-arrow {
	transform: translateX(3px);
	background: rgba(255, 255, 255, 0.32);
}

@media (max-width: 767px) {
	.zp-dock {
		--dock-h: 5.35rem;
		right: 0.85rem;
		left: 0.85rem;
		bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
		gap: 0.75rem;
	}

	.zp-dock__buy {
		gap: 1.1rem;
		padding: 0 1.35rem;
		justify-content: center;
	}

	.zp-dock__buy-copy {
		gap: 0.28rem;
		align-items: center;
		text-align: center;
	}

	.zp-dock__buy-label {
		font-size: 1.55rem;
		letter-spacing: 0.01em;
	}

	.zp-dock__buy-price {
		font-size: 1.35rem;
		justify-content: center;
	}

	.zp-dock__buy-price span.woocommerce-Price-amount.amount.old {
		font-size: 14px;
	}

	.zp-dock__seal {
		width: 4.15rem;
		height: 4.15rem;
		margin: -0.4rem -0.2rem -0.4rem 0;
	}

	.zp-dock__seal-pct {
		font-size: 1.12rem;
	}

	.zp-dock--sale .zp-dock__buy,
	.zp-dock__buy--sale {
		padding-right: 1.05rem;
		padding-left: 1.35rem;
	}

	.zp-dock__buy-arrow {
		width: 2.65rem;
		height: 2.65rem;
	}

	.zp-dock__buy-arrow svg {
		width: 20px;
		height: 20px;
	}
}

@media (min-width: 783px) {
	body.admin-bar .zp-dock {
		bottom: 1.6rem;
	}
}

body:has(.cky-btn-revisit-wrapper) .zp-dock,
body:has(#cookie-law-info-bar) .zp-dock {
	bottom: 4.5rem;
}
