/* Cosmos Store: featured products section (front page). */

.cosmos-featured-products {
	--cosmos-ink: #111827;
	--cosmos-text: #222222;
	--cosmos-muted: #6b7280;
	--cosmos-border: #e5e7eb;
	--cosmos-gap: 24px;
	--cosmos-cols: 4;
	width: 100%;
	margin: 8px 0 48px;
	font-family: "Montserrat", sans-serif;
}

/* Section heading (Elementor widget tagged by the plugin; overrides the kit's default primary color). */
.elementor .elementor-widget-heading.cosmos-featured-heading .elementor-heading-title {
	color: #222222;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-align: center;
}

.cosmos-fp__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--cosmos-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cosmos-fp__item {
	flex: 0 0 calc((100% - (var(--cosmos-cols) - 1) * var(--cosmos-gap)) / var(--cosmos-cols));
	max-width: calc((100% - (var(--cosmos-cols) - 1) * var(--cosmos-gap)) / var(--cosmos-cols));
	margin: 0;
	padding: 0;
	display: flex;
}

.cosmos-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid var(--cosmos-border);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cosmos-card:hover {
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
	transform: translateY(-2px);
}

.cosmos-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
}

.cosmos-card__media img.cosmos-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.cosmos-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 3px;
	background: var(--cosmos-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cosmos-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
}

.cosmos-card__title {
	margin: 0;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.cosmos-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--cosmos-text);
	text-decoration: none;
}

.cosmos-card__title a:hover,
.cosmos-card__title a:focus {
	color: var(--cosmos-ink);
	text-decoration: underline;
}

.cosmos-card__price {
	color: var(--cosmos-ink);
	font-size: 17px;
	font-weight: 700;
}

.cosmos-card__price del {
	color: var(--cosmos-muted);
	font-weight: 400;
	margin-right: 6px;
}

.cosmos-card__price ins {
	text-decoration: none;
}

.cosmos-card__actions {
	margin-top: auto;
	padding-top: 4px;
}

.cosmos-featured-products .cosmos-card__actions .button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 4px;
	background: var(--cosmos-ink);
	color: #fff;
	font-family: "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: normal;
}

.cosmos-featured-products .cosmos-card__actions .button:hover,
.cosmos-featured-products .cosmos-card__actions .button:focus {
	background: #000;
	color: #fff;
}

.cosmos-featured-products .cosmos-card__actions .added_to_cart {
	display: block;
	margin-top: 8px;
	color: var(--cosmos-ink);
	font-size: 14px;
	text-align: center;
}

.cosmos-fp__more {
	margin: 28px 0 0;
	text-align: center;
}

.cosmos-fp__more-link {
	display: inline-block;
	padding: 10px 22px;
	border: 2px solid var(--cosmos-ink);
	border-radius: 4px;
	color: var(--cosmos-ink);
	font-weight: 600;
	text-decoration: none;
}

.cosmos-fp__more-link:hover,
.cosmos-fp__more-link:focus {
	background: var(--cosmos-ink);
	color: #fff;
}

/* Tablet (Astra tablet breakpoint 921px): 2 columns. */
@media (max-width: 921px) {
	.cosmos-featured-products {
		--cosmos-cols: 2;
		--cosmos-gap: 20px;
	}
}

/* Mobile (Astra mobile breakpoint 544px): 2 columns while there is room. */
@media (max-width: 544px) {
	.cosmos-featured-products {
		--cosmos-gap: 12px;
		margin-bottom: 32px;
	}

	.cosmos-card__body {
		padding: 12px;
	}

	.cosmos-card__title {
		font-size: 14px;
	}

	.cosmos-card__price {
		font-size: 15px;
	}

	.cosmos-featured-products .cosmos-card__actions .button {
		padding: 10px 12px;
		font-size: 13px;
	}
}

/* Very narrow phones: 1 column. */
@media (max-width: 359px) {
	.cosmos-featured-products {
		--cosmos-cols: 1;
	}
}
