/* RB Brand Showcase 1.0.0 */

.rb-b {
	--rbb-radius: 12px;
	margin: 0 auto;
	padding: 8px 0 4px;
	max-width: 100%;
	box-sizing: border-box;
}

.rb-b *,
.rb-b *::before,
.rb-b *::after { box-sizing: border-box; }

/* ---------- head ---------- */

.rb-b .rb-b-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 14px;
	padding: 0 12px;
}

.rb-b .rb-b-heads { min-width: 0; }

.rb-b .rb-b-title {
	margin: 0;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	font-size: 30px;
	line-height: 1.25;
	color: var(--rbb-title);
}

.rb-b .rb-b-sub {
	margin: 4px 0 0;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.4;
	color: var(--rbb-sub);
}

.rb-b .rb-b-btn {
	display: inline-block;
	flex: none;
	padding: 9px 22px;
	border-radius: 6px;
	background: var(--rbb-btn-bg);
	color: var(--rbb-btn-tx);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .18s ease;
}

.rb-b .rb-b-btn:hover,
.rb-b .rb-b-btn:focus-visible {
	background: var(--rbb-btn-hv);
	color: var(--rbb-btn-tx);
}

.rb-b .rb-b-foot { display: none; }

/* ---------- shared track ---------- */

.rb-b .rb-b-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.rb-b .rb-b-viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.rb-b .rb-b-track {
	display: flex;
	align-items: stretch;
	gap: var(--rbb-gap);
	margin: 0;
	padding: 4px 0;
	padding-inline-start: 0;
	list-style: none;
}

.rb-b .rb-b-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rb-b .rb-b-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 100%;
	padding: 12px;
	background: var(--rbb-card);
	border-radius: var(--rbb-radius);
	text-decoration: none;
	transition: transform .18s ease, box-shadow .18s ease;
}

.rb-b .rb-b-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--rbb-ratio);
	overflow: hidden;
}

.rb-b .rb-b-logo {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: filter .25s ease, opacity .25s ease;
}

.rb-b .rb-b-text {
	padding: 0 6px;
	unicode-bidi: plaintext;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	text-align: center;
	color: var(--rbb-title);
	letter-spacing: .01em;
}

.rb-b .rb-b-name {
	max-width: 100%;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	color: var(--rbb-name);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	unicode-bidi: plaintext;
}

.rb-b .rb-b-count {
	font-size: 11px;
	line-height: 1.3;
	color: var(--rbb-name);
	opacity: .75;
}

@media (hover: hover) {
	.rb-b .rb-b-tile:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
	}
}

.rb-b--gray .rb-b-logo { filter: grayscale(1); opacity: .75; }
.rb-b--gray .rb-b-tile:hover .rb-b-logo,
.rb-b--gray .rb-b-tile:focus-visible .rb-b-logo { filter: none; opacity: 1; }

.rb-b .rb-b-tile:focus-visible {
	outline: 2px solid var(--rbb-btn-hv);
	outline-offset: 2px;
}

/* ---------- marquee ---------- */

/* The viewport must be LTR too: a max-content track inside an RTL box is
   anchored by its right edge, which pushes the whole strip out of view on /ar/.
   Travel direction is handled by animation-direction, not by text direction. */
.rb-b--marquee .rb-b-viewport {
	overflow: hidden;
	direction: ltr;
}

.rb-b--marquee .rb-b-track {
	direction: ltr;
	width: max-content;
	max-width: none;
	flex-wrap: nowrap;
	gap: 0; /* spacing lives on the item, so one loop advances exactly one set */
	will-change: transform;
}

.rb-b--marquee .rb-b-item {
	flex: 0 0 var(--rbb-tile);
	width: var(--rbb-tile);
	margin-right: var(--rbb-gap);
}

.rb-b--marquee .rb-b-track.is-running {
	animation-name: rbb-slide;
	animation-duration: var(--rbb-dur, 40s);
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.rb-b--marquee .rb-b-track.is-reverse { animation-direction: reverse; }

@keyframes rbb-slide {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

.rb-b--marquee.rb-b--pause .rb-b-track.is-paused { animation-play-state: paused; }

.rb-b--fade .rb-b-viewport {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}

/* ---------- carousel ---------- */

.rb-b--carousel .rb-b-viewport { overflow: visible; }

.rb-b--carousel .rb-b-track {
	overflow-x: auto;
	overflow-y: hidden;
	width: 100%;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
	touch-action: pan-x pan-y;
}

.rb-b--carousel .rb-b-track::-webkit-scrollbar { display: none; }

.rb-b--carousel .rb-b-item {
	flex: 0 0 calc((100% - (var(--rbb-pv-d) - 1) * var(--rbb-gap)) / var(--rbb-pv-d));
	scroll-snap-align: start;
}

.rb-b .rb-b-arrow {
	display: none;
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #eee;
	color: #1e293b;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

.rb-b .rb-b-arrow svg { width: 20px; height: 20px; }
.rb-b .rb-b-arrow:hover { background: var(--rbb-btn-hv); color: #fff; }
.rb-b .rb-b-arrow[disabled] { opacity: .35; cursor: default; }
.rb-b .rb-b-arrow[disabled]:hover { background: #eee; color: #1e293b; }

.rb-b--arrows .rb-b-arrow { display: flex; }

[dir="rtl"] .rb-b .rb-b-arrow svg,
.rtl .rb-b .rb-b-arrow svg { transform: scaleX(-1); }

/* ---------- divider ---------- */

.rb-b--div::after {
	content: "";
	display: block;
	width: 100%;
	height: 1.5px;
	margin: 22px auto 0;
	background: var(--rbb-div);
}

/* ---------- tablet ---------- */

@media (max-width: 1024px) {
	.rb-b--carousel .rb-b-item {
		flex-basis: calc((100% - (var(--rbb-pv-t) - 1) * var(--rbb-gap)) / var(--rbb-pv-t));
	}
	.rb-b .rb-b-title { font-size: 26px; }
	.rb-b .rb-b-sub { font-size: 16px; }
}

/* ---------- phone ---------- */

@media (max-width: 767px) {
	.rb-b .rb-b-head {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 6px;
	}

	.rb-b .rb-b-title { font-size: 23px; }
	.rb-b .rb-b-sub { font-size: 15px; }

	.rb-b .rb-b-btn--top { display: none; }
	.rb-b .rb-b-foot { display: block; margin-top: 16px; text-align: center; }

	.rb-b--carousel .rb-b-item {
		flex-basis: calc((100% - (var(--rbb-pv-m) - 1) * var(--rbb-gap)) / var(--rbb-pv-m));
	}

	.rb-b--arrows .rb-b-arrow { display: none; }

	.rb-b--div::after { width: 92%; margin-top: 18px; }

	.rb-b--fade .rb-b-viewport {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	}
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.rb-b--marquee .rb-b-track.is-running { animation: none; }

	.rb-b--marquee .rb-b-viewport {
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rb-b--marquee .rb-b-viewport::-webkit-scrollbar { display: none; }

	.rb-b .rb-b-tile,
	.rb-b .rb-b-logo,
	.rb-b .rb-b-btn { transition: none; }

	.rb-b--carousel .rb-b-track { scroll-behavior: auto; }
}
