/* Shop page toolbar – fixes overlap of sort, filter, and grid/list toggles */
.shop-toolbar.filter-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border-color, #e6e6e6);
}

.shop-toolbar .filter-left-area {
	flex: 1 1 100%;
	min-width: 0;
}

@media (min-width: 768px) {
	.shop-toolbar .filter-left-area {
		flex: 1 1 auto;
	}
}

.shop-toolbar .filter-right-area {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px 12px;
}

@media (min-width: 768px) {
	.shop-toolbar .filter-right-area {
		flex: 0 1 auto;
	}
}

.shop-toolbar .filter-right-area > .toolbar-item {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding-left: 12px;
	margin-left: 0;
	border-left: 1px solid var(--border-color, #e6e6e6);
}

.shop-toolbar .filter-right-area > .toolbar-item:first-child {
	padding-left: 0;
	border-left: none;
}

.shop-toolbar .filter-right-area form {
	margin: 0;
	display: flex;
	align-items: center;
}

.shop-toolbar .filter-right-area .form-select {
	min-width: 170px;
	max-width: 100%;
	height: 40px;
	border: 1px solid var(--border-color, #ddd);
	border-radius: 6px;
	font-size: 14px;
	padding: 6px 32px 6px 12px;
	background-color: #fff;
}

.shop-toolbar .panel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 6px;
}

.shop-toolbar .shop-view-toggle .shop-tab {
	margin: 0;
}

.shop-toolbar .shop-tab .nav {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shop-toolbar .shop-tab .nav-item {
	margin: 0;
}

.shop-toolbar .shop-tab .nav-link {
	width: 40px;
	height: 40px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-color, #ddd);
	border-radius: 6px;
	color: var(--secondary, #333);
	background: #fff;
	font-size: 0;
	line-height: 1;
}

.shop-toolbar .shop-tab .nav-link i {
	font-size: 18px;
}

.shop-toolbar .shop-tab .nav-link.active {
	background: var(--secondary, #2d2d2d);
	border-color: var(--secondary, #2d2d2d);
	color: #fff;
}

.shop-toolbar .shop-tab .nav-link:hover:not(.active) {
	border-color: var(--secondary, #2d2d2d);
	color: var(--secondary, #2d2d2d);
}

@media (max-width: 575px) {
	.shop-toolbar .filter-right-area {
		justify-content: space-between;
	}

	.shop-toolbar .filter-right-area > .toolbar-item {
		padding-left: 0;
		border-left: none;
	}

	.shop-toolbar .filter-right-area .form-select {
		min-width: 140px;
	}
}

/* Sidebar filters */
.shop-filter aside .widget {
	margin-bottom: 24px;
}

.shop-filter .widget-title {
	font-size: 16px;
	margin-bottom: 12px;
}

.shop-filter .cat-item {
	margin-bottom: 8px;
}

.shop-filter .custom-control {
	gap: 8px;
	align-items: flex-start;
}

.shop-filter .form-check-label {
	line-height: 1.4;
}

/* Override theme rules that break layout when children are not direct divs */
.shop-toolbar.filter-wrapper .filter-right-area > div:nth-child(3n-1) {
	border-left: 1px solid var(--border-color, #e6e6e6) !important;
}

.shop-toolbar.filter-wrapper .shop-tab {
	margin-left: 0 !important;
}

@media (max-width: 767px) {
	.shop-toolbar.filter-wrapper {
		display: flex;
	}
}
