/* =============================================
 * MW Product Cards Widget
 * ============================================= */

.mw-product-cards {
	width: 100%;
	background-color: #F7F7F9;
}

/* Grid — 4 columns */
.mw-product-cards__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin: 0;
	padding: 0;
}

/* ── Card (clickable <a> wrapper) ── */
.mw-product-cards__card {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border: 1px solid #E8E8EE;
	border-radius: 4px;
	padding: 28px 24px;
	text-decoration: none;
	color: inherit;
	outline: var(--mw-product-cards-outline-width, 2px) solid transparent;
	transition: outline-color 0.2s ease;
}

.mw-product-cards__card:hover {
	outline-color: var(--mw-product-cards-outline, #3B4BF9);
}

/* ── Icon Box ── */
.mw-product-cards__icon-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	margin-bottom: 20px;
	overflow: hidden;
	flex-shrink: 0;
}

.mw-product-cards__icon-box img {
	width: 60%;
	height: 60%;
	object-fit: contain;
}

/* ── Category Tag ── */
.mw-product-cards__category {
	display: block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8888AA;
	margin-bottom: 8px;
	line-height: 1;
}

/* ── Product Name ── */
.mw-product-cards__name {
	margin: 0 0 12px;
	font-family: Georgia, 'Times New Roman', Times, serif;
	font-size: 20px;
	font-weight: 600;
	color: #0D1240;
	line-height: 1.3;
}

/* ── Description ── */
.mw-product-cards__desc {
	margin: 0 0 20px;
	font-size: 13.5px;
	line-height: 1.6;
	color: #555570;
	flex-grow: 1;
}

/* ── CTA (visual only — card is the link) ── */
.mw-product-cards__cta-text {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: #3B4BF9;
	margin-top: auto;
}

.mw-product-cards__cta-arrow {
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.mw-product-cards__card:hover .mw-product-cards__cta-arrow {
	transform: translateX(5px);
}

/* ── Entrance Animation (opt-in via .mw-animate-items) ── */
.mw-animate-items .mw-product-cards__card {
	opacity: 0;
	transform: translateY(24px);
	transition:
		outline-color 0.2s ease 0s,
		opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mw-animate-items .mw-product-cards__card.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger each card — only delay opacity & transform, not outline-color */
.mw-animate-items .mw-product-cards__card:nth-child(2) { transition-delay: 0s, 0.15s, 0.15s; }
.mw-animate-items .mw-product-cards__card:nth-child(3) { transition-delay: 0s, 0.30s, 0.30s; }
.mw-animate-items .mw-product-cards__card:nth-child(4) { transition-delay: 0s, 0.45s, 0.45s; }
.mw-animate-items .mw-product-cards__card:nth-child(5) { transition-delay: 0s, 0.60s, 0.60s; }
.mw-animate-items .mw-product-cards__card:nth-child(6) { transition-delay: 0s, 0.75s, 0.75s; }
.mw-animate-items .mw-product-cards__card:nth-child(7) { transition-delay: 0s, 0.90s, 0.90s; }
.mw-animate-items .mw-product-cards__card:nth-child(8) { transition-delay: 0s, 1.05s, 1.05s; }

/* Skip animation in Elementor editor */
.elementor-editor-active .mw-animate-items .mw-product-cards__card {
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.mw-animate-items .mw-product-cards__card {
		opacity: 1;
		transform: none;
		transition-delay: 0s;
	}
}

/* ── Responsive: 2 columns below 900px ── */
@media (max-width: 900px) {
	.mw-product-cards__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── Responsive: 1 column below 520px ── */
@media (max-width: 520px) {
	.mw-product-cards__grid {
		grid-template-columns: 1fr;
	}
}
