/* =====================================================
   ElementX Product Collection Widget
   Prefix: .exc-
   ===================================================== */

.exc-wrap {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	width: 100%;
	box-sizing: border-box;
}

/* --------------------------------------------------
   Sidebar
   -------------------------------------------------- */
.exc-sidebar {
	flex: 0 0 260px;
	width: 260px;
	box-sizing: border-box;
}

.exc-search-wrap {
	position: relative;
	margin-top: 24px;
}

.exc-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-bottom: none;
	font-size: 0.875rem;
	background: #fff;
	outline: none;
	display: block;
}

.exc-search-input:focus {
	border-color: #999;
}

.exc-search-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	background: #111;
	color: #fff;
	border: 1px solid #111;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.exc-search-btn:hover {
	background: #333;
	border-color: #333;
}

.exc-autocomplete {
	position: absolute;
	top: calc(100% - 1px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	z-index: 200;
	max-height: 260px;
	overflow-y: auto;
	display: none;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.exc-autocomplete.is-open {
	display: block;
}

.exc-autocomplete-item {
	padding: 10px 12px;
	font-size: 0.8rem;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	line-height: 1.3;
}

.exc-autocomplete-item:last-child {
	border-bottom: none;
}

.exc-autocomplete-item:hover,
.exc-autocomplete-item.is-focused {
	background: #f5f5f5;
}

/* Filter groups */
.exc-filter-group {
	border-top: 1px solid #e0e0e0;
}

.exc-filter-toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	background: none;
	border: none;
	padding: 14px 0;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	text-align: left;
}

.exc-filter-toggle-icon {
	font-size: 1.1rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.exc-filter-group.is-open .exc-filter-toggle-icon {
	transform: rotate(45deg);
}

.exc-filter-options {
	display: none;
	padding-bottom: 14px;
	gap: 8px;
	flex-direction: column;
}

.exc-filter-group.is-open .exc-filter-options {
	display: flex;
}

.exc-filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.8rem;
	line-height: 1.3;
}

.exc-filter-option input[type="checkbox"] {
	margin: 0;
	flex-shrink: 0;
	cursor: pointer;
	width: 14px;
	height: 14px;
	accent-color: #333;
}

.exc-filter-option-label {
	flex: 1;
}

.exc-filter-option-count {
	color: #999;
	font-size: 0.75rem;
}

/* Active filters bar */
.exc-active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.exc-active-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	background: #111;
	color: #fff;
	font-size: 0.75rem;
	cursor: pointer;
}

.exc-active-tag:hover {
	background: #333;
}

.exc-clear-all {
	background: none;
	border: none;
	font-size: 0.75rem;
	text-decoration: underline;
	cursor: pointer;
	color: #666;
	padding: 4px 0;
}

/* --------------------------------------------------
   Products grid
   -------------------------------------------------- */
.exc-main {
	flex: 1;
	min-width: 0;
}

.exc-count-bar {
	font-size: 0.875rem;
	color: #444;
	margin-bottom: 12px;
}

.exc-sort-bar {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

.exc-sort-btn {
	flex: 1;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #ddd;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	letter-spacing: 0.04em;
	transition: background 0.2s, border-color 0.2s;
}

.exc-sort-btn:hover {
	background: #f5f5f5;
	border-color: #bbb;
}

.exc-sort-btn.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

.exc-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(var(--exc-cols, 3), 1fr);
}

.exc-card,
.exc-card:hover,
.exc-card:focus,
.exc-card:visited {
	display: block;
	text-decoration: none !important;
	color: inherit;
}

.exc-card-title {
	text-decoration: none !important;
}

.exc-card-img-wrap {
	position: relative;
	overflow: hidden;
	background: #f5f5f5;
	aspect-ratio: 1 / 1;
}

.exc-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.exc-card:hover .exc-card-img {
	transform: scale(1.04);
}

.exc-card-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #c00;
	color: #fff;
	font-size: 0.7rem;
	padding: 3px 8px;
	font-weight: 600;
}

.exc-card-body {
	padding: 10px 0 0;
	text-align: center;
}

.exc-card-title {
	font-size: 0.875rem;
	font-weight: 500;
	margin: 0 0 4px;
	line-height: 1.3;
	text-decoration: none;
	text-align: center;
}

.exc-card-price {
	font-size: 0.8rem;
	color: #444;
}

.exc-card-price-sale {
	color: #c00;
	margin-right: 6px;
}

.exc-card-price-original {
	text-decoration: line-through;
	color: #999;
}

/* Loading overlay */
.exc-main.is-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s;
}

/* Pagination */
.exc-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 40px;
}

.exc-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #ddd;
	background: #fff;
	font-size: 0.875rem;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	border-radius: 50%;
}

.exc-page-btn.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

.exc-page-btn:hover:not(.is-active) {
	background: #f5f5f5;
}

.exc-page-arrow {
	border: none;
	background: none;
	font-size: 1rem;
	cursor: pointer;
	color: #444;
	padding: 0 4px;
}

.exc-page-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* No results */
.exc-no-results {
	text-align: center;
	padding: 60px 0;
	color: #999;
	font-size: 0.9rem;
}

/* Mobile filter toggle — hidden on desktop */
.exc-mobile-filter-toggle {
	display: none;
}

/* Responsive */
@media (max-width: 768px) {
	.exc-wrap {
		flex-direction: column;
		gap: 0;
	}

	/* Mobile filter toggle button */
	.exc-mobile-filter-toggle {
		display: inline-flex;
		justify-content: space-between;
		align-items: center;
		width: auto;
		padding: 12px 16px;
		background: none;
		border: 1px solid #e0e0e0;
		border-radius: 0;
		font-size: 0.875rem;
		font-weight: 600;
		cursor: pointer;
		letter-spacing: 0.04em;
		margin-bottom: 0;
		margin-left: 70px;
		box-sizing: border-box;
		gap: 8px;
	}

	.exc-mobile-filter-toggle-icon {
		font-size: 1.1rem;
		line-height: 1;
		transition: transform 0.2s ease;
	}

	.exc-mobile-filter-toggle[aria-expanded="true"] .exc-mobile-filter-toggle-icon {
		transform: rotate(45deg);
	}

	/* Sidebar hidden by default on mobile */
	.exc-sidebar {
		flex: none;
		width: 100%;
		display: none;
		padding-bottom: 8px;
		border-bottom: 1px solid #e0e0e0;
		margin-bottom: 20px;
	}

	.exc-sidebar.is-open {
		display: block;
	}

	.exc-grid {
		grid-template-columns: repeat(var(--exc-cols-mobile, 2), 1fr);
	}

	.exc-sort-btn {
		flex: 1;
	}
}
