/*
 * Styles for the new product widget.
 */

.nova-new-product-widget {
	--nova-new-product-columns: 4;
	--nova-new-product-title-size: 4rem;

	display: grid;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	width: 100%;
}

.nova-new-product-widget__header {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1.5rem;
}

.nova-new-product-widget__heading {
	display: grid;
	gap: 0.65rem;
	max-width: 44rem;
}

.nova-new-product-widget__title {
	margin: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(
		min(2rem, var(--nova-new-product-title-size)),
		4vw,
		var(--nova-new-product-title-size)
	);
	line-height: 1;
	color: #111827;
}

.nova-new-product-widget__description {
	margin: 0;
	color: #4b5563;
	font-size: 1.05rem;
	line-height: 1.7;
}

.nova-new-product-widget__button,
.nova-new-product-widget__product-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: #111827;
	color: #ffffff;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
}

.nova-new-product-widget__button:hover,
.nova-new-product-widget__button:focus,
.nova-new-product-widget__product-link:hover,
.nova-new-product-widget__product-link:focus {
	background: #0f766e;
	color: #ffffff;
}

.nova-new-product-widget__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.nova-new-product-widget__card {
	display: grid;
	grid-template-rows: auto 1fr;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: #ffffff;
	box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.nova-new-product-widget__media {
	display: block;
	overflow: hidden;
	background: #f3f4f6;
	text-decoration: none;
}

.nova-new-product-widget__image {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transform: scale(1);
	transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nova-new-product-widget__card:hover .nova-new-product-widget__image,
.nova-new-product-widget__card:focus-within .nova-new-product-widget__image {
	transform: scale(1.06);
}

.nova-new-product-widget__card-body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 1rem;
}

.nova-new-product-widget__product-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.35;
	color: #111827;
}

.nova-new-product-widget__product-title a {
	text-decoration: none;
}

.nova-new-product-widget__price {
	color: #0f766e;
	font-weight: 900;
}

.nova-new-product-widget__price del {
	color: #6b7280;
	font-weight: 600;
}

.nova-new-product-widget__product-link {
	margin-top: auto;
	width: 100%;
}

.nova-new-product-widget__notice {
	margin: 0;
	padding: 1rem;
	border: 1px dashed #94a3b8;
	border-radius: 8px;
	background: #f8fafc;
	color: #334155;
}

@media (min-width: 850px) {
	.nova-new-product-widget__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 849px) and (min-width: 547px) {
	.nova-new-product-widget__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 546px) and (min-width: 447px) {
	.nova-new-product-widget__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 446px) {
	.nova-new-product-widget__grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.nova-new-product-widget__header {
		align-items: start;
		flex-direction: column;
	}

	.nova-new-product-widget__button {
		width: 100%;
	}

	.nova-new-product-widget__card-body {
		gap: 0.45rem;
		padding: 0.65rem;
	}

	.nova-new-product-widget__product-title {
		font-size: 0.82rem;
		line-height: 1.25;
	}

	.nova-new-product-widget__price {
		font-size: 0.82rem;
		line-height: 1.25;
	}

	.nova-new-product-widget__product-link {
		display: none;
	}
}
