/**
 * Related / Upsell Products — common widget CSS.
 *
 * Shared product-grid + card layout. Colours / borders are driven by Elementor
 * controls and the per-style sheets. Both widgets use the same .captwiki-products
 * structure, so this file is duplicated for each asset slug.
 *
 * @package captain-widgets-kit
 * @since   1.3.0
 */

.captwiki-products__heading {
	margin: 0 0 20px;
	font-size: 24px;
	font-weight: 700;
}

.captwiki-products__grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 24px;
}

.captwiki-products__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.captwiki-products__media {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
}

.captwiki-products__media img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.captwiki-products__card:hover .captwiki-products__media img {
	transform: scale( 1.05 );
}

.captwiki-products__sale {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 4px;
	background: #e02b2b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.captwiki-products__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 12px;
}

.captwiki-products__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

.captwiki-products__title a {
	color: inherit;
	text-decoration: none;
}

.captwiki-products__title a:hover {
	text-decoration: underline;
}

.captwiki-products__rating {
	font-size: 14px;
}

.captwiki-products__rating .star-rating {
	margin: 0;
}

.captwiki-products__price {
	font-size: 16px;
	font-weight: 700;
}

.captwiki-products__price del {
	opacity: 0.6;
	font-weight: 400;
	margin-right: 6px;
}

.captwiki-products__cart {
	margin-top: 6px;
}

.captwiki-products__cart a.button,
.captwiki-products__cart a.added_to_cart {
	display: inline-block;
	margin-top: 4px;
}

/* Center alignment helper (driven by Text Alignment control). */
.captwiki-products__card[style*="center"] .captwiki-products__rating {
	display: flex;
	justify-content: center;
}

/* Editor notice. */
.captwiki-products--notice {
	display: block;
	padding: 16px 18px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
	font-size: 13px;
}

.captwiki-products--notice p {
	margin: 0;
}

@media ( max-width: 767px ) {
	.captwiki-products__heading {
		font-size: 20px;
	}
}
