/* Khung tổng thể của thẻ sản phẩm */
.product-small.box {
	background-color: var(--color-white);
	border: 1px solid rgba(21, 128, 61, 0.16);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-small.box:hover {
	transform: translateY(-4px);
	border-color: rgba(21, 128, 61, 0.35);
	box-shadow: 0 10px 25px rgba(20, 102, 93, 0.08);
}

/* Phần ảnh sản phẩm full viền */
.product-small.box .box-image {
	width: 100%;
	aspect-ratio: 1 / 1; /* Giữ ảnh luôn vuông đều nhau ở mọi màn hình */
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(21, 128, 61, 0.12);
	overflow: hidden;
	background-color: var(--color-chu);
}

.product-small.box .box-image .image-none,
.product-small.box .box-image .image-none a {
	display: block;
	width: 100%;
	height: 100%;
}

.product-small.box .box-image img {
	width: 100%;
	height: 100%;
	object-fit: cover; /* Ảnh tràn sát viền không bị méo */
	display: block;
	transition: transform 0.4s ease;
}

.product-small.box:hover .box-image img {
	transform: scale(1.05);
}

/* Phần chữ và nút mũi tên bên dưới */
.product-small.box .box-text.box-text-products {
	position: relative;
	background-color: var(--color-white);
	padding: clamp(12px, 2vw, 18px) clamp(52px, 6vw, 68px) clamp(12px, 2vw, 18px) clamp(14px, 2vw, 20px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1;
	text-align: left;
}

/* Tiêu đề sản phẩm */
.product-small.box .box-text .title-wrapper {
	position: static;
}

.product-small.box .box-text .product-title {
	margin: 0;
	padding: 0;
}

.product-small.box .box-text .product-title a {
	color: var(--color-black);
	font-size: clamp(13px, 1.3vw, 15px);
	font-weight: 600;
	line-height: 1.35;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2; /* Giới hạn tối đa 2 dòng cho đều hàng */
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.25s ease;
}

/* Giúp bấm vào mũi tên hoặc cả vùng chữ đều chuyển trang */
.product-small.box .box-text .product-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.product-small.box:hover .box-text .product-title a {
	color: var(--color-main);
}

/* Ẩn price-wrapper nếu không có giá */
.product-small.box .box-text .price-wrapper:empty {
	display: none;
}

.product-small.box .box-text .price-wrapper {
	margin-top: 4px;
	font-size: clamp(13px, 1.2vw, 14px);
	color: var(--color-brand-green);
	font-weight: 600;
}

/* Nút mũi tên tròn màu xanh bên phải */
.product-small.box .box-text::after {
	content: "";
	position: absolute;
	right: clamp(12px, 2vw, 18px);
	top: 50%;
	transform: translateY(-50%);
	width: clamp(32px, 3.5vw, 38px);
	height: clamp(32px, 3.5vw, 38px);
	border-radius: 50%;
	background-color: rgba(34, 197, 94, 0.12);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 52%;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hiệu ứng khi rê chuột vào card */
.product-small.box:hover .box-text::after {
	background-color: var(--color-accent-light);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
	transform: translateY(-50%) translateX(3px);
}

/* Tối ưu thêm cho màn hình điện thoại nhỏ (2 cột) */
@media (max-width: 549px) {
	.product-small.box {
		border-radius: 12px;
	}
	.product-small.box .box-text.box-text-products {
		padding: 10px 46px 10px 12px;
	}
	.product-small.box .box-text::after {
		right: 10px;
		width: 30px;
		height: 30px;
	}
}