/**
 * RiversideHiFi - Product Carousel Styles
 * Unified Styles to match SHOP page exactly.
 * Handles Elementor Widget, Related Products, and Up-Sells.
 */

/* ========================================
   CONTAINER & WRAPPER RESET
======================================== */
.rh-product-carousel,
.related.products.related-carousel-section,
.upsells.products.related-carousel-section {
	padding: 40px 0 !important;
	background-color: transparent !important;
	width: 100% !important;
	border: none !important;
	box-shadow: none !important;
	margin-top: 40px !important;
}

/* Header & Title (Aligned with SHOP style) */
.related-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px !important;
	padding: 0 10px !important;
}

.rh-carousel-title,
.related-header h2 {
	font-size: 1.65rem !important;
	font-weight: 700 !important;
	margin: 0 !important;
	text-align: left !important;
	color: #1f2937 !important;
	position: relative;
	padding-left: 0 !important;
	text-transform: none !important;
	border: none !important;
}

/* Swiper Outer Container */
.rh-carousel-wrapper,
.related-carousel-container {
	position: relative;
	width: 100%;
}

.rh-product-swiper,
.related-products-swiper {
	padding: 10px 5px 60px !important;
	overflow: hidden !important;
}

/* ========================================
   THE UL.PRODUCTS "DISPLAY: CONTENTS" TRICK
   This allows us to keep the standard WooCommerce structure 
   for styling while satisfying Swiper's DOM requirements.
======================================== */
.swiper-wrapper ul.products {
	display: contents !important;
	border: none !important;
	background: none !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.swiper-wrapper ul.products::before,
.swiper-wrapper ul.products::after {
	display: none !important;
}

/* Ensure Slides are clean */
.swiper-slide {
	height: auto !important;
	display: flex !important;
}

/* Standardize the Product LI within Swiper */
.swiper-slide li.product {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	list-style: none !important;
	display: flex !important;
	flex-direction: column !important;
	flex: 1 !important;
}

/* ========================================
   PRODUCT CARD (Perfect SHOP Match)
======================================== */
li.product.rh-product-card {
	background-color: #ffffff !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
	position: relative !important;
	height: 100% !important;
	padding: 0 !important;
}

li.product.rh-product-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
	transform: translateY(-4px) !important;
	border-color: #0EA5E9 !important;
}

/* Image */
.rh-product-image {
	position: relative !important;
	overflow: hidden !important;
	background-color: #f9fafb !important;
}

.rh-product-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1/1 !important;
	object-fit: cover !important;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

li.product.rh-product-card:hover .rh-product-image img {
	transform: scale(1.05) !important;
}

/* Actions Overlay (Blue Button) */
.rh-product-actions {
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	padding: 1rem !important;
	background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent) !important;
	opacity: 0 !important;
	transform: translateY(10px) !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	pointer-events: none !important;
	z-index: 10 !important;
}

li.product.rh-product-card:hover .rh-product-actions {
	opacity: 1 !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

/* SHOP Button Style */
.rh-product-actions .button {
	width: 100% !important;
	padding: 12px 14px !important;
	background: #0EA5E9 !important;
	color: #ffffff !important;
	font-size: 0.875rem !important;
	line-height: 1.1 !important;
	font-weight: 600 !important;
	text-align: center !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	border: none !important;
	border-radius: 5px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.5rem !important;
	box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2) !important;
	margin: 0 !important;
}

.rh-product-actions .button:hover {
	background: #0284c7 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

/* Cart Icon */
.rh-product-actions .button::before {
	content: "" !important;
	display: inline-block !important;
	width: 16px !important;
	height: 16px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6h15l-1.5 9h-12L5 3H3'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E") !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
}

/* Content Area */
.rh-product-content {
	padding: 1rem !important;
	display: flex !important;
	flex-direction: column !important;
	flex-grow: 1 !important;
}

.rh-product-category {
	font-size: 0.75rem !important;
	color: #6b7280 !important;
	margin-bottom: 0.5rem !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
}

.rh-product-title,
.woocommerce-loop-product__title {
	font-size: 1rem !important;
	font-weight: 600 !important;
	margin: 0 0 0.75rem !important;
	line-height: 1.4 !important;
	color: #1f2937 !important;
}

.rh-product-title a,
.woocommerce-loop-product__title a {
	color: inherit !important;
	text-decoration: none !important;
}

.rh-product-title a:hover,
.woocommerce-loop-product__title a:hover {
	color: #0EA5E9 !important;
}

.rh-product-price,
li.product .price {
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	color: #0EA5E9 !important;
	margin-bottom: 0.75rem !important;
	margin-top: auto !important;
	display: block !important;
}

li.product .price del {
	font-size: 0.875rem !important;
	color: #9ca3af !important;
	margin-right: 0.5rem !important;
	font-weight: 500 !important;
}

li.product .price ins {
	text-decoration: none !important;
	color: #ef4444 !important;
}

/* Badges */
.rh-badge,
.onsale {
	position: absolute !important;
	top: 0.75rem !important;
	right: 0.75rem !important;
	padding: 0.375rem 0.75rem !important;
	background: #ef4444 !important;
	color: #ffffff !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	border-radius: 6px !important;
	z-index: 5 !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.rh-badge-featured {
	background: #f59e0b !important;
	top: 3rem !important;
}

/* ========================================
   NAVIGATION & PAGINATION
======================================== */
.carousel-nav {
	display: flex;
	gap: 8px;
}

/* 
.carousel-prev,
.carousel-next {
	width: 38px !important;
	height: 38px !important;
	background: #fff !important;
	border-radius: 50% !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
	color: #1a1a1a !important;
	transition: all 0.3s ease !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 1px solid #eee !important;
	cursor: pointer !important;
}

.carousel-prev:hover,
.carousel-next:hover {
	background: #0EA5E9 !important;
	color: #fff !important;
	border-color: #0EA5E9 !important;
}

.carousel-prev svg,
.carousel-next svg {
	width: 20px;
	height: 20px;
} */

/* Pagination Dots */
.swiper-pagination {
	bottom: 5px !important;
}

.swiper-pagination-bullet {
	width: 6px !important;
	height: 6px !important;
	background: #d1d5db !important;
	opacity: 1 !important;
	margin: 0 4px !important;
	transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
	background: #0EA5E9 !important;
	width: 18px !important;
	border-radius: 3px !important;
}

/* Responsive Fixes */
@media (max-width: 768px) {

	.rh-product-carousel,
	.related.products.related-carousel-section {
		padding: 30px 0 !important;
	}

	.rh-carousel-title,
	.related-header h2 {
		font-size: 1.4rem !important;
	}
}