/**
 * Category Switcher Styles
 * Phase 11.3
 */

.m77-category-switcher {
	margin: 0 0 30px 0;
	padding: 0;
}

.m77-category-switcher__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	padding: 15px 0;
}

/* ==========================================================
   TABS STYLE (default)
========================================================== */
.m77-category-switcher--tabs .m77-category-switcher__inner {
	border-bottom: 2px solid #e5e5e5;
}

.m77-category-switcher--tabs .m77-category-switcher__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 500;
	color: #666;
	text-decoration: none;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	transition: all 0.2s ease;
	cursor: pointer;
}

.m77-category-switcher--tabs .m77-category-switcher__tab:hover {
	color: #333;
	border-bottom-color: #ddd;
}

.m77-category-switcher--tabs .m77-category-switcher__tab--active {
	color: #0073aa;
	border-bottom-color: #0073aa;
}

/* ==========================================================
   PILLS STYLE
========================================================== */
.m77-category-switcher--pills .m77-category-switcher__inner {
	background: #f5f5f5;
	padding: 10px;
	border-radius: 50px;
	display: inline-flex;
	margin: 0 auto 30px;
}

.m77-category-switcher--pills .m77-category-switcher__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	text-decoration: none;
	background: transparent;
	border-radius: 50px;
	transition: all 0.2s ease;
}

.m77-category-switcher--pills .m77-category-switcher__tab:hover {
	background: #fff;
	color: #333;
}

.m77-category-switcher--pills .m77-category-switcher__tab--active {
	background: #0073aa;
	color: #fff;
}

/* ==========================================================
   BUTTONS STYLE
========================================================== */
.m77-category-switcher--buttons .m77-category-switcher__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	text-decoration: none;
	background: #fff;
	border: 2px solid #e5e5e5;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.m77-category-switcher--buttons .m77-category-switcher__tab:hover {
	border-color: #0073aa;
	color: #0073aa;
}

.m77-category-switcher--buttons .m77-category-switcher__tab--active {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

/* ==========================================================
   SHARED ELEMENTS
========================================================== */
.m77-category-switcher__icon {
	font-size: 18px;
	line-height: 1;
}

.m77-category-switcher__count {
	font-size: 12px;
	opacity: 0.7;
	font-weight: normal;
}

/* ==========================================================
   HERO: search row + category selector
========================================================== */
.m77-hero-widget .m77-search-wrapper {
	display: flex;
	align-items: stretch;
	gap: 0;
}

.m77-hero-search-input-wrap {
	flex: 1;
	position: relative;
	min-width: 0;
}

.m77-hero-widget .m77-search-wrapper .m77-hero-search-input {
	width: 100%;
}

.m77-hero-category-wrapper {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: stretch;
}

/* ==========================================================
   HERO INTEGRATION (category dropdown in hero search)
========================================================== */
.m77-hero-category-selector {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-right: 1px solid #e0e0e0;
	cursor: pointer;
	user-select: none;
	background: transparent;
	border-top: none;
	border-bottom: none;
	border-left: none;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	height: 48px;
	min-height: 48px;
	box-sizing: border-box;
}

.m77-hero-category-selector:hover {
	background: #f8f8f8;
}

.m77-hero-category-selector__icon {
	font-size: 16px;
}

.m77-hero-category-selector__label {
	white-space: nowrap;
}

.m77-hero-category-selector__arrow {
	font-size: 10px;
	opacity: 0.6;
}

.m77-hero-category-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #1a1a1a;
	color: #fff;
	border-radius: 8px;
	padding: 8px 0;
	margin-top: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	z-index: 1000;
	display: none;
}

.m77-hero-category-dropdown--open {
	display: block;
}

.m77-hero-category-dropdown__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.m77-hero-category-dropdown__item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.m77-hero-category-dropdown__item--active {
	background: rgba(0, 115, 170, 0.3);
}

.m77-hero-category-dropdown__icon {
	font-size: 16px;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 768px) {
	.m77-category-switcher__inner {
		gap: 5px;
		padding: 10px 0;
	}

	.m77-category-switcher--tabs .m77-category-switcher__tab,
	.m77-category-switcher--pills .m77-category-switcher__tab,
	.m77-category-switcher--buttons .m77-category-switcher__tab {
		padding: 8px 14px;
		font-size: 13px;
	}

	.m77-category-switcher__icon {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.m77-category-switcher__label {
		font-size: 12px;
	}

	.m77-category-switcher__count {
		display: none;
	}
}
