/**
 * TP4R Recently Viewed Styles
 */

/* Wrapper */
.tp4r-rv-wrapper {
	margin: 40px auto !important;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
}

/* Header */
.tp4r-rv-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}

.tp4r-rv-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
}

/* Clear Button */
.tp4r-rv-clear {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	color: #6b7280;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tp4r-rv-clear:hover {
	background: #fee2e2;
	border-color: #fca5a5;
	color: #dc2626;
}

.tp4r-rv-clear .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Loading */
.tp4r-rv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px;
	color: #6b7280;
}

.tp4r-spin {
	animation: tp4r-spin 1s linear infinite;
}

@keyframes tp4r-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Empty State */
.tp4r-rv-empty {
	text-align: center;
	padding: 60px 20px;
	color: #9ca3af;
}

.tp4r-rv-empty .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.tp4r-rv-empty p {
	margin: 0;
	font-size: 16px;
}

/* Content Container */
.tp4r-rv-content {
	position: relative;
}

/* ===================
   Minimal Card Style
   =================== */
.tp4r-rv-card--minimal {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	transition: all 0.3s ease;
}

.tp4r-rv-card--minimal:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.tp4r-rv-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.tp4r-rv-card__image {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f9fafb;
}

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

.tp4r-rv-card--minimal:hover .tp4r-rv-card__image img {
	transform: scale(1.05);
}

.tp4r-rv-card__info {
	padding: 12px;
	text-align: center;
}

.tp4r-rv-card__title {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #111827;
}

.tp4r-rv-card__price {
	font-size: 14px;
	font-weight: 700;
	color: var(--tp4r-color-price, #d9a23b);
}

.tp4r-rv-card__price del {
	color: #9ca3af;
	font-weight: 400;
	font-size: 12px;
}

.tp4r-rv-card__price ins {
	text-decoration: none;
}

/* ===================
   Display Styles
   =================== */

/* Grid Style */
.tp4r-rv-wrapper--grid .tp4r-rv-products {
	display: grid;
	grid-template-columns: repeat(var(--rv-cols-desktop, 6), 1fr);
	gap: 20px;
}

/* Scroll Style */
.tp4r-rv-wrapper--scroll .tp4r-rv-products {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db transparent;
	padding-bottom: 10px;
}

.tp4r-rv-wrapper--scroll .tp4r-rv-products::-webkit-scrollbar {
	height: 6px;
}

.tp4r-rv-wrapper--scroll .tp4r-rv-products::-webkit-scrollbar-track {
	background: transparent;
}

.tp4r-rv-wrapper--scroll .tp4r-rv-products::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 3px;
}

.tp4r-rv-wrapper--scroll .tp4r-rv-card {
	flex: 0 0 180px;
	min-width: 180px;
}

/* Carousel Style */
.tp4r-rv-wrapper--carousel .tp4r-rv-products {
	position: relative;
}

.tp4r-rv-wrapper--carousel .owl-nav {
	position: absolute;
	top: 35%;
	width: 100%;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	transform: translateY(-50%);
}

.tp4r-rv-wrapper--carousel .owl-nav button {
	pointer-events: auto;
	width: 40px;
	height: 40px;
	background: #fff !important;
	border-radius: 50% !important;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	display: grid !important;
	place-items: center;
	transition: all 0.2s ease;
	border: none !important;
}

.tp4r-rv-wrapper--carousel .owl-nav button:hover {
	background: #f3f4f6 !important;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tp4r-rv-wrapper--carousel .owl-nav button .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #333;
}

.tp4r-rv-wrapper--carousel .owl-nav .owl-prev {
	margin-left: -20px;
}

.tp4r-rv-wrapper--carousel .owl-nav .owl-next {
	margin-right: -20px;
}

.tp4r-rv-wrapper--carousel.tp4r-rtl .owl-nav .owl-prev {
	margin-left: 0;
	margin-right: -20px;
}

.tp4r-rv-wrapper--carousel.tp4r-rtl .owl-nav .owl-next {
	margin-right: 0;
	margin-left: -20px;
}

.tp4r-rv-wrapper--carousel .owl-nav .disabled {
	opacity: 0.3;
	cursor: default;
}

.tp4r-rv-wrapper--carousel .owl-dots {
	text-align: center;
	margin-top: 20px;
}

.tp4r-rv-wrapper--carousel .owl-dots .owl-dot {
	display: inline-block;
	margin: 0 5px;
}

.tp4r-rv-wrapper--carousel .owl-dots .owl-dot span {
	width: 10px;
	height: 10px;
	background: #d1d5db;
	border-radius: 50%;
	display: block;
	transition: all 0.2s ease;
}

.tp4r-rv-wrapper--carousel .owl-dots .owl-dot.active span {
	background: var(--tp4r-color-price, #d9a23b);
	transform: scale(1.2);
}

/* ===================
   Responsive
   =================== */
@media (max-width: 1024px) {
	.tp4r-rv-wrapper--grid .tp4r-rv-products {
		grid-template-columns: repeat(var(--rv-cols-tablet, 4), 1fr);
	}

	.tp4r-rv-wrapper--scroll .tp4r-rv-card {
		flex: 0 0 160px;
		min-width: 160px;
	}
}

@media (max-width: 768px) {
	.tp4r-rv-wrapper--grid .tp4r-rv-products {
		grid-template-columns: repeat(var(--rv-cols-mobile, 2), 1fr);
	}

	.tp4r-rv-wrapper--scroll .tp4r-rv-card {
		flex: 0 0 140px;
		min-width: 140px;
	}

	.tp4r-rv-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.tp4r-rv-title {
		font-size: 20px;
	}

	.tp4r-rv-wrapper--carousel .owl-nav button {
		width: 32px;
		height: 32px;
	}

	.tp4r-rv-wrapper--carousel .owl-nav .owl-prev {
		margin-left: -10px;
	}

	.tp4r-rv-wrapper--carousel .owl-nav .owl-next {
		margin-right: -10px;
	}
}

/* RTL Support */
.tp4r-rv-wrapper.tp4r-rtl {
	direction: rtl;
}

/* Hide empty elements */
.tp4r-rv-products > p:empty,
.tp4r-rv-products > br {
	display: none !important;
}

