/*
 * لیست قیمت موبایل — شیتِ مستقل (کلونِ سایت قدیم، داده زنده از ووکامرس)
 * پیشوند کلاس‌ها: nw-pl-
 */

.nw-pl-wrap {
	direction: rtl;
	background: #f0f2f5;
	padding: 70px 0 20px;
	font-family: inherit;
}

/* ── دکمه‌های خروجی (چسبانِ بالا) ── */
.nw-pl-controls {
	position: fixed;
	top: 0;
	inset-inline: 0;
	padding: 12px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	z-index: 1000;
	background: rgba(240, 242, 245, 0.85);
	backdrop-filter: blur(8px);
}

.nw-pl-btn {
	padding: 11px 26px;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* وقتی نوار مدیریت وردپرس بالای صفحه است (فقط کاربرانِ واردشده) دکمه‌ها زیرِ آن بروند */
body.admin-bar .nw-pl-controls { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nw-pl-controls { top: 46px; } }

.nw-pl-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.nw-pl-btn:active { transform: translateY(0) scale(0.97); }
.nw-pl-btn--img { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.nw-pl-btn--pdf { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

/* ── شیت ── */
.nw-pl-sheet {
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* حالتِ اجباریِ دسکتاپ هنگام گرفتنِ خروجی */
.nw-pl-sheet.nw-pl-desktop { width: 1600px !important; max-width: none !important; }

/* ── هدرِ تیره ── */
.nw-pl-header {
	background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 100%);
	padding: 20px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	border-bottom: 3px solid #ff571a;
}

.nw-pl-time {
	color: #ffc107;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
	flex-shrink: 0;
	direction: ltr;
	text-align: center;
	min-width: 150px;
}

.nw-pl-logo { flex-shrink: 0; }
.nw-pl-logo img { width: 240px; object-fit: contain; }

.nw-pl-info { color: #fff; text-align: center; line-height: 1.7; }
.nw-pl-info__order { font-size: 26px; font-weight: 700; color: #ffc107; margin-bottom: 6px; }
.nw-pl-info__addr { font-size: 18px; opacity: 0.92; }
.nw-pl-info__sub { font-size: 16px; opacity: 0.85; margin-top: 4px; }
.nw-pl-phones { margin-top: 6px; display: flex; gap: 20px; justify-content: center; }
.nw-pl-phone { font-size: 26px; font-weight: 700; color: #ffc107; direction: ltr; }

.nw-pl-qr { flex-shrink: 0; }
.nw-pl-qr img {
	width: 180px;
	height: 180px;
	object-fit: contain;
	border-radius: 8px;
	border: 2px solid #ff571a;
	background: #fff;
}

/* ── گریدِ ماسونریِ ۴ستونه ── */
.nw-pl-grid {
	column-count: 1;
	column-gap: 10px;
	padding: 10px;
	/* ستون‌ها از چپ به راست پر شوند تا سامسونگ (اولین برند) در ستونِ چپ بیفتد — مثل لیست قدیم */
	direction: ltr;
}

/* موبایل: ۱ ستون · تبلت: ۲ ستون · دسکتاپ: ۴ ستون */
@media (min-width: 620px)  { .nw-pl-grid { column-count: 2; } }
@media (min-width: 1024px) { .nw-pl-grid { column-count: 4; } }

/* هنگام گرفتنِ خروجی همیشه ۴ ستون (حتی روی موبایل) */
.nw-pl-grid.nw-pl-desktop { column-count: 4 !important; }

/* ── جعبه‌ی برند ── */
.nw-pl-box {
	width: 100%;
	margin-bottom: 12px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
	break-inside: avoid;
	page-break-inside: avoid;
	/* گریدْ LTR است ولی محتوای داخلِ جعبه فارسی/RTL می‌ماند */
	direction: rtl;
}

.nw-pl-box__head-group { break-inside: avoid; page-break-inside: avoid; }

.nw-pl-box__head {
	padding: 10px;
	text-align: center;
	background: #f8f9fa;
	border-bottom: 2px solid #333;
}

.nw-pl-pill {
	display: inline-block;
	padding: 5px 16px;
	border-radius: 4px;
	font-size: 17px;
	font-weight: 800;
}

/* ── ردیف ── */
.nw-pl-row {
	display: grid;
	grid-template-columns: 1fr 1fr 3fr;
	border-bottom: 1px solid #f0f0f0;
	min-height: 32px;
	align-items: stretch;
	break-inside: avoid;
	page-break-inside: avoid;
}

.nw-pl-row--head {
	background: #0000000f;
	font-weight: 700;
	font-size: 13px;
	border-bottom: 2px solid #333;
}

/* ── بلوکِ محصولِ ادغام‌شده: مدل یک‌بار (ستون چپ، span) + ردیف‌های رنگ/قیمت ── */
.nw-pl-prod {
	display: grid;
	grid-template-columns: 1fr 1fr 3fr;
	break-inside: avoid;
	page-break-inside: avoid;
}

.nw-pl-prod + .nw-pl-prod { border-top: 2px solid #ededed; }

/* راه‌راه (zebra): پس‌زمینهٔ یک‌درمیانِ محصولات */
.nw-pl-prod--alt { background: #f7f8fa; }

/* جداکنندهٔ افقیِ بینِ رنگ‌های یک محصول */
.nw-pl-prod .nw-pl-cell--price,
.nw-pl-prod .nw-pl-cell--color {
	border-bottom: 1px solid #f5f5f5;
	min-height: 32px;
}
.nw-pl-prod .nw-pl-cell--price:last-of-type,
.nw-pl-prod .nw-pl-cell--color:last-of-type { border-bottom: none; }

/* جداکننده‌های عمودی: قیمت|رنگ و رنگ|مدل (RTL: inline-end = لبهٔ چپِ سلول) */
.nw-pl-prod .nw-pl-cell { border-inline-start: none; }
.nw-pl-prod .nw-pl-cell--price,
.nw-pl-prod .nw-pl-cell--color { border-inline-end: 1px solid #f0f0f0; }

/* مدلِ کشیده وسط‌چینِ عمودی */
.nw-pl-prod .nw-pl-cell--model { align-items: center; }

.nw-pl-cell {
	padding: 7px 5px;
	border-inline-start: 1px solid #f0f0f0;
	display: flex;
	align-items: center;
	white-space: normal;
}

.nw-pl-cell:last-child { border-inline-start: none; }

.nw-pl-cell--price {
	justify-content: center;
	font-weight: 800;
	color: #d32f2f;
	direction: ltr;
	font-size: 118%;
}

.nw-pl-cell--color { justify-content: center; font-weight: 500; text-align: center; }

/* ستونِ مدل: نامِ انگلیسی (LTR) — چپ‌چین مثل لیست قدیم، شکستِ امنِ کدهای بلند */
.nw-pl-cell--model { justify-content: flex-start; font-weight: 700; direction: ltr; text-align: left; overflow-wrap: anywhere; }
.nw-pl-cell--model a { color: inherit; text-decoration: none; display: block; transition: color 0.15s; }
.nw-pl-cell--model a:hover { color: #2196f3; text-decoration: underline; }

/* ── تبلت و موبایل: هدرِ جمع‌وجورتر ── */
@media (max-width: 1023px) {
	.nw-pl-header { padding: 16px; gap: 14px; }
	.nw-pl-time { font-size: 30px; min-width: 0; }
	.nw-pl-logo img { width: 190px; }
	.nw-pl-info__order { font-size: 19px; }
	.nw-pl-qr img { width: 140px; height: 140px; }
}

/* ── موبایل (≤ ۶۱۹px): هدرِ تک‌ستونهٔ مرتب + جدولِ متراکم ── */
@media (max-width: 619px) {
	.nw-pl-wrap { padding-top: 58px; }
	.nw-pl-btn { padding: 9px 20px; font-size: 14px; }

	.nw-pl-header {
		flex-direction: column;
		text-align: center;
		padding: 16px 12px;
		gap: 10px;
	}
	.nw-pl-time { order: 1; font-size: 30px; }
	.nw-pl-logo { order: 2; }
	.nw-pl-logo img { width: 168px; }
	.nw-pl-info { order: 3; }
	.nw-pl-info__order { font-size: 16px; }
	.nw-pl-info__addr { font-size: 12.5px; }
	.nw-pl-info__sub { font-size: 11.5px; }
	.nw-pl-phone { font-size: 22px; }
	.nw-pl-qr { display: none; }

	.nw-pl-grid { padding: 8px; }
	.nw-pl-box { margin-bottom: 10px; }
	.nw-pl-pill { font-size: 16px; padding: 4px 14px; }

	/* قیمت و رنگ به‌اندازهٔ محتوا، بقیهٔ عرض برای نامِ انگلیسیِ مدل (هدر و بلوکِ محصول هم‌تراز) */
	.nw-pl-row,
	.nw-pl-prod { grid-template-columns: minmax(60px, auto) minmax(54px, auto) 1fr; }
	.nw-pl-cell { padding: 7px 6px; font-size: 13px; }
	.nw-pl-cell--price { font-size: 15px; }
	.nw-pl-cell--color { font-size: 12.5px; }
	.nw-pl-cell--model { font-size: 12.5px; }
	.nw-pl-row--head { font-size: 12px; }
}
