/* Tiện ích TikTok Shop: lưới ở /tiktok-shop + thanh chuyển nhanh ở trang con.
 * Danh sách mục: public/includes/tiktok-shop-tools.php. Tông cam khớp trang Phần trưng bày / tạo link. */

.tts-tools, .tts-nav {
    --tt-orange: #ea580c; --tt-orange-soft: #fff7ed; --tt-orange-line: #fed7aa;
    --tt-ink: #111827; --tt-muted: #6b7280; --tt-line: #eef0f3;
}

/* ── Lưới tiện ích (trang chính) ─────────────────────────────────────── */
.tts-tools { margin: 4px 0 8px; }
.tts-tools__group + .tts-tools__group { margin-top: 18px; }
.tts-tools__title { font-size: .8rem; font-weight: 700; color: var(--tt-muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px 2px; }
.tts-tools__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.tts-tool {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--tt-line);
    box-shadow: 0 1px 3px rgba(17,24,39,.04); color: var(--tt-ink); text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tts-tool:hover { color: var(--tt-ink); border-color: var(--tt-orange-line); box-shadow: 0 6px 18px rgba(234,88,12,.10); transform: translateY(-1px); }
.tts-tool:focus-visible { outline: 2px solid var(--tt-orange); outline-offset: 2px; }
.tts-tool__icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tts-tool__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tts-tool__label { font-size: .92rem; font-weight: 700; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.tts-tool__badge { flex: 0 0 auto; white-space: nowrap; font-style: normal; font-size: .64rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--tt-orange); color: #fff; letter-spacing: .02em; }
/* 2 dòng thay vì cắt "…" 1 dòng: mô tả là thứ giúp KOC chọn đúng tiện ích. */
.tts-tool__desc { font-size: .76rem; color: var(--tt-muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tts-tool__go { flex: 0 0 auto; color: #d1d5db; font-size: .85rem; transition: color .15s, transform .15s; }
.tts-tool:hover .tts-tool__go { color: var(--tt-orange); transform: translateX(2px); }

.tts-tone-orange .tts-tool__icon { background: #ffedd5; color: #ea580c; }
.tts-tone-rose   .tts-tool__icon { background: #ffe4e6; color: #e11d48; }
.tts-tone-amber  .tts-tool__icon { background: #fef3c7; color: #b45309; }
.tts-tone-green  .tts-tool__icon { background: #dcfce7; color: #15803d; }
.tts-tone-slate  .tts-tool__icon { background: #f1f5f9; color: #475569; }

/* Điện thoại: 3 cột ô gọn (icon + tên, bỏ mô tả) — lưới nằm ngay dưới hero nên phải ngắn,
 * không thì phần "Tài khoản của bạn" bị đẩy xuống quá xa. */
@media (max-width: 575.98px) {
    .tts-tools__group + .tts-tools__group { margin-top: 14px; }
    .tts-tools__title { font-size: .72rem; margin-bottom: 6px; }
    .tts-tools__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .tts-tool { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 4px; border-radius: 12px; }
    .tts-tool__icon { flex-basis: auto; width: 36px; height: 36px; font-size: 1.05rem; border-radius: 10px; }
    .tts-tool__label { font-size: .76rem; justify-content: center; line-height: 1.2; }
    .tts-tool__badge { font-size: .58rem; padding: 0 5px; }
    .tts-tool__desc, .tts-tool__go { display: none; }
}

/* ── Thanh chuyển nhanh (trang con) ──────────────────────────────────── */
.tts-nav {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: -6px 0 16px; padding: 2px 0 4px;
    mask-image: linear-gradient(90deg, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.tts-nav::-webkit-scrollbar { display: none; }
.tts-nav__item {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--tt-line);
    color: #374151; font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.tts-nav__item i { font-size: .9rem; color: var(--tt-muted); }
.tts-nav__item:hover { color: var(--tt-orange); border-color: var(--tt-orange-line); }
.tts-nav__item:hover i { color: var(--tt-orange); }
.tts-nav__item.is-active { background: var(--tt-orange); border-color: var(--tt-orange); color: #fff; }
.tts-nav__item.is-active i { color: #fff; }
.tts-nav__home { background: var(--tt-orange-soft); border-color: var(--tt-orange-line); color: #9a3412; }
.tts-nav__home i { color: var(--tt-orange); }
@media (max-width: 575.98px) {
    .tts-nav { margin-top: -4px; margin-bottom: 12px; }
    .tts-nav__item { padding: 6px 11px; font-size: .78rem; }
}
