/* Pro Cart – صفحه‌ی سبد خرید سفارشی (طرح مرجع: پایتخت کتاب)
   همه‌ی مقادیر از تنظیمات ویجت قابل تغییرند. */

.pcart-cart {
	--pcart-primary: #0865fe;
	--pcart-text: #333;
	--pcart-muted: #8ca0b2;
	--pcart-border: #e5ecf1;
	--pcart-soft: #f8fafc;
	--pcart-danger: #ff253f;
	--pcart-success: #00c09b;
	color: var(--pcart-text);
	font-size: 14.5px;
}
.pcart-cart *, .pcart-cart *::before, .pcart-cart *::after { box-sizing: border-box; }

.pcart-cart__title {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	color: #000;
}

/* ---------- چیدمان دو ستونه ---------- */
.pcart-cart__layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}
@media (max-width: 1024px) {
	.pcart-cart__layout { grid-template-columns: minmax(0, 1fr); }
}
.pcart-side-sticky-yes .pcart-cart__side { position: sticky; top: var(--pcart-sticky-top-auto, 20px); }

.pcart-cart__notices:empty { display: none; }
.pcart-cart__notices { margin-bottom: 16px; }
.pcart-cart__notices .pcart-bar { margin-bottom: 8px; }

/* ---------- کارت محصول ----------
   ساختار: ردیف اول = تصویر + (برچسب/حذف، عنوان، ویژگی‌ها)؛ ردیف دوم (تمام‌عرض) = باکس تعداد (راست) و قیمت (چپ). */
.pcart-items { display: flex; flex-direction: column; gap: 12px; }
.pcart-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: 12px;
	padding: 16px;
	background: #fff;
	border: .8px solid var(--pcart-border);
	border-radius: 20px;
	transition: opacity .2s;
}
.pcart-item__img {
	grid-column: 1;
	grid-row: 1;
	width: 91px;
	padding: 12px 10px;
	background: var(--pcart-soft);
	border-radius: 20px;
	text-align: center;
}
.pcart-item__img a, .pcart-item__img img { display: block; }
.pcart-item__img img { width: 100%; height: auto; margin: 0 auto; border-radius: 8px; object-fit: contain; }
.pcart-item__body { grid-column: 2; grid-row: 1; min-width: 0; }

.pcart-item__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}
.pcart-item__brand { font-size: 13px; color: var(--pcart-muted); }
.pcart-item__remove {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	background: #ffeef0;
	border: 0;
	border-radius: 999px;
	font-size: 13px;
	color: var(--pcart-danger);
	text-decoration: none;
	cursor: pointer;
	transition: color .2s, background-color .2s, border-color .2s;
}
.pcart-item__remove .pcart-ico { width: 16px; height: 16px; }
.pcart-item__remove:hover, .pcart-item__remove:focus { color: #d4102a; outline: none; }

.pcart-item__title {
	margin: 6px 0 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
	color: var(--pcart-text);
}
.pcart-item__title a { color: inherit; text-decoration: none; }
.pcart-item__title a:hover { color: var(--pcart-primary); }
.pcart-item__meta { margin: 0; font-size: 13px; line-height: 1.9; color: var(--pcart-muted); }
.pcart-item__meta dl { margin: 0; }
/* «نام ویژگی: مقدار» در هر خط (دو ستون: برچسب | مقدار) */
.pcart-item__meta dl.variation { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; row-gap: 2px; align-items: baseline; }
.pcart-item__meta dt, .pcart-item__meta dd { display: block; margin: 0; }
.pcart-item__meta dt { font-weight: 400; }
.pcart-item__meta dd p { display: inline; margin: 0; }
.pcart-item__meta p { display: inline; margin: 0; }

.pcart-item__bottom {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--pcart-border);
}
.pcart-item__price { display: flex; flex-direction: column; align-items: flex-start; margin-inline-start: auto; }
.pcart-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.5; }
.pcart-price__top { display: flex; align-items: center; gap: 6px; }
.pcart-price__badge {
	display: inline-flex;
	align-items: center;
	padding: 1px 8px;
	background: #ff7a1a;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
.pcart-item__now { font-size: 20px; font-weight: 700; color: var(--pcart-text); }
.pcart-item__old { font-size: 14px; font-weight: 400; color: var(--pcart-muted); }
.pcart-item__price .woocommerce-Price-currencySymbol { font-size: .7em; font-weight: 400; margin-inline-start: 3px; }

.pcart-item__error {
	grid-column: 1 / -1;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fdecea;
	color: #b3261e;
	font-size: 13px;
	line-height: 1.8;
}
.pcart-item__error:empty { display: none; }
.elementor-editor-active .pcart-preview-ierr-yes .pcart-item__error:empty { display: block; }
.elementor-editor-active .pcart-preview-ierr-yes .pcart-item__error:empty::before { content: attr(data-sample); }

.pcart-cart .pcart-qty, .pcart-co .pcart-item .pcart-qty { height: 42px; padding: 0 12px; min-width: 130px; justify-content: space-between; }
.pcart-cart .pcart-qty__btn, .pcart-co .pcart-item .pcart-qty__btn { width: 28px; height: 40px; }
.pcart-cart .pcart-qty__input, .pcart-co .pcart-item .pcart-qty__input { height: 40px; }

/* ---------- سایدبار ---------- */
.pcart-summary {
	margin-bottom: 20px;
	padding: 24px;
	background: #fff;
	border: .8px solid var(--pcart-border);
	border-radius: 20px;
}
.pcart-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.pcart-summary__row h4 { margin: 0; font-size: 15px; font-weight: 400; color: #485967; }
.pcart-summary__row p { margin: 0; font-size: 20px; font-weight: 700; color: var(--pcart-text); }
.pcart-summary__row .woocommerce-Price-currencySymbol { font-size: 14px; font-weight: 400; margin-inline-start: 4px; }
.pcart-summary__row--saving p { color: var(--pcart-success); }
.pcart-summary__divider { height: 1px; margin: 6px 0 18px; background: var(--pcart-border); }
.pcart-summary__row--payable { margin-bottom: 18px; }
.pcart-summary__cta { margin-bottom: 20px; }

/* ---------- ارسال رایگان ---------- */
.pcart-ship {
	padding: 17px 16px;
	background: var(--pcart-soft);
	border: 1px solid transparent;
	border-radius: 16px;
}
.pcart-ship__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 700;
}
.pcart-ship__title .pcart-ico { width: 22px; height: 22px; }
.pcart-ship__track {
	position: relative;
	height: 4px;
	margin-bottom: 12px;
	background: var(--pcart-border);
	border-radius: 2px;
	overflow: hidden;
}
.pcart-ship__fill {
	height: 4px;
	background: #333;
	border-radius: 2px;
	transition: width .4s;
}
.pcart-ship.is-reached .pcart-ship__fill { background: var(--pcart-success); }
.pcart-ship.is-reached .pcart-ship__title { color: var(--pcart-success); }
.pcart-ship.is-reached .pcart-ship__text { font-weight: 700; }
.pcart-summary__pct { font-size: 13px; font-weight: 400; }
.pcart-coupon__title { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.pcart-ship__text { font-size: 13px; }
.pcart-ship__divider { height: 1px; margin: 14px 0; background: var(--pcart-border); }
.pcart-ship__desc { margin: 0; font-size: 13px; text-align: center; }

/* ---------- کد تخفیف ---------- */
.pcart-coupon {
	padding: 16px;
	background: #fff;
	border: .8px solid var(--pcart-border);
	border-radius: 16px;
}
.pcart-coupon__form { display: flex; gap: 8px; }
.pcart-coupon__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	background: var(--pcart-soft);
	border: 0;
	border-radius: 12px;
	font: inherit;
	font-size: 14px;
	color: var(--pcart-text);
}
.pcart-coupon__input:focus { outline: 2px solid var(--pcart-primary); }
.pcart-coupon__btn {
	height: 44px;
	padding: 0 18px;
	background: var(--pcart-success);
	border: 0;
	border-radius: 12px;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .2s;
}
.pcart-coupon__btn:hover { background: #00a383; }
.pcart-coupon__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.pcart-coupon__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: var(--pcart-soft);
	border: .8px solid var(--pcart-border);
	border-radius: 10px;
	font-size: 13px;
}
.pcart-coupon__remove { display: inline-flex; color: var(--pcart-danger); }

/* ---------- سبد خالی ---------- */
.pcart-empty { padding: 40px 16px; text-align: center; }
.pcart-empty__icon { width: 72px; height: 72px; color: #94a3b8; }
.pcart-empty__title { margin: 14px 0 22px; font-size: 14px; font-weight: 700; }
.pcart-empty__sub { margin: 0 0 6px; font-size: 13px; color: #6b7a88; }
.pcart-empty__link { font-size: 13px; color: var(--pcart-success); text-decoration: none; }

/* ---------- موبایل ---------- */
@media (max-width: 767px) {
	.pcart-item { padding: 14px; gap: 10px; }
	.pcart-item__img { width: 80px; padding: 10px 8px; }
	.pcart-summary { padding: 18px; }
	.pcart-item__bottom { flex-wrap: nowrap; }
	.pcart-cart .pcart-qty { min-width: 0; flex: 0 1 46%; }

	/* نوار ثابت پایین صفحه: راست دکمه، چپ خلاصه‌ی قیمت (بالای نوار پایین سایت: با متغیر --pcart-sticky-bottom تنظیم می‌شود) */
	.pcart-cart--sticky .pcart-summary__cta { display: none; }
	.pcart-cart--sticky { padding-bottom: 90px; }
	.pcart-sticky {
		position: fixed;
		inset-inline: 0;
		bottom: var(--pcart-sticky-bottom, 0);
		z-index: 99;
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 12px 16px;
		background: #fff;
		border-top: 1px solid var(--pcart-border);
		box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
	}
	.pcart-sticky__btn { flex: 1 1 auto; margin: 0; min-height: 48px; }
	.pcart-sticky__sum { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; line-height: 1.5; }
	.pcart-sticky__row { display: flex; align-items: center; gap: 6px; }
	.pcart-sticky__count { font-size: 13px; color: var(--pcart-text); }
	.pcart-sticky__old { font-size: 13px; color: var(--pcart-muted); }
	.pcart-sticky__now { font-size: 18px; font-weight: 700; color: var(--pcart-text); }
	.pcart-sticky .woocommerce-Price-currencySymbol { font-size: .7em; font-weight: 400; margin-inline-start: 3px; }
}
@media (min-width: 768px) { .pcart-sticky { display: none; } }

/* ردیف کد تخفیف اعمال‌شده در سایدبار (سبد و پرداخت) */
.pcart-summary__row--coupon p, .pcart-sum__row--coupon p { color: var(--pcart-success); }
.pcart-sum__code { display: inline-block; padding: 0 6px; background: var(--pcart-soft); border-radius: 6px; font-weight: 700; direction: ltr; }
.pcart-sum__coupon-remove { display: inline-flex; vertical-align: middle; margin-inline-start: 4px; color: var(--pcart-danger); cursor: pointer; }
.pcart-sum__coupon-remove .pcart-ico { width: 14px; height: 14px; }

.pcart-cart__main, .pcart-cart__side { min-width: 0; }

/* قیمت عادی (خط‌خورده) بدون نماد ارز؛ نشان درصد سمت چپ آن (در RTL بعد از قیمت می‌آید) */
.pcart-item__old .woocommerce-Price-currencySymbol { display: none; }

/* پیغام «ارسال رایگان غیرفعال است» (همکاری / روش پرداخت) */
.pcart-ship__off { font-size: 13px; line-height: 2; }
