/* ============================================================
   Creet Smart Sidebar – Frontend Styles
   Blocksy handles two-column layout via data-sidebar attribute.
   These styles cover only the sidebar internals.
   ============================================================ */

/* ── Sidebar shell ── */
.creet-sidebar {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
	font-size: 14px;
	color: #1e293b;
}

/* ── Header ── */
.creet-sb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: #f8fafc;
	border-bottom: 1.5px solid #e2e8f0;
}
.creet-sb-head__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 800;
	color: #1e293b;
}
.creet-sb-head__title svg {
	width: 16px;
	height: 16px;
	color: var(--creet-primary-color, #00838f);
	flex-shrink: 0;
}
.creet-sb-badge {
	background: var(--creet-primary-color, #00838f);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 20px;
	line-height: 1.6;
}
.creet-sb-clear {
	font-size: 12px;
	font-weight: 600;
	color: #ef4444;
	text-decoration: none;
	padding: 4px 8px;
	border-radius: 6px;
	transition: background .15s;
	white-space: nowrap;
}
.creet-sb-clear:hover { background: #fef2f2; }

/* ── Active filter chips ── */
.creet-sb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	padding: 10px 14px;
	border-bottom: 1.5px solid #e2e8f0;
}
.creet-sb-chip {
	display: inline-flex;
	align-items: center;
	background: rgba(0,131,143,.08);
	color: var(--creet-primary-color, #00838f);
	border: 1px solid rgba(0,131,143,.2);
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: all .15s;
}
.creet-sb-chip:hover { background: #fef2f2; color: #ef4444; border-color: #fca5a5; }

/* ── Sections ── */
.creet-sb-section {
	border-bottom: 1.5px solid #e2e8f0;
}
.creet-sb-section:last-child { border-bottom: none; }

/* Section button */
.creet-sb-sec-btn {
	width: 100%;
	background: none;
	border: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 16px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	text-align: start;
	font-family: inherit;
	transition: background .15s;
}
.creet-sb-sec-btn:hover { background: #f8fafc; }
.creet-sb-sec-btn__label {
	display: flex;
	align-items: center;
	gap: 8px;
}
.creet-sb-sec-btn__label svg {
	width: 15px;
	height: 15px;
	color: var(--creet-primary-color, #00838f);
	flex-shrink: 0;
}
.creet-sb-chevron {
	width: 14px;
	height: 14px;
	color: #94a3b8;
	flex-shrink: 0;
	transition: transform .22s;
}
.creet-sb-sec-btn:not(.active) .creet-sb-chevron { transform: rotate(-90deg); }

/* Section body */
.creet-sb-sec-body {
	padding: 4px 14px 14px;
}

/* ── Category list ── */
.creet-sb-cat-all {
	display: flex;
	align-items: center;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 4px;
	transition: all .15s;
}
.creet-sb-cat-all:hover { background: #f8fafc; color: var(--creet-primary-color, #00838f); }
.creet-sb-cat-all.active { background: var(--creet-primary-color, #00838f); color: #fff !important; font-weight: 700; }
.creet-sb-cat-all.active:hover,
.creet-sb-cat-all.active:focus { background: var(--creet-primary-color, #00838f); color: #fff !important; opacity: .85; }

.creet-sb-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.creet-sb-cat-list li { margin: 0; }

.creet-sb-cat__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 7px 10px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	transition: all .15s;
}
.creet-sb-cat__link:hover { background: #f8fafc; color: var(--creet-primary-color, #00838f); }
.creet-sb-cat__link.active {
	background: var(--creet-primary-color, #00838f);
	color: #fff !important;
	font-weight: 700;
}
.creet-sb-cat__link.active:hover,
.creet-sb-cat__link.active:focus {
	background: var(--creet-primary-color, #00838f);
	color: #fff !important;
	opacity: .85;
}
.creet-sb-cat__link.active span,
.creet-sb-cat__link.active:hover span,
.creet-sb-cat__link.active:focus span { color: #fff !important; }
.creet-sb-cat__count {
	font-style: normal;
	font-size: 11px;
	font-weight: 600;
	background: #f1f5f9;
	color: #64748b;
	padding: 1px 7px;
	border-radius: 20px;
	flex-shrink: 0;
}
.creet-sb-cat__link.active .creet-sb-cat__count { background: rgba(255,255,255,.2); color: #fff; }

/* Children */
.creet-sb-cat-children {
	list-style: none;
	margin: 0;
	padding: 0;
}
.creet-sb-cat-children .creet-sb-cat__link {
	padding-inline-start: 22px;
	font-size: 12px;
	color: #64748b;
}
.creet-sb-cat-children .creet-sb-cat__link:hover { color: var(--creet-primary-color, #00838f); }
.creet-sb-cat-children .creet-sb-cat__link.active,
.creet-sb-cat-children .creet-sb-cat__link.active:hover,
.creet-sb-cat-children .creet-sb-cat__link.active:focus { color: #fff !important; }

/* ── Price slider ── */
.creet-sb-price-form { padding-top: 4px; }
.creet-sb-price-vals {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.creet-sb-price-tag {
	font-size: 13px;
	font-weight: 700;
	color: var(--creet-primary-color, #00838f);
	background: rgba(0,131,143,.08);
	padding: 4px 10px;
	border-radius: 8px;
	min-width: 50px;
	text-align: center;
}
.creet-sb-price-sep { color: #94a3b8; }

.creet-sb-slider {
	position: relative;
	height: 32px;
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}
.creet-sb-slider__track {
	position: absolute;
	width: 100%;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	pointer-events: none;
}
.creet-sb-slider__fill {
	position: absolute;
	height: 4px;
	background: var(--creet-primary-color, #00838f);
	border-radius: 2px;
	pointer-events: none;
}
.creet-sb-range {
	position: absolute;
	width: 100%;
	height: 4px;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none;
	margin: 0;
	border: none;
	outline: none;
}
.creet-sb-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--creet-primary-color, #00838f);
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,.18);
	cursor: pointer;
	pointer-events: all;
}
.creet-sb-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--creet-primary-color, #00838f);
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,.18);
	cursor: pointer;
	pointer-events: all;
}

.creet-sb-price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.creet-sb-price-inputs input {
	flex: 1;
	min-width: 0;
	padding: 7px 9px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	background: #f8fafc;
	box-sizing: border-box;
	font-family: inherit;
}
.creet-sb-price-inputs input:focus { border-color: var(--creet-primary-color, #00838f); outline: none; }
.creet-sb-price-inputs span { color: #94a3b8; flex-shrink: 0; }

.creet-sb-apply-btn {
	display: block;
	width: 100%;
	background: var(--creet-primary-color, #00838f);
	color: #fff;
	border: none;
	padding: 9px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s;
}
.creet-sb-apply-btn:hover { opacity: .85; }

/* ── Show Results sticky bar ── */
.creet-sb-apply-bar {
	padding: 12px 16px;
	border-top: 1.5px solid #e2e8f0;
	background: #fff;
	position: sticky;
	bottom: 0;
	z-index: 2;
}
.creet-sb-apply-results {
	display: block;
	width: 100%;
	background: var(--creet-primary-color, #00838f);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s, transform .1s;
	text-align: center;
}
.creet-sb-apply-results:hover { opacity: .85; transform: translateY(-1px); }
.creet-sb-apply-results:active { transform: translateY(0); }

/* ── Brand list ── */
.creet-sb-brand-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.creet-sb-brand__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	transition: all .15s;
}
.creet-sb-brand__link:hover { background: #f8fafc; color: var(--creet-primary-color, #00838f); }
.creet-sb-brand__link img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.creet-sb-brand__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cbd5e1;
	flex-shrink: 0;
}

/* ── On Sale ── */
.creet-sb-sale-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 16px;
	border-bottom: 1.5px solid #e2e8f0;
	text-decoration: none;
	transition: background .15s;
}
.creet-sb-sale-row:hover { background: #f8fafc; }
.creet-sb-sale-row__label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
}
.creet-sb-sale-row__label svg { width: 15px; height: 15px; color: #ef4444; }
.creet-sb-sale-pill {
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 5px;
	letter-spacing: .5px;
}
.creet-sb-toggle {
	width: 40px;
	height: 22px;
	border-radius: 22px;
	background: #e2e8f0;
	position: relative;
	flex-shrink: 0;
	transition: background .2s;
	direction: ltr;
}
.creet-sb-toggle::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	top: 3px;
	left: 3px;
	box-shadow: 0 1px 3px rgba(0,0,0,.15);
	transition: transform .2s;
}
.creet-sb-toggle.on { background: var(--creet-primary-color, #00838f); }
.creet-sb-toggle.on::before { transform: translateX(18px); }

/* ── Rating ── */
.creet-sb-rating-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: #1e293b;
	transition: all .15s;
}
.creet-sb-rating-row:hover { background: #f8fafc; }
.creet-sb-rating-row.active { background: var(--creet-primary-color, #00838f); color: #fff; }
.creet-sb-stars { color: #f59e0b; letter-spacing: 1px; font-size: 14px; }
.creet-sb-rating-row.active .creet-sb-stars { color: #fef08a; }
.creet-sb-rating-up { font-size: 11px; color: #64748b; }
.creet-sb-rating-row.active .creet-sb-rating-up { color: rgba(255,255,255,.75); }

/* ── Quick Links ── */
.creet-sb-link-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	transition: all .15s;
}
.creet-sb-link-item:hover { background: #f8fafc; color: var(--creet-primary-color, #00838f); }
.creet-sb-link-item svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--creet-primary-color, #00838f); }

/* ============================================================
   Mobile: FAB + Slide-up Drawer
   ============================================================ */
@media (min-width: 1000px) {
	/* On desktop the sidebar is in position via JS + Blocksy's data-sidebar CSS */
	.creet-sb-fab,
	.creet-sb-overlay,
	.creet-sb-drawer {
		display: none !important;
	}
}

@media (max-width: 999px) {
	/* Hide the desktop aside on mobile (JS does NOT inject it on mobile) */
	.creet-sidebar {
		display: none !important;
	}

	/* FAB */
	.creet-sb-fab {
		position: fixed;
		bottom: 80px;
		inset-inline-end: 16px;
		z-index: 99990;
		display: flex;
		align-items: center;
		gap: 8px;
		background: var(--creet-primary-color, #00838f);
		color: #fff;
		border: none;
		padding: 12px 20px;
		border-radius: 50px;
		font-size: 14px;
		font-weight: 700;
		cursor: pointer;
		box-shadow: 0 6px 20px rgba(0,0,0,.22);
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
		transition: transform .15s, box-shadow .15s;
	}
	.creet-sb-fab:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
	.creet-sb-fab svg { width: 16px; height: 16px; flex-shrink: 0; }
	.creet-sb-fab__badge {
		background: #ef4444;
		color: #fff;
		width: 20px;
		height: 20px;
		border-radius: 50%;
		font-size: 11px;
		font-weight: 700;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	/* Overlay */
	.creet-sb-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,.5);
		z-index: 99991;
		opacity: 0;
		pointer-events: none;
		transition: opacity .3s;
	}
	.creet-sb-overlay.open { opacity: 1; pointer-events: all; }

	/* Drawer */
	.creet-sb-drawer {
		position: fixed;
		bottom: 0;
		inset-inline-start: 0;
		inset-inline-end: 0;
		z-index: 99992;
		background: #fff;
		border-radius: 20px 20px 0 0;
		max-height: 90vh;
		display: flex;
		flex-direction: column;
		transform: translateY(100%);
		transition: transform .35s cubic-bezier(.32,.72,0,1);
	}
	.creet-sb-drawer.open { transform: translateY(0); }

	.creet-sb-drawer__grip {
		width: 36px;
		height: 4px;
		background: #e2e8f0;
		border-radius: 2px;
		margin: 10px auto 0;
		flex-shrink: 0;
	}
	.creet-sb-drawer__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 12px 18px 10px;
		border-bottom: 1.5px solid #e2e8f0;
		flex-shrink: 0;
		font-size: 15px;
		font-weight: 800;
		color: #1e293b;
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
	}
	.creet-sb-drawer__close {
		background: #f1f5f9;
		border: none;
		width: 32px;
		height: 32px;
		border-radius: 50%;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.creet-sb-drawer__close svg { width: 14px; height: 14px; }
	.creet-sb-drawer__body {
		overflow-y: auto;
		flex: 1;
		padding-bottom: env(safe-area-inset-bottom, 16px);
	}
	/* Sidebar inside drawer */
	.creet-sb-drawer__body .creet-sidebar {
		display: block !important;
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		position: static !important;
		max-height: none !important;
		overflow: visible !important;
	}
}

/* Hide Blocksy's native mobile filter toggle — creet sidebar FAB replaces it */
@media (max-width: 999px) {
	.ct-sidebar-toggle {
		display: none !important;
	}
}
