/* ============================================================
   RECENTLY VIEWED BUTTON
   ============================================================ */
.recently-viewed-section {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 30px;
	align-items: center;
}

.rv-toggle-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 12px 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
	position: relative;
	z-index: 10;
}

.rv-toggle-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.rv-toggle-button.active {
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.rv-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.rv-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
}

.rv-button-text {
	white-space: nowrap;
}

/* ============================================================
   RECENTLY VIEWED CONTAINER - SHOP PAGE
   ============================================================ */
.rv-container {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 30px;
	margin-bottom: 40px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	animation: rvSlideDown 0.3s ease-out;
}

@keyframes rvSlideDown {
	from {
		opacity: 0;
		transform: translateY(-15px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.rv-products-wrapper {
	width: 100%;
}

.rv-section-title {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin: 0 0 25px 0;
	padding-bottom: 15px;
	border-bottom: 3px solid #667eea;
	display: inline-block;
}

.rv-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
}

.rv-product-item {
	background: #f9f9f9;
	border: 1px solid #efefef;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.rv-product-item:hover {
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
	transform: translateY(-4px);
	border-color: #667eea;
	background: #fff;
}

.rv-product-image {
	width: 100%;
	height: 140px;
	background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.rv-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.rv-product-item:hover .rv-product-image img {
	transform: scale(1.08);
}

.rv-no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 12px;
	background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
}

.rv-product-info {
	padding: 12px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.rv-product-title {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	margin: 0 0 6px 0;
	line-height: 1.3;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rv-product-price {
	font-size: 14px;
	color: #667eea;
	font-weight: 700;
	margin-bottom: 8px;
	line-height: 1;
}

.rv-product-price del {
	color: #999;
	font-size: 12px;
	margin-right: 4px;
}

.rv-product-link {
	display: inline-block;
	padding: 8px 12px;
	background: #667eea;
	color: #fff;
	border: none;
	border-radius: 4px;
	text-decoration: none;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	box-sizing: border-box;
}

.rv-product-link:hover {
	background: #5568d3;
	transform: translateY(-1px);
}

/* ============================================================
   RECENTLY VIEWED CONTAINER - SINGLE PRODUCT PAGE
   ============================================================ */
.rv-container-single {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 30px;
	margin: 40px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	animation: rvSlideDown 0.3s ease-out;
}

.rv-container-single .rv-products-grid {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}

/* ============================================================
   RECENTLY VIEWED COUNT DISPLAY
   ============================================================ */
.recently-viewed-count-display {
	padding: 10px 18px;
	background: linear-gradient(135deg, #f5f7ff 0%, #f9f5ff 100%);
	border: 1px solid #e0d4ff;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #667eea;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

#rv-count-display {
	background: #667eea;
	color: #fff;
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 700;
	min-width: 24px;
	text-align: center;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
	.rv-products-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 15px;
	}

	.rv-container {
		padding: 20px;
	}

	.rv-button-text {
		display: none;
	}

	.rv-toggle-button {
		padding: 10px 14px;
	}

	.rv-product-image {
		height: 120px;
	}

	.rv-product-title {
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.rv-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.rv-section-title {
		font-size: 16px;
	}

	.rv-container {
		padding: 15px;
	}

	.rv-product-item {
		border-radius: 6px;
	}

	.rv-product-image {
		height: 100px;
	}

	.rv-product-info {
		padding: 10px;
	}
}
