/* ==========================================================================
   دیدگاه‌ها — طراحی یکپارچه‌ی وبلاگ و محصولات
   ========================================================================== */
.pd-cmt {
	--c-p: var(--pardis-primary, #5b30f6);
	--c-p-rgb: var(--pardis-primary-rgb-comma, 91, 48, 246);
	--c-s: var(--pardis-secondary, #ffb800);
	--c-card: color-mix(in srgb, var(--bg-surface, #fff) 96%, rgb(var(--c-p-rgb)) 4%);
	--c-line: var(--border, #e2e0f4);
	--c-text: var(--text-primary, #1e1c3a);
	--c-muted: var(--text-muted, #6b6898);
	position: relative;
	margin-top: 28px;
	padding: 28px;
	border: 1px solid var(--c-line);
	border-radius: 24px;
	background: var(--bg-surface, #fff);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 18px 48px -28px rgba(var(--c-p-rgb), .28);
	color: var(--c-text);
}
.pd-cmt--product { margin-top: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.pd-cmt * { box-sizing: border-box; }
.pd-cmt-i { display: inline-block; flex-shrink: 0; vertical-align: middle; }

/* ---------- سربرگ ---------- */
.pd-cmt__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pd-cmt__title { display: flex; align-items: center; gap: 14px; }
.pd-cmt__title-icon {
	width: 48px; height: 48px;
	display: grid; place-items: center;
	border-radius: 16px;
	color: #fff;
	background: linear-gradient(135deg, var(--c-p), color-mix(in srgb, var(--c-p) 55%, #22d3ee));
	box-shadow: 0 10px 24px -10px rgba(var(--c-p-rgb), .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.pd-cmt__title h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.5; color: var(--c-text); }
.pd-cmt__title p { margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted); }
.pd-cmt__cta {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1.5px solid rgba(var(--c-p-rgb), .25);
	color: var(--c-p);
	background: rgba(var(--c-p-rgb), .05);
	font-size: 13px; font-weight: 700;
	text-decoration: none;
	transition: all .2s ease;
}
.pd-cmt__cta:hover { background: var(--c-p); border-color: var(--c-p); color: #fff; box-shadow: 0 10px 22px -10px rgba(var(--c-p-rgb), .8); transform: translateY(-1px); }

/* ---------- خلاصه‌ی امتیاز محصول ---------- */
.pd-cmt-summary {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 26px;
	align-items: center;
	margin-bottom: 24px;
	padding: 20px 22px;
	border-radius: 20px;
	border: 1px solid var(--c-line);
	background: linear-gradient(135deg, rgba(var(--c-p-rgb), .06), transparent 60%), var(--bg-surface, #fff);
}
.pd-cmt-summary__score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border-inline-end: 1px solid var(--c-line); padding-inline-end: 22px; }
.pd-cmt-summary__score strong { font-size: 44px; font-weight: 900; line-height: 1; color: var(--c-text); }
.pd-cmt-summary__score small { font-size: 12px; color: var(--c-muted); }
.pd-cmt-summary__bars { display: grid; gap: 8px; }
.pd-cmt-summary__row { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; color: var(--c-muted); }
.pd-cmt-summary__row span { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--c-text); }
.pd-cmt-summary__row span svg { color: var(--c-s); }
.pd-cmt-summary__row i { display: block; height: 8px; border-radius: 99px; background: rgba(var(--c-p-rgb), .08); overflow: hidden; }
.pd-cmt-summary__row b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c-s), color-mix(in srgb, var(--c-s) 60%, #f97316)); }
.pd-cmt-summary__row em { font-style: normal; text-align: left; }

.pd-cmt-stars { display: inline-flex; gap: 1px; direction: ltr; }
.pd-cmt-stars span { color: rgba(var(--c-p-rgb), .15); display: inline-flex; }
.pd-cmt-stars span.is-on { color: var(--c-s); }

/* ---------- فهرست ---------- */
.pd-cmt__list, .pd-cmt__list .children { list-style: none; margin: 0; padding: 0; }
.pd-cmt__list { display: flex; flex-direction: column; gap: 16px; }
.pd-cmt__item { position: relative; margin: 0; }
.pd-cmt__card {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	padding: 18px 20px;
	border: 1px solid var(--c-line);
	border-radius: 20px;
	background: var(--c-card);
	transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
}
.pd-cmt__card:hover { border-color: rgba(var(--c-p-rgb), .28); box-shadow: 0 14px 34px -22px rgba(var(--c-p-rgb), .55); }
.pd-cmt__item:target > .pd-cmt__card { border-color: var(--c-p); box-shadow: 0 0 0 4px rgba(var(--c-p-rgb), .12); }

.pd-cmt__avatar { position: relative; width: 52px; height: 52px; padding: 2px; border-radius: 18px; background: linear-gradient(135deg, var(--c-p), var(--c-s)); }
.pd-cmt__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; border: 2px solid var(--bg-surface, #fff); background: var(--bg-surface, #fff); }
.is-reply > .pd-cmt__card .pd-cmt__avatar { width: 44px; height: 44px; border-radius: 15px; }
.is-reply > .pd-cmt__card .pd-cmt__avatar img { border-radius: 13px; }

.pd-cmt__body { min-width: 0; }
.pd-cmt__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.pd-cmt__who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pd-cmt__author { font-size: 14.5px; font-weight: 800; color: var(--c-text); }
.pd-cmt__badge {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 2px 9px 2px 8px;
	border-radius: 999px;
	font-size: 10.5px; font-weight: 700; line-height: 1.9;
	background: rgba(var(--c-p-rgb), .1);
	color: var(--c-p);
}
.pd-cmt__badge--author { background: rgba(14, 165, 233, .12); color: #0284c7; }
.pd-cmt__badge--buyer { background: rgba(16, 185, 129, .13); color: #059669; }
.pd-cmt__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; order: 3; }
.pd-cmt__date { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--c-muted); text-decoration: none; }
.pd-cmt__date:hover { color: var(--c-p); }
.pd-cmt__to { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; background: rgba(var(--c-p-rgb), .06); font-size: 11px; color: var(--c-muted); }
.pd-cmt__rating { order: 2; }

.pd-cmt__text { font-size: 14px; line-height: 2.05; color: color-mix(in srgb, var(--c-text) 88%, transparent); overflow-wrap: anywhere; }
.pd-cmt__text p { margin: 0 0 .6em; }
.pd-cmt__text p:last-child { margin-bottom: 0; }
.pd-cmt__text a { color: var(--c-p); }
.pd-cmt__pending { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; background: rgba(245, 158, 11, .12); color: #b45309; }

.pd-cmt__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pd-cmt__actions .comment-reply-link,
.pd-cmt__like,
.pd-cmt__edit {
	display: inline-flex; align-items: center; gap: 6px;
	height: 32px;
	padding: 0 12px;
	border: 1px solid var(--c-line);
	border-radius: 10px;
	background: var(--bg-surface, #fff);
	color: var(--c-muted);
	font: inherit; font-size: 12px; font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: all .18s ease;
}
.pd-cmt__actions .comment-reply-link:hover { color: var(--c-p); border-color: rgba(var(--c-p-rgb), .35); background: rgba(var(--c-p-rgb), .06); }
.pd-cmt__like:hover { color: #e11d48; border-color: rgba(225, 29, 72, .3); background: rgba(225, 29, 72, .05); }
.pd-cmt__like.is-liked { color: #e11d48; border-color: rgba(225, 29, 72, .35); background: rgba(225, 29, 72, .08); }
.pd-cmt__like.is-liked svg { fill: currentColor; animation: pd-like-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.pd-cmt__like [data-like-count]:empty { display: none; }
.pd-cmt__edit { border-style: dashed; }
.pd-cmt__edit:hover { color: var(--c-text); }
@keyframes pd-like-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* پاسخ‌ها: رشته‌ی گفتگو */
.pd-cmt__list .children {
	position: relative;
	display: flex; flex-direction: column; gap: 12px;
	margin-top: 12px;
	margin-inline-start: 26px;
	padding-inline-start: 22px;
}
.pd-cmt__list .children::before {
	content: "";
	position: absolute;
	inset-inline-start: 0; top: -12px; bottom: 26px;
	width: 2px;
	border-radius: 2px;
	background: linear-gradient(180deg, rgba(var(--c-p-rgb), .35), rgba(var(--c-p-rgb), .08));
}
.pd-cmt__list .children > .pd-cmt__item::before {
	content: "";
	position: absolute;
	inset-inline-start: -22px; top: 22px;
	width: 18px; height: 14px;
	border-bottom: 2px solid rgba(var(--c-p-rgb), .22);
	border-inline-start: 2px solid rgba(var(--c-p-rgb), .22);
	border-end-start-radius: 12px;
	transform: translateY(-12px);
}
.is-reply > .pd-cmt__card { background: color-mix(in srgb, var(--bg-surface, #fff) 92%, rgb(var(--c-p-rgb)) 8%); padding: 14px 16px; }
.bypostauthor > .pd-cmt__card, .pd-cmt__item:has(> .pd-cmt__card .pd-cmt__badge--admin) > .pd-cmt__card {
	border-color: rgba(var(--c-p-rgb), .3);
	background: linear-gradient(135deg, rgba(var(--c-p-rgb), .07), transparent 55%), var(--c-card);
}

.pd-cmt__pagination { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
.pd-cmt__pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--c-line); color: var(--c-muted); font-size: 13px; text-decoration: none; }
.pd-cmt__pagination .page-numbers.current, .pd-cmt__pagination .page-numbers:hover { background: var(--c-p); border-color: var(--c-p); color: #fff; }

.pd-cmt__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border: 1.5px dashed var(--c-line); border-radius: 20px; text-align: center; }
.pd-cmt__empty-art { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; color: var(--c-p); background: radial-gradient(circle, rgba(var(--c-p-rgb), .14), rgba(var(--c-p-rgb), .03) 70%); }
.pd-cmt__empty p { margin: 0; font-size: 13.5px; color: var(--c-muted); }
.pd-cmt__closed { margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(var(--c-p-rgb), .05); font-size: 13px; color: var(--c-muted); text-align: center; }

/* ---------- فرم ---------- */
.pd-cmt-form {
	position: relative;
	margin-top: 26px;
	padding: 24px;
	border-radius: 22px;
	border: 1px solid var(--c-line);
	background: linear-gradient(160deg, rgba(var(--c-p-rgb), .06), transparent 45%), var(--bg-surface, #fff);
	overflow: hidden;
}
.pd-cmt-form::before {
	content: "";
	position: absolute; top: -60px; left: -60px;
	width: 180px; height: 180px; border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--c-p-rgb), .12), transparent 70%);
	pointer-events: none;
}
.pd-cmt__list .pd-cmt-form { margin: 12px 0 4px; }
.pd-cmt-form__title { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--c-text); }
.pd-cmt-form__cancel a { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(225, 29, 72, .08); color: #e11d48; font-size: 12px; font-weight: 700; text-decoration: none; }
.pd-cmt-form__note { position: relative; margin: 0 0 16px; font-size: 12.5px; color: var(--c-muted); }
.pd-cmt-form__form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.pd-cmt-form__form > * { grid-column: 1 / -1; margin: 0; }
.pd-cmt-form__form > .pd-field--author, .pd-cmt-form__form > .pd-field--email { grid-column: auto; }
.pd-cmt-form__me { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(var(--c-p-rgb), .06); }
.pd-cmt-form__me img { width: 40px; height: 40px; border-radius: 13px; }
.pd-cmt-form__me strong { display: block; font-size: 13.5px; }
.pd-cmt-form__me span { font-size: 12px; color: var(--c-muted); }
.pd-cmt-form__me a { color: var(--c-p); }
.pd-cmt-form__login { padding: 14px; border-radius: 14px; background: rgba(var(--c-p-rgb), .06); font-size: 13px; }
.pd-cmt-form__login a { color: var(--c-p); font-weight: 700; }

.pd-field label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 700; color: var(--c-text); }
.pd-req { color: #e11d48; }
.pd-field__wrap { position: relative; display: block; }
.pd-field__wrap .pd-cmt-i { position: absolute; top: 50%; inset-inline-start: 15px; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; transition: color .2s; }
.pd-field input, .pd-field textarea {
	width: 100%;
	border: 1.5px solid var(--c-line);
	border-radius: 14px;
	background: var(--bg-surface, #fff);
	color: var(--c-text);
	font: inherit; font-size: 14px;
	outline: 0;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.pd-field input { height: 50px; padding: 0 16px; padding-inline-start: 44px; }
.pd-field textarea { min-height: 140px; padding: 14px 16px 30px; line-height: 2; resize: vertical; display: block; }
.pd-field input:focus, .pd-field textarea:focus { border-color: var(--c-p); box-shadow: 0 0 0 4px rgba(var(--c-p-rgb), .13); }
.pd-field__wrap:focus-within .pd-cmt-i { color: var(--c-p); }
/* جای آیکون داخل فیلد: قانون عمومی قالب (#respond input[type="text"]) با
   شناسه‌ی #respond فاصله‌ی داخلی را به 1rem برمی‌گرداند و متن روی آیکون
   می‌افتاد. آیکون و فاصله را فیزیکی (سمت راست) می‌دهیم چون
   فیلد ایمیل dir="ltr" دارد و padding-inline-start آن به چپ می‌رفت. */
#respond .pd-field .pd-field__wrap input,
.pd-cmt-form .pd-field .pd-field__wrap input,
.pdp #reviews .comment-form .pd-field .pd-field__wrap input {
	height: 50px;
	padding: 0 44px 0 16px;
	font-size: 14px;
	line-height: normal;
}
#respond .pd-field .pd-field__wrap .pd-cmt-i,
.pd-cmt-form .pd-field .pd-field__wrap .pd-cmt-i { right: 15px; left: auto; z-index: 1; }
.pd-field--comment { position: relative; }
.pd-field__counter { position: absolute; bottom: 10px; left: 14px; font-size: 11px; color: var(--c-muted); background: var(--bg-surface, #fff); padding: 0 4px; border-radius: 6px; pointer-events: none; }
.pd-field__counter.is-near { color: #d97706; }
.pd-field__counter.is-full { color: #e11d48; }

.pd-cmt-form .pd-cmt-form__cookies label { position: relative; display: flex !important; align-items: center; gap: 10px; font-size: 12.5px; color: var(--c-muted); cursor: pointer; }
.pd-cmt-form__cookies input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-check { width: 20px; height: 20px; flex-shrink: 0; border-radius: 7px; border: 1.5px solid var(--c-line); background: var(--bg-surface, #fff); display: grid; place-items: center; transition: all .15s; }
.pd-cmt-form__cookies input:checked + .pd-check { background: var(--c-p); border-color: var(--c-p); }
.pd-cmt-form__cookies input:checked + .pd-check::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pd-cmt-form__cookies input:focus-visible + .pd-check { box-shadow: 0 0 0 4px rgba(var(--c-p-rgb), .15); }

.pd-cmt-form__actions { display: flex; justify-content: flex-end; }
.pd-cmt-form__submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	height: 50px;
	padding: 0 28px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--c-p), color-mix(in srgb, var(--c-p) 70%, #a855f7));
	color: #fff;
	font: inherit; font-size: 14px; font-weight: 800;
	cursor: pointer;
	box-shadow: 0 14px 28px -14px rgba(var(--c-p-rgb), .85);
	transition: transform .18s ease, box-shadow .18s ease, filter .18s;
}
.pd-cmt-form__submit svg { transform: scaleX(-1); }
.pd-cmt-form__submit:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -14px rgba(var(--c-p-rgb), .95); filter: saturate(1.1); }
.pd-cmt-form__submit:disabled { opacity: .7; cursor: progress; transform: none; }
.pd-cmt-form .pardis-star-rating, .pd-cmt-form .comment-form-rating { grid-column: 1 / -1; }

/* ---------- حالت تاریک ---------- */
.dark .pd-cmt { --c-card: color-mix(in srgb, var(--bg-surface, #1a1829) 90%, rgb(var(--c-p-rgb)) 10%); box-shadow: 0 18px 48px -30px rgba(0, 0, 0, .8); }
.dark .pd-cmt__avatar img { border-color: var(--bg-surface, #1a1829); }
.dark .pd-cmt__badge--author { color: #38bdf8; }
.dark .pd-cmt__badge--buyer { color: #34d399; }
.dark .pd-cmt__pending { color: #fbbf24; }

/* ---------- موبایل ---------- */
@media (max-width: 640px) {
	.pd-cmt { padding: 18px; border-radius: 20px; }
	.pd-cmt--product { padding: 0; }
	.pd-cmt__card { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
	.pd-cmt__avatar { width: 42px; height: 42px; border-radius: 14px; }
	.pd-cmt__avatar img { border-radius: 12px; }
	.pd-cmt__card { grid-template-columns: auto 1fr; }
	.pd-cmt__list .children { margin-inline-start: 8px; padding-inline-start: 14px; }
	.pd-cmt__list .children > .pd-cmt__item::before { inset-inline-start: -14px; width: 11px; }
	.pd-cmt-summary { grid-template-columns: 1fr; gap: 16px; }
	.pd-cmt-summary__score { border-inline-end: 0; padding-inline-end: 0; border-bottom: 1px solid var(--c-line); padding-bottom: 14px; }
	.pd-cmt-form { padding: 18px; }
	.pd-cmt-form__form { grid-template-columns: 1fr; }
	.pd-cmt-form__form > .pd-field--author, .pd-cmt-form__form > .pd-field--email { grid-column: 1 / -1; }
	.pd-cmt-form__submit { width: 100%; }
}
