.wcef-filters {
	width: 100%;
}

.wcef-grid {
	width: 100%;
}

/*
 * Elementor Containers only grow to fill remaining flex space when told to;
 * a container left with no explicit width (common when a builder places our
 * grid widget straight into a flex row without setting "Width: Grow") shrinks
 * to the width of its content instead. Claim the space explicitly here so the
 * grid renders correctly regardless of how the surrounding container was set up.
 */
.elementor-widget-wcef-grid,
.elementor-widget-wcef-grid > .elementor-widget-container {
	width: 100% !important;
	flex: 1 1 0% !important;
	min-width: 0 !important;
}

/*
 * The widget wrapper above can grow all it wants, but it is still capped by
 * its immediate parent — the Elementor Container the widget was dropped
 * into. If that container was left without an explicit "Grow" width (the
 * default when quickly building a layout), it shrinks to content instead of
 * filling the row. Force that direct parent container to grow too.
 */
.e-con:has( > .elementor-widget-wcef-grid ) {
	width: 100% !important;
	flex: 1 1 0% !important;
	min-width: 0 !important;
}

/*
 * The filters sidebar is meant to stay narrow, not grow — but the same kind
 * of unconfigured Container (flex-grow: 0, flex-shrink: 0, no width) also
 * makes it collapse toward zero instead of settling at a sensible sidebar
 * width. Give it a floor without forcing it to grow.
 */
.elementor-widget-wcef-filters {
	min-width: 240px;
}

.e-con:has( > .elementor-widget-wcef-filters ) {
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 240px !important;
}

.wcef-mobile-toggle {
	display: none;
}

.wcef-group {
	margin-bottom: 24px;
}

.wcef-group-title {
	font-weight: 600;
	margin-bottom: 12px;
}

.wcef-terms {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wcef-terms--pills {
	flex-direction: row;
	flex-wrap: wrap;
}

.wcef-term-item {
	display: block;
}

.wcef-term-item.wcef-term-hidden {
	display: none;
}

.wcef-term {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	padding: 6px 10px;
	border-radius: 4px;
	line-height: 1.3;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.wcef-terms--pills .wcef-term {
	border: 1px solid #d8d8d8;
	border-radius: 999px;
}

.wcef-term input[type="checkbox"] {
	margin: 0;
}

.wcef-terms--pills .wcef-term input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wcef-term-count {
	font-size: .85em;
}

.wcef-show-more {
	display: inline-block;
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	color: #7a5cff;
	text-decoration: underline;
	text-transform: none;
	letter-spacing: normal;
	line-height: normal;
	width: auto;
	min-height: 0;
	cursor: pointer;
	margin: 4px 0 0;
	padding: 0;
	font-size: .9em;
	font-weight: 400;
}

.wcef-show-more:hover,
.wcef-show-more:focus {
	background: none;
	box-shadow: none;
}

.wcef-price {
	position: relative;
	padding-top: 8px;
}

.wcef-price-track {
	position: relative;
	height: 4px;
	border-radius: 2px;
	margin: 0 2px 16px;
}

.wcef-price-track-fill {
	position: absolute;
	top: 0;
	height: 4px;
	border-radius: 2px;
}

.wcef-price-range {
	position: absolute;
	top: 8px;
	left: 0;
	width: 100%;
	margin: 0;
	pointer-events: none;
	appearance: none;
	background: transparent;
	height: 4px;
}

.wcef-price-range::-webkit-slider-thumb {
	appearance: none;
	pointer-events: all;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

.wcef-price-range::-moz-range-thumb {
	pointer-events: all;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

.wcef-price-inputs {
	display: flex;
	gap: 12px;
}

.wcef-price-inputs label {
	display: flex;
	flex-direction: column;
	font-size: .85em;
	gap: 4px;
	flex: 1;
}

.wcef-price-inputs input {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
}

.wcef-actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.wcef-btn {
	cursor: pointer;
	border: none;
	background: #f2f2f2;
	padding: 10px 18px;
	border-radius: 4px;
	font-weight: 600;
}

.wcef-btn-clear {
	background: transparent;
}

/* Grid */

.wcef-grid.is-loading .wcef-grid-content {
	opacity: .45;
	pointer-events: none;
	transition: opacity .15s ease;
}

.wcef-grid-result-count {
	margin-bottom: 16px;
	opacity: .7;
	font-size: .9em;
}

.wcef-grid-list {
	display: grid;
	grid-template-columns: repeat(var(--wcef-cols, 4), 1fr);
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcef-card {
	position: relative;
	display: flex;
	flex-direction: column;
}

.wcef-card-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	gap: 6px;
}

.wcef-card-image {
	position: relative;
	display: block;
}

.wcef-card-image img {
	width: 100%;
	height: auto;
	display: block;
}

.wcef-badge-sale {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #e53935;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 3px;
	text-transform: uppercase;
}

.wcef-card-cat {
	font-size: .75em;
	text-transform: uppercase;
	opacity: .6;
}

.wcef-card-title {
	font-weight: 600;
}

.wcef-card-price {
	font-weight: 700;
}

.wcef-card .add_to_cart_button {
	display: inline-block;
	margin-top: 10px;
	text-align: center;
	text-decoration: none;
	padding: 8px 16px;
	border-radius: 4px;
	font-weight: 600;
}

.wcef-no-results {
	grid-column: 1 / -1;
	opacity: .7;
}

.wcef-pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 32px;
	flex-wrap: wrap;
}

.wcef-page-btn {
	border: 1px solid #d8d8d8;
	background: #fff;
	width: 36px;
	height: 36px;
	border-radius: 4px;
	cursor: pointer;
}

.wcef-page-btn.is-active {
	background: #7a5cff;
	color: #fff;
	border-color: #7a5cff;
}

.wcef-load-more {
	cursor: pointer;
	border: 1px solid #d8d8d8;
	background: #fff;
	padding: 10px 24px;
	border-radius: 4px;
	font-weight: 600;
}

/* Tablet / Mobile columns */
@media (max-width: 1024px) {
	.wcef-grid-list {
		grid-template-columns: repeat(var(--wcef-cols-tablet, 3), 1fr);
	}
}

@media (max-width: 767px) {
	.wcef-grid-list {
		grid-template-columns: repeat(var(--wcef-cols-mobile, 2), 1fr);
	}

	.wcef-mobile-toggle {
		display: inline-block;
		margin-bottom: 16px;
	}

	.wcef-filters-panel {
		display: none;
	}

	.wcef-filters-panel.is-open {
		display: block;
	}
}
