/* TSQ Danh Mục & Thẻ Nhanh – Tác giả: TonySQuang */

.tsq-nhan-group { display: flex; flex-wrap: wrap; gap: 4px; }
.tsq-nhan {
	display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
	line-height: 1.5; text-decoration: none !important; letter-spacing: .01em; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
a.tsq-nhan:hover { filter: brightness(1.08); }

/* Nhãn đè lên ảnh sản phẩm */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { position: relative; }
.tsq-nhan-overlay { position: absolute; z-index: 5; flex-direction: column; align-items: flex-start; pointer-events: none; }
.tsq-nhan-overlay.tsq-pos-top-left { top: 10px; left: 10px; }
.tsq-nhan-overlay.tsq-pos-top-right { top: 10px; right: 10px; align-items: flex-end; }
.tsq-nhan-overlay.tsq-pos-bottom-left { bottom: 10px; left: 10px; }
.tsq-nhan-overlay.tsq-pos-bottom-right { bottom: 10px; right: 10px; align-items: flex-end; }
.tsq-nhan-single, .tsq-nhan-content { margin: 0 0 12px; }

/* Lưới danh mục */
.tsq-term-grid {
	display: grid; grid-template-columns: repeat(var(--tsq-cols, 4), minmax(0, 1fr)); gap: 16px; margin: 0 0 24px;
}
@media (max-width: 900px) { .tsq-term-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tsq-term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tsq-term-grid-item {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
	text-decoration: none !important; color: inherit; padding: 10px; border-radius: 12px; transition: transform .2s, box-shadow .2s;
}
.tsq-term-grid-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.tsq-term-grid-media { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.tsq-term-grid-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tsq-term-grid-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e5e7eb, #f9fafb); }
.tsq-term-grid-name { font-weight: 600; line-height: 1.3; }
.tsq-term-grid-count { font-size: 12px; opacity: .65; }
