/* =========================================================================
 * DKLens: shop root category block (.dkl-shopcats), inc/dklens-shopcats.php
 * Card styles come from the mega menu (dklens_mega_styles in functions.php);
 * this file only sizes them for the page and for phones.
 * ========================================================================= */

.dkl-shopcats {
	margin: 0 0 48px;
}

.dkl-shopcats .dkl-mega__section + .dkl-mega__section {
	margin-top: 44px;
}

.dkl-shopcats .dkl-mega__grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dkl-shopcats .dkl-mega__grid--wide {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dkl-shopcats .dkl-card__img {
	height: 170px;
}

.dkl-shopcats .dkl-mega__grid--wide .dkl-card__img {
	height: 260px;
}

/* The shop root lists categories only: result count, view toggles and the
   sidebar opener have nothing to act on here. */
.dkl-shopcats-on .shop-loop-head,
.dkl-shopcats-on .wd-shop-tools,
.dkl-shopcats-on .woocommerce-result-count,
.dkl-shopcats-on .woocommerce-pagination {
	display: none !important;
}

@media (max-width: 1024px) {
	.dkl-shopcats .dkl-mega__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.dkl-shopcats {
		margin-bottom: 32px;
	}

	.dkl-shopcats .dkl-mega__section + .dkl-mega__section {
		margin-top: 32px;
	}

	.dkl-shopcats .dkl-mega__head {
		margin-bottom: 14px;
		padding-bottom: 10px;
	}

	.dkl-shopcats .dkl-mega__title {
		font-size: 18px;
	}

	.dkl-shopcats .dkl-mega__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.dkl-shopcats .dkl-mega__grid--wide {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.dkl-shopcats .dkl-card__img {
		height: 120px;
	}

	.dkl-shopcats .dkl-mega__grid--wide .dkl-card__img {
		height: 180px;
	}

	.dkl-shopcats .dkl-card__bar {
		padding: 10px 12px;
	}

	.dkl-shopcats .dkl-card__name {
		font-size: 13px;
	}

	.dkl-shopcats .dkl-mega__grid--wide .dkl-card__name {
		font-size: 15px;
	}

	/* No hover lift on touch. */
	.dkl-shopcats .dkl-card:hover {
		transform: none;
	}
}
