/* ── دکمه مقایسه روی کارت ── */
.nw-cmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.9);
	border: none;
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	cursor: pointer;
	color: #666;
	font-size: .9rem;
	transition: color .2s, transform .15s;
	line-height: 1;
}
.nw-cmp-btn:hover           { color: #f5a623; transform: scale(1.15); }
.nw-cmp-btn--active         { color: #f5a623; }

/* دکمه PDP (متنی) */
.nw-cmp-btn--pdp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	padding: .6rem 1rem;
	margin-block-start: .4rem;
	background: #fff;
	border: 1.5px solid #ddd;
	border-radius: 8px;
	font-size: .875rem;
	font-family: inherit;
	color: #555;
	cursor: pointer;
	transition: border-color .2s, color .2s;
}
.nw-cmp-btn--pdp:hover,
.nw-cmp-btn--pdp.nw-cmp-btn--active {
	border-color: #f5a623;
	color: #e09415;
}

/* ── نوار شناور پایین ── */
.nw-cmp-bar {
	position: fixed;
	inset-block-end: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	z-index: 9990;
	background: #fff;
	border-block-start: 2px solid #f5a623;
	box-shadow: 0 -4px 20px rgba(0,0,0,.12);
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: .75rem 1.25rem;
	flex-wrap: wrap;
}
.nw-cmp-bar[hidden] { display: none; }

.nw-cmp-bar__slots {
	display: flex;
	gap: .75rem;
	flex: 1;
	flex-wrap: wrap;
}

.nw-cmp-slot {
	position: relative;
	width: 56px;
	height: 56px;
	border: 1.5px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	background: #fafafa;
}
.nw-cmp-slot img { width: 100%; height: 100%; object-fit: contain; }
.nw-cmp-slot__rm {
	position: absolute;
	inset-block-start: 2px;
	inset-inline-end: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #e53e3e;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .6rem;
	padding: 0;
	line-height: 1;
}

.nw-cmp-bar__actions { display: flex; gap: .6rem; align-items: center; }
.nw-cmp-bar__go { white-space: nowrap; background: #f5a623; color: #fff; border: none; }
.nw-cmp-bar__go:hover { background: #e09415; color: #fff; }
.nw-cmp-bar__clear {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	border: 1.5px solid #eee; border-radius: 8px;
	background: #fff; color: #999; cursor: pointer;
	transition: color .2s, border-color .2s;
}
.nw-cmp-bar__clear:hover { color: #e53e3e; border-color: #e53e3e; }

/* ── جستجوی صفحه مقایسه ── */
.nw-cmp-search-wrap {
	position: relative;
	max-width: 560px;
	margin: 0 auto 1.75rem;
}

.nw-cmp-search-box {
	position: relative;
	display: flex;
	align-items: center;
}

.nw-cmp-search-icon {
	position: absolute;
	inset-inline-end: .9rem;
	color: #aaa;
	font-size: 1.1rem;
	pointer-events: none;
}

.nw-cmp-search-input {
	width: 100%;
	padding: .75rem 2.5rem .75rem 1rem;
	border: 1.5px solid #ddd;
	border-radius: 10px;
	font-size: .9rem;
	font-family: inherit;
	color: #222;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
	background: #fff;
}
.nw-cmp-search-input:focus {
	border-color: #f5a623;
	box-shadow: 0 0 0 3px rgba(245,166,35,.15);
}
.nw-cmp-search-input::placeholder { color: #aaa; }

.nw-cmp-search-spinner {
	position: absolute;
	inset-inline-start: .9rem;
	width: 16px;
	height: 16px;
	border: 2px solid #eee;
	border-top-color: #f5a623;
	border-radius: 50%;
	animation: nwCmpSpin .6s linear infinite;
}
@keyframes nwCmpSpin { to { transform: rotate(360deg); } }

.nw-cmp-search-results {
	position: absolute;
	inset-block-start: calc(100% + 6px);
	inset-inline-start: 0;
	inset-inline-end: 0;
	background: #fff;
	border: 1.5px solid #eee;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.1);
	list-style: none;
	margin: 0;
	padding: .4rem 0;
	z-index: 9999;
	max-height: 340px;
	overflow-y: auto;
}
.nw-cmp-search-results[hidden] { display: none; }

.nw-cmp-sr-item {
	display: flex;
	align-items: center;
	gap: .7rem;
	padding: .55rem .9rem;
	cursor: default;
	transition: background .15s;
}
.nw-cmp-sr-item:hover { background: #fafafa; }

.nw-cmp-sr-img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: 6px;
	border: 1px solid #eee;
	flex-shrink: 0;
}

.nw-cmp-sr-name {
	flex: 1;
	font-size: .82rem;
	color: #222;
	line-height: 1.4;
}

.nw-cmp-sr-price {
	font-size: .78rem;
	color: #e53e3e;
	white-space: nowrap;
}

.nw-cmp-sr-btn {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .35rem .75rem;
	border: 1.5px solid #f5a623;
	border-radius: 6px;
	background: #fff;
	color: #e09415;
	font-size: .78rem;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s, color .2s;
}
.nw-cmp-sr-btn:hover { background: #f5a623; color: #fff; }
.nw-cmp-sr-btn--in {
	border-color: #22c55e;
	color: #16a34a;
	background: #f0fdf4;
	cursor: default;
}
.nw-cmp-sr-btn--disabled,
.nw-cmp-sr-btn:disabled {
	border-color: #ddd;
	color: #bbb;
	background: #fafafa;
	cursor: not-allowed;
}

.nw-cmp-sr-empty {
	padding: .9rem 1rem;
	color: #999;
	font-size: .85rem;
	text-align: center;
}

/* ── صفحه مقایسه ── */
.nw-cmp-empty {
	text-align: center;
	padding: 4rem 1rem;
	color: #888;
}
.nw-cmp-empty .ti { font-size: 3rem; display: block; margin-block-end: 1rem; }
.nw-cmp-empty p { margin-block-end: 1.25rem; }

.nw-cmp-table-wrap { overflow-x: auto; }

.nw-cmp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .875rem;
	min-width: calc(var(--cmp-cols) * 180px + 160px);
}

.nw-cmp-table th,
.nw-cmp-table td {
	padding: .6rem .75rem;
	border: 1px solid #eee;
	vertical-align: middle;
	text-align: center;
}

.nw-cmp-table thead th { background: #fafafa; }

.nw-cmp-table__label-col {
	width: 160px;
	background: #fafafa;
}
.nw-cmp-table__label {
	text-align: end;
	background: #fafafa;
	font-weight: 600;
	color: #444;
}

/* سطر عنوان گروه */
.nw-cmp-group-row td {
	background: #f5a623;
	color: #fff;
	font-weight: 700;
	text-align: start;
}

.nw-cmp-dash { color: #ccc; }
.nw-cmp-no-specs { text-align: center; color: #999; padding: 2rem; }
.nw-cmp-out { color: #999; font-size: .8rem; }

.nw-cmp-prod-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	position: relative;
	padding-block-start: 1.5rem;
}
.nw-cmp-prod-img { width: 100px; height: 100px; object-fit: contain; }
.nw-cmp-prod-name { font-size: .8rem; text-decoration: none; color: #222; text-align: center; line-height: 1.4; }
.nw-cmp-prod-price { font-size: .875rem; color: #e53e3e; }
.nw-cmp-remove-btn {
	position: absolute;
	inset-block-start: 0;
	inset-inline-end: 0;
	width: 24px; height: 24px;
	border-radius: 50%;
	border: 1px solid #eee;
	background: #fff;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	font-size: .75rem;
	color: #999;
	transition: color .2s;
}
.nw-cmp-remove-btn:hover { color: #e53e3e; }

@media (max-width: 640px) {
	.nw-cmp-bar { padding: .5rem .75rem; }
	.nw-cmp-slot { width: 44px; height: 44px; }
}
