/* ========================================
   UNIVERSAL PRODUCT CARD STYLES
   Used by: Sliders, Shop, Archive, Category pages
   ======================================== */

/* Product Card Container */
.product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.product-link {
	text-decoration: none;
	color: inherit;
	display: block;
	padding: 0 2px;
}

/* Product Image */
.product-image-wrapper {
	position: relative;
	overflow: hidden;
	aspect-ratio: 3/4;
	margin-bottom: 0.25rem;
}

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

.product-image-wrapper .product-image-primary {
	position: relative;
	z-index: 1;
}

.product-image-wrapper .product-image-secondary {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	z-index: 2;
}

/* Hover effect only on desktop (1024px+) */
@media (min-width: 1024px) {
	.product-link:hover .product-image-wrapper .product-image-primary {
		opacity: 0;
	}

	.product-link:hover .product-image-wrapper .product-image-secondary {
		opacity: 1;
	}
}

/* Product badge stack */
.product-badge-stack {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.25rem;
	width: clamp(4.75rem, 14vw, 6.75rem);
	z-index: 10;
}

.product-badge-stack .sale-badge {
	position: static;
	background-color: #dc2626;
	color: white;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 1.85rem;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: center;
	box-sizing: border-box;
	font-size: 0.68rem;
	line-height: 1.15;
}

.product-badge-stack .discount-pct-badge {
	background-color: #000;
}

.product-badge-stack .sale-badge--coupon-code {
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
	white-space: normal;
	overflow-wrap: anywhere;
}

@media screen and (max-width: 640px) {
	.product-badge-stack .sale-badge {
		font-size: 8px;
		min-height: 1.2rem;
		padding: 0.2rem 0.4rem;
		line-height: 1.1;
	}

	.product-badge-stack .sale-badge--coupon-code,
	.product-badge-stack .discount-pct-badge--coupon {
		font-size: 8px !important;
	}

	.product-badge-stack .sale-badge--coupon-code {
		min-height: 1.2rem !important;
		padding: 0.2rem 0.4rem;
		line-height: 1.1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

.product-badge-stack .discount-pct-badge--coupon {
	background-color: #000;
	text-transform: none;
}

.product-badge-stack .sale-badge--promo {
	background: #f3e8d7;
	color: #3b2b1f;
	border: 1px solid rgba(59, 43, 31, 0.18);
}

/* Product Rating */
.product-rating {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	min-height: 20px;
}

.product-rating .stars {
	display: flex;
	gap: 0.125rem;
	line-height: 1;
}

.product-rating .star {
	font-size: 16px;
	line-height: 1;
}

.product-rating .star.filled {
	color: #d5a676;
}

.product-rating .star.empty {
	color: #d1d5db;
}

.product-rating .rating-text {
	font-size: 0.875rem;
	color: #4b5563;
	font-weight: 500;
}

/* Stars between subtitle and product info row */
.product-card .stars {
	position: static;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 10px;
	flex-wrap: nowrap;
	margin-top: 0.4rem;
	margin-bottom: 0.35rem;
}

.product-card .stars .rating-number {
	font-weight: 600;
	color: #333;
}

.product-card .stars .rating-count {
	color: #666;
}

.product-card .stars .rating-stars {
	display: inline-flex;
	gap: 1px;
}

.product-card .stars .rating-stars .star {
	font-size: 10px;
	line-height: 1;
}

@media (min-width: 640px) {
	.product-card .stars .rating-stars .star {
		font-size: 12px;
	}
}

.product-card .stars .rating-stars .star.filled {
	color: #d5a676;
}

.product-card .stars .rating-stars .star.empty {
	color: #d1d5db;
}

/* Product Title */
.product-title {
	font-size: 14px;
	font-weight: 300;
	text-transform: uppercase;
	margin-bottom: 0;
	color: #333;
	line-height: 1.4;
	text-align: left;
	flex: 1 1 50%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Slider Product Title (ACF custom name) */
.slider-product-title {
	font-size: 24px;
	font-weight: 500;
	/* text-transform: uppercase; */
	margin-bottom: 0;
	color: #333;
	line-height: 1.4;
	text-align: left;
	font-family: 'Playfair Display', serif;
}

.slider-product-subtitle {
	font-size: 14px;
	font-weight: 300;
	color: #715037;
	margin: 2px 0 0 0;
	line-height: 1.3;
	text-align: left;
}

.color-swatch {
	width: 25px !important;
	height: 25px !important;
	border-radius: 50% !important;
	display: inline-block !important;
	cursor: pointer;
	transition: transform 0.2s ease;
	border: 1px solid #333333 !important;
}

@media screen and (max-width: 640px) {
	.slider-product-title {
		font-size: 18px;
	}

	.slider-product-subtitle {
		font-size: 10px;
		font-family: 'Inter', sans-serif;
		letter-spacing: -0.02em;
		font-weight: 400;
	}

	.product-banner-image {
		display: none;
	}

	.color-swatch {
		width: 20px !important;
		height: 20px !important;
	}
}

.product-banner-payment-wrapper img.feature-image {
	outline: 2px solid white;
	outline-offset: -1px;
}
/* Product Colors */
.product-colors {
	margin: 8px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.product-title-wrapper {
	flex: 1 1 50%;
	min-width: 0;
}

/* Product Price */
.product-price {
	font-size: 0.875rem;
	font-weight: 300;
	color: #000;
	margin-bottom: 0;
	flex: 0 0 auto;
	white-space: nowrap;
	padding-top: 10px;
	display: flex;
}

.product-price del {
	opacity: 0.5;
	margin-right: 0.5rem;
	font-weight: 400;
}

.product-price ins {
	text-decoration: none;
	color: #000;
}

/* Add to Cart Button */
.add-to-cart-btn {
	display: block;
	text-align: center;
	padding: 0.5rem 1rem;
	background-color: #000;
	color: #fff;
	text-transform: uppercase;
	font-size: 0.875rem;
	font-weight: 600;
	transition: background-color 0.2s ease;
	cursor: pointer;
	border: none;
	margin-top: auto;
}

.add-to-cart-btn:hover {
	background-color: #374151;
}

/* ========================================
   WOOCOMMERCE SPECIFIC OVERRIDES
   ======================================== */

/* WooCommerce product list (shop/archive) */
.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
}

/* Ensure WooCommerce uses our card structure */
.woocommerce ul.products li.product .product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Hide default WooCommerce elements that we replaced */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .star-rating,
.woocommerce ul.products li.product .button {
	display: none !important;
}

.review-author-info .verfied {
	font-weight: 300;
}

/* ========================================
   WISHLIST HEART BUTTON
   ======================================== */

.product-card {
	position: relative;
}

.wishlist-heart-btn {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 20;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	pointer-events: auto !important;
	-webkit-tap-highlight-color: transparent;
}

.wishlist-heart-btn:hover {
	background: #fff;
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wishlist-heart-btn .heart-icon {
	color: #666;
	transition: all 0.2s ease;
}

.wishlist-heart-btn:hover .heart-icon {
	color: #e91e63;
}

.wishlist-heart-btn.in-wishlist .heart-icon {
	color: #e91e63;
	fill: #e91e63;
}

.wishlist-heart-btn.loading {
	pointer-events: none;
	opacity: 0.7;
}

.wishlist-heart-btn.loading .heart-icon {
	animation: heartPulse 0.6s ease-in-out infinite;
}

@keyframes heartPulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
	}
}

/* Mobile adjustments */
@media (max-width: 640px) {
	.wishlist-heart-btn {
		width: 32px;
		height: 32px;
	}

	.wishlist-heart-btn .heart-icon {
		width: 16px;
		height: 16px;
	}
}

/* Move sale badge to left when wishlist button is present */
.product-card .sale-badge {
	left: 0.5rem;
	right: auto;
}
