/* ═══════════════════════════════════════════════════════════
   HOCLIN — Quantity Discounts (Auto Bundles)
   ═══════════════════════════════════════════════════════════ */

.hx-bundles {
	display: grid;
	grid-template-columns: repeat(var(--hx-bundle-cols, 3), minmax(0, 1fr));
	gap: var(--hx-sp-3);
	margin-block: var(--hx-sp-4) var(--hx-sp-4);
	width: 100%;
	flex: 1 1 100%;
}

.hx-bundle {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: var(--hx-sp-4) var(--hx-sp-2) var(--hx-sp-3);
	background: #fff;
	border: 2px solid var(--hx-line);
	border-radius: var(--hx-radius-md);
	text-align: center;
	cursor: pointer;
	min-height: 44px;
	transition: border-color var(--hx-dur) var(--hx-ease), background var(--hx-dur) var(--hx-ease), box-shadow var(--hx-dur) var(--hx-ease), transform var(--hx-dur) var(--hx-ease);
}
.hx-bundle:hover {
	border-color: var(--hx-primary-border);
	transform: translateY(-2px);
	box-shadow: var(--hx-shadow-md);
}
.hx-bundle:focus-visible {
	outline: 2px solid var(--hx-primary);
	outline-offset: 2px;
}
.hx-bundle.is-active {
	border-color: var(--hx-primary);
	background: var(--hx-primary-soft);
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.hx-bundle__best {
	position: absolute;
	top: -10px;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	padding: 1px 10px;
	border-radius: var(--hx-radius-full);
	background: var(--hx-accent);
	color: var(--hx-on-accent, #0f172a);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: var(--hx-shadow);
}
[dir="rtl"] .hx-bundle__best { transform: translateX(50%); }

.hx-bundle__qty {
	font-size: var(--hx-fs-xl);
	font-weight: 800;
	line-height: 1.1;
	color: var(--hx-ink);
}
.hx-bundle__off {
	display: inline-block;
	padding: 2px 10px;
	border-radius: var(--hx-radius-full);
	background: var(--hx-badge);
	color: #fff;
	font-size: var(--hx-fs-xs);
	font-weight: 800;
	line-height: 1.4;
}
.hx-bundle__price {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 3px;
	font-size: var(--hx-fs-sm);
	color: var(--hx-ink-muted);
	line-height: 1.3;
}
.hx-bundle__price .amount {
	font-weight: 800;
	color: var(--hx-price);
}
.hx-bundle__each {
	font-size: var(--hx-fs-xs);
	color: var(--hx-ink-light);
}

@media (max-width: 600px) {
	.hx-bundles {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		padding: 14px 3px 6px;
		margin-inline: -3px;
		scrollbar-width: none;
		justify-content: safe center;
		box-sizing: border-box;
	}
	.hx-bundles::-webkit-scrollbar { display: none; }
	.hx-bundle {
		flex: 0 0 92px;
		scroll-snap-align: center;
		padding: 10px 4px 8px;
		gap: 3px;
		border-width: 1.5px;
		border-radius: 12px;
	}
	.hx-bundle:hover { transform: none; box-shadow: none; }
	.hx-bundle__qty { font-size: 18px; }
	.hx-bundle__off { padding: 1px 8px; font-size: 11px; }
	.hx-bundle__best {
		top: -9px;
		padding: 1px 8px;
		font-size: 9px;
	}
	.hx-bundle__price {
		flex-direction: column;
		align-items: center;
		gap: 0;
		font-size: 12px;
	}
	.hx-bundle__each { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.hx-bundle { transition: none; }
}