/* Brand Reviews Hub — frontend */

.brh-wrap {
	--brh-star-color: #f6a623;
	--brh-text: #1f2937;
	--brh-muted: #6b7280;
	--brh-border: #e8eaee;
	--brh-card: #ffffff;
	--brh-radius: 14px;
	color: var(--brh-text);
	line-height: 1.6;
}
.brh-wrap *, .brh-wrap *::before, .brh-wrap *::after { box-sizing: border-box; }
.brh-title { margin: 0 0 16px; }

/* ---------- Layouts ---------- */
.brh-list.brh-layout-grid {
	display: grid;
	grid-template-columns: repeat(var(--brh-cols, 3), minmax(0, 1fr));
	gap: 20px;
}
.brh-list.brh-layout-list { display: flex; flex-direction: column; gap: 16px; }
.brh-list .brh-empty { grid-column: 1 / -1; }

.brh-carousel-wrap { position: relative; }
.brh-list.brh-layout-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 4px 2px 14px;
	scrollbar-width: none;
}
.brh-list.brh-layout-carousel::-webkit-scrollbar { display: none; }
.brh-layout-carousel .brh-card { flex: 0 0 min(340px, 82vw); scroll-snap-align: start; }

/* Perfectly-round nav buttons - hardened against theme button CSS (Flatsome etc.). */
.brh-wrap .brh-nav,
.brh-wrap button.brh-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	box-sizing: border-box;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	max-width: 44px !important;
	max-height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--brh-border);
	background: #fff;
	color: #111827;
	font-size: 0;
	line-height: 0 !important;
	letter-spacing: 0;
	text-indent: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(17, 24, 39, .12);
	transition: background .2s, color .2s, opacity .2s;
	-webkit-appearance: none;
	appearance: none;
}
.brh-wrap .brh-nav svg { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.brh-wrap .brh-nav:hover { background: #111827; border-color: #111827; color: #fff; }
.brh-wrap .brh-nav:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.brh-wrap .brh-nav[disabled] { opacity: .35; pointer-events: none; }
.brh-prev { left: -12px; }
.brh-next { right: -12px; }

@media (max-width: 992px) {
	.brh-list.brh-layout-grid { grid-template-columns: repeat(min(var(--brh-cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.brh-list.brh-layout-grid { grid-template-columns: 1fr; }
	.brh-wrap .brh-nav,
	.brh-wrap button.brh-nav {
		width: 38px !important;
		height: 38px !important;
		min-width: 38px !important;
		min-height: 38px !important;
		max-width: 38px !important;
		max-height: 38px !important;
	}
	.brh-wrap .brh-nav svg { width: 18px; height: 18px; }
	.brh-prev { left: 4px; }
	.brh-next { right: 4px; }
}

/* ---------- Card ---------- */
.brh-card {
	background: var(--brh-card);
	border: 1px solid var(--brh-border);
	border-radius: var(--brh-radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow .25s, transform .25s;
	min-width: 0;
}
.brh-card:hover { box-shadow: 0 10px 30px rgba(17, 24, 39, .08); transform: translateY(-2px); }

.brh-card-head { display: flex; align-items: center; gap: 12px; row-gap: 6px; flex-wrap: wrap; }
.brh-avatar {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 17px;
	color: var(--brh-c, #334155);
	background: #f1f5f9;
	background: color-mix(in srgb, var(--brh-c, #334155) 12%, #fff);
}
.brh-headmeta { flex: 1; min-width: 0; }
.brh-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.brh-sub { font-size: 12.5px; color: var(--brh-muted); }
.brh-verified {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	font-weight: 600;
	color: #0e9f6e;
	background: #e6f7f1;
	border-radius: 20px;
	padding: 2px 8px;
	white-space: nowrap;
}
.brh-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: var(--brh-c, #64748b);
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
	align-self: flex-start;
}
.brh-badge svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* ---------- Stars ---------- */
.brh-stars { position: relative; display: inline-block; line-height: 0; }
.brh-stars svg { width: var(--brh-star, 16px); height: var(--brh-star, 16px); display: inline-block; }
.brh-stars-bg { color: #e2e5ea; display: inline-flex; }
.brh-stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--brh-star-color); pointer-events: none; }
.brh-stars-fill > span { display: inline-flex; white-space: nowrap; }

/* ---------- Card content ---------- */
.brh-product { font-size: 12.5px; }
.brh-product a, .brh-product span {
	color: #374151;
	background: #f3f4f6;
	padding: 3px 10px;
	border-radius: 8px;
	text-decoration: none;
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.brh-product a:hover { background: #e5e7eb; }

.brh-text { font-size: 14.5px; overflow-wrap: anywhere; }
.brh-text.is-clamped {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.brh-more {
	align-self: flex-start;
	background: none;
	border: 0;
	padding: 0;
	color: #2563eb;
	font-size: 13px;
	cursor: pointer;
}
.brh-more:hover { text-decoration: underline; }

.brh-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.brh-photo {
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: 10px;
	overflow: hidden;
	width: 64px;
	height: 64px;
}
.brh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.brh-photo:hover img { transform: scale(1.06); }

.brh-video {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	text-decoration: none;
	border: 1px solid var(--brh-border);
	padding: 6px 12px;
	border-radius: 24px;
	align-self: flex-start;
	transition: background .2s, color .2s;
}
.brh-video:hover { background: #111827; color: #fff; }

.brh-reply {
	background: #f8fafc;
	border-left: 3px solid #cbd5e1;
	border-radius: 0 10px 10px 0;
	padding: 10px 12px;
	font-size: 13px;
}
.brh-reply strong { display: block; font-size: 12px; color: var(--brh-muted); margin-bottom: 2px; }

.brh-card-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px dashed var(--brh-border);
	font-size: 12.5px;
	color: var(--brh-muted);
}
.brh-helpful { display: inline-flex; align-items: center; gap: 5px; }
.brh-card-foot a { color: var(--brh-muted); text-decoration: none; white-space: nowrap; }
.brh-card-foot a:hover { color: #111827; }

.brh-selection-note {
	margin: -4px 0 14px;
	color: var(--brh-muted);
	font-size: 12.5px;
}

.brh-disclaimer {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--brh-border);
	color: var(--brh-muted);
	font-size: 12px;
	line-height: 1.6;
}
.brh-disclaimer a {
	display: inline-block;
	margin-left: 8px;
	color: #374151;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Summary ---------- */
.brh-first-party-summary {
	display: grid;
	grid-template-columns: minmax(210px, auto) 1fr;
	gap: 24px;
	align-items: center;
	padding: 20px 24px;
	margin-bottom: 22px;
	border: 1px solid #b8d8ef;
	border-left: 4px solid #2271b1;
	border-radius: var(--brh-radius);
	background: #f3f8fc;
}
.brh-first-party-label { color: #38566d; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.brh-first-party-value { margin: 3px 0; font-size: 34px; font-weight: 800; line-height: 1.1; }
.brh-first-party-value span { margin-left: 3px; color: var(--brh-muted); font-size: 16px; font-weight: 600; }
.brh-first-party-count { margin-top: 6px; color: var(--brh-muted); font-size: 12.5px; }
.brh-first-party-note { color: #38566d; font-size: 13px; }
.brh-first-party-note strong { color: #1f3f57; }
.brh-first-party-note p { margin: 4px 0 0; }

.brh-summary {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 28px;
	align-items: center;
	background: linear-gradient(135deg, #fafafa, #f3f4f6);
	border: 1px solid var(--brh-border);
	border-radius: var(--brh-radius);
	padding: 22px 26px;
	margin-bottom: 22px;
}
.brh-avg { text-align: center; }
.brh-avg-num { font-size: 42px; font-weight: 800; line-height: 1.1; }
.brh-avg-sub { font-size: 12.5px; color: var(--brh-muted); margin-top: 6px; }

.brh-bars { display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 100%; max-width: 420px; }
.brh-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--brh-muted); }
.brh-bar-label { width: 34px; white-space: nowrap; }
.brh-bar-track { flex: 1; height: 8px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.brh-bar-fill { display: block; height: 100%; background: var(--brh-star-color); border-radius: 6px; }
.brh-bar-n { min-width: 28px; text-align: right; }

.brh-chips { display: flex; flex-direction: column; gap: 8px; }
.brh-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	border: 1px solid var(--brh-border);
	border-radius: 24px;
	padding: 6px 14px;
}
.brh-chip svg { width: 15px; height: 15px; color: var(--brh-c, #64748b); }
.brh-chip-n { color: var(--brh-muted); font-weight: 500; }

@media (max-width: 768px) {
	.brh-first-party-summary { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
	.brh-summary { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
	.brh-chips { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Filters ---------- */
.brh-filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.brh-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.brh-selects select {
	border: 1px solid var(--brh-border);
	border-radius: 10px;
	padding: 7px 10px;
	font-size: 13px;
	background: #fff;
	max-width: 100%;
	color: var(--brh-text);
}

/* ---------- Actions / states ---------- */
.brh-actions { text-align: center; margin-top: 22px; }
.brh-loadmore {
	background: #111827;
	color: #fff;
	border: 0;
	border-radius: 26px;
	padding: 11px 30px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .2s;
}
.brh-loadmore:hover { opacity: .85; }
.brh-loadmore[disabled] { opacity: .5; cursor: wait; }

.brh-empty {
	color: var(--brh-muted);
	text-align: center;
	padding: 26px;
	border: 1px dashed var(--brh-border);
	border-radius: var(--brh-radius);
	margin: 0;
}
.brh-wrap.is-loading .brh-list { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---------- Lightbox ---------- */
.brh-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(10, 12, 16, .92);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}
.brh-lb.is-open { opacity: 1; pointer-events: auto; }
.brh-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.brh-lb button {
	position: absolute;
	background: rgba(255, 255, 255, .12);
	border: 0;
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 22px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.brh-lb button:hover { background: rgba(255, 255, 255, .25); }
.brh-lb-close { top: 18px; right: 18px; }
.brh-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.brh-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Home slider variant ---------- */
.brh-variant-home-slider {
	--brh-radius: 8px;
	position: relative;
	padding: 8px 0 2px;
}
.brh-variant-home-slider .brh-title {
	font-size: clamp(22px, 2.6vw, 34px);
	line-height: 1.2;
	margin: 0 0 18px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--brh-text);
}
.brh-variant-home-slider .brh-carousel-wrap {
	margin-left: -6px;
	margin-right: -6px;
}
.brh-variant-home-slider .brh-list.brh-layout-carousel {
	gap: 18px;
	padding: 6px 6px 22px;
	scroll-padding: 6px;
}
.brh-variant-home-slider .brh-layout-carousel .brh-card {
	flex-basis: clamp(280px, 31vw, 390px);
	border-radius: 8px;
	border-color: rgba(17, 24, 39, .09);
	box-shadow: 0 8px 24px rgba(17, 24, 39, .06);
}
.brh-variant-home-slider .brh-card:hover {
	box-shadow: 0 14px 34px rgba(17, 24, 39, .10);
}
.brh-variant-home-slider .brh-text {
	font-size: 15px;
}
.brh-variant-home-slider .brh-text.is-clamped {
	-webkit-line-clamp: 5;
}
.brh-variant-home-slider .brh-rating {
	margin-top: 2px;
}
.brh-variant-home-slider .brh-product a,
.brh-variant-home-slider .brh-product span {
	border-radius: 6px;
}
.brh-variant-home-slider .brh-nav {
	top: 46%;
	box-shadow: 0 10px 28px rgba(17, 24, 39, .16);
}
.brh-variant-home-slider .brh-prev { left: -4px; }
.brh-variant-home-slider .brh-next { right: -4px; }
.brh-variant-home-slider .brh-disclaimer {
	max-width: 880px;
	margin-top: 4px;
}

@media (max-width: 640px) {
	.brh-variant-home-slider .brh-carousel-wrap { margin-left: 0; margin-right: 0; }
	.brh-variant-home-slider .brh-list.brh-layout-carousel { padding-left: 2px; padding-right: 2px; }
	.brh-variant-home-slider .brh-layout-carousel .brh-card {
		flex-basis: 84vw;
	}
	.brh-variant-home-slider .brh-prev { left: 2px; }
	.brh-variant-home-slider .brh-next { right: 2px; }
}

/* ---------- WooCommerce tab ---------- */
.woocommerce div.product .woocommerce-tabs .panel .brh-tab-title { margin-bottom: 16px; }

/* ---------- Responsive hardening ---------- */
.brh-wrap { max-width: 100%; }
.brh-wrap img { max-width: 100%; }

@media (max-width: 640px) {
	.brh-card { padding: 16px; }
	.brh-list.brh-layout-grid,
	.brh-list.brh-layout-carousel { gap: 14px; }
	.brh-layout-carousel .brh-card { flex-basis: min(320px, 84vw); }
	.brh-lb-close { top: 12px; right: 12px; }
	.brh-lb-prev { left: 8px; }
	.brh-lb-next { right: 8px; }
	.brh-lb img { max-width: 94vw; max-height: 80vh; }
}

@media (max-width: 480px) {
	.brh-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 15px; }
	.brh-name { font-size: 14px; }
	.brh-badge { font-size: 11px; padding: 3px 9px; }
	.brh-text { font-size: 14px; }
	.brh-variant-home-slider .brh-text { font-size: 14px; }
	.brh-photo { width: 56px; height: 56px; }

	.brh-summary { padding: 16px 14px; gap: 14px; }
	.brh-avg-num { font-size: 36px; }

	.brh-filters { flex-direction: column; align-items: stretch; gap: 10px; }
	.brh-selects { width: 100%; }
	.brh-selects select { flex: 1 1 0; min-width: 0; }

	.brh-actions { margin-top: 16px; }
	.brh-loadmore { width: 100%; max-width: 340px; }
}
