/**
 * Rocky product card — shared markup for every WooCommerce product loop
 * (shop, related, upsells, homepage carousel, shortcodes).
 */

ul.products li.product {
	text-align: center;
}

ul.products li.product .rocky-product-card__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 0.15rem;
}

ul.products li.product .rocky-product-card__title-link {
	display: block;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

ul.products li.product .rocky-product-card__title,
ul.products li.product .woocommerce-loop-product__title {
	margin: 0.35rem 0 0;
	padding: 0;
	font-size: var(--rocky-font-size-product-card-title);
	font-weight: var(--rocky-font-weight-normal);
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	line-height: 1.45;
	color: var(--rocky-color-text-primary);
}

ul.products li.product .rocky-product-image__badges,
.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__badges {
	position: absolute;
	top: 0;
	right: 0;
	width: var(--rocky-product-ribbon-corner-size);
	height: var(--rocky-product-ribbon-corner-size);
	overflow: hidden;
	z-index: 3;
	pointer-events: none;
}

.single-product div.product .woocommerce-product-gallery__image {
	position: relative;
}

.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__badges {
	width: 5.75rem;
	height: 5.75rem;
}

.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__ribbon {
	padding: 0.42rem 0;
}

ul.products li.product .rocky-product-image__ribbon,
.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__ribbon {
	position: absolute;
	top: 1.05rem;
	right: -2.35rem;
	width: 9rem;
	display: block;
	color: var(--rocky-color-on-badge);
	font-size: var(--rocky-product-ribbon-font-size);
	font-weight: var(--rocky-font-weight-bold);
	letter-spacing: 0.1em;
	line-height: 1.25;
	text-align: center;
	text-transform: uppercase;
	padding: 0.36rem 0;
	transform: rotate(45deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

ul.products li.product .rocky-product-image__ribbon--new,
.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__ribbon--new {
	letter-spacing: 0.08em;
}

ul.products li.product .rocky-product-image__ribbon--sale,
.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__ribbon--sale {
	background: var(--rocky-color-badge-sale);
}

ul.products li.product .rocky-product-image__ribbon--new,
.single-product div.product .woocommerce-product-gallery__image .rocky-product-image__ribbon--new {
	background: var(--rocky-color-badge-new);
}

ul.products li.product .rocky-product-card__price {
	width: 100%;
	margin: 0.15rem 0 0;
}

ul.products li.product .rocky-product-card__price .price {
	display: inline-flex;
	justify-content: center;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.45rem;
	font-size: var(--rocky-font-size-body);
	margin: 0;
	color: var(--rocky-color-text-primary);
}

ul.products li.product .rocky-product-card__price .price ins {
	order: 1;
	text-decoration: none;
	font-weight: var(--rocky-font-weight-medium);
	background: none;
}

ul.products li.product .rocky-product-card__price .price del {
	order: 2;
	opacity: 1;
	color: var(--rocky-color-text-muted);
	font-size: var(--rocky-font-size-body);
	font-weight: var(--rocky-font-weight-normal);
	text-decoration: line-through;
}

ul.products li.product .rocky-product-card__price .price .woocommerce-Price-amount {
	font-weight: inherit;
}

ul.products li.product a.button.product_type_simple {
	display: none !important;
}

ul.products li.product a.woocommerce-LoopProduct-link {
	display: block;
}

ul.products li.product .rocky-product-image > a.woocommerce-LoopProduct-link {
	height: 100%;
}

ul.products li.product .rocky-product-image {
	margin-bottom: 0.75rem;
}

ul.products li.product .rocky-product-card__promo {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45rem 0.5rem;
	background: linear-gradient(90deg, #5c2438 0%, #3d1828 55%, #2a121c 100%);
	color: var(--rocky-color-on-badge);
	pointer-events: none;
}

ul.products li.product .rocky-product-card__promo-gift {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

ul.products li.product .rocky-product-card__promo-gift-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

ul.products li.product .rocky-product-card__promo-text {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

ul.products li.product .rocky-product-card__promo-line1 {
	margin: 0;
	font-size: var(--rocky-font-size-2xs);
	font-weight: var(--rocky-font-weight-bold);
	line-height: 1.25;
	letter-spacing: 0.02em;
}

ul.products li.product .rocky-product-card__promo-line2 {
	margin: 0.15rem 0 0;
	font-size: var(--rocky-font-size-3xs);
	font-weight: var(--rocky-font-weight-medium);
	line-height: 1.2;
	opacity: 0.92;
}
