/* ==========================================================================
   اجزای مشترک صفحه ها (از بخش 6 components.css دمو)
   بخش، سر بخش، دکمه ها، آیکن ها، نشان، کاشی دسته، کارت محصول، کارت مقاله،
   نوار برند، فهرست آدرس، سوال های پرتکرار، جای خالی، کادر استعلام، کارت «چرا» و
   کارت لینک، لوگوی برند، و اجزای لیست استعلام (دکمه کارت، شمارنده، پیام کوتاه، فیلد تعداد).
   کارت ها را بلوک های cntech-core می سازند، بقیه بلوک های هسته وردپرس اند.
   ========================================================================== */

/* ---- آیکن های خطی دمو برای جاهایی که بلوک هسته SVG نمی گیرد ---- */
:root {
	--cn-icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m6-6-6 6 6 6'/%3E%3C/svg%3E");
	--cn-icon-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
	--cn-icon-route: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='19' r='2'/%3E%3Ccircle cx='18' cy='5' r='2'/%3E%3Cpath d='M8 19h8.5a3.5 3.5 0 0 0 0-7h-9a3.5 3.5 0 0 1 0-7H16'/%3E%3C/svg%3E");
	--cn-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 1 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
	--cn-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E");
	--cn-icon-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E");
	--cn-icon-layers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5z'/%3E%3Cpath d='m3 13 9 5 9-5'/%3E%3C/svg%3E");
	--cn-icon-headset: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15v-3a8 8 0 0 1 16 0v3'/%3E%3Crect x='3' y='14' width='4' height='6' rx='1.5'/%3E%3Crect x='17' y='14' width='4' height='6' rx='1.5'/%3E%3C/svg%3E");
	--cn-icon-filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v6l-4-2v-4z'/%3E%3C/svg%3E");
	--cn-icon-store: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v10h16V10'/%3E%3Cpath d='M3 4h18l-1.5 6h-15z'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E");
	--cn-icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
	--cn-icon-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-11 11'/%3E%3Cpath d='M22 2 15 22l-4-9-9-4z'/%3E%3C/svg%3E");
}

/* کلاس cn-icon-{نام} آیکن را انتخاب می کند. هر جزء خودش جای آیکن را می سازد. */
.cn-icon-arrow { --cn-icon: var(--cn-icon-arrow); }
.cn-icon-grid { --cn-icon: var(--cn-icon-grid); }
.cn-icon-route { --cn-icon: var(--cn-icon-route); }
.cn-icon-pin { --cn-icon: var(--cn-icon-pin); }
.cn-icon-image { --cn-icon: var(--cn-icon-image); }
.cn-icon-box { --cn-icon: var(--cn-icon-box); }
.cn-icon-layers { --cn-icon: var(--cn-icon-layers); }
.cn-icon-headset { --cn-icon: var(--cn-icon-headset); }
.cn-icon-store { --cn-icon: var(--cn-icon-store); }
.cn-icon-user { --cn-icon: var(--cn-icon-user); }
.cn-icon-send { --cn-icon: var(--cn-icon-send); }

/* ---- Buttons: .btn از بلوک های افزونه، .cn-btn برای بلوک دکمه هسته ---- */
.cn-btn > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--1);
	width: 100%;
	min-height: var(--wp--custom--size--control);
	padding: 0 var(--wp--preset--spacing--3);
	border: var(--wp--custom--border-width-thick) solid transparent;
	border-radius: var(--wp--preset--border-radius--default);
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--control);
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--wp--custom--duration), color var(--wp--custom--duration), border-color var(--wp--custom--duration);
}

.cn-btn[class*="cn-icon-"] > .wp-block-button__link::before {
	content: "";
	flex: none;
	width: var(--wp--custom--size--icon);
	height: var(--wp--custom--size--icon);
	background: currentColor;
	-webkit-mask: var(--cn-icon) center / contain no-repeat;
	mask: var(--cn-icon) center / contain no-repeat;
}

.btn--primary,
.cn-btn--primary > .wp-block-button__link {
	background: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text-inverse);
}

.btn--primary:hover,
.cn-btn--primary > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-strong);
	color: var(--wp--custom--color--text-inverse);
}

/* تنها جای استفاده از رنگ گرم */
.btn--inquiry {
	background: var(--wp--preset--color--inquiry);
	color: var(--wp--custom--color--text-inverse);
}

.btn--inquiry:hover {
	background: var(--wp--preset--color--inquiry-strong);
	color: var(--wp--custom--color--text-inverse);
}

.btn--sm {
	min-height: var(--wp--custom--size--tap);
	padding: 0 var(--wp--preset--spacing--2);
	font-size: var(--wp--preset--font-size--sm);
}

.btn--block {
	display: flex;
	width: 100%;
}

/* ردیف دکمه: بلوک دکمه های هسته و دکمه های افزونه کنار هم */
.btn-row,
.hero__actions {
	display: flex;
	flex-wrap: wrap;
}

.btn-row > .wp-block-buttons,
.hero__actions > .wp-block-buttons {
	display: contents;
}

.btn-row {
	gap: var(--wp--preset--spacing--1);
}

.btn-row > * > .wp-block-button,
.btn-row > .btn {
	flex: 1 1 var(--wp--custom--size--btn-basis-sm);
	margin: 0;
}

@media (min-width: 48em) {
	.btn-row > * > .wp-block-button,
	.btn-row > .btn {
		flex: 0 0 auto;
	}
}

/* ---- Breadcrumb: بلوک مسیر راهنمای ووکامرس (فهرست مرتب، افزونه). دسته و محصول ----
   از جلسه 8ب در موبایل (زیر 64em) عمدا با دمو فرق دارد: یک خط، بدون شکستن. اگر جا
   نشد فهرست افقی اسکرول می شود، بدون نوار اسکرول دیده شدنی. با Tab روی لینک ها و
   کلیدهای جهت هم اسکرول می شود. breadcrumb.js افزونه در بار اول آن را به آخر مسیر
   (صفحه جاری) می برد. */
.wp-block-woocommerce-breadcrumbs.breadcrumb {
	margin: 0;
	padding-block: var(--wp--preset--spacing--1);
	font-size: var(--wp--custom--font-size--breadcrumb-sm);
}

.breadcrumb .woocommerce-breadcrumb {
	margin: 0;
	font-size: var(--wp--custom--font-size--breadcrumb-sm);
}

.breadcrumb ol {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.breadcrumb ol::-webkit-scrollbar {
	display: none;
}

.breadcrumb li {
	display: inline-flex;
	flex: none;
	align-items: center;
	white-space: nowrap;
}

.breadcrumb li + li::before {
	content: "/";
	margin-inline: var(--wp--preset--spacing--1);
	color: var(--wp--custom--color--border-strong);
}

.breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--size--tap);
	color: var(--wp--custom--color--text-muted);
	text-decoration: none;
}

.breadcrumb a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
	color: var(--wp--custom--color--text);
	font-weight: var(--wp--custom--font-weight--medium);
}

@media (min-width: 64em) {
	.wp-block-woocommerce-breadcrumbs.breadcrumb,
	.breadcrumb .woocommerce-breadcrumb {
		font-size: var(--wp--preset--font-size--sm);
	}

	.breadcrumb ol {
		flex-wrap: wrap;
		overflow-x: visible;
	}

	.breadcrumb li {
		flex: initial;
		white-space: normal;
	}
}

/* ---- Section ---- */
.section {
	padding-block: var(--wp--custom--section-space--base);
}

.section--alt {
	background: var(--wp--custom--color--surface-alt);
}

/* دو بخش پشت سر هم با زمینه یکسان: فاصله دوبل نشود */
.section:not(.section--alt) + .section:not(.section--alt),
.section--alt + .section--alt {
	padding-top: 0;
}

@media (min-width: 64em) {
	.section {
		padding-block: var(--wp--custom--section-space--lg);
	}
}

/* بخش جمع و جور، در همه عرض ها (بعد از قانون بالا تا جایش را بگیرد) */
.section--tight {
	padding-block: var(--wp--preset--spacing--4);
}

/* بلوک های گروه وردپرس بین فرزندها blockGap می گذارند. فاصله ها اینجا مثل دمو است. */
.section > *,
.section .is-layout-flow > *,
.section .wp-block-post-template > li,
.section .wp-block-term-template > li {
	margin-block: 0;
}

/* ---- Section head ---- */
.section .section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--1) var(--wp--preset--spacing--2);
	margin-bottom: var(--wp--preset--spacing--3);
}

.section-head h2 {
	margin: 0;
}

.more-link a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--1);
	min-height: var(--wp--custom--size--tap);
	font-weight: var(--wp--custom--font-weight--bold);
	text-decoration: none;
}

.more-link a::after {
	content: "";
	width: var(--wp--custom--size--icon-sm);
	height: var(--wp--custom--size--icon-sm);
	background: currentColor;
	-webkit-mask: var(--cn-icon-arrow) center / contain no-repeat;
	mask: var(--cn-icon-arrow) center / contain no-repeat;
}

.more-link a:hover {
	text-decoration: underline;
}

/* ---- Badge ---- */
.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--half);
	padding: 0 var(--wp--preset--spacing--1);
	min-height: var(--wp--custom--size--badge);
	border-radius: var(--wp--preset--border-radius--default);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--badge);
	background: var(--wp--custom--color--surface-muted);
	color: var(--wp--custom--color--text-muted);
}

.badge--stock {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-strong);
}

/* ناموجود (جلسه 21): زمینه سفید با خط دور، کم رنگ تر از موجود و جدا از سفارشی. */
.badge--out {
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border-strong);
	background: var(--wp--custom--color--surface);
	color: var(--wp--custom--color--text-muted);
}

.badge--stock::before {
	content: "";
	width: var(--wp--custom--size--dot);
	height: var(--wp--custom--size--dot);
	border-radius: 50%;
	background: currentColor;
}

/* ---- Category tiles: بلوک «قالب اصطلاح» هسته با کاشی دسته افزونه ---- */
.cat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--2);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* موبایل: کارت افقی جمع و جور. از 48em به بالا: کارت عمودی با عکس */
.cat-tile {
	display: flex;
	align-items: center;
	height: 100%;
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	color: var(--wp--custom--color--text);
	text-decoration: none;
	overflow: hidden;
	transition: border-color var(--wp--custom--duration), box-shadow var(--wp--custom--duration);
}

.cat-tile:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--sm);
	color: var(--wp--preset--color--primary);
}

.cat-tile img {
	width: var(--wp--custom--size--tile-thumb);
	height: var(--wp--custom--size--tile-thumb);
	flex: none;
}

.cat-tile__name {
	display: flex;
	align-items: center;
	flex: 1;
	min-height: var(--wp--custom--size--tile-thumb);
	padding: var(--wp--preset--spacing--1);
	font-weight: var(--wp--custom--font-weight--bold);
	font-size: var(--wp--preset--font-size--sm);
	line-height: var(--wp--custom--line-height--tight);
}

@media (min-width: 48em) {
	.cat-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.cat-tile {
		flex-direction: column;
		align-items: stretch;
	}

	.cat-tile img {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-fit: cover;
	}

	.cat-tile__name {
		justify-content: center;
		min-height: var(--wp--custom--size--control);
		text-align: center;
	}
}

/* ---- Brand card: کادر برند با لوگو و نام زیرش (جلسه 22). نوار خانه (.brand-strip، home.css)
   و شبکه برگه /brand/ (.brand-grid). کادر و جای لوگو اندازه ثابت دارند، پس بار شدن لوگو
   چیزی را جابه جا نمی کند. برند بی لوگو نامش را درشت وسط کادر دارد ---- */
.brand-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--wp--custom--size--brand-card-sm), 1fr));
	gap: var(--wp--preset--spacing--2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--1);
	box-sizing: border-box;
	block-size: var(--wp--custom--size--brand-card-height-sm);
	padding: var(--wp--preset--spacing--1);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--gray-800);
	text-align: center;
	text-decoration: none;
	transition: border-color var(--wp--custom--duration), color var(--wp--custom--duration);
}

.brand-card:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.brand-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 100%;
	block-size: var(--wp--custom--size--brand-card-logo-sm);
}

.brand-card__logo img {
	display: block;
	inline-size: auto;
	block-size: auto;
	max-inline-size: 100%;
	max-block-size: 100%;
	object-fit: contain;
}

.brand-card__name {
	max-inline-size: 100%;
	overflow: hidden;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--tight);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brand-card--text .brand-card__name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--black);
	white-space: normal;
	overflow-wrap: anywhere;
}

@media (min-width: 48em) {
	.brand-grid {
		grid-template-columns: repeat(auto-fill, minmax(var(--wp--custom--size--brand-card), 1fr));
	}

	.brand-card {
		block-size: var(--wp--custom--size--brand-card-height);
	}

	.brand-card__logo {
		block-size: var(--wp--custom--size--brand-card-logo);
	}
}

/* ---- Product card: مجموعه محصولات ووکامرس با کارت محصول افزونه ---- */
.wc-block-product-template.product-grid,
.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--2);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* چیدمان «فهرست» مجموعه محصولات زیر هر محصول فاصله می گذارد. فاصله از gap است. */
.product-grid > li,
.wc-block-product-template.product-grid > .wc-block-product:not(:last-child) {
	width: auto;
	max-width: none;
	margin: 0;
}

@media (min-width: 48em) {
	.wc-block-product-template.product-grid,
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.wc-block-product-template.product-grid,
	.product-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--3);
	}
}

/* از جلسه 8ب کارت عمدا با دمو فرق دارد: دکمه ندارد و نشان وضعیت روی عکس است.
   موبایل (زیر 64em) جمع و جورتر است. اندازه ها از theme.json (custom.card و بقیه). */
.product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--custom--radius--card-sm);
	background: var(--wp--custom--color--surface);
	overflow: hidden;
	text-align: start;
	transition: border-color var(--wp--custom--duration), box-shadow var(--wp--custom--duration);
}

.product-card:hover {
	border-color: var(--wp--custom--color--border-strong);
	box-shadow: var(--wp--preset--shadow--sm);
}

/* کادر عکس با نسبت ثابت و زمینه سفید. عکس کامل داخل آن جا می شود و از اندازه
   واقعی فایل بزرگ تر نمی شود. عکس کوچک وسط کادر می ماند. چیدمان کارت به اندازه
   عکس بستگی ندارد. لینک عکس همه کادر را می گیرد و نشان وضعیت روی آن می نشیند. */
.product-card__media {
	position: relative;
	aspect-ratio: 1;
	background: var(--wp--preset--color--white);
	overflow: hidden;
}

.product-card__image {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-card__media img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* عکس جایگزین (SVG برداری، تار نمی شود) کادر را پر می کند، مثل دمو. */
.product-card__media img.woocommerce-placeholder {
	width: 100%;
	height: 100%;
}

/* نشان وضعیت: پایین و سمت شروع کادر عکس (در فارسی پایین راست). زمینه پر و سایه
   دارد تا روی عکس سفید و عکس تیره هر دو خوانده شود. */
.product-card__media > .badge {
	position: absolute;
	inset-block-end: var(--wp--preset--spacing--1);
	inset-inline-start: var(--wp--preset--spacing--1);
	border-radius: var(--wp--custom--radius--pill);
	box-shadow: var(--wp--preset--shadow--sm);
	font-size: var(--wp--custom--font-size--badge-sm);
}

.product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: var(--wp--custom--card--specs-gap-sm);
	padding: var(--wp--preset--spacing--1) var(--wp--preset--spacing--1) var(--wp--custom--card--pad-end-sm);
}

.product-card .product-card__title {
	margin: 0;
	font-size: var(--wp--custom--font-size--card-title-sm);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--tight);
}

.product-card__title a {
	min-height: var(--wp--custom--size--tap);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--wp--custom--color--text);
	text-decoration: none;
}

.product-card__title a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.product-card__specs {
	margin: 0;
	padding: 0;
	padding-inline-start: var(--wp--custom--card--specs-indent);
	list-style: none;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--custom--color--text-muted);
	line-height: var(--wp--custom--line-height--list);
}

.product-card__specs li::before {
	content: "•";
	margin-inline-end: var(--wp--preset--spacing--half);
	color: var(--wp--custom--color--border-strong);
}

@media (min-width: 64em) {
	.product-card {
		border-radius: var(--wp--preset--border-radius--default);
	}

	.product-card__media > .badge {
		font-size: var(--wp--preset--font-size--xs);
	}

	.product-card__body {
		gap: var(--wp--preset--spacing--1);
		padding: var(--wp--preset--spacing--1) var(--wp--preset--spacing--2) var(--wp--preset--spacing--2);
	}

	.product-card .product-card__title {
		font-size: var(--wp--preset--font-size--base);
	}

	.product-card__specs {
		padding-inline-start: 0;
		font-size: var(--wp--preset--font-size--sm);
	}
}

/* ==========================================================================
   لیست استعلام (جلسه 10ب). همه با ویژگی hidden رندر می شوند و اسکریپت لیست افزونه
   (assets/inquiry-list.js) نشانشان می دهد. بدون جاوااسکریپت دیده نمی شوند.
   ========================================================================== */

/* دکمه «افزودن به لیست» کارت محصول: روی کادر عکس، گوشه پایین سمت پایان (روبه روی نشان
   وضعیت). جای لمس size.tap است و دایره دیده شدنی size.list-toggle وسط آن. حلقه فوکوس روی
   دایره است، چون کادر عکس overflow: hidden دارد. */
.list-toggle {
	position: absolute;
	inset-block-end: 0;
	inset-inline-end: 0;
	display: grid;
	place-items: center;
	width: var(--wp--custom--size--tap);
	height: var(--wp--custom--size--tap);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--primary);
	-webkit-tap-highlight-color: transparent;
}

.list-toggle__icon {
	display: grid;
	place-items: center;
	width: var(--wp--custom--size--list-toggle);
	height: var(--wp--custom--size--list-toggle);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border-strong);
	border-radius: 50%;
	background: var(--wp--custom--color--surface);
	box-shadow: var(--wp--preset--shadow--sm);
	transition: background-color var(--wp--custom--duration), border-color var(--wp--custom--duration), color var(--wp--custom--duration);
}

.list-toggle .icon {
	width: var(--wp--custom--size--icon-sm);
	height: var(--wp--custom--size--icon-sm);
}

.list-toggle:hover .list-toggle__icon {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary-soft);
}

.list-toggle[aria-pressed="true"] .list-toggle__icon {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text-inverse);
}

.list-toggle[aria-pressed="true"]:hover .list-toggle__icon {
	background: var(--wp--preset--color--primary-strong);
}

.list-toggle:focus-visible {
	outline: none;
}

.list-toggle:focus-visible .list-toggle__icon {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--color--focus);
	outline-offset: var(--wp--custom--focus--offset);
}

/* «افزودن به لیست» کنار «دیدن محصول» در «محصول در متن» مقاله. در لیست: پر با رنگ اصلی. */
.list-toggle-btn[aria-pressed="true"],
.list-toggle-btn[aria-pressed="true"]:hover {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text-inverse);
}

/* دکمه هایی با دو آیکن «+» و تیک: تیک فقط در حالت «در لیست» */
.list-toggle .icon + .icon,
.list-toggle-btn .icon + .icon,
.inquiry-add__button .icon + .icon,
.list-toggle[aria-pressed="true"] .icon,
.list-toggle-btn[aria-pressed="true"] .icon,
.inquiry-add.is-added .inquiry-add__button .icon {
	display: none;
}

.list-toggle[aria-pressed="true"] .icon + .icon,
.list-toggle-btn[aria-pressed="true"] .icon + .icon,
.inquiry-add.is-added .inquiry-add__button .icon + .icon {
	display: block;
}

/* شمارنده لیست (سربرگ و نوار پایین). صفر دیده نمی شود (hidden). */
.count {
	display: inline-grid;
	place-items: center;
	min-width: var(--wp--custom--size--count);
	height: var(--wp--custom--size--count);
	padding-inline: var(--wp--preset--spacing--half);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text-inverse);
	font-size: var(--wp--custom--font-size--badge-sm);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--size--count);
}

/* پیام کوتاه افزودن و حذف (role="status"). خالی بود جا و رنگ ندارد. بالای نوار پایین موبایل. */
.inquiry-toast {
	position: fixed;
	inset-inline: 0;
	inset-block-end: calc(var(--wp--custom--size--quick-bar) + env(safe-area-inset-bottom, 0px) + var(--wp--preset--spacing--1));
	z-index: var(--wp--custom--z--toast);
	width: fit-content;
	max-width: min(var(--wp--custom--size--toast), calc(100% - 2 * var(--wp--custom--gutter--base)));
	margin: 0 auto;
	padding: var(--wp--preset--spacing--1) var(--wp--preset--spacing--2);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--text);
	color: var(--wp--custom--color--text-inverse);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--bold);
	box-shadow: var(--wp--preset--shadow--md);
	pointer-events: none;
}

.inquiry-toast:empty {
	padding: 0;
	box-shadow: none;
}

/* نوار «مقایسه (n)» (جلسه 23، compare.php): لینک ثابت گوشه پایین سمت پایان (چپ)، بالای نوار
   پایین موبایل. ثابت است، پس آمدن و رفتنش چیزی را جابه جا نمی کند. با لیست خالی hidden است.
   وقتی دیده می شود (has-compare-bar روی html) پابرگ به اندازه آن بلندتر می شود تا آخر صفحه
   زیرش نماند. */
.compare-bar {
	position: fixed;
	inset-inline-end: var(--wp--custom--gutter--base);
	inset-block-end: calc(var(--wp--custom--size--quick-bar) + env(safe-area-inset-bottom, 0px) + var(--wp--preset--spacing--1));
	z-index: var(--wp--custom--z--quick-bar);
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--1);
	min-height: var(--wp--custom--size--tap);
	padding: 0 var(--wp--preset--spacing--2);
	border: var(--wp--custom--border-width-thick) solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--custom--color--surface);
	color: var(--wp--preset--color--primary-strong);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--bold);
	text-decoration: none;
	box-shadow: var(--wp--preset--shadow--md);
}

.compare-bar[hidden] {
	display: none;
}

.compare-bar:hover {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-strong);
}

.compare-bar .icon {
	width: var(--wp--custom--size--icon-sm);
	height: var(--wp--custom--size--icon-sm);
}

.has-compare-bar .site-footer::after {
	content: "";
	display: block;
	height: calc(var(--wp--custom--size--tap) + 2 * var(--wp--preset--spacing--1));
}

/* فیلد تعداد: صفحه محصول و ردیف های برگه لیست. رقم فارسی، وسط چین. */
.qty-input {
	min-height: var(--wp--custom--size--control);
	padding: 0 var(--wp--preset--spacing--1);
	border: var(--wp--custom--border-width-thick) solid var(--wp--custom--color--border-strong);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	font-weight: var(--wp--custom--font-weight--bold);
	text-align: center;
}

.qty-input:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--primary-soft);
	outline-offset: 0;
	border-color: var(--wp--preset--color--primary);
}

/* تعداد با دکمه کم و زیاد: ردیف های برگه لیست و جعبه استعلام صفحه محصول (جلسه 18).
   هر دکمه به اندازه هدف لمسی. */
.qty {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--half);
}

.qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--size--tap);
	height: var(--wp--custom--size--tap);
	padding: 0;
	border: var(--wp--custom--border-width-thick) solid var(--wp--custom--color--border-strong);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	color: var(--wp--preset--color--primary);
}

.qty__btn:hover {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary-soft);
}

.qty .qty-input {
	width: var(--wp--custom--size--qty-input);
	min-height: var(--wp--custom--size--tap);
}

@media (min-width: 64em) {
	.inquiry-toast {
		inset-block-end: var(--wp--preset--spacing--3);
	}

	.compare-bar {
		inset-inline-end: var(--wp--custom--gutter--lg);
		inset-block-end: var(--wp--preset--spacing--3);
	}

	.has-compare-bar .site-footer::after {
		height: calc(var(--wp--custom--size--tap) + 2 * var(--wp--preset--spacing--3));
	}
}

/* ---- Article card: حلقه پرس و جوی هسته با کارت مقاله افزونه ---- */
.article-grid {
	display: grid;
	gap: var(--wp--preset--spacing--3);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48em) {
	.article-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.article-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	overflow: hidden;
}

.article-card:hover {
	border-color: var(--wp--preset--color--primary);
}

.article-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.article-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: var(--wp--preset--spacing--1);
	padding: var(--wp--preset--spacing--2);
}

.article-card .article-card__meta {
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--custom--color--text-muted);
}

.article-card h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--base);
}

.article-card h3 a {
	color: var(--wp--custom--color--text);
	text-decoration: none;
}

/* کل کارت قابل کلیک با یک لینک */
.article-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.article-card h3 a:focus-visible {
	outline: none;
}

.article-card h3 a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--color--focus);
	outline-offset: calc(var(--wp--custom--focus--width) * -1);
	border-radius: var(--wp--preset--border-radius--default);
}

.article-card:hover h3 a {
	color: var(--wp--preset--color--primary);
}

.article-card p {
	margin: 0;
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

/* ---- Info list: آدرس، تلفن، واتساپ، ساعت کاری (بلوک تماس مغازه) ---- */
.info-list {
	display: grid;
	gap: var(--wp--preset--spacing--2);
	margin: 0 0 var(--wp--preset--spacing--3);
	padding: 0;
	list-style: none;
}

.section .info-list {
	margin-bottom: var(--wp--preset--spacing--3);
}

.info-list__item {
	display: grid;
	grid-template-columns: var(--wp--custom--size--control) 1fr;
	gap: var(--wp--preset--spacing--2);
	align-items: start;
}

.info-list__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--size--control);
	height: var(--wp--custom--size--control);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
}

.info-list__label {
	display: block;
	font-weight: var(--wp--custom--font-weight--bold);
}

.info-list__value {
	display: block;
	color: var(--wp--custom--color--text-muted);
}

.info-list__value a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--size--tap);
	font-weight: var(--wp--custom--font-weight--bold);
}

.hours {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 var(--wp--preset--spacing--2);
}

.hours dt {
	color: var(--wp--custom--color--text-muted);
}

.hours dd {
	margin: 0;
	font-weight: var(--wp--custom--font-weight--medium);
}

/* ---- Placeholder: جای خالی نقشه و عکس ---- */
.placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--1);
	min-height: var(--wp--custom--size--placeholder);
	padding: var(--wp--preset--spacing--3);
	border: var(--wp--custom--border-width-thick) dashed var(--wp--custom--color--border-strong);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface-muted);
	color: var(--wp--custom--color--text-muted);
	text-align: center;
	font-weight: var(--wp--custom--font-weight--medium);
}

.placeholder[class*="cn-icon-"]::before {
	content: "";
	width: var(--wp--custom--size--icon-xl);
	height: var(--wp--custom--size--icon-xl);
	background: currentColor;
	-webkit-mask: var(--cn-icon) center / contain no-repeat;
	mask: var(--cn-icon) center / contain no-repeat;
}

.section .placeholder p {
	margin: 0;
}

.placeholder .muted {
	color: var(--wp--custom--color--text-muted);
}

/* ---- FAQ: بلوک «جزئیات» هسته ---- */
.faq {
	border-top: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
}

.faq__item {
	border-bottom: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
}

.faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--2);
	min-height: var(--wp--custom--size--faq-row);
	padding-block: var(--wp--preset--spacing--1);
	font-weight: var(--wp--custom--font-weight--bold);
	cursor: pointer;
	list-style: none;
}

.faq__item summary::-webkit-details-marker {
	display: none;
}

/* فلش مثل .chevron، یک شکل چرخیده است نه جهت متن */
.faq__item summary::after {
	content: "";
	flex: none;
	width: var(--wp--custom--size--chevron);
	height: var(--wp--custom--size--chevron);
	margin-inline-end: var(--wp--preset--spacing--1);
	border-right: var(--wp--custom--border-width-thick) solid currentColor;
	border-bottom: var(--wp--custom--border-width-thick) solid currentColor;
	transform: translateY(-25%) rotate(45deg);
	color: var(--wp--custom--color--text-muted);
}

.faq__item[open] summary::after {
	transform: translateY(25%) rotate(-135deg);
}

.faq__item summary:hover {
	color: var(--wp--preset--color--primary);
}

.section .faq__item > :not(summary) {
	padding-bottom: var(--wp--preset--spacing--2);
	color: var(--wp--custom--color--text-muted);
}

/* ---- Page head: تیتر صفحه و متن معرفی. دسته، برند، برچسب و صفحه اصلی بلاگ ---- */
.page-head {
	padding-block: var(--wp--preset--spacing--2) var(--wp--preset--spacing--3);
}

.page-head > * {
	margin-block: 0;
}

.page-head h1 {
	margin-bottom: var(--wp--preset--spacing--1);
}

.page-head__lead {
	max-width: var(--wp--custom--size--lead);
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--md);
}

.page-head__lead p {
	margin: 0;
}

/* ---- «بیشتر» (.read-more): در حالت بسته کادر با ارتفاع ثابت و محو شدن پایین، همان جا باز
   می شود. توضیحات محصول (جلسه 19) و متن معرفی بالای دسته، برند و برچسب (جلسه 22) ---- */
.read-more.is-clamped .read-more__content {
	max-height: var(--wp--custom--size--read-more);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, var(--wp--custom--color--text) 55%, transparent);
	mask-image: linear-gradient(to bottom, var(--wp--custom--color--text) 55%, transparent);
}

.read-more__toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--1);
	min-height: var(--wp--custom--size--tap);
	margin-block-start: var(--wp--preset--spacing--1);
	padding: 0 var(--wp--preset--spacing--2);
	border: var(--wp--custom--border-width-thick) solid var(--wp--preset--color--primary);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	color: var(--wp--preset--color--primary);
	font-weight: var(--wp--custom--font-weight--bold);
}

.read-more__toggle:hover {
	background: var(--wp--preset--color--primary-soft);
}

/* متن معرفی دسته، برند و برچسب (آیتم 18): تمام عرض سر صفحه، در حالت بسته حدود سه خط */
.read-more--lead .page-head__lead {
	max-width: none;
	margin-block: 0;
}

.read-more--lead.is-clamped .read-more__content {
	max-height: var(--wp--custom--size--read-more-lead);
	/* دو خط اول کامل، خط سوم محو */
	-webkit-mask-image: linear-gradient(to bottom, var(--wp--custom--color--text) 66%, transparent);
	mask-image: linear-gradient(to bottom, var(--wp--custom--color--text) 66%, transparent);
}

/* ---- Pagination: صفحه بندی پرس و جوی هسته. دسته و بلاگ ---- */
.wp-block-query-pagination.pagination {
	gap: var(--wp--preset--spacing--1);
	margin-top: var(--wp--preset--spacing--4);
}

.pagination .wp-block-query-pagination-numbers {
	display: contents;
}

.pagination a,
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--size--tap);
	min-height: var(--wp--custom--size--tap);
	margin: 0;
	padding: 0 var(--wp--preset--spacing--1);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	color: var(--wp--custom--color--text);
	font-weight: var(--wp--custom--font-weight--bold);
	text-decoration: none;
}

.pagination a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.pagination [aria-current="page"] {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text-inverse);
}

.pagination .page-numbers.dots {
	border-color: transparent;
	color: var(--wp--custom--color--text-muted);
}

/* ---- Tables: جدول مشخصات محصول و جدول هسته (core/table) در متن مقاله ----
   ظرف .table-wrap افقی اسکرول می شود. جدول متن مقاله را افزونه با tabindex و
   role="region" می سازد تا با صفحه کلید هم اسکرول شود. */
.table-wrap {
	overflow-x: auto;
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
}

.table-wrap:focus-visible {
	outline-offset: var(--wp--custom--focus--offset);
}

.table {
	width: 100%;
	min-width: var(--wp--custom--size--table-min);
	margin: 0;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--sm);
}

.table caption {
	padding: var(--wp--preset--spacing--2);
	text-align: start;
	font-weight: var(--wp--custom--font-weight--bold);
}

.table th,
.table td {
	padding: var(--wp--preset--spacing--1) var(--wp--preset--spacing--2);
	border: 0;
	border-bottom: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	text-align: start;
	vertical-align: top;
}

.table thead th {
	background: var(--wp--custom--color--surface-alt);
	font-weight: var(--wp--custom--font-weight--bold);
	white-space: nowrap;
}

.table thead {
	border-bottom: 0;
}

.table tbody tr:last-child > * {
	border-bottom: 0;
}

.table tbody tr:nth-child(even) {
	background: var(--wp--custom--color--surface-alt);
}

.table a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--size--tap);
	margin-block: calc(var(--wp--preset--spacing--1) * -1);
	font-weight: var(--wp--custom--font-weight--bold);
}

.table--spec {
	min-width: 0;
}

.table--spec th {
	width: 40%;
	color: var(--wp--custom--color--text-muted);
	font-weight: var(--wp--custom--font-weight--medium);
}

/* ---- Prose: متن مقاله و توضیحات محصول (محتوای خود نوشته) ---- */
.prose {
	font-size: var(--wp--preset--font-size--base);
}

.prose .wp-block-post-content > * {
	margin-block: 0 var(--wp--preset--spacing--2);
}

.prose .wp-block-post-content > h2 {
	margin-top: var(--wp--preset--spacing--5);
	scroll-margin-top: var(--wp--preset--spacing--3);
}

.prose .wp-block-post-content > h3 {
	margin-top: var(--wp--preset--spacing--3);
}

.prose .wp-block-post-content > :first-child {
	margin-top: 0;
}

.prose .wp-block-post-content > :last-child {
	margin-bottom: 0;
}

.prose li {
	margin-bottom: var(--wp--preset--spacing--half);
}

.prose .wp-block-post-content > .table-wrap {
	margin-block: var(--wp--preset--spacing--3);
}

/* عکس ها هیچ وقت از کادر متن بزرگ تر نمی شوند (آیتم 13، جلسه 19). عکس کپشن دار ویرایشگر
   کلاسیک ([caption]) عرض ثابت را در style می نویسد (مثلا width: 816px). max-width آن را
   کوچک می کند و کپشن و alt سر جایشان می مانند. */
.prose img {
	max-width: 100%;
	height: auto;
}

.prose .wp-caption,
.prose figure.wp-block-image {
	max-width: 100%;
	margin-inline: 0;
}

.prose .wp-caption.aligncenter,
.prose figure.wp-block-image.aligncenter {
	margin-inline: auto;
}

.prose .wp-caption img,
.prose figure.wp-block-image img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* کپشن کلاسیک مثل کپشن بلوک تصویر */
.prose .wp-caption-text,
.prose figure.wp-block-image figcaption {
	margin: var(--wp--preset--spacing--1) 0 0;
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
	line-height: var(--wp--custom--line-height--tight);
	text-align: center;
}

/* ---- Article card پهن: «راهنمای مرتبط» صفحه محصول، مثل دمو ---- */
.article-grid--single > li {
	min-width: 0;
}

.article-card--wide {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48em) {
	.article-grid--single {
		grid-template-columns: minmax(0, 1fr);
		max-width: var(--wp--custom--size--guide-wide);
	}

	.article-card--wide {
		grid-template-columns: var(--wp--custom--size--guide-wide-media) minmax(0, 1fr);
	}

	.article-card--wide img {
		height: 100%;
		aspect-ratio: auto;
	}

	.article-card--wide .article-card__body {
		justify-content: center;
		padding: var(--wp--preset--spacing--3);
	}

	.article-card--wide h3 {
		font-size: var(--wp--preset--font-size--lg);
	}
}

/* ---- Inquiry box: کادر استعلام صفحه محصول و صفحه تماس. دکمه های تماس و پیام رسان. ---- */
.inquiry {
	max-width: var(--wp--custom--size--inquiry);
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--2);
	border: var(--wp--custom--border-width-thick) solid var(--wp--preset--color--primary);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
}

.inquiry > * {
	margin: 0 0 var(--wp--preset--spacing--2);
}

.inquiry > :last-child {
	margin-bottom: 0;
}

.inquiry .inquiry__title {
	margin-bottom: var(--wp--preset--spacing--half);
	font-size: var(--wp--preset--font-size--lg);
}

.inquiry__note {
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

.inquiry__hours {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--1);
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

.inquiry__hours .icon {
	width: var(--wp--custom--size--icon-sm);
	height: var(--wp--custom--size--icon-sm);
	margin-block-start: var(--wp--custom--icon-nudge);
	color: var(--wp--preset--color--primary);
}

/* دو دکمه تماس، شماره روی دکمه. اگر جا نشد شماره به خط دوم می رود. */
.inquiry .inquiry__actions {
	display: grid;
	gap: var(--wp--preset--spacing--1);
	margin-bottom: var(--wp--preset--spacing--1);
}

.inquiry__actions .btn {
	flex-wrap: wrap;
	column-gap: var(--wp--preset--spacing--1);
	row-gap: 0;
	padding-inline: var(--wp--preset--spacing--2);
}

/* پیام رسان ها: هم اندازه. موبایل دو ستون، دسکتاپ یک ردیف (پایین فایل). */
.inquiry .inquiry__messengers {
	margin-bottom: var(--wp--preset--spacing--3);
}

.inquiry__messengers ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.inquiry__messengers .btn {
	width: 100%;
	padding-inline: var(--wp--preset--spacing--1);
}

/* خط «متن پیام کپی شد» (role="status"). تا کلیک خالی است و جا نمی گیرد. */
.inquiry__status {
	margin: var(--wp--preset--spacing--1) 0 0;
	color: var(--wp--preset--color--primary-strong);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--bold);
}

.inquiry__status:empty {
	margin: 0;
}


@media (min-width: 30em) {
	.inquiry {
		padding: var(--wp--preset--spacing--3);
	}

	.inquiry .inquiry__actions {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 64em) {
	.inquiry__messengers ul {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}
}

/* ---- Why grid: «چرا سی ان تک» خانه و «برای چه کسانی» همکاری ---- */
.why-grid {
	display: grid;
	gap: var(--wp--preset--spacing--2);
}

/* خانه آیکن ::before است و خود آیکن ::after روی آن */
.why-item {
	position: relative;
	display: grid;
	grid-template-columns: var(--wp--custom--size--control) 1fr;
	gap: var(--wp--preset--spacing--2);
	align-items: start;
	padding: var(--wp--preset--spacing--2);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
}

.why-item::before {
	content: "";
	width: var(--wp--custom--size--control);
	height: var(--wp--custom--size--control);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--preset--color--primary-soft);
}

.why-item::after {
	content: "";
	position: absolute;
	top: calc(var(--why-padding, var(--wp--preset--spacing--2)) + (var(--wp--custom--size--control) - var(--wp--custom--size--icon-lg)) / 2);
	inset-inline-start: calc(var(--why-padding, var(--wp--preset--spacing--2)) + (var(--wp--custom--size--control) - var(--wp--custom--size--icon-lg)) / 2);
	width: var(--wp--custom--size--icon-lg);
	height: var(--wp--custom--size--icon-lg);
	background: var(--wp--preset--color--primary);
	-webkit-mask: var(--cn-icon) center / contain no-repeat;
	mask: var(--cn-icon) center / contain no-repeat;
}

.section .why-item h3 {
	margin-bottom: var(--wp--preset--spacing--half);
	font-size: var(--wp--preset--font-size--base);
}

.section .why-item p {
	margin: 0;
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

@media (min-width: 48em) {
	.why-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.why-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--3);
	}

	.why-item {
		--why-padding: var(--wp--preset--spacing--3);
		grid-template-columns: 1fr;
		padding: var(--wp--preset--spacing--3);
	}
}

/* ---- Link card: کارت لینک بدون عکس. «مقاله های دیگر» مقاله و نتیجه های جستجوی عمومی ---- */
.link-grid {
	display: grid;
	gap: var(--wp--preset--spacing--1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.link-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--half);
	height: 100%;
	min-height: var(--wp--custom--size--tap);
	padding: var(--wp--preset--spacing--2);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	color: var(--wp--custom--color--text);
	text-decoration: none;
	transition: border-color var(--wp--custom--duration);
}

.link-card:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--custom--color--text);
}

.link-card__title {
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--tight);
}

.link-card:hover .link-card__title {
	color: var(--wp--preset--color--primary);
}

.link-card__text {
	color: var(--wp--custom--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

@media (min-width: 48em) {
	.link-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--2);
	}
}

@media (min-width: 80em) {
	.link-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---- Brand logo: لوگوی برند کنار H1 صفحه برند. برند بی لوگو فقط H1 دارد ---- */
.page-head:has(> .term-logo) {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: var(--wp--preset--spacing--2);
}

.page-head:has(> .term-logo) > :not(.term-logo, h1) {
	grid-column: 1 / -1;
}

.term-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--size--brand-logo);
	height: var(--wp--custom--size--brand-logo);
	padding: var(--wp--preset--spacing--half);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--preset--color--white);
}

.term-logo img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.page-head:has(> .term-logo) h1 {
	margin-bottom: 0;
}

@media (min-width: 64em) {
	.term-logo {
		width: var(--wp--custom--size--brand-logo-lg);
		height: var(--wp--custom--size--brand-logo-lg);
	}
}

/* ---- Chips: برچسب های لینک دار («دسته های هم خانواده» دمو). «دسته های مکمل» دسته، برند و
   برچسب (جلسه 11) و «سبد کامل در یک جا» همکاری ---- */
.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip-list a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--size--tap);
	padding: 0 var(--wp--preset--spacing--2);
	border: var(--wp--custom--border-width) solid var(--wp--custom--color--border);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--custom--color--surface);
	color: var(--wp--custom--color--text);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--medium);
	text-decoration: none;
}

.chip-list a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* ---- نکته مغازه (جلسه 11): دمو کادری برای آن ندارد، با زبان کادر «جواب کوتاه» مقاله.
   دسته، برند، برچسب، محصول و مقاله ---- */
.shop-note {
	max-width: var(--wp--custom--size--lead);
	padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--3);
	border-inline-start: var(--wp--custom--accent-border-thick) solid var(--wp--preset--color--primary);
	border-radius: var(--wp--preset--border-radius--default);
	background: var(--wp--preset--color--primary-soft);
}

.shop-note p {
	margin: 0 0 var(--wp--preset--spacing--1);
}

.shop-note p:last-child {
	margin-bottom: 0;
}

.shop-note .shop-note__label {
	margin-bottom: var(--wp--preset--spacing--half);
	color: var(--wp--preset--color--primary-strong);
	font-weight: var(--wp--custom--font-weight--black);
	font-size: var(--wp--preset--font-size--sm);
}

/* جواب سوال پرتکرار دسته (چند پاراگراف ممکن است) */
.faq__answer > * {
	margin: 0 0 var(--wp--preset--spacing--1);
}

.faq__answer > :last-child {
	margin-bottom: 0;
}
