/* Product card — values from the reference component-card.css / quick-add.css / component-price.css */

.rk-card {
	--rk-card-fg: #121212;
	--rk-card-muted: #757575;
	--rk-card-radius: 12px;
	--rk-card-sale: #d73d3d;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--rk-card-fg);
	text-align: left;
}

/* 2:3 rounded media box */
.rk-card__inner {
	position: relative;
	width: 100%;
	border-radius: var(--rk-card-radius);
	overflow: hidden;
	background: #fff;
}
.rk-card__inner::before {
	content: "";
	display: block;
	padding-bottom: 150%;
}
.rk-card__media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
}
.rk-card__media img,
.rk-card .rk-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Badge: top-left, 12px in (8px tablet/phone) */
.rk-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	display: inline-block;
	padding: 2px 10px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: #fff;
	color: #000;
	font-size: 12px;
	line-height: 16px;
	font-weight: 500;
	pointer-events: none;
}
.rk-card__badge--sale {
	background: var(--rk-card-sale);
	color: #fff;
	font-weight: 300;
}

/* Hover bar (desktop) */
.rk-card__overlay {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -15%;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	background: #fff;
	border-radius: 7.6px;
	opacity: 0;
	visibility: hidden;
	transition: all .4s ease-in-out;
}
.rk-card__quick {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
}
.rk-card__details {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--rk-card-fg);
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}
.rk-card__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	min-height: 0;
	border: 0;
	background: transparent;
	color: var(--rk-card-muted);
	line-height: 0;
	cursor: pointer;
}
.rk-card__icon:hover,
.rk-card__icon:focus {
	background: transparent;
	color: var(--rk-card-fg);
}
.rk-card__icon-wrap {
	display: inline-flex;
	height: 24px;
	overflow: hidden;
}
.rk-card__icon svg {
	display: block;
}
.rk-card__wish.is-active .rk-heart path,
[data-rk-wishlist].is-active .rk-heart path {
	fill: currentColor;
}

/* Loading state while the quick view fetches */
.rk-spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: rk-spin .8s linear infinite;
}
.is-loading > .rk-spinner {
	display: block;
}
.is-loading > .rk-card__icon-wrap {
	opacity: 0;
}
@keyframes rk-spin {
	to { transform: rotate(360deg); }
}

/* Info under the image */
.rk-card__info {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding-top: 13px;
}
.rk-card__title {
	flex-grow: 1;
	margin: 0;
	color: var(--rk-card-fg);
	font-size: 12px;
	font-weight: 500;
	line-height: 100%;
	letter-spacing: 0;
	word-break: break-word;
}
.rk-card__title a {
	display: block;
	color: inherit;
	line-height: inherit;
	text-decoration: none;
}
.rk-card .rk-price {
	margin-top: 4px;
	font-size: 16px;
	line-height: 24px;
}

/* Price (shared with quick view) */
.rk-price {
	color: var(--rk-card-fg, #121212);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
}
.rk-price > * {
	display: inline-block;
	vertical-align: top;
}
.rk-price__regular {
	margin-right: 10px;
	color: rgba(18, 18, 18, .75);
	font-size: 13px;
	text-decoration: line-through;
}
.rk-price .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	white-space: nowrap;
}

/* Focus */
.rk-card a:focus-visible,
.rk-card button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media screen and (min-width: 750px) {
	.rk-card__info { padding-top: 16px; }
}

@media screen and (min-width: 989px) {
	.rk-card:hover .rk-card__overlay,
	.rk-card:focus-within .rk-card__overlay {
		bottom: 12px;
		opacity: 1;
		visibility: visible;
	}
}

@media screen and (min-width: 990px) {
	.rk-card__img {
		transition: transform .5s ease;
	}
	.rk-card:hover .rk-card__img {
		transform: scale(1.03);
	}
}

@media screen and (min-width: 1025px) {
	.rk-card__title { font-size: 14px; }
	.rk-price { font-size: 16px; }
}

/* Tablet / phone: round white icons top-right, no "View Details" */
@media screen and (max-width: 988.98px) {
	.rk-card__overlay {
		top: 8px;
		right: 8px;
		left: auto;
		bottom: auto;
		flex-direction: column-reverse;
		gap: 8px;
		padding: 8px;
		background: transparent;
		opacity: 1;
		visibility: visible;
	}
	.rk-card__details {
		display: none;
	}
	.rk-card__icon {
		padding: 6px;
		border: 1px solid #fff;
		border-radius: 50%;
		color: #fff;
	}
	.rk-card__icon:hover,
	.rk-card__icon:focus {
		color: #fff;
	}
	.rk-card__icon svg,
	.rk-card__icon-wrap {
		width: 16px;
		height: 16px;
	}
	.rk-card__badge {
		top: 8px;
		left: 8px;
		padding: 2px 4px;
		font-size: 8px;
		line-height: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rk-card__overlay,
	.rk-card__img {
		transition: none !important;
	}
	.rk-card:hover .rk-card__img {
		transform: none;
	}
}
