/* Product card styles. */
.xj-product-card {
	position: relative;
}

.xj-product-card__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--xj-color-border);
	border-radius: var(--xj-radius-lg);
	background: var(--xj-color-surface);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.xj-product-card__inner:hover,
.xj-product-card__inner:focus-within {
	border-color: rgba(111, 168, 220, 0.25);
	box-shadow: var(--xj-shadow-lg);
	transform: translateY(-3px);
}

.xj-product-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.xj-product-card__media {
	position: relative;
	flex: 0 0 auto;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: var(--xj-color-surface-soft);
}

.xj-product-card__image,
.woocommerce ul.products li.product .xj-product-card__image {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 250ms ease;
}

.xj-product-card__image--deferred {
	background: var(--xj-color-surface-soft);
	opacity: 0.01;
}

.xj-product-card__inner:hover .xj-product-card__image,
.xj-product-card__inner:focus-within .xj-product-card__image {
	transform: scale(1.05);
}

.xj-product-card__badge {
	position: absolute;
	z-index: 3;
	left: 0.55rem;
	max-width: calc(100% - 1rem);
	color: #ffffff;
	font-family: var(--xj-font-price);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.34rem 0.52rem;
}

.xj-product-card__badge--sale {
	top: 0.55rem;
	border-radius: 999px;
	background: #e84b78;
	box-shadow: 0 0.2rem 0.55rem rgba(232, 75, 120, 0.22);
}

.xj-product-card__badge--stock {
	bottom: 0;
	border-top-right-radius: var(--xj-radius-sm);
	background: rgba(26, 42, 58, 0.82);
}

.xj-product-card__colors {
	position: absolute;
	z-index: 3;
	right: 0.5rem;
	bottom: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.xj-product-card__colors span {
	display: block;
	width: 0.9rem;
	height: 0.9rem;
	border: 1px solid rgba(255, 255, 255, 0.82);
	border-radius: 50%;
	background: var(--xj-swatch, linear-gradient(135deg, #f9c0cc 0%, #93c5fd 100%));
	box-shadow: 0 1px 4px rgba(26, 42, 58, 0.16);
}

.xj-product-card__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 6.55rem;
	padding: 0.72rem 0.72rem 2.65rem;
}

.xj-product-card__title,
.woocommerce ul.products li.product .xj-product-card__title {
	margin: 0;
	padding: 0;
	color: var(--xj-color-text);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.35;
	min-height: 2.16em;
}

.xj-product-card__title a {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.xj-product-card__rating {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 0.95rem;
	margin-top: 0.28rem;
	color: var(--xj-color-text-soft);
	font-size: 0.68rem;
}

.xj-product-card__rating span:not(.star-rating),
.xj-product-card__rating .star-rating::before,
.xj-product-card__rating .star-rating span::before {
	color: #f5c342;
}

.xj-product-card__rating .screen-reader-text {
	display: none !important;
}

.xj-product-card__rating .star-rating,
.woocommerce .xj-product-card__rating .star-rating {
	float: none;
	width: 4.9em;
	height: 1em;
	margin: 0;
	color: #f5c342;
	font-size: 0.72rem;
}

.xj-product-card__price-row {
	position: absolute;
	right: 10px;
	bottom: 10px;
	left: 10px;
	display: flex;
	align-items: center;
	gap: var(--xj-space-2);
	margin-top: 0;
}

.xj-product-card__price,
.woocommerce ul.products li.product .xj-product-card__price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	margin: 0;
	color: var(--xj-color-text);
	font-family: var(--xj-font-price);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.xj-product-card__price del {
	color: #b0bfd0;
	font-size: 0.82rem;
	font-weight: 500;
	opacity: 1;
}

.xj-product-card__price ins {
	background: transparent;
	font-weight: 700;
	text-decoration: none;
}

.xj-product-card__price .woocommerce-Price-amount,
.woocommerce ul.products li.product .xj-product-card__price .woocommerce-Price-amount,
.woocommerce ul.products li.product .price .woocommerce-Price-amount {
	font-family: var(--xj-font-price);
	font-weight: 700;
}

.xj-product-card__price .woocommerce-Price-currencySymbol {
	font-size: 0.95rem;
}

.xj-product-card__price-decimal {
	font-size: 0.68em;
	line-height: 1;
}

.xj-product-card__virtual-list-price {
	display: inline-flex;
	align-items: baseline;
	color: #9ca8b7;
	font-family: var(--xj-font-price);
	font-size: 0.72em;
	font-weight: 600;
	line-height: 1;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	white-space: nowrap;
}

.xj-product-card__virtual-list-price .woocommerce-Price-amount,
.woocommerce ul.products li.product .xj-product-card__virtual-list-price .woocommerce-Price-amount {
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.xj-product-card__cart {
	position: relative;
	z-index: 3;
	display: inline-flex;
	margin-left: auto;
}

.xj-product-card__cart .button,
.woocommerce ul.products li.product .xj-product-card__cart .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	min-width: 1.35rem;
	overflow: hidden;
	margin: 0;
	border: 0;
	border-radius: var(--xj-radius-pill);
	background: transparent;
	color: transparent;
	box-shadow: none;
	font-size: 0;
	line-height: 1;
	padding: 0;
	transition: opacity 160ms ease, transform 160ms ease;
}

.xj-product-card__cart .button::before {
	display: block;
	width: 100%;
	height: 100%;
	background: url("../icons/cart-circle.svg") center / contain no-repeat;
	content: "";
}

.xj-product-card__cart .button.product_type_variable::before,
.xj-product-card__cart .button.product_type_grouped::before,
.xj-product-card__cart .button.product_type_external::before {
	background-image: url("../icons/cart-circle.svg");
}

.xj-product-card__cart .button:hover,
.xj-product-card__cart .button:focus {
	opacity: 0.82;
	transform: translateY(-1px);
}

.xj-product-card__cart .button.loading {
	opacity: 0.72;
}

.xj-product-card__cart .added_to_cart {
	position: absolute;
	right: 0;
	bottom: calc(100% + 0.35rem);
	width: max-content;
	border-radius: var(--xj-radius-pill);
	background: var(--xj-color-success);
	color: #ffffff;
	font-size: 0.68rem;
	font-weight: 800;
	padding: 0.32rem 0.65rem;
}

.xj-product-card.outofstock .xj-product-card__media img {
	filter: grayscale(0.15);
	opacity: 0.74;
}

@media (max-width: 38rem) {
	.xj-product-card__content {
		min-height: 6.1rem;
		padding: 0.62rem 0.62rem 2.45rem;
	}

	.xj-product-card__title,
	.woocommerce ul.products li.product .xj-product-card__title {
		font-size: 0.76rem;
		line-height: 1.32;
	}

	.xj-product-card__price,
	.woocommerce ul.products li.product .xj-product-card__price {
		font-size: 18px;
	}

	.xj-product-card__cart .button,
	.woocommerce ul.products li.product .xj-product-card__cart .button {
		width: 1.28rem;
		height: 1.28rem;
		min-width: 1.28rem;
	}
}

.xj-product-card__cart .button,
.woocommerce ul.products li.product .xj-product-card__cart .button,
.xj-product-card__badge,
.xj-product-card__discount {
	font-family: var(--xj-font-button);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: uppercase;
}

