/* ============================================================
 * BagFinder Reviews v1.2.0 — Cinematic Noir Luxury
 * All rules scoped under .bf-rev (plus the standalone lightbox).
 * Transform/opacity-only motion; no external requests.
 * v1.1.0: text testimonial cards + video testimonial cards.
 * v1.2.0: step-through slider (one item at a time, arrows, 9s
 *          auto-advance) + "Related guide" article link under cards.
 * ============================================================ */

/* ---------- Widget shell ---------- */
.bf-rev {
	--bf-espresso: #0c0a08;
	--bf-coal: #171310;
	--bf-champagne: #d8b87e;
	--bf-cream: #f3ead9;
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	margin: 2.5rem auto;
	padding: 20px 16px 16px;
	background: rgba(12, 10, 8, 0.94);
	border: 1px solid rgba(216, 184, 126, 0.35);
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
	color: var(--bf-cream);
	/* JS toggles .bf-rev-visible; hidden until the article scrolls into view
	   on desktop. <noscript> in the markup keeps it visible without JS. */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.bf-rev.bf-rev-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.bf-rev *,
.bf-rev *::before,
.bf-rev *::after {
	box-sizing: border-box;
}

.bf-rev-title {
	font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	font-weight: 600;
	font-size: 1.45rem;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: var(--bf-champagne);
	text-align: center;
	margin: 0 0 14px;
	padding: 0;
}

/* ---------- Step-through viewport (v1.2.0: one item at a time) ---------- */
.bf-rev-viewport {
	overflow: hidden;
	border-radius: 10px;
}

.bf-rev-track {
	display: flex;
	will-change: transform;
	transition: transform 0.45s ease;
}

.bf-rev-item {
	flex: 0 0 100%;
	max-width: 100%;
}

/* ---------- Review cards ---------- */
.bf-rev-card {
	margin: 0;
	padding: 0;
	background: var(--bf-coal);
	border: 1px solid rgba(216, 184, 126, 0.22);
	border-radius: 12px;
	overflow: hidden;
	cursor: zoom-in;
	flex: 0 0 auto;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bf-rev-card:hover,
.bf-rev-card:focus-visible {
	border-color: rgba(216, 184, 126, 0.65);
	box-shadow: 0 8px 26px rgba(216, 184, 126, 0.12);
	outline: none;
}

.bf-rev-img {
	display: block;
	width: 100%;
	height: auto;
}

.bf-rev-cap {
	margin: 0;
	padding: 9px 12px;
	font-size: 0.82rem;
	line-height: 1.45;
	text-align: center;
	color: var(--bf-cream);
	opacity: 0.85;
}

/* ---------- Desktop: fixed rail that travels with the article ---------- */
@media (min-width: 1200px) {
	.bf-rev {
		position: fixed;
		right: 22px;
		top: 50%;
		transform: translateY(-50%);
		width: 210px;
		max-width: none;
		margin: 0;
		padding: 16px 12px 12px;
		z-index: 150;
	}

	.bf-rev-title {
		font-size: 1.15rem;
		margin-bottom: 10px;
	}
}

/* ---------- Lightbox (no libraries) ---------- */
.bf-rev-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(5, 4, 3, 0.94);
	padding: 60px 70px;
}

.bf-rev-lightbox.bf-rev-lb-open {
	display: flex;
}

.bf-rev-lb-img {
	max-width: min(92vw, 880px);
	max-height: 86vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	border: 1px solid rgba(216, 184, 126, 0.4);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
	background: #0c0a08;
}

.bf-rev-lb-close,
.bf-rev-lb-prev,
.bf-rev-lb-next {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(12, 10, 8, 0.75);
	border: 1px solid rgba(216, 184, 126, 0.55);
	color: #d8b87e;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.25s ease;
}

.bf-rev-lb-close:hover,
.bf-rev-lb-prev:hover,
.bf-rev-lb-next:hover {
	background: rgba(216, 184, 126, 0.18);
	transform: scale(1.06);
}

.bf-rev-lb-close {
	top: 18px;
	right: 18px;
}

.bf-rev-lb-prev {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.bf-rev-lb-next {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.bf-rev-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.bf-rev-lb-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 640px) {
	.bf-rev-lightbox {
		padding: 54px 12px;
	}
	.bf-rev-lb-prev { left: 6px; }
	.bf-rev-lb-next { right: 6px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.bf-rev-track {
		transition: none;
	}
	.bf-rev {
		transition: none;
	}
}

/* ============================================================
 * v1.1.0 — Text testimonial cards
 * ============================================================ */
.bf-rev-text-card {
	padding: 18px 16px 14px;
	cursor: default;
	text-align: left;
}

.bf-rev-quote-mark {
	display: block;
	font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	font-size: 3.2rem;
	line-height: 0.8;
	color: var(--bf-champagne);
	margin-bottom: 8px;
}

.bf-rev-text {
	font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	font-style: italic;
	font-size: 1.02rem;
	line-height: 1.55;
	color: var(--bf-cream);
}

.bf-rev-text p {
	margin: 0 0 0.7em;
}

.bf-rev-text p:last-child {
	margin-bottom: 0;
}

.bf-rev-attr {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(216, 184, 126, 0.18);
}

.bf-rev-photo {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid rgba(216, 184, 126, 0.55);
	flex: 0 0 auto;
}

.bf-rev-name {
	font-style: normal;
	font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	font-size: 0.85rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bf-champagne);
}

/* ============================================================
 * v1.1.0 — Video testimonial cards
 * ============================================================ */
.bf-rev-video-wrap {
	position: relative;
}

.bf-rev-video-ph {
	aspect-ratio: 4 / 3;
	background: radial-gradient(circle at 50% 38%, #261d13 0%, #0c0a08 78%);
}

.bf-rev-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 58px;
	height: 58px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(12, 10, 8, 0.72);
	border: 2px solid var(--bf-champagne);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: transform 0.25s ease, background 0.25s ease;
}

.bf-rev-play::after {
	content: "";
	margin-left: 5px;
	border-left: 16px solid var(--bf-champagne);
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

.bf-rev-video-card:hover .bf-rev-play,
.bf-rev-video-card:focus-visible .bf-rev-play {
	transform: translate(-50%, -50%) scale(1.08);
	background: rgba(216, 184, 126, 0.22);
}

/* ============================================================
 * v1.1.0 — Lightbox video player
 * ============================================================ */
.bf-rev-lb-video {
	max-width: min(92vw, 880px);
	max-height: 86vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	border: 1px solid rgba(216, 184, 126, 0.4);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
	background: #0c0a08;
}

/* ============================================================
 * v1.2.0 — Step-through nav + related-article link
 * ============================================================ */
.bf-rev-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 12px;
}

.bf-rev-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(12, 10, 8, 0.72);
	border: 1px solid rgba(216, 184, 126, 0.55);
	color: #d8b87e;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.25s ease;
	padding: 0 0 2px;
}

.bf-rev-arrow:hover,
.bf-rev-arrow:focus-visible {
	background: rgba(216, 184, 126, 0.18);
	transform: scale(1.07);
	outline: none;
}

.bf-rev-count {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	color: rgba(243, 234, 217, 0.72);
	min-width: 52px;
	text-align: center;
}

/* "Related guide:" link under each testimonial card */
.bf-rev-article-link {
	display: block;
	margin-top: 10px;
	padding: 9px 12px;
	border: 1px dashed rgba(216, 184, 126, 0.42);
	border-radius: 10px;
	color: var(--bf-champagne);
	text-decoration: none;
	font-size: 0.85rem;
	line-height: 1.5;
	transition: background 0.25s ease, border-color 0.25s ease;
}

.bf-rev-article-link:hover,
.bf-rev-article-link:focus-visible {
	background: rgba(216, 184, 126, 0.1);
	border-color: rgba(216, 184, 126, 0.75);
	outline: none;
}

.bf-rev-article-label {
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.75;
	margin-bottom: 2px;
}
