/* AutomaxHK - Compact category introduction */
body .automax-category-intro { margin-bottom: 18px; }
body .automax-category-description[data-category-description] {
	display: block;
	max-height: none;
	overflow: visible;
	line-height: 26px;
}
body .automax-category-description[data-category-description].is-expanded {
	display: block;
	-webkit-line-clamp: unset;
	max-height: none;
}
.automax-description-toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 8px;
	padding: 6px 12px;
	border: 1px solid #fbb71c;
	border-radius: 5px;
	background: #fff8e9;
	color: #252832;
	font-size: 13px;
	font-weight: 500;
}
.automax-description-toggle[hidden] { display: none; }
.automax-description-toggle:hover { background: #fbb71c; }
.automax-description-toggle[aria-expanded="true"] .fa { transform: rotate(180deg); }

/* AutomaxHK - Keep a single native country selector */
body select[name="country_id"] {
	position: static !important;
	opacity: 1 !important;
	width: 100% !important;
	height: 44px !important;
}
body select[name="country_id"] ~ span.customSelect { display: none !important; }

@media (max-width: 767px) {
	body #top.automax-top { display: none !important; }
	body .content-top-breadcum {
		margin: 0;
		padding: 8px 0;
		background: #20232a;
		border-bottom: 2px solid #fbb71c;
	}
	body .content-top-breadcum #title-content { margin: 0; padding: 0; }
	body .content-top-breadcum #title-content :is(h1,h2,.page-title) { display: none; }
	body .content-top-breadcum #title-content .breadcrumb {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 0;
		margin: 0 !important;
		padding: 0 15px !important;
		min-height: 26px;
		background: transparent;
		font-size: 11px;
		line-height: 20px;
		text-align: left;
	}
	body .content-top-breadcum #title-content .breadcrumb > li { display: flex; align-items: center; min-width: 0; }
	body .content-top-breadcum #title-content .breadcrumb > li:not(:first-child):not(:nth-last-child(2)):not(:last-child) { display: none; }
	body .content-top-breadcum #title-content .breadcrumb > li + li::before { padding: 0 7px !important; color: #fbb71c; }
	body .content-top-breadcum #title-content .breadcrumb > li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
	body .content-top-breadcum #title-content .breadcrumb > li:last-child { flex: 1; }
	body #product-category .automax-category-title { margin: 0 0 10px; font-size: 23px; line-height: 1.2; }
	body #product-category .automax-category-description { font-size: 14px; }
	body #product-category .automax-subcategories { display: none; }
}



@media (max-width: 767px) {
	body .content-top-breadcum #title-content ul.breadcrumb {
		margin: 0 !important;
		padding: 0 15px !important;
	}
}

/* AutomaxHK - Keep category editor formatting within the storefront design */
body #product-category .automax-category-description {
	font-family: inherit !important;
	font-size: 15px !important;
	line-height: 1.7 !important;
	color: #515761 !important;
	background: transparent !important;
}
body #product-category .automax-category-description [style] {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
	background: transparent !important;
}
body #product-category .automax-category-description :is(h1,h2,h3,h4) {
	margin: 14px 0 8px !important;
	font-size: 18px !important;
	line-height: 1.4 !important;
	color: #252832 !important;
	text-transform: none !important;
}
body #product-category .automax-category-description p {
	margin: 0 0 10px !important;
}
body #product-category .automax-category-description img {
	max-width: 100%;
	height: auto;
}
@media (min-width: 768px) {
	body .automax-description-toggle { display: none; }
}
@media (max-width: 767px) {
	body .automax-category-description[data-category-description]:not(.is-expanded) {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		max-height: 78px;
		overflow: hidden;
	}
	body #product-category .automax-category-description[data-category-description]:not(.is-expanded) :is(h1,h2,h3,h4,p,ul,ol) {
		margin: 0 !important;
		font-size: inherit !important;
		line-height: inherit !important;
	}
}

/* AutomaxHK - Compact category navigation and vehicle selection on mobile */
.automax-mobile-vehicle-filter { display:none; }
@media(max-width:767px){
	body #product-category #column-left .automax-sidebar-categories { display:none !important; }
	body #product-category .automax-subcategories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0 20px; }
	body #product-category .automax-subcategories > a { padding:12px 8px; gap:8px; font-size:12px; line-height:1.4; }
	body #product-category .automax-subcategories img { width:70px; height:70px; }
	body #product-category .automax-mobile-vehicle-filter.is-ready { display:grid; gap:12px; margin:0 0 20px; padding:15px; border:1px solid #e2e4e8; border-top:3px solid #fbb71c; border-radius:6px; background:#fff; }
	body #product-category .automax-mobile-vehicle-field label { display:block; margin:0 0 6px; color:#252832; font-size:13px; font-weight:600; }
	body #product-category .bf-form .automax-brainy-vehicle { display:none; }
}

/* AutomaxHK - Hide the bottom filter and center mobile category pagination */
@media(max-width:767px){
	body #product-category #column-left .bf-panel-wrapper { display:none !important; }
	body #product-category .pagination-wrapper { display:flex; flex-direction:column; align-items:center; gap:14px; float:none; width:100%; margin:26px 0 30px; padding:14px 0; }
	body #product-category .pagination-wrapper .page-link,
	body #product-category .pagination-wrapper .page-result { float:none; width:100%; padding:0; margin:0; text-align:center !important; }
	body #product-category .pagination-wrapper .pagination { display:inline-flex; flex-wrap:wrap; justify-content:center; gap:4px; float:none; max-width:100%; margin:0; padding:0; }
	body #product-category .pagination-wrapper .page-result { font-size:12px; line-height:1.6; }
}
/* AutomaxHK - Equal mobile pagination buttons and spacing */
@media(max-width:767px){
	body #product-category .pagination-wrapper .pagination { align-items:center; gap:6px; }
	body #product-category .pagination-wrapper .pagination > li { display:block; float:none; margin:0; padding:0; }
	body #product-category .pagination-wrapper .pagination > li > a,
	body #product-category .pagination-wrapper .pagination > li > span { display:flex; align-items:center; justify-content:center; float:none; box-sizing:border-box; width:32px; min-width:32px; height:32px; margin:0 !important; padding:0 !important; border:1px solid #e2e4e8 !important; border-radius:5px; font-size:12px; line-height:1; }
	body #product-category .pagination-wrapper .pagination > li.active > span,
	body #product-category .pagination-wrapper .pagination > li > a:hover { border-color:#fbb71c !important; }
}
/* AutomaxHK - Full width subcategories for the selected vehicle on mobile */
@media(max-width:767px){
	body #product-category:has([name="vehicle_id"] option:checked:not([value=""])) .automax-subcategories,
	body #product-category:has([name="vehicle_model_id"] option:checked:not([value=""])) .automax-subcategories {
		grid-template-columns:minmax(0,1fr);
	}
}
