/* Crebi Social Proof & Recently Viewed — Recently Viewed Panel (Front-end) */

.crebi-spv-rv-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #f4f6f9;
	color: #1b2333;
	border: none;
	cursor: pointer;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.crebi-spv-rv-trigger:hover {
	background-color: #e9ecf2;
}

.crebi-spv-rv-trigger i,
.crebi-spv-rv-trigger svg {
	display: inline-flex;
	width: 16px;
	height: 16px;
}

/* Panel */
.crebi-spv-rv-panel {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.crebi-spv-rv-panel.is-open {
	visibility: visible;
	pointer-events: auto;
}

.crebi-spv-rv-panel__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(17, 22, 33, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.crebi-spv-rv-panel.is-open .crebi-spv-rv-panel__overlay {
	opacity: 1;
}

.crebi-spv-rv-panel__inner {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 380px;
	max-width: 92vw;
	background-color: #ffffff;
	display: flex;
	flex-direction: column;
	box-shadow: -6px 0 24px rgba(0, 0, 0, 0.15);
	transition: transform 0.3s ease;
}

.crebi-spv-rv-panel--right .crebi-spv-rv-panel__inner {
	right: 0;
	transform: translateX(100%);
}

.crebi-spv-rv-panel--left .crebi-spv-rv-panel__inner {
	left: 0;
	transform: translateX(-100%);
	box-shadow: 6px 0 24px rgba(0, 0, 0, 0.15);
}

.crebi-spv-rv-panel.is-open .crebi-spv-rv-panel__inner {
	transform: translateX(0);
}

.crebi-spv-rv-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background-color: #f4f6f9;
	flex-shrink: 0;
}

.crebi-spv-rv-panel__title {
	font-size: 16px;
	font-weight: 600;
	color: #1b2333;
}

.crebi-spv-rv-panel__close {
	background: none;
	border: none;
	cursor: pointer;
	color: #4b5566;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
}

.crebi-spv-rv-panel__close svg {
	width: 18px;
	height: 18px;
}

.crebi-spv-rv-panel__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 20px;
}

.crebi-spv-rv-panel__loading {
	text-align: center;
	color: #8a94a6;
	font-size: 13px;
	padding: 40px 0;
}

.crebi-spv-rv-empty {
	text-align: center;
	color: #8a94a6;
	font-size: 13px;
	padding: 40px 10px;
}

/* Product card */
@keyframes crebiSpvRvItemIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.crebi-spv-rv-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid #e6e9ee;
	border-radius: 10px;
	margin-bottom: 14px;
	animation: crebiSpvRvItemIn 0.3s ease both;
	transition: box-shadow 0.15s ease;
}

.crebi-spv-rv-item:hover {
	box-shadow: 0 3px 10px rgba(17, 22, 33, 0.06);
}

.crebi-spv-rv-item:nth-child(1) { animation-delay: 0.02s; }
.crebi-spv-rv-item:nth-child(2) { animation-delay: 0.06s; }
.crebi-spv-rv-item:nth-child(3) { animation-delay: 0.10s; }
.crebi-spv-rv-item:nth-child(4) { animation-delay: 0.14s; }
.crebi-spv-rv-item:nth-child(5) { animation-delay: 0.18s; }
.crebi-spv-rv-item:nth-child(n+6) { animation-delay: 0.22s; }

.crebi-spv-rv-item__link {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	text-decoration: none;
	min-width: 0;
}

.crebi-spv-rv-item__image,
.crebi-spv-rv-item__img {
	width: 70px;
	height: 70px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	object-fit: cover;
	display: block;
}

.crebi-spv-rv-item__image img {
	transition: transform 0.25s ease;
}

.crebi-spv-rv-item:hover .crebi-spv-rv-item__image img {
	transform: scale(1.06);
}

.crebi-spv-rv-item__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.crebi-spv-rv-item__title {
	font-size: 13px;
	color: #1b2333;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crebi-spv-rv-item__price {
	font-size: 13px;
	font-weight: 600;
	color: #2d6cdf;
}

.crebi-spv-rv-item__rating {
	font-size: 12px;
}

.crebi-spv-rv-item__add-to-cart {
	flex-shrink: 0;
	background-color: #2d6cdf;
	color: #ffffff;
	border: 1px solid #2d6cdf;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	text-decoration: none;
	white-space: nowrap;
}

.crebi-spv-rv-item__add-to-cart.loading {
	opacity: 0.6;
	pointer-events: none;
}

.crebi-spv-rv-item__add-to-cart.added::after {
	content: '\2713';
	margin-left: 4px;
}

/* Body scroll lock helper applied via JS */
body.crebi-spv-rv-lock {
	overflow: hidden;
}
