/**
 * Sticky Price Component Styles
 *
 * @package Astra Child
 * @since 1.2.0
 */

/* Base styles - Desktop (1501px+): inline placement, no sticky behavior */
.mfp-sticky-price {
	background: #222;
	padding: 24px 24px;
	border: 1px solid #fff;
	border-radius: 5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

/* Hover state - no change */
.mfp-sticky-price:hover {
	background: #222;
}

/* Hidden state for desktop (when scrolled to add-to-cart area) */
.mfp-sticky-price.is-hidden {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s;
}

/* Product title */
.sticky-price-product-title {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #888;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Separator */
.sticky-price-separator {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	color: #888;
}

/* Price amount styling */
.sticky-price-amount {
	font-family: 'Lato', sans-serif;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	transition: transform 0.15s ease;
	display: inline-block;
}

/* Price update animation */
.sticky-price-amount.price-updated {
	animation: priceUpdate 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes priceUpdate {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.08);
		color: #f57e00;
	}
	100% {
		transform: scale(1);
	}
}

/* Add to Cart CTA */
.sticky-price-cta {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #f57e00;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Narrow desktop (1025px - 1215px): hide title and separator to save space */
@media (min-width: 1025px) and (max-width: 1215px) {
	.sticky-price-product-title,
	.sticky-price-separator {
		display: none;
	}
}

/* Tablet and below (1024px): fixed bottom bar with sticky behavior */
@media (max-width: 1024px) {
	.mfp-sticky-price {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		border-radius: 0;
		border: none;
		border-top: 1px solid #fff;
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
		z-index: 1000;
		justify-content: center;
		/* Slide-up animation */
		transform: translateY(100%);
		opacity: 0;
		visibility: hidden;
		transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		            opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		            visibility 0.35s;
	}

	/* Active state - slides up into view */
	.mfp-sticky-price.is-visible {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}

	/* Hide product title in sticky bar */
	.sticky-price-product-title {
		display: none;
	}
}

/* Small mobile adjustments (600px and below) */
@media (max-width: 600px) {
	.mfp-sticky-price {
		padding: 12px 16px;
		gap: 8px;
	}

	.sticky-price-amount {
		font-size: 18px;
	}
}
