/* ==========================================================================
   Figurina Cart Enhancer - استایل مدرن صفحه سبد خرید
   طراحی الهام‌گرفته از بهترین الگوهای رایج فروشگاه‌های ایرانی (نه کپی هیچ سایت خاصی).
   ========================================================================== */

:root {
	--fce-accent: #00a86b;
}

/* نوار اعتماد */
.fce-trust-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.fce-trust-badge {
	background: #f6f7f7;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

/* --- چیدمان مدرن دوستونه --- */
body.fce-modern-layout .woocommerce-cart-form {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 6px 16px;
}

body.fce-modern-layout table.shop_table {
	border: none;
}

body.fce-modern-layout table.shop_table thead {
	display: none;
}

body.fce-modern-layout table.shop_table tr {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f1;
}

body.fce-modern-layout table.shop_table tr:last-child {
	border-bottom: none;
}

body.fce-modern-layout table.shop_table td {
	border: none !important;
	padding: 0 !important;
}

body.fce-modern-layout td.product-thumbnail img {
	border-radius: 8px;
	width: 72px;
	height: 72px;
	object-fit: cover;
}

body.fce-modern-layout td.product-name {
	flex: 1 1 200px;
	font-weight: 600;
}

body.fce-modern-layout td.product-price,
body.fce-modern-layout td.product-subtotal {
	font-weight: 700;
	color: #1d2327;
}

body.fce-modern-layout td.product-remove a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fbeaea;
	color: #c9302c !important;
	font-size: 16px;
}

/* خلاصه سفارش چسبان */
body.fce-modern-layout .cart-collaterals .cart_totals {
	position: sticky;
	top: 32px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.fce-modern-layout .cart_totals h2 {
	font-size: 16px;
	margin-top: 0;
}

body.fce-modern-layout .cart_totals table {
	border: none;
}

body.fce-modern-layout .cart_totals table th,
body.fce-modern-layout .cart_totals table td {
	border: none !important;
	padding: 8px 0 !important;
}

body.fce-modern-layout .wc-proceed-to-checkout .checkout-button {
	background: var(--fce-accent);
	border-radius: 8px;
	font-weight: 700;
	padding: 14px;
	text-align: center;
	display: block;
}

/* دکمه‌های تعداد (+/-) */
.fce-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	overflow: hidden;
}

.fce-qty-stepper button {
	background: #f6f7f7;
	border: none;
	width: 30px;
	height: 30px;
	font-size: 16px;
	cursor: pointer;
	line-height: 1;
}

.fce-qty-stepper button:hover {
	background: #e2e4e7;
}

.fce-qty-stepper input.qty {
	width: 44px !important;
	text-align: center;
	border: none !important;
	box-shadow: none !important;
}

/* کد تخفیف جمع‌شونده */
body.fce-coupon-collapsed .coupon {
	display: none;
}

.fce-coupon-toggle {
	display: inline-block;
	margin: 10px 0;
	color: var(--fce-accent);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

body.fce-coupon-collapsed .coupon.fce-coupon-open {
	display: block;
}

/* دکمه تسویه‌حساب چسبان موبایل */
.fce-sticky-checkout-mobile {
	display: none;
}

@media (max-width: 782px) {
	body.fce-sticky-checkout .fce-sticky-checkout-mobile {
		display: block;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 99998;
		background: #fff;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
		padding: 10px 16px;
	}

	body.fce-sticky-checkout .fce-sticky-checkout-mobile a {
		display: block;
		background: var(--fce-accent);
		color: #fff;
		text-align: center;
		padding: 12px;
		border-radius: 8px;
		font-weight: 700;
		text-decoration: none;
	}

	body.fce-modern-layout table.shop_table tr {
		position: relative;
	}
}

/* بروزرسانی زنده سبد خرید */
.fce-cart-updating {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

body.fce-live-update-ready .woocommerce-cart-form button[name="update_cart"] {
	display: none;
}

/* تسویه‌حساب یکپارچه (تک‌صفحه‌ای) */
body.fce-unified-checkout .cart-collaterals .wc-proceed-to-checkout {
	display: none;
}

.fce-inline-checkout {
	margin-top: 24px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 20px;
}

.fce-inline-checkout__title {
	margin-top: 0;
	font-size: 17px;
	border-bottom: 1px solid #f0f0f1;
	padding-bottom: 12px;
	margin-bottom: 16px;
}

/* جدول مرور سفارش داخل فرم تسویه‌حساب: فقط ردیف‌های تکراری کالاها حذف می‌شود
   (چون در سبد بالای صفحه قبلاً نمایش داده شده‌اند)؛ ردیف روش ارسال و جمع کل
   دست‌نخورده باقی می‌مانند چون همین‌ها برای ثبت سفارش واقعاً استفاده می‌شوند. */
body.fce-unified-checkout #order_review table.shop_table thead,
body.fce-unified-checkout #order_review table.shop_table tbody tr.cart_item {
	display: none;
}

/* سبد خرید خالی */
.fce-empty-cart {
	text-align: center;
	padding: 50px 20px;
}

.fce-empty-cart__text {
	font-size: 16px;
	margin-bottom: 18px;
	color: #3c434a;
}

.fce-empty-cart__btn {
	background: var(--fce-accent) !important;
	color: #fff !important;
	border-radius: 8px !important;
	padding: 12px 28px !important;
	font-weight: 700 !important;
}
