/* /tiktok-shop/products — Sản phẩm của tôi.
 * Desktop: lưới thẻ dọc. Mobile: thẻ NGANG (ảnh vuông trái, chữ phải) — lưới 2 cột cũ ép tên SP
 * và Product ID 19 số vào ~170px nên vỡ dòng, khó đọc. Nạp SAU tiktok-shop-mobile.css; selector
 * .tap-* riêng của trang nên không đụng .product-grid của file dùng chung. */

.tts-hero { border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; }
.tts-hero h1 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.tts-hero p { font-size: .88rem; margin: 0; }

/* Thanh trên danh sách: số SP bên trái, nút đồng bộ bên phải. */
.tap-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; border: 1px solid #eef0f3; border-radius: 14px;
    padding: 10px 12px; margin-bottom: 12px;
}
.tap-count { font-size: .86rem; color: #6b7280; min-width: 0; }
.tap-count b { color: #111827; font-size: 1rem; }
.tap-toolbar .btn { flex: 0 0 auto; border-radius: 999px; font-weight: 700; }

.tap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tap-card {
    background: #fff; border: 1px solid #eef0f3; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04); display: flex; flex-direction: column; min-width: 0;
}
.tap-thumb { position: relative; aspect-ratio: 1 / 1; background: #f9fafb; }
.tap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Không có ảnh / ảnh lỗi: ô xám nhạt + biểu tượng hộp, thay cho logo RioHub bị cắt méo. */
.tap-thumb.is-empty { display: grid; place-items: center; color: #d1d5db; font-size: 2rem; }
.tap-rate {
    position: absolute; left: 8px; top: 8px;
    background: #ea580c; color: #fff; font-weight: 800; font-size: .74rem;
    border-radius: 999px; padding: 3px 9px; box-shadow: 0 2px 6px rgba(234, 88, 12, .3);
}
.tap-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.tap-name {
    font-size: .86rem; font-weight: 700; color: #111827; line-height: 1.35; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tap-price { font-size: .95rem; font-weight: 800; color: #111827; }
.tap-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .74rem; color: #6b7280; }
.tap-pid {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
    background: #f9fafb; border: 1px solid #eef0f3; border-radius: 8px;
    padding: 2px 6px; font: 600 .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: #374151;
    cursor: pointer;
}
.tap-pid:hover { border-color: #fed7aa; color: #9a3412; }
.tap-pid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap-pid.is-copied { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.tap-commission { color: #9a3412; font-weight: 700; }
.tap-body .btn { margin-top: auto; border-radius: 999px; font-weight: 700; }

/* Trạng thái rỗng / lỗi / đang tải. */
.tap-state {
    background: #fff; border: 1.5px dashed #fed7aa; border-radius: 14px;
    padding: 28px 16px; text-align: center; color: #6b7280; font-size: .88rem;
}
.tap-state > .bi { display: block; font-size: 2rem; color: #ea580c; margin-bottom: 6px; }
.tap-state b { display: block; color: #111827; font-size: .95rem; margin-bottom: 4px; }
.tap-state.is-error { border-color: #fecaca; background: #fffafa; }
.tap-state.is-error > .bi { color: #dc2626; }
.tap-state .btn { margin-top: 12px; border-radius: 999px; font-weight: 700; }
.tap-skel { background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%); background-size: 200% 100%; animation: tapShimmer 1.2s infinite; border-radius: 14px; }
@keyframes tapShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.tap-grid .tap-skel { height: 300px; }

@media (max-width: 575.98px) {
    .tap-toolbar { padding: 8px 10px; }
    .tap-toolbar .btn { font-size: .8rem; }
    .tap-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tap-card { flex-direction: row; }
    .tap-thumb { flex: 0 0 104px; width: 104px; aspect-ratio: auto; min-height: 104px; }
    .tap-rate { left: 6px; top: 6px; font-size: .68rem; padding: 2px 7px; }
    .tap-body { padding: 10px; gap: 5px; }
    .tap-name { font-size: .84rem; }
    .tap-body .btn { align-self: flex-start; padding: 4px 14px; font-size: .78rem; margin-top: 4px; }
    .tap-grid .tap-skel { height: 124px; }
}
