/**
 * Product Upsells widget.
 *
 * The DEFAULT look lives here, not in control defaults: every style control in
 * product-upsells.php defaults to '' so a per-instance value can override this
 * stylesheet. Baking colours into control defaults instead would permanently
 * outspecify the theme and global styles with no way back.
 *
 * The markup below `.ractro-upsells` comes straight from WooCommerce's own
 * single-product/up-sells.php + content-product.php templates (via
 * woocommerce_upsell_display()) — this file lays out and skins WooCommerce's
 * classes, it never re-declares them.
 */

.ractro-upsells {
	--ractro-ups-cols: 4;
}

.ractro-upsells--notice,
.ractro-upsells__empty {
	padding: 16px 20px;
	border: 1px dashed rgba(15, 23, 42, 0.25);
	border-radius: 8px;
	color: rgba(15, 23, 42, 0.6);
	font-size: 14px;
}

.ractro-upsells > h2 {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
}

.ractro-upsells ul.products {
	display: grid;
	grid-template-columns: repeat(var(--ractro-ups-cols), minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ractro-upsells ul.products li.product {
	position: relative;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	overflow: hidden;
	text-align: center;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ractro-upsells ul.products li.product:hover {
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}

.ractro-upsells ul.products li.product a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.ractro-upsells ul.products li.product img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.ractro-upsells .woocommerce-loop-product__title {
	margin: 14px 16px 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.ractro-upsells .price {
	display: block;
	margin: 0 16px 12px;
	font-size: 14px;
	font-weight: 600;
	color: rgba(15, 23, 42, 0.75);
}

.ractro-upsells .price del {
	opacity: 0.55;
	font-weight: 400;
	margin-right: 6px;
}

.ractro-upsells .price ins {
	text-decoration: none;
}

.ractro-upsells .star-rating {
	margin: 0 auto 8px;
	font-size: 13px;
}

.ractro-upsells a.button {
	display: inline-block;
	margin: 0 16px 18px;
	padding: 9px 18px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #0f172a;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.ractro-upsells a.button:hover {
	background: #1e293b;
	color: #fff;
}

.ractro-upsells .onsale {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #dc2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 8px;
	border-radius: 4px;
}

/* Presentation switches — the widget still fetches full WooCommerce loop
   markup (price, rating, add-to-cart come bundled with content-product.php),
   so hidden state is expressed in CSS rather than by stripping markup. */
.ractro-upsells--hide-price .price {
	display: none;
}

.ractro-upsells--hide-rating .star-rating {
	display: none;
}

.ractro-upsells--hide-cart a.button {
	display: none;
}

@media (max-width: 1024px) {
	.ractro-upsells ul.products {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

@media (max-width: 640px) {
	.ractro-upsells ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
