/* ===== خرید فوری کارت به کارت — استایل فرانت ===== */
.plqb-modal-overlay, .plqb-modal-box, .plqb-modal-box * {
	box-sizing: border-box; /* رفع باگ بزرگ‌تر شدن پاپ‌آپ از صفحه در آیفون/سافاری */
}
.plqb-open-btn {
	display: inline-block;
	background: linear-gradient(135deg, var(--plqb-c1, #ff6a3d), var(--plqb-c2, #ff8a00));
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 12px 22px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px var(--plqb-glow, rgba(255, 106, 61, .35));
	transition: transform .15s ease, box-shadow .15s ease;
	font-family: inherit;
}
.plqb-open-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--plqb-glow-strong, rgba(255, 106, 61, .45)); }
.plqb-soldout-badge { display:inline-block; background:#eee; color:#999; padding:10px 18px; border-radius:10px; font-weight:700; }

.plqb-modal-overlay {
	position: fixed !important; inset: 0; background: rgba(20, 20, 25, .55);
	display: none; align-items: center; justify-content: center;
	z-index: 2147483640; padding: 16px; backdrop-filter: blur(2px);
}
.plqb-modal-overlay.plqb-open { display: flex; }

.plqb-modal-box {
	background: #ffffff; width: 100%; max-width: 440px; max-height: 92vh; max-height: 92dvh;
	overflow-y: auto; border-radius: 18px; padding: 22px 20px 26px;
	position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.35);
	font-family: inherit; opacity: 1;
	animation: plqb-pop .18s ease;
}
@keyframes plqb-pop { from { transform: scale(.94); opacity:0; } to { transform: scale(1); opacity:1; } }

.plqb-close-btn {
	position: absolute; top: 10px; left: 10px; width: 34px; height: 34px;
	border-radius: 50%; border: none; background: #f3f3f4; font-size: 20px;
	cursor: pointer; line-height: 1; color:#222; font-weight: 800;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.plqb-refresh-btn {
	position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
	border-radius: 50%; border: none; background: #f3f3f4; font-size: 17px;
	cursor: pointer; line-height: 1; color:#222; font-weight: 800;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.plqb-back-btn {
	background: none; border: none; color: var(--plqb-c1, #ff6a3d); font-weight: 700;
	cursor: pointer; margin-bottom: 8px; padding: 4px 0; font-size: 14px;
}

.plqb-title { text-align: center; font-size: 19px; margin: 4px 0 16px; font-weight: 800; }

.plqb-product-img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; border: 1px solid #eee; flex-shrink: 0; }
.plqb-product-img-wrap { position: relative; flex-shrink: 0; }
.plqb-product-img-wrap.plqb-img-excluded .plqb-product-img { opacity: .35; filter: grayscale(1); }
/* شماره/حذف محصول جاری، روی گوشه سمت‌راست-پایین عکس — هم‌تراز با ستون شماره سبد */
.plqb-current-cart-badge {
	position: absolute; bottom: -6px; right: -6px; display: flex; align-items: center; gap: 4px;
}
.plqb-current-cart-badge .plqb-item-num { box-shadow: 0 0 0 2px #fff; }
.plqb-current-cart-remove, .plqb-current-cart-restore {
	width: 20px; height: 20px; border-radius: 50%; background:#fff; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.25);
	border: 1px solid #e3c4a3; color:#d33; font-size: 11px; cursor: pointer; padding: 0; line-height: 1;
	display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.plqb-current-cart-restore { color: var(--plqb-c1, #ff6a3d); font-weight: 800; }
/* ردیف هم‌تراز با سبد: جمع لحظه‌ای سمت راست، تعداد +/- سمت چپ */
.plqb-current-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.plqb-current-cart-subtotal { font-size: 12px; font-weight: 700; color: #777; }
.plqb-product-info { flex: 1; min-width: 0; }
.plqb-product-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.plqb-product-price { color: var(--plqb-c1, #ff6a3d); font-weight: 800; font-size: 15px; }

/* نشانگر بروزرسانی لحظه‌ای قیمت تا تأخیر شبکه احساس نشود */
.plqb-price-summary { transition: opacity .15s ease; }
.plqb-price-summary.plqb-recalculating { opacity: .5; }

.plqb-field { margin-bottom: 14px; }
.plqb-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #333; }
.plqb-field input[type=text],
.plqb-field input[type=tel],
.plqb-field input[type=number],
.plqb-field select,
.plqb-field textarea {
	width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1.5px solid #e3e3e6;
	border-radius: 10px; font-size: 16px; font-family: inherit; background:#fafafa;
}
.plqb-field input:focus, .plqb-field select:focus, .plqb-field textarea:focus { outline:none; border-color: var(--plqb-c2, #ff8a00); background:#fff; }

.plqb-checkbox-field label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.plqb-checkbox-field input { width: 18px; height: 18px; }

.plqb-qty-box { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.plqb-qty-box button {
	width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid #e3e3e6;
	background: #f6f6f7; font-size: 20px; font-weight: 800; color: #000; cursor: pointer; flex-shrink:0;
	display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.plqb-qty-input { text-align: center; max-width: 80px; }
.plqb-bulk-hint { font-size: 12px; color: #2e9e4f; margin: 6px 2px 0; min-height: 14px; }

.plqb-discount-box { display: flex; gap: 8px; }
.plqb-discount-apply-btn {
	background: #333; color: #fff; border: none; border-radius: 10px; padding: 0 16px;
	font-size: 13px; cursor: pointer; white-space: nowrap; font-weight: 700;
}
.plqb-discount-msg { font-size: 12px; margin: 6px 2px 0; min-height: 14px; }
.plqb-discount-msg.ok { color: #2e9e4f; }
.plqb-discount-msg.err { color: #d33; }

.plqb-price-summary { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.plqb-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #555; }
.plqb-row-total { border-top: 1px dashed #ddd; margin-top: 6px; padding-top: 8px; font-size: 16px; font-weight: 800; color: #111; }
.plqb-row-total span:last-child { color: var(--plqb-c1, #ff6a3d); }

.plqb-error-msg { color: #d33; font-size: 13px; min-height: 14px; margin: 6px 2px; text-align:center; font-weight:600; }

.plqb-btn {
	display: block; width: 100%; border: none; border-radius: 12px; padding: 13px;
	font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit;
	transition: opacity .15s;
}
.plqb-btn:active { opacity: .85; }
.plqb-btn-primary { background: linear-gradient(135deg, var(--plqb-c1, #ff6a3d), var(--plqb-c2, #ff8a00)); color: #fff; }
.plqb-btn-secondary { background: #2962ff; color: #fff; }
.plqb-btn-secondary.plqb-paid-confirmed { background: #2e9e4f; }
.plqb-btn[disabled] { opacity: .55; cursor: not-allowed; }

.plqb-pay-box { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.plqb-pay-box label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; font-weight: 700; }
.plqb-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plqb-card-number, .plqb-pay-amount { font-size: 19px; font-weight: 800; letter-spacing: .5px; direction: ltr; unicode-bidi: isolate; font-family: Consolas, Menlo, monospace; display:inline-block; }
.plqb-copy-btn { background: #111; color: #fff; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; white-space:nowrap; }
.plqb-copy-btn.plqb-copied { background: #2e9e4f; }
.plqb-card-owner { font-size: 12.5px; color: #777; margin: 6px 0 0; }

.plqb-countdown-box { text-align: center; margin: 14px 0 18px; }
.plqb-countdown-box p { font-size: 13px; color: #777; margin: 0 0 4px; }
.plqb-countdown { font-size: 30px; font-weight: 800; color: #d33; direction: ltr; letter-spacing: 1px; }

.plqb-canceled-msg { background: #fdeaea; color: #c0392b; padding: 10px; border-radius: 10px; text-align: center; font-weight: 700; font-size: 13.5px; }

.plqb-hint { font-size: 13px; color: #666; text-align: center; margin-bottom: 16px; }
.plqb-cart-box { background: var(--plqb-cart-bg, #fff8f2); border:1.5px solid var(--plqb-cart-border, #ffd9b8); border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.plqb-cart-title { font-size:13px; font-weight:800; margin:0 0 8px; }
.plqb-cart-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed #f0d9c4; font-size:12.5px; }
.plqb-cart-row:last-child { border-bottom:none; }
.plqb-cart-row-title { flex:1; font-weight:700; }
.plqb-cart-row-qty { display:flex; align-items:center; gap:8px; }
/* همان نوع/سایز دکمه‌های +/- محصول اصلی، برای یکدستی کامل ظاهر */
.plqb-cart-row-qty button {
	width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid #e3e3e6;
	background: #f6f6f7; font-size: 20px; font-weight: 800; color: #000; cursor: pointer; flex-shrink:0;
	display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.plqb-cart-row-qty span { min-width:28px; text-align:center; font-weight:700; font-size:14px; }
.plqb-cart-row-remove { background:none; border:none; color:#d33; font-size:18px; cursor:pointer; padding:0 4px; }

/* شماره ردیف یکدست (دایره آبی) برای همه آیتم‌ها — هم سبد، هم محصول جاری */
.plqb-item-num {
	display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px;
	border-radius:50%; background:#2962ff; color:#fff; font-size:12px; font-weight:800; flex-shrink:0;
}
.plqb-cart-row-main { flex:1; display:flex; flex-direction:column; gap:2px; min-width:0; }
.plqb-cart-row-subtotal { font-size:11px; color:#888; font-weight:600; }
.plqb-add-more-btn { background:#fff; color: var(--plqb-c1, #ff6a3d); border: 1.5px solid var(--plqb-c1, #ff6a3d); margin-top:10px; font-size:13.5px; }

/* محصول جاری (همان کارتی که در همین پاپ‌آپ نمایش داده می‌شود) داخل کادری
   مثل سبد خرید بالایی است، فقط بزرگ‌تر، تا از نظر گرافیکی هماهنگ باشند */
.plqb-product-head {
	display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
	background: var(--plqb-cart-bg, #fff8f2); border:1.5px solid var(--plqb-cart-border, #ffd9b8); border-radius:14px; padding:14px 16px;
}
.plqb-current-cart-excluded { color:#d33; font-weight:700; font-size: 12.5px; }

/* دکمه «خرید فوری» بیرون پاپ‌آپ، وقتی محصول داخل سبد است: همان رنگ‌بندی
   فریبنده قبلی حفظ می‌شود، فقط به دو نیمه مساوی (برچسب «سبد خرید» + استپر
   تعداد به همان شکل/سایز محصول جاری) تقسیم می‌شود، بدون تغییر اندازه کلی دکمه. */
.plqb-open-btn.plqb-open-btn-in-cart {
	display:flex; align-items:stretch; padding:0 !important; overflow:hidden;
}
.plqb-obtn-label {
	flex:1; display:flex; align-items:center; justify-content:center;
	padding: 12px 14px; font-weight:700; border-left:1px solid rgba(255,255,255,.35);
}
.plqb-obtn-stepper { flex:1; display:flex; align-items:center; justify-content:center; gap:8px; padding: 8px 10px; }
.plqb-open-btn-in-cart .plqb-obtn-minus,
.plqb-open-btn-in-cart .plqb-obtn-plus {
	width:26px; height:26px; border-radius:50%; border:1.5px solid #fff;
	background:rgba(255,255,255,.18); color:#fff; font-weight:900; font-size:16px; line-height:1; cursor:pointer;
	display:flex; align-items:center; justify-content:center; padding:0; flex-shrink:0;
}
.plqb-open-btn-in-cart .plqb-obtn-qty { font-size:14px; font-weight:800; color:#fff; white-space:nowrap; min-width:18px; text-align:center; }
.plqb-receipt-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }

.plqb-captcha-box { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 14px; }
.plqb-captcha-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.plqb-captcha-label .plqb-captcha-q { direction: ltr; unicode-bidi: isolate; font-family: Consolas, Menlo, monospace; font-size: 17px; font-weight: 800; display: inline-block; margin: 0 4px; }
.plqb-captcha-input {
	width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid #e3e3e6; border-radius: 10px;
	margin-bottom: 10px; font-size: 16px; direction: ltr; text-align: left; unicode-bidi: isolate;
	font-family: Consolas, Menlo, monospace;
}

.plqb-success-box { text-align: center; padding: 14px 4px; }
.plqb-success-icon { width: 60px; height: 60px; border-radius: 50%; background: #e9fbef; color: #2e9e4f; font-size: 30px; line-height: 60px; margin: 0 auto 14px; }
.plqb-success-box h2 { font-size: 17px; margin: 0 0 8px; }
.plqb-success-box p { font-size: 14px; color: #555; margin: 4px 0; }
.plqb-success-box .plqb-btn { margin-top: 16px; }
.plqb-track-order-btn { background: #2c2c30; color: #fff; text-decoration: none; display: block; text-align: center; }
.plqb-free-shipping-hint { color: #2e9e4f; font-size: 12px; font-weight: 700; margin: 6px 2px 0; }
.plqb-confirm-payment-label { font-weight: 700; font-size: 14px; margin: 16px 0 8px; }
.plqb-trust-badge { display: block; font-size: 12px; color: #2e9e4f; font-weight: 700; text-align: right; margin: 10px 0 4px; }
.plqb-pay-online-btn { background: #e3e3e6; color: #999; cursor: not-allowed; }
.plqb-payment-divider { text-align: center; margin: 12px 0; font-size: 12px; color: #aaa; }
.plqb-payment-divider::before, .plqb-payment-divider::after { content: ''; display: inline-block; width: 60px; height: 1px; background: #e3e3e6; vertical-align: middle; margin: 0 8px; }
.plqb-preinvoice-note { text-align: center; font-size: 11.5px; color: #bbb; margin-top: 14px; line-height: 1.6; }

/* ریسپانسیو موبایل/تبلت */
@media (max-width: 480px) {
	.plqb-modal-box { border-radius: 16px 16px 0 0; max-height: 95vh; max-height: 95dvh; padding: 18px 14px 20px; }
	.plqb-modal-overlay { align-items: flex-end; padding: 0; }
	.plqb-title { font-size: 17px; }
	.plqb-countdown { font-size: 26px; }
	.plqb-receipt-methods { grid-template-columns: 1fr 1fr; }
	.plqb-product-head { flex-wrap: wrap; }
	.plqb-qty-box { width: 100%; justify-content: flex-start; margin-top: 4px; }
}
@media (min-width: 481px) and (max-width: 900px) {
	.plqb-modal-box { max-width: 480px; }
}

/* ───── Toast / اعلان شناور غیربلاک‌کننده ───── */
.plqb-toast {
	position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
	background: #222; color: #fff; padding: 12px 22px; border-radius: 10px;
	font-size: 14px; font-weight: 600; z-index: 2147483647; opacity: 0; isolation: isolate;
	transition: opacity .3s, transform .3s; pointer-events: none; text-align: center;
	max-width: calc(100vw - 40px); box-shadow: 0 6px 24px rgba(0,0,0,.4);
	white-space: pre-wrap; line-height: 1.5;
}
.plqb-toast.plqb-toast-ok  { background: #1e6d3c; }
.plqb-toast.plqb-toast-err { background: #b02020; }
.plqb-toast.plqb-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
