/* ===== پکیج محصولات — وب ۲۴ ===== */

/* هشدار به توسعه‌دهنده:
 * هیچ کلاسی در این افزونه نباید با «prk-» شروع شود.
 * قالب پارس کالا در assets/fonts/parsfont/style.css این قانون را دارد:
 *   [class^="prk-"], [class*=" prk-"] { font-family: 'parsfont' !important; }
 * که فونت آیکون را با !important روی هر کلاسی با آن پیشوند اعمال می‌کند.
 * به همین دلیل پیشوند کلاس‌های این افزونه «w24-» است. */

/* ---------- فونت ----------
 * قالب پارس کالا هر فونتی که در تنظیمات انتخاب شود را با نام مستعار prk-font
 * ثبت می‌کند، اما آن را روی body اعمال نمی‌کند؛ فقط روی سلکتورهای خودش.
 * پس اینجا صریحاً همان نام مستعار را صدا می‌زنیم تا فونت سایت اعمال شود.
 * برای تغییر، کافی است متغیر --w24-font را بازنویسی کنید. */
.w24-packages,
.w24-pkg-row {
	--w24-font: 'prk-font', 'IRANYekanX', 'IRANSans', 'IRANyekan', Tahoma, sans-serif;
	font-family: var(--w24-font);
}

/* دکمه‌ها و فیلدها فونت والد را ارث نمی‌برند و باید صریح تنظیم شوند */
.w24-packages button,
.w24-packages input,
.w24-packages select,
.w24-packages textarea {
	font-family: inherit;
}

.w24-packages {
	display: flex;
	flex-direction: column;
	gap: 40px;
	width: 100%;
}

.w24-pkg-row {
	--w24-pv: 4;
	--w24-pv-t: 3;
	--w24-pv-m: 2;
	--w24-gap: 12px;
	--w24-accent: #e02b52;
	--w24-btn-color: #fff;
	--w24-row-bg: #fff;
	--w24-card-bg: #fff;
	--w24-radius: 14px;
	--w24-border: #ececf1;

	background: var(--w24-row-bg);
	border: 1px solid var(--w24-border);
	border-radius: var(--w24-radius);
	padding: 18px;
	position: relative;
	direction: rtl;
}

/* ---------- هدر ردیف ---------- */
.w24-pkg-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px dashed var(--w24-border);
}

.w24-pkg-head-info {
	min-width: 200px;
	flex: 1 1 240px;
}

.w24-pkg-badge {
	display: inline-block;
	background: var(--w24-accent);
	color: var(--w24-btn-color);
	font-size: 12px;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.w24-pkg-title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 700;
}

.w24-pkg-subtitle {
	margin: 0 0 4px;
	font-size: 13px;
	opacity: .75;
}

.w24-pkg-count {
	font-size: 12px;
	opacity: .6;
}

.w24-pkg-viewall {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-inline-start: 10px;
	font-size: 12px;
	font-weight: 600;
	color: var(--w24-accent) !important;
	text-decoration: none !important;
}

.w24-pkg-viewall:hover {
	text-decoration: underline !important;
}

/* ---------- صفحه‌ی اختصاصی هر پکیج ---------- */
.w24-pkg-single {
	direction: rtl;
	font-family: "prk-font", "IRANYekanX", "IRANSans", Tahoma, sans-serif;
}

.w24-pkg-single-head {
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid #ececf1;
}

.w24-pkg-single-buy {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.w24-pkg-full-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}

@media (max-width: 767px) {
	.w24-pkg-full-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 10px;
	}
}

.w24-pkg-head-buy {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.w24-pkg-prices {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.6;
}

.w24-pkg-old {
	font-size: 13px;
	opacity: .55;
	text-decoration: line-through;
}

.w24-pkg-off {
	font-size: 12px;
	color: var(--w24-accent);
	font-weight: 700;
}

.w24-pkg-new {
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
	background: none;
	color: inherit;
}

.w24-pkg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--w24-accent);
	color: var(--w24-btn-color) !important;
	border-radius: 10px;
	padding: 12px 26px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none !important;
	transition: opacity .2s ease, transform .2s ease;
	white-space: nowrap;
}

.w24-pkg-btn:hover {
	opacity: .9;
	transform: translateY(-1px);
}

.w24-pkg-btn--incart {
	background: #1f9d55;
	font-size: 13px;
	padding: 12px 18px;
}

/* ---------- اسلایدر ---------- */
.w24-pkg-slider {
	position: relative;
}

.w24-pkg-track {
	display: flex;
	gap: var(--w24-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
}

.w24-pkg-track::-webkit-scrollbar {
	display: none;
}

.w24-pkg-card {
	flex: 0 0 calc((100% - (var(--w24-pv) - 1) * var(--w24-gap)) / var(--w24-pv));
	scroll-snap-align: start;
	background: var(--w24-card-bg);
	border: 1px solid var(--w24-border);
	border-radius: calc(var(--w24-radius) - 4px);
	padding: 10px;
	text-align: center;
	display: flex;
	flex-direction: column;
	position: relative;
}

.w24-pkg-card-link {
	text-decoration: none !important;
	color: inherit;
	display: block;
}

.w24-pkg-card-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 8px;
	display: block;
}

.w24-pkg-card-title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.7;
	margin: 8px 0 6px;
	min-height: 44px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.w24-pkg-card-price {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.w24-pkg-card-price del {
	font-size: 12px;
	opacity: .5;
}

.w24-pkg-card-new {
	font-size: 14px;
	font-weight: 700;
	color: var(--w24-accent);
}

.w24-pkg-card-qty {
	position: absolute;
	inset-inline-start: 8px;
	top: 8px;
	background: rgba(0, 0, 0, .06);
	border-radius: 6px;
	font-size: 11px;
	padding: 3px 6px;
}

/* ---------- دکمه‌های ناوبری ---------- */
.w24-pkg-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--w24-border);
	background: #fff;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
	padding: 0;
	transition: opacity .2s ease;
}

.w24-pkg-prev { inset-inline-end: -10px; }
.w24-pkg-next { inset-inline-start: -10px; }

.w24-pkg-nav[disabled] {
	opacity: .3;
	cursor: default;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1024px) {
	.w24-pkg-card {
		flex-basis: calc((100% - (var(--w24-pv-t) - 1) * var(--w24-gap)) / var(--w24-pv-t));
	}
}

@media (max-width: 767px) {
	.w24-pkg-card {
		flex-basis: calc((100% - (var(--w24-pv-m) - 1) * var(--w24-gap)) / var(--w24-pv-m));
	}

	.w24-pkg-row { padding: 14px; }

	.w24-pkg-head {
		flex-direction: column;
		align-items: stretch;
	}

	.w24-pkg-head-buy {
		justify-content: space-between;
	}

	.w24-pkg-btn { flex: 1 1 auto; }

	.w24-pkg-nav { display: none; }
}

/* ---------- سبد خرید ---------- */
.w24-pkg-locked-qty {
	display: inline-block;
	min-width: 32px;
	text-align: center;
	font-weight: 700;
}
