/**
 * Elementor Product Categories Grid – frontend styles
 *
 * @package EPCG
 */

/* Grid wrapper */
.epcg-grid {
	display: grid;
	grid-template-columns: repeat(var(--epcg-columns, 2), 1fr);
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.epcg-grid *,
.epcg-grid *::before,
.epcg-grid *::after {
	box-sizing: border-box;
}

/* Block: no border, no background. Padding controlled via Style > Layout > Block padding. */
.epcg-block {
	margin: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.epcg-block:hover {
	border: none;
	box-shadow: none;
}

/* Parent title */
.epcg-block__title {
	margin: 0 0 0.5em;
	font-size: 1rem;
	line-height: 1.3;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.epcg-block__title a,
.epcg-block__title span {
	text-decoration: none;
	transition: color 0.2s ease;
}

/* With-icons design: icon left, category + subcategories right */
.epcg-design-with_icons .epcg-block {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
}

.epcg-design-with_icons .epcg-block__icon {
	flex-shrink: 0;
	margin: 0;
	line-height: 0;
}

.epcg-design-with_icons .epcg-block__icon img {
	display: block;
	object-fit: contain;
	vertical-align: middle;
}

.epcg-design-with_icons .epcg-block__icon a {
	display: block;
}

.epcg-design-with_icons .epcg-block__content {
	flex: 1;
	min-width: 0;
}

/* Text-only: no icon, block stays block so content stacks normally */
.epcg-design-text_only .epcg-block__icon {
	display: none;
}

/* Parent list only: one vertical list of selected categories, no children */
.epcg-list-only.epcg-grid {
	display: block;
	gap: 0;
}

.epcg-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.epcg-list__item {
	margin: 0;
	padding: 0.25em 0;
}

.epcg-list__item:first-child {
	padding-top: 0;
}

.epcg-list__item a,
.epcg-list__item span {
	text-decoration: none;
	transition: color 0.2s ease;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Children list */
.epcg-block__children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.epcg-block__children li {
	margin: 0.25em 0 0;
	padding: 0;
}

.epcg-block__children li:first-child {
	margin-top: 0;
}

.epcg-block__children a {
	text-decoration: none;
	transition: color 0.2s ease;
}

/* Responsive: 1 column on small screens */
@media (max-width: 767px) {
	.epcg-grid {
		grid-template-columns: 1fr;
	}
}

/* Responsive columns via modifier (widget sets --epcg-columns) */
@media (min-width: 768px) {
	.epcg-grid--col-1 { grid-template-columns: 1fr; }
	.epcg-grid--col-2 { grid-template-columns: repeat(2, 1fr); }
	.epcg-grid--col-3 { grid-template-columns: repeat(3, 1fr); }
	.epcg-grid--col-4 { grid-template-columns: repeat(4, 1fr); }
	.epcg-grid--col-5 { grid-template-columns: repeat(5, 1fr); }
	.epcg-grid--col-6 { grid-template-columns: repeat(6, 1fr); }
}
