/* Homepage (templates/home.php). Mobile first; colours from the theme's variables. */

/* Side padding comes from the theme's container. */
.hbs-home {
	max-width: 1240px;
	margin: 0 auto;
	padding: 4px 0 24px;
}

.hbs-sec {
	margin-top: 26px;
}

.hbs-sec-title {
	margin: 0 0 12px;
	color: #222;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

/* Banner slider: native scroll-snap, the script only adds dots and autoplay. */
.hbs-hero {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #f4f4f4;
}

.hbs-hero-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.hbs-hero-track::-webkit-scrollbar {
	display: none;
}

.hbs-hero-slide {
	display: block;
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.hbs-hero-slide img {
	display: block;
	width: 100%;
	height: auto;
}

.hbs-hero-dots {
	position: absolute;
	right: 0;
	bottom: 8px;
	left: 0;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.hbs-hero-dots button {
	width: 8px;
	height: 8px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.hbs-hero-dots button[aria-selected="true"] {
	width: 18px;
	border-radius: 4px;
	background: #fff;
}

.hbs-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 14px;
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #f3faf6;
	color: #2c6b47;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.hbs-trust-item::before {
	content: "✓ ";
}

.hbs-trust-rates {
	flex-basis: 100%;
	color: #3d5a49;
	font-weight: 400;
}

/* Horizontal rails (categories, brands, reviews). */
.hbs-rail {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 4px;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.hbs-rail::-webkit-scrollbar {
	display: none;
}

.hbs-cat {
	display: flex;
	flex: 0 0 76px;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	scroll-snap-align: start;
	color: #333;
	text-align: center;
}

.hbs-cat-img {
	display: block;
	width: 68px;
	height: 68px;
	overflow: hidden;
	border: 2px solid #e8f3ec;
	border-radius: 50%;
	background: #fff;
}

.hbs-cat-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hbs-cat-name {
	font-size: 12px;
	line-height: 1.25;
}

.hbs-tiles-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.hbs-tile {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: #fafafa;
	color: #222;
}

.hbs-tile-img {
	display: block;
	aspect-ratio: 1 / 1;
}

.hbs-tile-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hbs-tile-title {
	display: block;
	padding: 8px 10px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.hbs-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.hbs-brand {
	display: flex;
	flex: 0 0 110px;
	align-items: center;
	justify-content: center;
	height: 110px;
	overflow: hidden;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fff;
	scroll-snap-align: start;
}

.hbs-brand img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hbs-brand-name {
	padding: 6px;
	color: #333;
	font-weight: 600;
	text-align: center;
}

.hbs-review {
	display: block;
	flex: 0 0 210px;
	overflow: hidden;
	border-radius: 10px;
	background: #f4f4f4;
	scroll-snap-align: start;
}

.hbs-review img {
	display: block;
	width: 100%;
	height: auto;
}

.hbs-more {
	display: block;
	width: 100%;
	max-width: 320px;
	height: 44px;
	margin: 16px auto 0;
	border: 1px solid var(--wd-primary-color, #439665);
	border-radius: 8px;
	background: #fff;
	color: var(--wd-primary-color, #439665);
	font-size: 15px;
	font-weight: 600;
}

.hbs-more[disabled] {
	opacity: .6;
}

/* /brands/ page */
.hbs-brand-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.hbs-brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 6px 10px;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fff;
	color: #222;
	text-align: center;
}

.hbs-brand-card-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: #f6f8f7;
}

.hbs-brand-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hbs-brand-initial {
	padding: 6px;
	color: var(--wd-primary-color, #439665);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
}

.hbs-brand-card-name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
}

.hbs-brand-card-count {
	color: #888;
	font-size: 11px;
}

.hbs-offers-page .hbs-tiles-grid {
	margin-bottom: 8px;
}

@media (min-width: 768px) {
	.hbs-brand-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 14px;
	}

	.hbs-home {
		padding-top: 18px;
	}

	.hbs-sec-title {
		font-size: 22px;
	}

	.hbs-tiles-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hbs-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}

	.hbs-cat {
		flex-basis: 96px;
	}

	.hbs-cat-img {
		width: 84px;
		height: 84px;
	}

	.hbs-cat-name {
		font-size: 13px;
	}
}

@media (min-width: 1025px) {
	.hbs-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.hbs-cats .hbs-rail {
		flex-wrap: wrap;
		justify-content: center;
		overflow: visible;
	}
}
