/**
 * WeMatrix products catalog page styles.
 */

.wm-products {
	background: var(--wm-bg);
	color: var(--wm-text);
}

.wm-text-accent {
	color: var(--wm-accent);
}

/* Hero */
.wm-products-hero {
	position: relative;
	background: var(--wm-dark);
	overflow: hidden;
}

.wm-products-hero__bg {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	width: 60%;
	background-size: cover;
	background-position: center;
}

.wm-products-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, var(--wm-dark) 0%, rgba(17, 17, 17, 0.8) 55%, transparent 100%);
}

.wm-products-hero__content {
	position: relative;
	padding: 5rem 0;
	color: var(--wm-white);
}

.wm-products-hero__title {
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	margin: 0;
	text-wrap: balance;
}

@media (min-width: 640px) {
	.wm-products-hero__title {
		font-size: 3rem;
	}
}

.wm-products-hero__desc {
	margin: 1.25rem 0 0;
	max-width: 36rem;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.625;
}

/* Products page newsletter — compact like original (py-8, text-xl) */
body.wematrix-products .wm-newsletter__inner {
	padding: 2rem 0;
}

body.wematrix-products .wm-newsletter__title {
	font-size: 1.25rem;
}

/* Hero features bar */
.wm-products-hero-features {
	background: var(--wm-white);
	border-bottom: 1px solid var(--wm-border);
}

.wm-products-hero-features__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
	.wm-products-hero-features__grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

.wm-products-hero-features__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.25rem;
	border-bottom: 1px solid var(--wm-border);
}

.wm-products-hero-features__item:nth-child(odd) {
	border-right: 1px solid var(--wm-border);
}

@media (min-width: 768px) {
	.wm-products-hero-features__item {
		border-bottom: none;
		border-right: 1px solid var(--wm-border);
	}

	.wm-products-hero-features__item:last-child {
		border-right: none;
	}
}

@media (max-width: 767px) {
	.wm-products-hero-features__item:nth-child(even) {
		border-right: none;
	}

	.wm-products-hero-features__item:nth-last-child(-n + 1) {
		border-bottom: none;
	}

	.wm-products-hero-features__item:nth-child(-n + 4) {
		border-bottom: 1px solid var(--wm-border);
	}
}

.wm-icon--product-feature {
	width: 1.5rem;
	height: 1.5rem;
	color: var(--wm-accent);
	flex-shrink: 0;
}

.wm-products-hero-features__title {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0;
}

.wm-products-hero-features__desc {
	font-size: 0.75rem;
	color: var(--wm-text-muted);
	margin: 0;
}

/* Layout */
.wm-products__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	padding: 3rem 0;
}

@media (min-width: 1024px) {
	.wm-products__layout {
		grid-template-columns: 260px 1fr;
		gap: 2rem;
	}
}

/* Sidebar */
.wm-products-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

.wm-products-sidebar__card {
	border-radius: var(--wm-radius);
	background: var(--wm-white);
	border: 1px solid var(--wm-border);
	padding: 1.25rem;
	min-width: 0;
	box-sizing: border-box;
}

.wm-products-sidebar__heading,
.wm-products-sidebar__subheading {
	font-weight: 800;
	margin: 0;
	font-size: 1rem;
}

.wm-products-sidebar__list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.wm-products-sidebar__link {
	display: block;
	border-radius: var(--wm-radius-md);
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	color: rgba(17, 17, 17, 0.7);
	text-decoration: none;
}

.wm-products-sidebar__link:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--wm-text);
}

.wm-products-sidebar__link.is-active {
	background: rgba(91, 174, 75, 0.1);
	color: var(--wm-accent);
	font-weight: 600;
}

.wm-products-sidebar__text {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--wm-text-muted);
	line-height: 1.625;
}

.wm-products-sidebar__btn-outline {
	display: block;
	margin-top: 1rem;
	border-radius: var(--wm-radius-md);
	border: 1px solid rgba(0, 0, 0, 0.15);
	padding: 0.625rem 1rem;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--wm-text);
}

.wm-products-sidebar__btn-outline:hover {
	background: rgba(0, 0, 0, 0.05);
}

.wm-products-sidebar__btn-download {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.625rem 1rem;
	border-radius: var(--wm-radius-md);
	background: var(--wm-accent);
	color: var(--wm-white);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border: none;
	line-height: 1.25;
}

.wm-products-sidebar__btn-download:hover {
	filter: brightness(0.95);
	color: var(--wm-white);
}

/* Catalog */
.wm-products-breadcrumb {
	font-size: 0.875rem;
	color: rgba(17, 17, 17, 0.5);
}

.wm-products-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.wm-products-breadcrumb a:hover {
	color: var(--wm-text);
}

.wm-products-breadcrumb__sep {
	margin: 0 0.25rem;
}

.wm-products-breadcrumb__current {
	color: rgba(17, 17, 17, 0.8);
}

.wm-products-catalog__header {
	margin-top: 0.75rem;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
}

.wm-products-catalog__title {
	font-size: 1.875rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	margin: 0;
}

@media (min-width: 640px) {
	.wm-products-catalog__title {
		font-size: 2.25rem;
	}
}

.wm-products-catalog__intro {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	color: var(--wm-text-muted);
	line-height: 1.625;
}

.wm-products-catalog__tools {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.wm-products-tool-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-radius: var(--wm-radius-md);
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: var(--wm-white);
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	color: var(--wm-text);
}

.wm-products-tool-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

.wm-products-catalog__sections {
	margin-top: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.wm-products-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wm-products-section__title {
	font-size: 1.25rem;
	font-weight: 800;
	margin: 0;
}

.wm-products-section__view-all {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wm-accent);
	text-decoration: none;
}

.wm-products-section__view-all:hover {
	text-decoration: underline;
}

.wm-products-section__grid {
	margin-top: 1.25rem;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}

@media (min-width: 1024px) {
	.wm-products-section__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Product card */
.wm-product-card {
	border-radius: var(--wm-radius);
	background: var(--wm-white);
	border: 1px solid var(--wm-border);
	padding: 1rem;
	transition: box-shadow 0.15s ease;
}

.wm-product-card:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wm-product-card__link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.wm-product-card__image-wrap {
	border-radius: var(--wm-radius-md);
	background: var(--wm-bg);
	padding: 0.75rem;
}

.wm-product-card__image {
	height: 7rem;
	width: 100%;
	object-fit: contain;
	display: block;
}

.wm-product-card__name {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	font-weight: 700;
}

.wm-product-card__desc {
	margin: 0;
	font-size: 0.75rem;
	color: rgba(17, 17, 17, 0.55);
}

.wm-product-card__footer {
	margin-top: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wm-product-card__price {
	font-size: 0.875rem;
	font-weight: 700;
}

.wm-product-card__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 9999px;
	background: rgba(91, 174, 75, 0.1);
	color: var(--wm-accent);
}

/* Bottom features */
.wm-products-bottom-features {
	background: #f0f0f0;
	border-top: 1px solid var(--wm-border);
	border-bottom: 1px solid var(--wm-border);
}

.wm-products-bottom-features__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
	.wm-products-bottom-features__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.wm-products-bottom-features__item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.5rem;
	border-bottom: 1px solid var(--wm-border-10);
}

.wm-products-bottom-features__item:nth-child(odd) {
	border-right: 1px solid var(--wm-border-10);
}

@media (min-width: 768px) {
	.wm-products-bottom-features__item {
		border-bottom: none;
		border-right: 1px solid var(--wm-border-10);
	}

	.wm-products-bottom-features__item:last-child {
		border-right: none;
	}
}

@media (max-width: 767px) {
	.wm-products-bottom-features__item:nth-child(even) {
		border-right: none;
	}

	.wm-products-bottom-features__item:nth-last-child(-n + 1) {
		border-bottom: none;
	}

	.wm-products-bottom-features__item:nth-child(-n + 2) {
		border-bottom: 1px solid var(--wm-border-10);
	}
}

.wm-icon--product-bottom {
	width: 1.75rem;
	height: 1.75rem;
	color: var(--wm-accent);
	flex-shrink: 0;
}

.wm-products-bottom-features__title {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0;
}

.wm-products-bottom-features__desc {
	margin: 0;
	font-size: 0.75rem;
	color: var(--wm-text-muted);
	line-height: 1.5;
}
