/* SEARCH FILTER */
.jm-search-wrap {
	display: flex;
	align-items: flex-end;
	gap: 18px;
	padding: 20px;
	background: #161616;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 18px;
	flex-wrap: wrap;
}

.jm-search-item {
	position: relative;
	flex: 1;
	min-width: 220px;
}

.jm-keyword {
	flex: 1.5;
}

.jm-search-item label {
	position: absolute;
	top: -11px;
	left: 14px;
	background: #161616;
	padding: 0 10px;
	font-size: 13px;
	color: var(--color-main);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 5;
}

.jm-search-item label i {
	color: var(--color-main);
	font-size: 13px;
}

.jm-search-item select,
.jm-search-item input {
	width: 100%;
	height: 45px !important;
	border-radius: 12px !important;
	border: 1px solid #3a3a3a !important;
	background: #0f0f0f !important;
	color: var(--color-white) !important;
	padding: 0 18px;
	font-size: 15px;
	transition: .3s;
	outline: none;
	margin-bottom: 0;
}

.jm-search-item input::placeholder {
	color: #8d8d8d;
}

.jm-search-item select:focus,
.jm-search-item input:focus {
	border-color: var(--color-main);
	box-shadow: 0 0 0 3px rgba(224, 89, 0, .15);
}

.jm-search-btn {
	flex: 0 0 auto;
}

.jm-search-btn button {
	height: 45px;
	padding: 0 34px;
	border: none;
	border-radius: 12px;
	background: var(--color-main);
	color: var(--color-white);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: .3s;
	margin-bottom: 0;
}

.jm-search-btn button:hover {
	transform: translateY(-2px);
}

.jm-search-btn i {
	font-size: 15px;
}

/* Tablet */
@media(max-width:991px) {
	.jm-search-wrap {
		gap: 15px;
	}

	.jm-search-item {
		min-width: calc(50% - 8px);
	}

	.jm-keyword {
		flex: 100%;
	}

	.jm-search-btn {
		width: 100%;
	}

	.jm-search-btn button {
		width: 100%;
		justify-content: center;
	}
}

/* Mobile */
@media(max-width:767px) {
	.jm-search-wrap {
		padding: 16px;
		border-radius: 14px;
	}

	.jm-search-item {
		min-width: 100%;
	}

	.jm-search-btn {
		width: 100%;
	}
}

/* Khung chứa danh sách sản phẩm */
.jm-products-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* Chia đều làm 3 cột */
	gap: 20px;                                       /* Khoảng cách giữa các sản phẩm */
	margin-top: 30px;                                /* Khoảng cách với bộ lọc phía trên */
	width: 100%;
	box-sizing: border-box;
}

/* Đảm bảo các box sản phẩm bên trong không bị vỡ khung */
.jm-products-grid .product-small.box {
	width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

/* --- Tùy chỉnh hiển thị trên các thiết bị nhỏ hơn (Responsive) --- */

/* Trên máy tính bảng: hiển thị 2 sản phẩm mỗi hàng */
@media (max-width: 768px) {
	.jm-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 15px;
	}
}

/* Trên điện thoại di động: hiển thị 1 sản phẩm mỗi hàng */
@media (max-width: 480px) {
	.jm-products-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

/* 1. Thiết lập khung thẻ sản phẩm (Card) */
.jm-products-grid .product-small.box {
	background-color: #121212;
	border: 1px solid #1c1c1c;
	border-radius: 20px;
	padding: 0 !important;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hiệu ứng Hover */
.jm-products-grid .product-small.box:hover {
	border: 1px solid var(--color-main);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* 2. Định dạng hình ảnh dính sát viền */
.jm-products-grid .box-image {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}

.jm-products-grid .box-image img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}

/* 3. Phần văn bản (Thêm padding ở đây để tạo khoảng cách với viền) */
.jm-products-grid .box-text-products {
	padding: 10px 10px 15px 15px !important;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* Tiêu đề sản phẩm */
.jm-products-grid .product-title {
	margin: 4px 0 !important;
	line-height: 1.4;
}

.jm-products-grid .product-title a {
	color: var(--color-white) !important;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 2.6em;
}

.products_info .location_text {
	color: rgba(255,255,255,0.65);
	font-size: 12px;
}

/* Khung bao ngoài để căn lề cho tag */
.specialty-wrapper {
	margin: 8px 0;
	display: flex;
	flex-wrap: wrap;
}

/* Định dạng nhãn Specialty dạng viên thuốc viền đồng */
.specialty-tag {
	display: inline-block;
	background-color: #0e0e0e;
	color: #e2e2e2;
	border: 1px solid #3d3527;
	border-radius: 50px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	width: fit-content;
	box-sizing: border-box;
}

/* 5. Nút Xem thông tin (View Profile) */
.jm-products-grid .button_bottom {
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.jm-products-grid .btn-view-profile {
	background-color: #1c1813;
	color: var(--color-main) !important;
	border: 1px solid #3d3527;
	border-radius: 20px;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
	transition: background-color 0.2s, color 0.2s;
}

.jm-products-grid .btn-view-profile:hover {
	background-color: #26211a;
	color: #cbb285 !important;
}

/* Ẩn bớt các phần giá gốc/khuyến mãi mặc định */
.jm-products-grid .price-wrapper {
	display: none; 
}