/* AutomaxHK - Two-line product names and right-aligned prices */
body .product-thumb .caption h4 {
	min-height: 44px;
	height: 44px;
	max-height: 44px;
	white-space: normal;
	text-transform: none;
	letter-spacing: 0;
	line-height: 22px;
	overflow: hidden;
}

body .product-thumb .caption h4 a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	max-height: 44px;
	font-size: 14px;
	line-height: 22px;
	letter-spacing: 0;
	white-space: normal;
	word-break: normal;
	overflow-wrap: break-word;
	overflow: hidden;
}

body .product-thumb .caption .price {
	display: block;
	width: 100%;
	text-align: right;
	font-size: 16px;
	line-height: 24px;
}

body .product-thumb .caption .price-new,
body #special-carousel .product-thumb .price-new {
	font-size: 16px;
}

body .product-thumb .caption .price-old {
	font-size: 13px;
}

/* AutomaxHK - Keep grid cards and their purchase controls aligned */
body #products > .row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

body #products > .row:before,
body #products > .row:after {
	display: none;
}

body .product-grid,
body .automax-products-item {
	display: flex;
	min-width: 0;
}

body .product-grid .product-thumb,
body .automax-products .product-thumb {
	display: flex;
	float: none;
	width: 100%;
	overflow: visible;
}

body .product-grid .product-block-inner,
body .automax-products .product-block-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: visible;
}

body .product-grid .product-details,
body .automax-products .product-details {
	float: none;
	flex: 1;
	width: 100%;
	overflow: visible;
}

body .product-grid .caption,
body .automax-products .caption {
	display: flex;
	flex-direction: column;
	height: 100%;
}

body .product-grid .caption h4,
body .automax-products .caption h4 {
	float: none;
	flex-shrink: 0;
	text-align: left;
}

body .product-grid .automax-card-metadata,
body .automax-products .automax-card-metadata {
	height: 30px;
	flex-shrink: 0;
}

body .product-thumb .automax-card-metadata .automax-product-metadata {
	margin: 6px 0 8px;
}

body .product-thumb .automax-product-code {
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body .product-grid .caption .price,
body .automax-products .caption .price {
	margin-top: auto;
	margin-bottom: 0;
}

body .product-grid .automax-thumb-cart,
body .automax-products .automax-thumb-cart {
	margin: 12px 0 0;
	padding-top: 0;
}

/* AutomaxHK - Product stock availability */
body .product-thumb .automax-card-stock {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 7;
	display: inline-flex;
	padding: 4px 9px;
	border-radius: 4px;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
}

body .product-thumb .automax-card-stock.is-in-stock {
	color: #268442;
	background: #eaf6ee;
}

body .product-thumb .automax-card-stock.is-out-of-stock {
	color: #68707c;
	background: #f0f2f5;
}

/* AutomaxHK - Separate product names from the image */
body .product-thumb .image {
	position: relative;
}

body .product-thumb .caption h4 {
	margin-top: 16px;
}

/* AutomaxHK - One product per row on mobile */
@media (max-width: 767px) {
	body .product-layout.product-grid {
		width: 100% !important;
		max-width: 100%;
		flex-basis: 100%;
	}
	body .automax-products .automax-products-grid {
		grid-template-columns: minmax(0,1fr);
	}
}

/* AutomaxHK - Keep both product images in the same frame on mobile */
@media(max-width:767px){
	body .product-thumb .image > a { position:relative; display:block; width:100%; }
	body .product-thumb .image > a .reg-image { display:block; width:100%; height:auto !important; margin:0 !important; transform:none !important; }
	body .product-thumb .image > a .hover-image { position:absolute; inset:0; width:100%; height:100% !important; max-width:100%; margin:0 !important; object-fit:contain; transform:none !important; transition:opacity .2s ease !important; }
}