/**
 * E-Grow Components: Catalog (colour dots on the product cards).
 *
 * The dots follow the text alignment of the card: centred cards get centred dots.
 */

.egc-cat {
	display: block;
	margin: 8px 0 4px;
	line-height: 0;
}

.egc-cat__dots {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	vertical-align: middle;
}

.egc-cat__dot {
	box-sizing: border-box;
	display: block;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
	transition: box-shadow 0.15s;
}

.egc-cat__dot[data-href] {
	cursor: pointer;
}

.egc-cat__dot:hover,
.egc-cat__dot.is-active {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14), 0 0 0 2px #fff, 0 0 0 3px var(--egc-accent, #111);
}

.egc-cat__more {
	font-size: 12px;
	line-height: 13px;
	letter-spacing: 0.04em;
	color: #6f6f6f;
}

/* Touch screens: a little larger, there is no hover. */
@media (hover: none) {

	.egc-cat__dot {
		width: 15px;
		height: 15px;
	}

	.egc-cat__more {
		line-height: 15px;
	}
}

.egc-cat .egc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Category tiles with an icon instead of a photo (setting "Category tiles") */

/* The same space between rows and columns (the theme uses a larger row gap for product cards). */
ul.products:has(> li.egc-cat-tile) {
	gap: clamp(12px, 1.6vw, 24px);
}

.woocommerce ul.products li.product.egc-cat-tile,
ul.products li.product.egc-cat-tile {
	text-align: center;
}

.woocommerce ul.products li.product.egc-cat-tile > a,
ul.products li.product.egc-cat-tile > a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	box-sizing: border-box;
	height: 100%;
	min-height: 168px;
	padding: 32px 12px 28px;
	border: 1px solid #e6e6e6;
	background: #fff;
	color: #111;
	text-decoration: none;
	transition: border-color 0.2s;
}

.woocommerce ul.products li.product.egc-cat-tile > a:hover,
ul.products li.product.egc-cat-tile > a:hover,
ul.products li.product.egc-cat-tile > a:focus-visible {
	border-color: #111;
	color: #111;
}

.egc-cat-tile__icon {
	display: block;
	line-height: 0;
}

.egc-cat-tile__svg {
	display: block;
	width: 44px;
	height: 44px;
}

.woocommerce ul.products li.product.egc-cat-tile .woocommerce-loop-category__title,
ul.products li.product.egc-cat-tile .woocommerce-loop-category__title {
	margin: 0;
	padding: 0;
	font-size: 12px !important;
	font-weight: 400;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}

@media (max-width: 767px) {

	/* Two tiles per row on phones, where the theme shows one product per row. */
	ul.products:has(> li.egc-cat-tile) {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.woocommerce ul.products li.product.egc-cat-tile,
	ul.products li.product.egc-cat-tile {
		width: auto !important;
		margin: 0 !important;
	}

	.woocommerce ul.products li.product.egc-cat-tile > a,
	ul.products li.product.egc-cat-tile > a {
		min-height: 136px;
		padding: 24px 8px 20px;
		gap: 14px;
	}

	.egc-cat-tile__svg {
		width: 36px;
		height: 36px;
	}
}
