.sany-product-archive {
	background: #f4f4f4;
	padding: 44px 24px 64px;
}

.sany-product-archive__inner {
	margin: 0 auto;
	max-width: 1360px;
}

.sany-product-archive__title {
	font-size: clamp(2rem, 3vw, 2.5rem);
	margin: 0 0 18px;
}

.sany-product-archive__tabs {
	background: #fff;
	margin-bottom: 26px;
	padding: 18px 20px 0;
}

.sany-product-archive .subcategorias-irmas {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.sany-product-archive .subcategorias-irmas li {
	border-bottom: 2px solid transparent;
	margin: 0;
	padding: 0 0 14px;
}

.sany-product-archive .subcategorias-irmas li.active {
	border-bottom-color: #e30613;
}

.sany-product-archive .subcategorias-irmas a {
	align-items: center;
	color: #111;
	display: flex;
	flex-direction: column;
	font-size: 15px;
	gap: 8px;
	text-align: center;
	text-decoration: none;
}

.sany-product-archive .subcategorias-irmas li.active a {
	color: #e30613;
}

.sany-product-archive .subcategoria-imagem {
	height: 72px;
	object-fit: contain;
	width: 100%;
}

.sany-product-archive .custom-post-list {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.sany-product-archive .custom-post-list img {
	height: auto;
	max-width: 100%;
}

@media (max-width: 767px) {
	/* The archive template used by child categories does not have the
	 * .sany-product-archive wrapper, so these rules intentionally target
	 * the shared shortcode markup directly. */
	.subcategorias-irmas {
		display: grid !important;
		gap: 10px !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		list-style: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.subcategorias-irmas > li {
		align-items: stretch !important;
		border: 1px solid #ededed;
		border-bottom: 3px solid transparent;
		display: flex !important;
		list-style: none !important;
		margin: 0 !important;
		min-width: 0;
		padding: 0 !important;
	}

	.subcategorias-irmas > li::marker {
		content: '';
	}

	.subcategorias-irmas > li.active {
		border-bottom-color: #e30613;
	}

	.subcategorias-irmas > li > a {
		align-items: center !important;
		color: #1f1f1f !important;
		display: flex !important;
		flex: 1;
		flex-direction: column !important;
		font-size: 14px !important;
		gap: 6px !important;
		justify-content: center;
		line-height: 1.25;
		min-height: 142px;
		padding: 10px 8px !important;
		text-align: center !important;
		text-decoration: none !important;
	}

	.subcategorias-irmas > li.active > a {
		color: #e30613 !important;
		font-weight: 600;
	}

	.subcategorias-irmas .subcategoria-imagem {
		height: 76px !important;
		margin: 0 auto !important;
		max-height: 76px !important;
		max-width: 112px !important;
		object-fit: contain !important;
		width: 100% !important;
	}

	.subcategorias-irmas .subcategoria-titulo {
		display: block;
		min-height: 35px;
	}

	/* The Elementor child-category archive needs room after its last product
	 * card; otherwise the footer visually touches the last row on short screens. */
	.elementor-2173 .elementor-element.elementor-element-8d0fe56,
	.elementor-2173 .elementor-element.elementor-element-8d0fe56 .elementor-widget-container,
	.elementor-2173 .elementor-element.elementor-element-8d0fe56 .elementor-posts-container {
		overflow: visible !important;
	}

	/* Elementor retains the desktop widget height after the mobile grid wraps.
	 * Let the widget and its wrapper grow with all product cards, so the footer
	 * is laid out after — rather than over — the final row. */
	.elementor-2173 .elementor-element.elementor-element-8d0fe56,
	.elementor-2173 .elementor-element.elementor-element-8d0fe56 .elementor-widget-container {
		height: auto !important;
	}

	/* The Elementor archive section is a desktop flex row. On mobile, changing
	 * the posts to one column makes it taller than that row's calculated height.
	 * Normal block flow makes every product row contribute to page height. */
	.elementor-2173 .elementor-element.elementor-element-7e4b4f0,
	.elementor-2173 .elementor-element.elementor-element-c5fb4d9 {
		display: block !important;
		height: auto !important;
		width: 100% !important;
	}

	.elementor-2173 .elementor-element.elementor-element-8d0fe56 .elementor-posts-container {
		padding-bottom: 72px;
	}

	body.category .elementor-location-footer {
		position: relative;
		z-index: 1;
	}

	.sany-product-archive {
		padding: 28px 16px 44px;
	}

	.sany-product-archive__tabs {
		padding: 14px 12px 0;
	}

	.sany-product-archive .subcategorias-irmas {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
