/* ═══════════════════════════════════════════════════════
   FIND CARS BY CHOICE SECTION
   ═══════════════════════════════════════════════════════ */

.m77-find-by-choice-section {
	padding: 40px 0;
}

/* Section Header */
.m77-find-by-choice-section .m77-section-header {
	margin-bottom: 24px;
}

.m77-find-by-choice-section .m77-section-title {
	font-size: 24px;
	font-weight: 700;
	color: #222;
	margin: 0 0 4px;
	line-height: 1.3;
}

.m77-find-by-choice-section .m77-section-subtitle {
	font-size: 14px;
	color: #666;
	margin: 0;
}

/* ═══════════════════════════════════════════════════════
   MAIN TABS (Budget / Body Type / Fuel Type)
   ═══════════════════════════════════════════════════════ */

.m77-choice-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 2px solid #eee;
	padding-bottom: 0;
}

.m77-choice-tab {
	padding: 12px 24px;
	background: none;
	border: none;
	font-size: 15px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	position: relative;
	transition: color 0.2s ease;
	margin-bottom: -2px;
}

.m77-choice-tab:hover {
	color: #333;
}

.m77-choice-tab.active {
	color: #0073aa;
}

.m77-choice-tab.active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: #0073aa;
}

/* ═══════════════════════════════════════════════════════
   TAB PANELS
   ═══════════════════════════════════════════════════════ */

.m77-choice-panels {
	position: relative;
}

.m77-choice-panel {
	display: none;
}

.m77-choice-panel.active {
	display: block;
}

/* ═══════════════════════════════════════════════════════
   SUB-TABS (Budget ranges, Body types, Fuel types)
   ═══════════════════════════════════════════════════════ */

.m77-sub-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
	padding: 16px 0;
}

.m77-sub-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 25px;
	font-size: 14px;
	font-weight: 500;
	color: #555;
	cursor: pointer;
	transition: all 0.2s ease;
}

.m77-sub-tab:hover {
	background: #eee;
	border-color: #ccc;
}

.m77-sub-tab.active {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

.m77-sub-tab-icon {
	font-size: 16px;
}

/* ═══════════════════════════════════════════════════════
   SUB-PANELS
   ═══════════════════════════════════════════════════════ */

.m77-sub-panels {
	position: relative;
}

.m77-sub-panel {
	display: none;
}

.m77-sub-panel.active {
	display: block;
}

/* ═══════════════════════════════════════════════════════
   CAROUSEL - Reset any theme interference
   ═══════════════════════════════════════════════════════ */

.m77-find-by-choice-section .m77-carousel-container,
.m77-find-by-choice-section .m77-carousel-container * {
	box-sizing: border-box;
}

.m77-find-by-choice-section .m77-carousel-track {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
}

.m77-find-by-choice-section .m77-carousel-slide {
	float: none !important;
	clear: none !important;
	display: block !important;
}

/* ═══════════════════════════════════════════════════════
   AUTOCAR-STYLE CAROUSEL
   ═══════════════════════════════════════════════════════ */

.m77-carousel-container {
	position: relative !important;
	width: 100% !important;
	display: block !important;
}

/* Hide scroll indicator / focus ring artifacts */
.m77-carousel-viewport::-webkit-scrollbar {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}

.m77-carousel-viewport {
	scrollbar-width: none !important;
	-ms-overflow-style: none !important;
}

.m77-carousel-container *:focus {
	outline: none;
}

.m77-carousel-arrow:focus {
	outline: none;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Remove any stray pseudo-elements */
.m77-carousel-container::after,
.m77-carousel-viewport::after,
.m77-carousel-track::after {
	display: none !important;
	content: none !important;
}

/* Viewport - clips overflow */
.m77-carousel-viewport {
	overflow: hidden !important;
	margin: 0 50px;
	position: relative;
	width: calc(100% - 100px) !important;
}

/* Track - FORCE horizontal flex layout */
.m77-carousel-track {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	gap: 20px;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
	margin: 0 !important;
	padding: 0 !important;
}

.m77-carousel-track.is-dragging {
	transition: none;
	cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION ARROWS (Premium Overlay Style)
   ═══════════════════════════════════════════════════════ */

.m77-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	transition: all 0.25s ease;
	z-index: 10;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	padding: 0;
}

.m77-carousel-arrow:hover {
	background: #222;
	color: #fff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
	transform: translateY(-50%) scale(1.05);
}

.m77-carousel-arrow:disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.7);
}

.m77-carousel-arrow:disabled:hover {
	background: rgba(255, 255, 255, 0.7);
	color: #333;
	transform: translateY(-50%) scale(1);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Arrows slightly overlapping content */
.m77-carousel-prev {
	left: 25px;
}

.m77-carousel-next {
	right: 25px;
}

.m77-carousel-arrow svg {
	width: 20px;
	height: 20px;
	stroke-width: 2.5;
}

/* ═══════════════════════════════════════════════════════
   SLIDES - FORCE width for 4 cards + peek
   ═══════════════════════════════════════════════════════ */

.m77-carousel-slide {
	flex: 0 0 24% !important;
	min-width: 24% !important;
	max-width: 24% !important;
	width: 24% !important;
	display: block !important;
}

.m77-choice-car-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	display: block;
	transition: all 0.25s ease;
	height: 100%;
}

.m77-choice-car-card:hover {
	border-color: #ddd;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-4px);
}

/* Car Image */
.m77-choice-car-image {
	height: 140px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.m77-choice-car-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.m77-choice-car-card:hover .m77-choice-car-image img {
	transform: scale(1.05);
}

.m77-choice-car-placeholder {
	font-size: 32px;
	font-weight: 700;
	color: #ccc;
	letter-spacing: 2px;
}

/* Car Info */
.m77-choice-car-info {
	padding: 14px 16px;
}

.m77-choice-car-name {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	margin: 0 0 6px;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.m77-choice-car-price {
	font-size: 13px;
	color: #e53935;
	font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   VIEW ALL BUTTON
   ═══════════════════════════════════════════════════════ */

.m77-choice-view-all {
	text-align: center;
	padding-top: 28px;
}

.m77-view-all-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 32px;
	background: #fff;
	border: 2px solid #222;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	transition: all 0.25s ease;
}

.m77-view-all-btn:hover {
	background: #222;
	color: #fff;
}

.m77-view-all-btn svg {
	transition: transform 0.25s ease;
}

.m77-view-all-btn:hover svg {
	transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════
   NO CARS MESSAGE
   ═══════════════════════════════════════════════════════ */

.m77-no-cars-message {
	text-align: center;
	padding: 48px 24px;
	background: #f9f9f9;
	border-radius: 12px;
}

.m77-no-cars-message p {
	margin: 0;
	color: #666;
	font-size: 15px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE - AUTOCAR STYLE
   ═══════════════════════════════════════════════════════ */

/* Large Desktop (1400px+): 4 cards + peek */
@media (min-width: 1400px) {
	.m77-carousel-slide {
		flex: 0 0 24% !important;
		min-width: 24% !important;
		max-width: 24% !important;
		width: 24% !important;
	}
}

/* Desktop (1200px - 1399px): 4 cards visible */
@media (max-width: 1399px) and (min-width: 1200px) {
	.m77-carousel-slide {
		flex: 0 0 24% !important;
		min-width: 24% !important;
		max-width: 24% !important;
		width: 24% !important;
	}
}

/* Tablet - 3 cards */
@media (max-width: 1199px) and (min-width: 768px) {
	.m77-carousel-slide {
		flex: 0 0 32% !important;
		min-width: 32% !important;
		max-width: 32% !important;
		width: 32% !important;
	}

	.m77-carousel-viewport {
		margin: 0 45px;
	}

	.m77-carousel-prev {
		left: 20px;
	}

	.m77-carousel-next {
		right: 20px;
	}
}

/* Small Tablet - 2 cards */
@media (max-width: 767px) and (min-width: 576px) {
	.m77-carousel-slide {
		flex: 0 0 48% !important;
		min-width: 48% !important;
		max-width: 48% !important;
		width: 48% !important;
	}

	.m77-carousel-viewport {
		margin: 0 35px;
	}

	.m77-carousel-track {
		gap: 14px;
	}

	.m77-carousel-arrow {
		width: 36px;
		height: 36px;
	}

	.m77-choice-car-image {
		height: 120px;
	}
}

/* Mobile (< 576px): Swipe mode, 1 card + peek */
@media (max-width: 575px) {
	.m77-carousel-container {
		margin: 0 -16px;
	}

	.m77-carousel-slide {
		flex: 0 0 85% !important;
		min-width: 85% !important;
		max-width: 85% !important;
		width: 85% !important;
	}

	.m77-carousel-viewport {
		overflow-x: auto !important;
		margin: 0 !important;
		width: 100% !important;
		padding: 0 16px;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.m77-carousel-viewport::-webkit-scrollbar {
		display: none;
	}

	.m77-carousel-track {
		gap: 12px;
		padding-right: 16px;
	}

	.m77-carousel-slide {
		scroll-snap-align: start;
	}

	.m77-carousel-arrow {
		display: none !important;
	}

	.m77-choice-car-image {
		height: 150px;
	}

	.m77-choice-car-info {
		padding: 12px 14px;
	}

	.m77-choice-tabs {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.m77-choice-tabs::-webkit-scrollbar {
		display: none;
	}

	.m77-choice-tab {
		padding: 10px 16px;
		font-size: 14px;
		white-space: nowrap;
	}

	.m77-sub-tabs {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
		padding-bottom: 8px;
	}

	.m77-sub-tab {
		padding: 8px 16px;
		font-size: 13px;
		white-space: nowrap;
	}
}

/* Very small mobile */
@media (max-width: 400px) {
	.m77-carousel-slide {
		flex: 0 0 85% !important;
		min-width: 85% !important;
		max-width: 85% !important;
		width: 85% !important;
	}
}
