/* =============================================================
   Find Your Dream Bed — category icon slider
   Scoped under .bbs-db.
   ============================================================= */

.bbs-db {
	--db-width: 1600px;
	--db-gutter: 16px;
	--db-ink: #1a1a2e;
	--db-sub: #2b5aa7;
	--db-item-w: 170px;
	--db-icon-h: 96px;
	--db-gap: 8px;

	padding: 48px 0;
	background: #fff;
}

.bbs-db__inner {
	max-width: var(--db-width);
	margin: 0 auto;
	padding: 0 var(--db-gutter);
	box-sizing: border-box;
}

.bbs-db__title {
	margin: 0 0 6px;
	color: var(--db-ink);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.bbs-db__sub {
	margin: 0 0 30px;
	color: var(--db-sub);
	font-size: 17px;
	line-height: 1.5;
}

/* ---------------------------------------------- track */
.bbs-db__track {
	display: flex;
	gap: var(--db-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	touch-action: manipulation;
	cursor: grab;
	outline: none;
	padding-bottom: 4px;
}

.bbs-db__track::-webkit-scrollbar {
	display: none;
}

.bbs-db__track.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
}

.bbs-db__track:focus-visible {
	outline: 2px solid var(--db-ink);
	outline-offset: 4px;
	border-radius: 6px;
}

/* ---------------------------------------------- items */
.bbs-db__item {
	flex: 0 0 var(--db-item-w);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 6px 4px 10px;
	color: var(--db-ink);
	text-decoration: none;
	border-radius: 8px;
	transition: transform .18s ease;
}

.bbs-db__item:hover,
.bbs-db__item:focus {
	color: var(--db-ink);
	transform: translateY(-3px);
}

.bbs-db__icon {
	display: block;
	width: 100%;
	height: var(--db-icon-h);
	color: var(--db-ink);
}

.bbs-db__icon svg {
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

.bbs-db__label {
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	line-height: 1.3;
}

/* ---------------------------------------------- progress */
.bbs-db__progress {
	position: relative;
	width: min(420px, 60%);
	height: 4px;
	margin: 26px auto 0;
	border-radius: 4px;
	background: #e8e8ee;
	overflow: hidden;
}

.bbs-db__progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0;
	border-radius: 4px;
	background: var(--db-ink);
}

/* Hide the bar when everything already fits on screen */
.bbs-db__progress.is-idle {
	display: none;
}

/* ---------------------------------------------- mobile */
@media (max-width: 768px) {
	.bbs-db {
		--db-item-w: 124px;
		--db-icon-h: 72px;
		padding: 36px 0;
	}

	.bbs-db__title { font-size: 22px; }
	.bbs-db__sub { font-size: 15px; margin-bottom: 22px; }
	.bbs-db__label { font-size: 13px; }

	.bbs-db__progress {
		width: min(280px, 70%);
		margin-top: 20px;
	}
}
