/*
 * کالاهای جعبه‌باز/کارکرده — کارت، PDP، سبد و checkout
 * Mobile-first، RTL و مبتنی بر توکن‌های معنایی.
 */

:root {
	--nu-ink: var(--pf-ink);
	--nu-muted: var(--pf-muted);
	--nu-surface: var(--pf-surface);
	--nu-soft: var(--pf-surface-2);
	--nu-border: var(--pf-line);
	--nu-accent: var(--pf-primary-dark);
	--nu-accent-soft: var(--pf-primary-soft);
	--nu-good: var(--pf-success);
	--nu-good-soft: var(--pf-success-soft);
	--nu-important: var(--pf-danger);
	--nu-important-soft: var(--pf-danger-soft);
	--nu-radius-sm: var(--pf-radius-sm);
	--nu-radius: var(--pf-radius);
	--nu-shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
}

.nw-used-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: fit-content;
	max-width: 100%;
	padding-block: 6px;
	padding-inline: 9px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--pf-dark);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.35;
	white-space: normal;
}

.nw-used-badge i {
	flex: 0 0 auto;
	font-size: 16px;
}

.nw-used-badge--open_box {
	background: var(--pf-primary-dark);
}

.nw-used-badge--refurbished {
	background: #155e75;
}

.nw-used-badge--card {
	box-shadow: 0 4px 12px rgba(23, 32, 51, 0.16);
}

.nw-used-badge--pdp {
	margin-inline-start: 4px;
	font-size: 13px;
}

.nw-used-compact {
	display: grid;
	gap: 10px;
	min-width: 0;
	max-width: 100%;
	margin-block-end: 16px;
	padding: 14px;
	border: 1px solid color-mix(in srgb, var(--pf-primary) 72%, var(--pf-line));
	border-radius: var(--nu-radius-sm);
	background: var(--nu-accent-soft);
	color: var(--nu-ink);
}

.nw-used-compact__head,
.nw-used-compact__facts,
.nw-used-compact__link {
	display: flex;
	align-items: center;
}

.nw-used-compact__head {
	gap: 8px;
}

.nw-used-compact__head i {
	color: var(--nu-accent);
	font-size: 21px;
}

.nw-used-compact__facts {
	flex-wrap: wrap;
	gap: 6px;
}

.nw-used-compact__facts span {
	padding-block: 4px;
	padding-inline: 8px;
	border: 1px solid color-mix(in srgb, var(--pf-primary-dark) 22%, transparent);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.78);
	font-size: 12px;
	font-weight: 700;
}

.nw-used-compact__link {
	justify-content: space-between;
	min-height: 44px;
	padding-inline: 2px;
	color: var(--pf-primary-ink);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
}

.nw-used-compact__link:focus-visible {
	border-radius: 6px;
	outline: 3px solid color-mix(in srgb, var(--pf-primary-dark) 35%, transparent);
	outline-offset: 2px;
}

.nw-used-report {
	overflow: hidden;
	min-width: 0;
	max-width: 100%;
	margin-block-end: 20px;
	border: 1px solid var(--nu-border);
	border-radius: var(--nu-radius);
	background: var(--nu-surface);
	box-shadow: var(--nu-shadow);
	color: var(--nu-ink);
}

.nw-used-report *,
.nw-used-compact * {
	min-width: 0;
}

.nw-used-report__header {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 16px;
	border-block-end: 1px solid color-mix(in srgb, var(--pf-primary) 28%, var(--pf-surface));
	background: linear-gradient(135deg, var(--pf-primary-soft), var(--pf-primary-soft));
}

.nw-used-report__icon {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--pf-radius);
	background: var(--nu-accent);
	color: var(--pf-on-primary);
	font-size: 24px;
}

.nw-used-report__header h2,
.nw-used-report__group h3,
.nw-used-report__detail h3 {
	margin: 0;
	color: var(--nu-ink);
	font-family: inherit;
}

.nw-used-report__header h2 {
	font-size: clamp(18px, 5vw, 22px);
	line-height: 1.45;
}

.nw-used-report__header p {
	margin-block: 4px 0;
	color: var(--nu-muted);
	font-size: 13px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.nw-used-report__header > .nw-used-badge {
	grid-column: 1 / -1;
}

.nw-used-report__facts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin: 0;
	padding: 8px 16px;
}

.nw-used-report__facts > div {
	display: grid;
	grid-template-columns: minmax(80px, 0.8fr) minmax(0, 1.4fr);
	gap: 16px;
	padding-block: 11px;
	border-block-end: 1px dashed var(--nu-border);
}

.nw-used-report__facts > div:last-child {
	border-block-end: 0;
}

.nw-used-report__facts dt {
	color: var(--nu-muted);
	font-size: 13px;
}

.nw-used-report__facts dd {
	margin: 0;
	color: var(--nu-ink);
	font-size: 13px;
	font-weight: 800;
	text-align: end;
	overflow-wrap: anywhere;
}

.nw-used-report__group {
	padding: 16px;
	border-block-start: 1px solid var(--nu-border);
	background: var(--nu-soft);
}

.nw-used-report__group h3,
.nw-used-report__detail h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
}

.nw-used-report__group h3 i {
	color: var(--nu-good);
	font-size: 20px;
}

.nw-used-report__tests {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.nw-used-report__tests li {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) 20px;
	gap: 8px;
	align-items: center;
	min-height: 44px;
	padding-block: 7px;
	padding-inline: 10px;
	border: 1px solid color-mix(in srgb, var(--pf-success) 35%, var(--pf-surface));
	border-radius: var(--nu-radius-sm);
	background: var(--nu-good-soft);
	color: var(--pf-success);
	font-size: 13px;
	font-weight: 700;
}

.nw-used-report__tests li span,
.nw-used-report__detail,
.nw-used-report__footer span,
.nw-used-report__footer a {
	overflow-wrap: anywhere;
}

.nw-used-report__tests li > i:last-child {
	color: var(--nu-good);
	font-size: 18px;
}

.nw-used-report__details {
	display: grid;
	gap: 12px;
	padding: 16px;
}

.nw-used-report__detail {
	padding: 14px;
	border: 1px solid var(--nu-border);
	border-radius: var(--nu-radius-sm);
	background: var(--nu-surface);
}

.nw-used-report__detail--important {
	border-color: color-mix(in srgb, var(--pf-danger) 35%, var(--pf-surface));
	background: var(--nu-important-soft);
}

.nw-used-report__detail h3 i {
	color: var(--nu-accent);
	font-size: 19px;
}

.nw-used-report__detail--important h3 i {
	color: var(--nu-important);
}

.nw-used-report__detail p,
.nw-used-report__detail ul {
	margin-block: 9px 0;
	color: var(--pf-ink);
	font-size: 14px;
	line-height: 1.9;
}

.nw-used-report__detail ul {
	padding-inline-start: 20px;
}

.nw-used-report__footer {
	display: grid;
	gap: 8px;
	padding: 14px 16px;
	border-block-start: 1px solid var(--nu-border);
	background: var(--pf-surface);
	color: var(--nu-muted);
	font-size: 12px;
}

.nw-used-report__footer span,
.nw-used-report__footer a {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 28px;
}

.nw-used-report__footer span i {
	color: var(--nu-good);
	font-size: 17px;
}

.nw-used-report__footer a {
	min-height: 44px;
	color: var(--pf-primary-ink);
	font-weight: 800;
	text-decoration: none;
}

.nw-used-report__footer a:focus-visible {
	border-radius: 6px;
	outline: 3px solid color-mix(in srgb, var(--pf-primary-dark) 35%, transparent);
	outline-offset: 2px;
}

.nw-used-checkout-ack {
	padding: 12px;
	border: 1px solid color-mix(in srgb, var(--pf-primary) 72%, var(--pf-line));
	border-radius: var(--nu-radius-sm);
	background: var(--nu-accent-soft);
}

.nw-used-checkout-ack label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--nu-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.75;
}

.nw-used-checkout-ack input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-block-start: 2px;
	accent-color: var(--nu-accent);
}

@media (min-width: 640px) {
	.nw-used-report__facts,
	.nw-used-report__tests,
	.nw-used-report__details {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nw-used-report__facts {
		column-gap: clamp(24px, 4vw, 48px);
	}

	.nw-used-report__header {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		padding: 20px;
	}

	.nw-used-report__header > .nw-used-badge {
		grid-column: auto;
	}

	.nw-used-report__footer {
		grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nw-used-compact__link,
	.nw-used-report__footer a {
		scroll-behavior: auto;
		transition: none;
	}
}
