/* =========================================================
   The san pham .dm-* -- DUNG CHUNG trang danh muc (product_category/ajax/product_item.twig)
   va trang chu (product_box/blocks/list_products.twig). Tach tu product-category-2026.css 03/10/2026.
   ========================================================= */
.dm-card { position: relative; display: flex; flex-direction: column; height: 100%; padding: var(--nr-space-2, 8px); background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; transition: border-color .15s; }
.dm-card:hover { border-color: #cbd5e1; } /* hieu ung chuot: xem khoi @media (hover: hover) cuoi file */
.dm-nhan { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; flex-wrap: wrap; gap: var(--nr-space-1, 4px); } /* goc trai duoi anh (03/10/2026) */
.dm-nhan-i { padding: 2px var(--nr-space-2, 8px); border-radius: 8px; background: rgba(255, 255, 255, .92); color: #475467; font-size: 11px; font-weight: 400; box-shadow: 0 0 0 1px rgba(16, 24, 40, .08); /* nhan trung tinh, khong xanh (Owner 03/10/2026) */ }
.dm-nhan--sale, .dm-nhan--hot { background: #fef2f2; color: #b91c1c; }
.dm-anh { position: relative; display: block; overflow: hidden; margin: 0 0 var(--nr-space-2, 8px); padding: var(--nr-space-1, 4px); background: #f6f7f9; border-radius: 8px; }
.dm-anh img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; transition: transform .3s ease; }
.dm-het { position: absolute; left: 8px; bottom: 8px; padding: 2px var(--nr-space-2, 8px); border-radius: 8px; background: rgba(15,23,42,.75); color: #fff; font-size: 12px; }
.dm-ten { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.4; }
.dm-ten a { color: var(--nr-ink, #333); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; /* luon 2 dong -> gia cac the thang hang */ }
.dm-gia { display: flex; align-items: center; justify-content: space-between; gap: var(--nr-space-1, 4px); margin-top: var(--nr-space-1, 4px); }
.dm-price { font-size: 17px; font-weight: 500; color: #e02424; }
.dm-lienhe { font-size: 15px; font-weight: 500; color: #64748b; }
.dm-giacu { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.dm-sao { font-size: 12px; color: #64748b; white-space: nowrap; }
.dm-sao b { color: #f59e0b; }
.dm-tt { display: flex; flex-wrap: wrap; gap: var(--nr-space-1, 4px); margin-top: var(--nr-space-1, 4px); }
.dm-tt-i { max-width: 100%; padding: 2px var(--nr-space-1, 4px); border-radius: 8px; background: #f1f5f9; color: #475569; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-nut { display: flex; gap: var(--nr-space-1, 4px); margin-top: auto; padding-top: var(--nr-space-2, 8px); }
.dm-buy { flex: 1 1 auto; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--nr-border, #e4e7ec); border-radius: 8px; background: #fff; color: var(--nr-ink, #333); font-size: 13px; font-weight: 500; text-decoration: none; }
.dm-buy:hover { background: var(--nr-soft, #f2f4f7); color: var(--nr-ink, #333); }
.dm-cart { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #eef0f3; border-radius: 8px; background: #fff; color: #98a2b3; }
.dm-cart svg { width: 18px; height: 18px; }
.dm-ss { flex: 1 1 auto; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: var(--nr-space-1, 4px); padding: 0 var(--nr-space-2, 8px); border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #334155; font-size: 12px; }
.dm-ss:hover { border-color: #cbd5e1; }
.dm-ss.on { border-color: #e02424; background: #e02424; color: #fff; }
.dm-o { height: 100%; }

@media (max-width: 767.98px) {
	.dm-card { padding: var(--nr-space-2, 8px); }
	.dm-ten { font-size: 13px; }
	.dm-price { font-size: 15px; }
	.dm-tt-i:nth-child(n+2) { display: none; }
	.dm-buy { font-size: 12px; }
	.dm-ss span { display: none; }
}
/* The trong rail Swiper (trang chu): slide gian cao bang nhau, the lap day slide */
.swiper-slide:has(> .dm-o) { display: flex; height: auto; }
.swiper-slide > .dm-o { flex: 1 1 auto; min-width: 0; }

/* Hover (chi thiet bi co chuot -- man cam ung khong dinh trang thai hover), 03/10/2026 */
@media (hover: hover) {
	.dm-card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
	.dm-card:hover { border-color: #e5e7eb; box-shadow: 0 8px 24px rgba(16, 24, 40, .10); transform: translateY(-2px); }
	.dm-card:hover .dm-anh img { transform: scale(1.04); }
	.dm-card:hover .dm-ten a { color: var(--nr-primary-text, #d0161d); }
	.dm-cart:hover { border-color: #fecaca; color: var(--nr-primary-text, #d0161d); }
}
@media (prefers-reduced-motion: reduce) {
	.dm-card, .dm-anh img { transition: none; }
	.dm-card:hover { transform: none; }
	.dm-card:hover .dm-anh img { transform: none; }
}
