.ttsn-category-menu * { box-sizing: border-box; }

.ttsn-search-bar {
	display: flex;
	align-items: stretch;
	width: 100%;
	background: #ffffff;
	overflow: visible;
	position: relative;
}

.ttsn-search-input {
	flex: 1 1 auto;
	border: none;
	outline: none;
	padding: 0 18px;
	font-size: 15px;
	background: transparent;
	min-width: 0;
}

.ttsn-cat-select {
	position: relative;
	flex: 0 0 auto;
	border-left: 1px solid #e5e5e5;
	border-right: 1px solid #e5e5e5;
}

.ttsn-cat-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 100%;
	width: 100%;
	padding: 0 16px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
}

.ttsn-cat-toggle .ttsn-dropdown-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
	transition: transform .2s ease;
	flex: 0 0 auto;
}

.ttsn-cat-toggle .ttsn-dropdown-icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

.ttsn-cat-toggle.is-active .ttsn-dropdown-icon {
	transform: rotate(180deg);
}

.ttsn-cat-toggle.is-selected .ttsn-cat-toggle-label {
	font-weight: 600;
}

.ttsn-cat-toggle-clear {
	display: none;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	line-height: 1;
	font-size: 15px;
	border-radius: 50%;
	flex: 0 0 auto;
	opacity: .6;
	cursor: pointer;
}

.ttsn-cat-toggle-clear:hover {
	opacity: 1;
}

.ttsn-search-submit {
	flex: 0 0 auto;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	color: #fff;
}

.ttsn-cat-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	background: #fff;
	z-index: 999;
	overflow-y: auto;
	display: none;
	text-align: left;
}

.ttsn-cat-panel.is-open {
	display: block;
}

/* Category List Style: Always Visible — panel becomes part of normal
   page flow under the search bar instead of an absolutely-positioned
   click-to-open dropdown. */
.ttsn-list-style-always .ttsn-cat-panel {
	position: static;
	display: block;
	width: 100%;
	box-shadow: none;
	z-index: auto;
	top: auto;
	left: auto;
}

.ttsn-list-style-always .ttsn-cat-select {
	position: static;
}

.ttsn-list-style-always .ttsn-cat-toggle .ttsn-dropdown-icon {
	display: none;
}

.ttsn-list-style-always .ttsn-search-bar {
	flex-wrap: wrap;
}

.ttsn-list-style-always .ttsn-cat-select {
	flex: 1 1 100%;
	order: 3;
	border-left: none;
	border-right: none;
}

/* Hide Scrollbar toggle: panel stays scrollable, track is just invisible */
.ttsn-panel-noscroll-yes .ttsn-cat-panel {
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* old Edge/IE */
}

.ttsn-panel-noscroll-yes .ttsn-cat-panel::-webkit-scrollbar {
	display: none; /* Chrome, Safari, new Edge */
	width: 0;
	height: 0;
}

.ttsn-cat-children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ttsn-cat-item {
	border-bottom: 1px solid #eee;
	position: relative;
}

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

.ttsn-cat-item > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	text-decoration: none;
	font-size: 14px;
	transition: background-color .15s ease, color .15s ease;
}

.ttsn-cat-item .ttsn-caret {
	width: 0;
	height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 5px solid currentColor;
	opacity: .55;
	transition: transform .2s ease;
	flex: 0 0 auto;
}

.ttsn-cat-item.is-expanded > a .ttsn-caret {
	transform: rotate(90deg);
}

.ttsn-cat-item .ttsn-cat-children {
	display: none;
}

/* Always-expanded (nested) mode */
.ttsn-category-menu[data-expand-mode="nested"] .ttsn-cat-item .ttsn-cat-children {
	display: block;
}

/* Accordion mode */
.ttsn-category-menu[data-expand-mode="accordion"] .ttsn-cat-item.is-expanded > .ttsn-cat-children {
	display: block;
}

.ttsn-live-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	width: 100%;
	background: #fff;
	z-index: 998;
	overflow-y: auto;
	display: none;
	text-align: left;
	box-sizing: border-box;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.ttsn-live-results::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.ttsn-live-results.is-open {
	display: block;
}

.ttsn-live-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ttsn-live-result-item {
	border-bottom: 1px solid #eee;
}

.ttsn-live-result-item:last-child {
	border-bottom: none;
}

.ttsn-live-result-item a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 14px;
	text-decoration: none;
	transition: background-color .15s ease;
}

.ttsn-live-result-thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: 4px;
	background: #f5f5f5;
}

.ttsn-live-result-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ttsn-live-result-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ttsn-live-result-title {
	font-size: 14px;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ttsn-live-result-price {
	font-size: 13px;
	font-weight: 600;
}

.ttsn-category-menu[data-show-price="no"] .ttsn-live-result-price {
	display: none;
}

.ttsn-live-no-results {
	padding: 16px 14px;
	font-size: 14px;
	text-align: center;
}

.ttsn-live-results.is-loading {
	opacity: .7;
}

@media (max-width: 767px) {
	.ttsn-search-bar {
		flex-wrap: nowrap;
	}
	.ttsn-cat-select {
		flex: 1 1 100%;
		order: 0;
		border-left: none;
		border-right: none;
		border-top: 1px solid #e5e5e5;
	}
	.ttsn-cat-panel {
		width: 100% !important;
		left: 0;
		right: 0;
	}
	.ttsn-live-results {
		position: absolute;
		box-shadow: none !important;
		min-height: auto !important;
	}
}
