/**
 * Carousel người bán: 2 hàng, lưới responsive 5–4–3–2 cột.
 */

.mmo-featured-vendors {
	--mmo-fv-gap: 12px;
	--mmo-fv-cols: 2;
	position: relative;
	margin-bottom: 1.5rem;
}

@media (min-width: 550px) {
	.mmo-featured-vendors {
		--mmo-fv-cols: 3;
	}
}

@media (min-width: 768px) {
	.mmo-featured-vendors {
		--mmo-fv-cols: 4;
	}
}

@media (min-width: 1000px) {
	.mmo-featured-vendors {
		--mmo-fv-cols: 5;
	}
}

.mmo-featured-vendors__head {
	margin-bottom: 1rem;
}

.mmo-featured-vendors__title {
	margin: 0;
	font-size: 1.25rem;
}

.mmo-featured-vendors__scroll {
	width: 100%;
	/* Chiều rộng cột = % của vùng cuộn (xem container query bên dưới). */
	container-type: inline-size;
	container-name: mmo-fv;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mmo-featured-vendors__scroll::-webkit-scrollbar {
	display: none;
}

.mmo-featured-vendors__scroll:focus {
	outline: 2px solid rgba(0, 0, 0, 0.15);
	outline-offset: 2px;
}

.mmo-featured-vendors__cols {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: var(--mmo-fv-gap);
	min-height: 1px;
	padding-bottom: 4px;
}

.mmo-featured-vendors__col {
	/* Fallback: trình duyệt không hỗ trợ cqi */
	flex: 0 0 calc(
		(100% - (var(--mmo-fv-cols) - 1) * var(--mmo-fv-gap)) / var(--mmo-fv-cols)
	);
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mmo-fv-gap);
	scroll-snap-align: start;
}

@supports (width: 1cqi) {
	.mmo-featured-vendors__col {
		flex: 0 0
			calc(
				(100cqi - (var(--mmo-fv-cols) - 1) * var(--mmo-fv-gap)) /
					var(--mmo-fv-cols)
			);
	}
}

.mmo-featured-vendors__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	color: inherit;
	padding: 10px 8px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.03);
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.mmo-featured-vendors__card:hover {
	background: rgba(0, 0, 0, 0.06);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mmo-featured-vendors__card--demo {
	cursor: default;
	opacity: 0.92;
}

.mmo-featured-vendors__card--demo:hover {
	box-shadow: none;
	background: rgba(0, 0, 0, 0.03);
}

.mmo-featured-vendors__avatar {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: rgba(0, 0, 0, 0.06);
}

.mmo-featured-vendors__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mmo-featured-vendors__name {
	margin-top: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.mmo-featured-vendors--empty {
	padding: 1rem;
	text-align: center;
	color: rgba(0, 0, 0, 0.55);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
}
