/*
 * Lenzzberry — mobile sticky add-to-cart bar styles.
 * Mobile-only by design — display:none above 768px so the bar never
 * appears on desktop where the sidebar Add-to-Cart is already in view.
 */

.lenzz-sticky-cart {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9000;
	background: #fff;
	border-top: 1px solid #ececec;
	box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.08);
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
	transform: translateY(110%);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.lenzz-sticky-cart.is-visible {
	transform: translateY(0);
}

/* Hide the sticky bar whenever the mini-cart drawer is open so it doesn't
   peek out above the drawer / overlap the drawer's footer CTAs. */
body.lenzz-minicart-open .lenzz-sticky-cart {
	transform: translateY(110%) !important;
	pointer-events: none;
}

@media (min-width: 768px) {
	.lenzz-sticky-cart { display: none !important; }
}

.lenzz-sticky-cart-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 600px;
	margin: 0 auto;
}

.lenzz-sticky-cart-thumb-link {
	flex-shrink: 0;
	display: block;
	pointer-events: none; /* purely decorative thumbnail; main click target is the button */
}

.lenzz-sticky-cart-thumb {
	width: 46px;
	height: 46px;
	border-radius: 8px;
	object-fit: cover;
	display: block;
	background: #f5f5f5;
}

.lenzz-sticky-cart-info {
	flex: 1;
	min-width: 0;
}

.lenzz-sticky-cart-price {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: #111;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lenzz-sticky-cart-price ins {
	text-decoration: none;
}

.lenzz-sticky-cart-price del {
	font-weight: 400;
	opacity: 0.55;
	font-size: 12px;
	margin-right: 5px;
}

.lenzz-sticky-cart-price .woocommerce-Price-amount {
	font-weight: inherit;
}

.lenzz-sticky-cart-btn {
	flex-shrink: 0;
	padding: 12px 22px;
	background: var(--wp--preset--color--brand, #0E7B91);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.01em;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(14, 123, 145, 0.25);
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.lenzz-sticky-cart-btn:hover {
	background: var(--wp--preset--color--brand-dark, #0A5E70);
	box-shadow: 0 4px 14px rgba(14, 123, 145, 0.32);
}

.lenzz-sticky-cart-btn:active {
	transform: scale(0.96);
}

.lenzz-sticky-cart-btn:disabled {
	background: var(--wp--preset--color--muted, #6B7280);
	box-shadow: none;
	cursor: not-allowed;
	opacity: 0.75;
}

/* Brief shake animation applied to the main cart form when the customer
   taps the sticky button but hasn't picked a required variation yet. */
.lenzz-shake {
	animation: lenzz-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes lenzz-shake {
	10%, 90% { transform: translateX(-2px); }
	20%, 80% { transform: translateX(3px);  }
	30%, 50%, 70% { transform: translateX(-5px); }
	40%, 60% { transform: translateX(5px);  }
}

/* Push the body content up a touch when the bar is visible so the last
   element on the page isn't permanently hidden behind the bar. */
@media (max-width: 767px) {
	body.single-product { padding-bottom: 0; }
	body.single-product.lenzz-sticky-cart-on { padding-bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.lenzz-sticky-cart { transition: none; }
	.lenzz-shake { animation: none; }
}
