/* =========================================================
   Category / shop product cards (mockup, no attributes)
   ========================================================= */

:root {
	--rr-card-border: #e6e6e6;
	--rr-card-bg: #ffffff;
	--rr-card-muted: #6b6b6b;
	--rr-card-text: #1a1a1a;
	--rr-card-price: #c62828;
	--rr-card-btn: #f3f3f3;
	--rr-card-btn-border: #e0e0e0;
	--rr-card-radius: 10px;
}

body.tax-product_cat .products.elements-grid > .product-grid-item,
body.tax-product_tag .products.elements-grid > .product-grid-item,
body.post-type-archive-product .products.elements-grid > .product-grid-item {
	display: flex !important;
	flex-direction: column;
	height: 100%;
	padding: 0 !important;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.rr-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	background: var(--rr-card-bg);
	border: 1px solid var(--rr-card-border);
	border-radius: var(--rr-card-radius);
	overflow: hidden;
}

.rr-card-media {
	position: relative;
	background: #fafafa;
}

.rr-card-image {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.rr-card-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

/* Hide Basel hover extras inside redesigned cards */
.rr-card .hover-img,
.rr-card .basel-buttons,
.rr-card .quick-view,
.rr-card .basel-compare-btn {
	display: none !important;
}

/* Badges */
.rr-card .onsale,
.rr-card .out-of-stock,
.rr-card .product-label,
.rr-card .basel-product-labels,
body.tax-product_cat .product-grid-item .onsale,
body.tax-product_cat .product-grid-item span.out-of-stock,
body.tax-product_tag .product-grid-item .onsale,
body.post-type-archive-product .product-grid-item .onsale {
	position: absolute !important;
	z-index: 2;
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	margin: 0 !important;
	border-radius: 6px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	line-height: 1 !important;
	padding: 7px 10px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: auto !important;
	height: auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: none !important;
}

body.tax-product_cat .product-grid-item .onsale,
body.tax-product_tag .product-grid-item .onsale,
body.post-type-archive-product .product-grid-item .onsale,
.rr-card .onsale {
	left: auto !important;
	right: 12px !important;
	background: var(--rr-card-price) !important;
	color: #fff !important;
	border-radius: 999px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	padding: 0 !important;
}

/* Out-of-stock: pill label (not Basel circle) */
.rr-card .product-labels.labels-rounded,
.rr-card .product-labels {
	position: absolute !important;
	z-index: 2;
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	display: block !important;
	overflow: visible !important;
	pointer-events: none;
}

body.tax-product_cat .product-grid-item span.out-of-stock,
body.tax-product_tag .product-grid-item span.out-of-stock,
body.post-type-archive-product .product-grid-item span.out-of-stock,
.rr-card span.out-of-stock,
.rr-card .out-of-stock-label,
.rr-card a.product-label.out-of-stock,
.rr-card .product-labels .out-of-stock {
	position: static !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	background: rgba(28, 28, 28, 0.9) !important;
	color: #fff !important;
	border-radius: 6px !important;
	text-transform: none !important;
	letter-spacing: 0.01em;
	font-size: 12px !important;
	font-weight: 700 !important;
	padding: 8px 12px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	white-space: nowrap !important;
	text-align: center;
	line-height: 1.2 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.rr-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 8px;
	padding: 14px 14px 22px;
	min-width: 0;
}

.rr-card-title {
	margin: 0 !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	color: var(--rr-card-text) !important;
}

.rr-card-title a {
	color: inherit !important;
	text-decoration: none !important;
}

.rr-card-title a:hover {
	color: var(--rr-card-price) !important;
}

.rr-card-sub {
	margin: -2px 0 0 !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	font-weight: 500 !important;
	color: var(--rr-card-text) !important;
	opacity: 0.85;
}

.rr-card-price {
	margin-top: 4px !important;
}

.rr-card-price .price,
.rr-card-price .amount {
	color: var(--rr-card-price) !important;
	font-size: 20px !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
}

.rr-card-price del {
	opacity: 0.55;
	margin-right: 8px;
}

.rr-card-price del .amount {
	color: #888 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	text-decoration: line-through;
}

.rr-card-price ins {
	text-decoration: none !important;
	background: transparent !important;
}

.rr-card-price .wrapp-swap,
.rr-card-price .swap-elements {
	display: block !important;
	transform: none !important;
}

.rr-card-actions {
	display: block;
	margin-top: auto;
	padding-top: 8px;
}

.rr-card-cart {
	width: 100%;
}

.rr-card-cart .button,
.rr-card-cart a.button,
.rr-card-details {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100% !important;
	margin: 0 !important;
	padding: 12px 14px !important;
	border-radius: 8px !important;
	border: 1px solid var(--rr-card-btn-border) !important;
	background-color: var(--rr-card-btn) !important;
	color: var(--rr-card-text) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-align: center;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	min-height: 46px;
	white-space: nowrap;
	overflow: hidden;
}

.rr-card-cart .button:hover,
.rr-card-details:hover {
	background-color: #ebebeb !important;
	color: var(--rr-card-text) !important;
	border-color: #d0d0d0 !important;
}

/* Kill Basel icon font / tooltip chrome on CTA */
.rr-card-cart .basel-tooltip-label,
.rr-card-cart .button .basel-tooltip-label {
	display: none !important;
}

.rr-card-cart .button::before,
.rr-card-cart .button::after,
.rr-card-cart a.button::before,
.rr-card-cart a.button::after,
.rr-card-details::before,
.rr-card-details::after {
	content: none !important;
	display: none !important;
	font-family: inherit !important;
	speak: none;
}

/* Single clean cart icon via background, then label */
.rr-card-cart .button:not(.rr-card-details) {
	padding-left: 42px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 6H6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: 14px center !important;
	background-size: 16px 16px !important;
}

.rr-card-details {
	background-image: none !important;
	padding-left: 14px !important;
}

@media (max-width: 767px) {
	.rr-card-body {
		padding: 12px 12px 18px;
		gap: 6px;
	}

	.rr-card-title {
		font-size: 13px !important;
	}

	.rr-card-sub {
		font-size: 12px !important;
	}

	.rr-card-price .price,
	.rr-card-price .amount {
		font-size: 17px !important;
	}

	.rr-card-cart .button,
	.rr-card-details {
		font-size: 12px !important;
		padding: 11px 12px !important;
		min-height: 42px;
	}

	.rr-card-cart .button:not(.rr-card-details) {
		padding-left: 38px !important;
		background-position: 12px center !important;
		background-size: 15px 15px !important;
	}
}
