/* =============================================
 * Product Category Sidebar Widget
 * ============================================= */
.pcs-widget {
	overflow: hidden;
}

/* =============================================
 * Title
 * ============================================= */
.pcs-title {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	padding: 14px 16px;
	border-bottom: 1px solid #e0e0e0;
	line-height: 1.4;
}

/* =============================================
 * Category List
 * ============================================= */
.pcs-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pcs-cat-item {
	border-bottom: 1px solid #f0f0f0;
	border-left: 3px solid transparent;
	transition: border-color 0.2s ease;
}

.pcs-cat-item:hover {
	border-left-color: #333;
}

.pcs-cat-item:last-child {
	border-bottom: none;
}

/* =============================================
 * Category Row
 * ============================================= */
.pcs-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	cursor: default;
}

.pcs-cat-link {
	flex: 1;
	text-decoration: none;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
	transition: color 0.2s ease;
}

.pcs-cat-link:hover {
	color: #2196F3;
}

.pcs-count {
	margin-left: 4px;
	font-size: 12px;
	color: #aaa;
}

/* =============================================
 * Active State
 * ============================================= */
.pcs-cat-item.pcs-active > .pcs-cat-row .pcs-cat-link {
	color: #2196F3;
	font-weight: 600;
}

.pcs-cat-item.pcs-active {
	border-left-color: #333;
}

/* =============================================
 * Arrow Icon
 * ============================================= */
.pcs-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	cursor: pointer;
	flex-shrink: 0;
	transition: transform 0.25s ease;
	border-radius: 4px;
}

.pcs-arrow:hover {
	background-color: transparent;
}

.pcs-arrow svg {
	display: block;
	transition: color 0.2s ease;
}

.pcs-expanded > .pcs-cat-row .pcs-arrow {
	transform: rotate(90deg);
}

/* =============================================
 * Children List
 * ============================================= */
.pcs-children {
	list-style: none;
	margin: 0;
	padding: 0 0 6px 0;
}

.pcs-child-item {
	border-bottom: none;
}

.pcs-child-item .pcs-cat-row {
	padding: 6px 16px 6px 32px;
}

.pcs-depth-2 .pcs-cat-row {
	padding-left: 48px;
}

.pcs-depth-3 .pcs-cat-row {
	padding-left: 64px;
}

.pcs-child-item .pcs-cat-link {
	font-size: 13px;
	color: #777;
}

.pcs-child-item .pcs-cat-link:hover {
	color: #2196F3;
}

.pcs-child-item.pcs-active > .pcs-cat-row .pcs-cat-link {
	color: #2196F3;
	font-weight: 600;
}

/* =============================================
 * Arrow color (stroke-based SVG)
 * ============================================= */
.pcs-arrow {
	color: #999;
}

/* =============================================
 * Mobile trigger button (hidden on desktop)
 * ============================================= */
.pcs-mobile-trigger {
	display: none !important;
}

.pcs-mobile-overlay {
	display: none;
}

/* =============================================
 * Mobile (≤768px)
 * ============================================= */
@media (max-width: 768px) {
	.pcs-widget .pcs-title {
		display: none !important;
	}

	.pcs-widget .pcs-desktop-only {
		display: none !important;
	}

	.pcs-trigger-btn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 10px 18px;
		font-size: 14px;
		font-weight: 500;
		color: #333;
		background: #fff;
		border: 1px solid #ddd;
		cursor: pointer;
		transition: border-color 0.2s;
	}

	.pcs-trigger-btn:active {
		border-color: #999;
	}

	.pcs-trigger-btn svg {
		flex-shrink: 0;
	}

	/* Overlay */
	.pcs-mobile-overlay {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		background: rgba(0,0,0,0.45);
	}

	/* Slide-in panel */
	.pcs-mobile-panel {
		position: absolute;
		top: 0;
		left: 0;
		width: 80%;
		max-width: 320px;
		height: 100%;
		background: #fff;
		display: flex;
		flex-direction: column;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
	}

	.pcs-mobile-overlay.pcs-overlay-open .pcs-mobile-panel {
		transform: translateX(0);
	}

	.pcs-panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 16px;
		border-bottom: 1px solid #e0e0e0;
		flex-shrink: 0;
	}

	.pcs-panel-title {
		font-size: 16px;
		font-weight: 700;
		color: #333;
	}

	.pcs-panel-close {
		font-size: 24px;
		line-height: 1;
		color: #999;
		cursor: pointer;
		padding: 0 4px;
	}

	.pcs-panel-close:hover {
		color: #333;
	}

	.pcs-panel-body {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.pcs-panel-body .pcs-cat-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
}
