/**
 * دکمه خرید صفحه محصول + نوار خرید چسبان موبایل.
 */

.clw-buy-box {
	margin: 18px 0 6px;
	font-family: var(--clw-font, "Vazirmatn", Tahoma, sans-serif);
	direction: rtl;
}

.clw-buy-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 56px;
	padding: 15px 24px;
	border-radius: 16px;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: #fff !important;
	font-size: 15.5px;
	font-weight: 800;
	text-decoration: none !important;
	box-shadow: 0 12px 26px -10px rgba(22, 163, 74, .55);
	transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
	position: relative;
	z-index: 5;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.clw-buy-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 32px -12px rgba(22, 163, 74, .65);
	color: #fff !important;
}
.clw-buy-btn:active { transform: translateY(0) scale(.99); }

.clw-buy-arrow { transition: transform .18s ease; font-size: 17px; }
.clw-buy-btn:hover .clw-buy-arrow { transform: translateX(-4px); }

.clw-buy-hint {
	margin: 10px 2px 0;
	font-size: 12.5px;
	line-height: 1.9;
	color: #7b8394;
	text-align: center;
}

/* ===== نوار خرید چسبان — فقط موبایل ===== */
.clw-sticky-buy { display: none; }

@media (max-width: 900px) {
	.clw-sticky-buy {
		display: flex;
		align-items: center;
		gap: 12px;
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 9990;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .97);
		-webkit-backdrop-filter: saturate(180%) blur(14px);
		backdrop-filter: saturate(180%) blur(14px);
		border-top: 1px solid #e9ebf2;
		box-shadow: 0 -3px 18px rgba(17, 24, 39, .08);
		font-family: var(--clw-font, "Vazirmatn", Tahoma, sans-serif);
		direction: rtl;
		/* ورود نرم از پایین تا ناگهانی نپرد */
		animation: clwStickyUp .35s cubic-bezier(.22, .61, .36, 1) both;
	}

	@keyframes clwStickyUp {
		from { transform: translateY(100%); }
		to   { transform: none; }
	}

	.clw-sticky-price {
		display: flex;
		flex-direction: column;
		gap: 1px;
		min-width: 0;
		flex-shrink: 0;
	}
	.clw-sticky-label { font-size: 10.5px; color: #8a8f98; }
	.clw-sticky-amount {
		font-size: 15px;
		font-weight: 800;
		color: #111827;
		white-space: nowrap;
	}
	.clw-sticky-amount del { display: none; }   /* در نوار باریک فقط قیمت نهایی */
	.clw-sticky-amount ins { text-decoration: none; }
	.clw-sticky-amount .woocommerce-Price-currencySymbol {
		font-size: 11px;
		font-weight: 600;
		color: #16a34a;
	}

	.clw-sticky-btn {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 50px;
		border-radius: 14px;
		background: linear-gradient(135deg, #22c55e, #16a34a);
		color: #fff !important;
		font-size: 14.5px;
		font-weight: 800;
		text-decoration: none !important;
		box-shadow: 0 8px 20px -8px rgba(22, 163, 74, .6);
		-webkit-tap-highlight-color: transparent;
	}
	.clw-sticky-btn:active { transform: scale(.98); }

	/* جا برای نوار، تا محتوای انتهای صفحه زیرش پنهان نشود */
	body.single-product { padding-bottom: 78px; }

	/* دکمه بزرگ داخل صفحه روی موبایل تکراری است، ولی نگهش می‌داریم چون
	   کاربر ممکن است قبل از رسیدن به انتهای صفحه تصمیم بگیرد */
	.clw-buy-btn { min-height: 52px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.clw-sticky-buy { animation: none; }
	.clw-buy-btn { transition: none; }
}

@media print {
	.clw-sticky-buy { display: none !important; }
}
