/* Toofunatr Product Notes - default styles (v1.1.2) */

.product-notes-container {
	--tfn-border: rgba(0, 0, 0, .08);
	--tfn-bg: transparent;
	--tfn-circle-bg: #f4f4f5;
	--tfn-muted: #8a8a8a;
	--tfn-divider: rgba(0, 0, 0, .1);
	--tfn-radius: 16px;
	--tfn-circle: 64px;

	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 20px 0;
	direction: rtl;
}

.product-notes-container .product-notes-heading {
	margin: 0 0 2px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.7;
}

/* --- کادر هر گروه --------------------------------------------------- */

.product-notes-container .note-section {
	background: var(--tfn-bg);
	border: 1px solid var(--tfn-border);
	border-radius: var(--tfn-radius);
	padding: 14px 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
	transition: border-color .2s ease, box-shadow .2s ease;
	/* جلوگیری از ارتفاع تحمیلی قالب */
	min-height: 0;
	height: auto;
}

.product-notes-container .note-section:hover {
	border-color: rgba(0, 0, 0, .14);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.product-notes-container .note-row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
}

/* --- عنوان گروه ----------------------------------------------------- */

.product-notes-container .note-title-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 96px;
	text-align: center;
	gap: 6px;
}

.product-notes-container .note-title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}

.product-notes-container .note-subtitle {
	font-size: 12px;
	color: var(--tfn-muted);
	line-height: 1.5;
}

.product-notes-container .note-divider {
	display: block;
	width: 32px;
	height: 2px;
	background: var(--tfn-divider);
	border-radius: 2px;
	flex: 0 0 auto;
}

/* آیکون ویژگی — مهار سایز حتی وقتی قالب تصویر بزرگ برمی‌گرداند */
.product-notes-container .note-icon,
.product-notes-container img.note-icon,
.product-notes-container svg.note-icon {
	width: 26px;
	height: 26px;
	max-width: 26px;
	max-height: 26px;
	object-fit: contain;
	display: block;
	flex: 0 0 auto;
}

.product-notes-container .default-icon {
	font-size: 13px;
	color: #c9c9c9;
	line-height: 1;
	width: auto;
	height: auto;
	max-width: none;
	max-height: none;
}

/* --- شبکه نوت‌ها ---------------------------------------------------- */

.product-notes-container .note-items {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	min-width: 0;

	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 14px 8px;
	align-content: start;
}

.product-notes-container .note-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	width: auto;
	list-style: none;
}

.product-notes-container .note-item::before,
.product-notes-container .note-item::marker {
	content: none;
}

.product-notes-container .note-image-circle {
	width: var(--tfn-circle);
	height: var(--tfn-circle);
	border-radius: 50%;
	overflow: hidden;
	background: var(--tfn-circle-bg);
	border: 1px solid var(--tfn-border);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.product-notes-container .note-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.product-notes-container .note-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.product-notes-container .note-name {
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.45;
	word-break: break-word;
}

.product-notes-container .note-term-subtitle {
	font-size: 10.5px;
	color: var(--tfn-muted);
	line-height: 1.4;
	word-break: break-word;
}

/* --- تبلت ----------------------------------------------------------- */

@media (max-width: 767px) {
	.product-notes-container {
		--tfn-circle: 58px;
	}

	.product-notes-container .note-items {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

/* --- موبایل --------------------------------------------------------- */

@media (max-width: 575px) {
	.product-notes-container {
		--tfn-circle: 52px;
		--tfn-radius: 14px;
		gap: 10px;
		margin: 16px 0;
	}

	.product-notes-container .note-section {
		padding: 10px 12px;
	}

	.product-notes-container .note-row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.product-notes-container .note-title-wrapper {
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		min-width: 0;
		gap: 8px;
	}

	.product-notes-container .note-divider {
		width: 2px;
		height: 16px;
	}

	/* دقیقاً ۴ ستون؛ ستون‌ها کل عرض را پر می‌کنند تا سمت چپ خالی نماند */
	.product-notes-container .note-items {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px 4px;
	}

	.product-notes-container .note-name {
		font-size: 11.5px;
		line-height: 1.4;
	}

	.product-notes-container .note-term-subtitle {
		font-size: 10px;
	}
}

@media (max-width: 359px) {
	.product-notes-container {
		--tfn-circle: 46px;
	}

	.product-notes-container .note-name {
		font-size: 11px;
	}
}

/* --- قالب‌های تیره -------------------------------------------------- */

@media (prefers-color-scheme: dark) {
	.product-notes-container {
		--tfn-border: rgba(255, 255, 255, .12);
		--tfn-circle-bg: rgba(255, 255, 255, .06);
		--tfn-divider: rgba(255, 255, 255, .16);
		--tfn-muted: #a0a0a0;
	}

	.product-notes-container .note-section:hover {
		border-color: rgba(255, 255, 255, .2);
	}
}
