/* The native main catalog loop opts in; other WooCommerce cards keep their owners. */
.catalog-archive ul.products li.product.r5-catalog-card {
	--r5-card-brand: #19118c;
	--r5-card-line: #ececec;
	position: relative;
	z-index: 0;
	display: flex;
	min-width: 0;
	min-height: 490px;
	padding: 25px;
	border-right-color: var(--r5-card-line);
	border-bottom-color: var(--r5-card-line);
	background: #fff;
	overflow: visible;
}
.r5-catalog-card__body {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	width: 100%;
	min-width: 0;
}
.catalog-archive ul.products li.product.r5-catalog-card .woocommerce-loop-product__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	text-decoration: none;
}
.r5-catalog-card__media {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 100%;
	margin: 0 0 20px;
	aspect-ratio: 1;
	background: #fff;
	overflow: hidden;
}
.catalog-archive ul.products li.product.r5-catalog-card .r5-catalog-card__media img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
	aspect-ratio: 1;
	object-fit: contain;
	background: #fff;
}
.r5-catalog-card__rating { min-height: 20px; margin: 0 0 8px; font-size: 12px; line-height: 20px; }
.r5-catalog-card__stars { color: #d8d8d8; font-size: 18px; line-height: 20px; letter-spacing: -1px; }
.r5-catalog-card__rating .star-rating { float: none; margin: 0; color: var(--r5-card-brand); }
.catalog-archive ul.products li.product.r5-catalog-card .woocommerce-loop-product__title {
	min-height: 0;
	margin: 0;
	padding: 0;
	color: #333;
	font: 400 14px/25px Montserrat, Arial, sans-serif;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}
.catalog-archive ul.products li.product.r5-catalog-card a:hover .woocommerce-loop-product__title { color: var(--r5-card-brand); text-decoration: none; }
.r5-catalog-card__sku { display: block; margin: 4px 0 0; color: #767676; font-size: 12px; line-height: 20.304px; overflow-wrap: anywhere; }

/* The square overlay is a sibling of the product link, never an interactive descendant. */
.r5-catalog-card__controls { position: absolute; inset: 0 0 auto; z-index: 2; width: 100%; aspect-ratio: 1; pointer-events: none; }
.r5-catalog-card__photos { position: absolute; top: calc(100% - 8px); right: 0; left: 0; display: flex; gap: 3px; visibility: hidden; pointer-events: auto; }
[data-r5-catalog-card][data-r5-card-ready="true"] .r5-catalog-card__photos { visibility: visible; }
.r5-catalog-card__photos button {
	position: relative;
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	min-height: 24px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: var(--r5-card-brand);
	background: transparent;
	font-size: 0;
	line-height: 1;
	cursor: pointer;
}
.r5-catalog-card__photos button::before { display: block; width: 100%; height: 1px; background: #ccc; content: ''; }
.r5-catalog-card__photos button[aria-pressed="true"]::before { height: 2px; background: var(--r5-card-brand); }
.r5-catalog-card__photos button:disabled { opacity: .35; cursor: default; }
.r5-catalog-card__actions { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; gap: 4px; pointer-events: auto; }
.catalog-archive ul.products li.product.r5-catalog-card .r5-catalog-card__action {
	display: grid;
	width: 32px;
	min-height: 32px;
	place-items: center;
	margin: 0;
	padding: 7px;
	border: 1px solid transparent;
	border-radius: 2px;
	color: #767676;
	background: rgba(255, 255, 255, .96);
	font: inherit;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}
.r5-catalog-card__action svg { width: 16px; height: 16px; }
.catalog-archive ul.products li.product.r5-catalog-card .r5-catalog-card__action:is(:hover, :focus-visible) { color: var(--r5-card-brand); background: #f4f3fc; }
.catalog-archive ul.products li.product.r5-catalog-card .r5-catalog-card__action[aria-pressed="true"] { border-color: var(--r5-card-brand); color: var(--r5-card-brand); background: #f4f3fc; }
.r5-catalog-card__action:disabled { opacity: .45; cursor: default; }
.catalog-archive ul.products li.product.r5-catalog-card .r5-product-order-button {
	display: flex;
	width: 100%;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	margin: 24px 0 0;
	padding: 12px 16px;
	border: 1px solid var(--r5-card-brand);
	border-radius: 2px;
	color: #fff;
	background: var(--r5-card-brand);
	font: 400 11px/20px Montserrat, Arial, sans-serif;
	letter-spacing: .03em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}
.catalog-archive ul.products li.product.r5-catalog-card .r5-product-order-button:is(:hover, :focus-visible) { color: #fff; background: #110b70; }
.r5-catalog-card :is(a, button):focus-visible { outline: 2px solid var(--color-focus, #a84500); outline-offset: 3px; }

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
	.catalog-archive ul.products li.product.r5-catalog-card:is(:hover, :focus-within) { z-index: 3; box-shadow: 0 0 20px rgba(0, 0, 0, .15); }
	.r5-catalog-card__actions { opacity: 0; visibility: visible; pointer-events: none; }
	.r5-catalog-card:is(:hover, :focus-within) .r5-catalog-card__actions { opacity: 1; pointer-events: auto; }
	.catalog-archive ul.products li.product.r5-catalog-card .r5-product-order-button {
		position: absolute;
		top: calc(100% + 25px);
		right: -26px;
		left: -25px;
		width: auto;
		min-height: 57px;
		margin: 0;
		border-radius: 0 0 2px 2px;
		opacity: 0;
		visibility: visible;
		box-shadow: 0 12px 18px -10px rgba(0, 0, 0, .2);
		pointer-events: none;
	}
	.catalog-archive ul.products li.product.r5-catalog-card:is(:hover, :focus-within) .r5-product-order-button { opacity: 1; pointer-events: auto; }
}

@media (max-width: 767px) {
	.catalog-archive ul.products li.product.r5-catalog-card { min-height: 0; padding: 18px; }
	.catalog-archive ul.products li.product.r5-catalog-card .woocommerce-loop-product__title {
		display: -webkit-box;
		max-height: 58.5px;
		font-size: 13px;
		line-height: 19.5px;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
	}
	.r5-catalog-card__actions { gap: 2px; }
	.catalog-archive ul.products li.product.r5-catalog-card .r5-catalog-card__action { width: 36px; min-height: 36px; padding: 8px; }
	.catalog-archive ul.products li.product.r5-catalog-card .r5-product-order-button { min-height: 44px; margin-top: 18px; padding: 10px 8px; font-size: 10px; }
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
	.r5-catalog-card__media { margin-bottom: 24px; }
	.r5-catalog-card__photos { top: calc(100% - 5px); }
	.r5-catalog-card__photos button { min-height: 28px; }
	.r5-catalog-card__photos button::before { position: absolute; right: 0; bottom: 2px; left: 0; }
	.r5-catalog-card__photos button::after { color: #767676; font: 400 10px/18px Montserrat, Arial, sans-serif; content: attr(data-r5-photo-label); }
	.r5-catalog-card__photos button[aria-pressed="true"]::after { color: var(--r5-card-brand); font-weight: 600; }
}
