/* افزونهٔ تخفیف کلی محصولات — نمای فروشگاه */

:root {
	--bd-badge: #e02424;
	--bd-badge-text: #fff;
}

/* ------------------------------------------------ برچسب تخفیف */

.bd-badge.onsale {
	background: var(--bd-badge);
	color: var(--bd-badge-text);
	border: 0;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	min-width: 0;
	min-height: 0;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.bd-badge--outline.onsale {
	background: transparent;
	color: var(--bd-badge);
	border: 1.5px solid var(--bd-badge);
	box-shadow: none;
}

.bd-badge--ribbon.onsale {
	border-radius: 4px 4px 4px 0;
	padding: 5px 12px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}

/* ------------------------------------------------ زیر قیمت */

.bd-meta {
	margin: 6px 0 2px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bd-save {
	display: inline-block;
	align-self: flex-start;
	background: rgba(22, 163, 74, .1);
	color: #15803d;
	border-radius: 6px;
	padding: 3px 9px;
	font-size: 13px;
	font-weight: 600;
}

.bd-rule-label {
	font-size: 13px;
	color: #6b7280;
}

/* ------------------------------------------------ شمارش معکوس */

.bd-countdown {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
	border-radius: 8px;
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 600;
	align-self: flex-start;
}

.bd-countdown__clock {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: .3px;
}

.bd-countdown.is-ended {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #6b7280;
}

/* ------------------------------------------------ جدول پلکانی */

.bd-tier-table {
	margin: 0 0 18px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.bd-tier-table__title {
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	padding: 10px 14px;
	font-weight: 700;
	font-size: 14px;
}

.bd-tier-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.bd-tier-table th,
.bd-tier-table td {
	padding: 9px 14px;
	text-align: start;
	border-bottom: 1px solid #f3f4f6;
	font-size: 13px;
}

.bd-tier-table thead th {
	color: #6b7280;
	font-weight: 600;
	background: #fff;
}

.bd-tier-table tbody tr:last-child td {
	border-bottom: 0;
}

/* ------------------------------------------------ سبد و فهرست */

.bd-threshold-notice {
	font-weight: 600;
}

.bd-rules-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.bd-rules-list__item {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 14px;
	background: #fff;
}

.bd-rules-list__value {
	color: var(--bd-badge);
	font-weight: 700;
}

.bd-rules-list__note,
.bd-rules-list__end {
	font-size: 13px;
	color: #6b7280;
	margin-top: 4px;
}

.bd-empty {
	color: #6b7280;
}

@media (prefers-color-scheme: dark) {
	.bd-tier-table,
	.bd-rules-list__item {
		background: #111827;
		border-color: #1f2937;
	}

	.bd-tier-table__title {
		background: #0b1220;
		border-color: #1f2937;
		color: #e5e7eb;
	}

	.bd-tier-table th,
	.bd-tier-table td {
		border-color: #1f2937;
		color: #e5e7eb;
	}

	.bd-tier-table thead th {
		background: #111827;
		color: #9ca3af;
	}
}
