/* ============================================================
   Kho giao diện mẫu — /kho-giao-dien-mau  (themesieuviet / Win Ora)
   Namespace tg-*. CSS thật (tailwind.css build sẵn thiếu nhiều utility).

   Glass đồng bộ header/footer: alpha .55–.74, blur 16–20px, saturate 155–160%.
   Accent DUY NHẤT: var(--site-primary…).
   NGOẠI LỆ đỏ commerce #ed1c24/#e31d22: CHỈ cho badge giảm giá và giá bán —
   đúng convention đang dùng ở Hosting / Tên miền.

   GIỮ NGUYÊN tên class mà nơi khác bám vào:
     .theme-listing-hero  (header.css cấp padding-top 120px — nguồn duy nhất)
     .site-container      (app.css)
     .faq-block/.faq-item (components/faq.blade.php)
     .pagination__*       (components/pagination.blade.php)
   ============================================================ */

.tg-page {
    color: #0f172b;
    background: #fff;
    /* clip chứ không hidden: hidden biến thẻ này thành scroll container và
       position:sticky của thanh lọc sẽ chết. */
    overflow-x: clip;
}

/* KHÔNG dùng `.tg-page section { position: relative }`: selector đó có độ ưu tiên
   (0,1,1) — cao hơn `.tg-filterbar` (0,1,0) — nên nó ĐÈ MẤT position:sticky của thanh
   lọc. Thanh lọc thành `relative`, mà `top: 96px` trên relative lại ĐẨY nó xuống 96px,
   tạo một khe trắng ngay dưới hero. Liệt kê từng section cho chắc. */
.tg-hero,
.tg-section,
.tg-commit,
.tg-compare,
.tg-faq,
.tg-cta { position: relative; }

/* ---- Reveal ---- */
.tg-anim [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
}
.tg-anim [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .tg-anim [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
    .tg-page * { animation: none !important; transition: none !important; }
}

/* ---- Focus ring ---- */
.tg-page a:focus-visible,
.tg-page button:focus-visible,
.tg-page select:focus-visible,
.tg-page input:focus-visible,
.tg-page summary:focus-visible {
    outline: 3px solid rgba(var(--site-primary-rgb, 220, 38, 38), .45);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ---- Nút dùng chung ---- */
.tg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    font-size: 14px; font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.tg-btn--primary {
    background: linear-gradient(135deg, var(--site-primary-light, #ef4444), var(--site-primary, #dc2626));
    color: #fff;
    box-shadow: 0 10px 24px rgba(var(--site-primary-rgb, 220, 38, 38), .3);
}
.tg-btn--primary:hover {
    transform: translateY(-2px); color: #fff;
    box-shadow: 0 16px 32px rgba(var(--site-primary-rgb, 220, 38, 38), .4);
}
.tg-btn--ghost {
    background: rgba(255, 255, 255, .6);
    border-color: rgba(15, 23, 43, .1);
    color: #475569;
}
.tg-btn--ghost:hover { transform: translateY(-2px); color: var(--site-primary, #dc2626); border-color: var(--site-primary-soft-border, #fecaca); }
.tg-btn--outline {
    background: transparent;
    border-color: var(--site-primary, #dc2626);
    color: var(--site-primary, #dc2626);
}
.tg-btn--outline:hover { transform: translateY(-2px); background: var(--site-primary, #dc2626); color: #fff; }

/* =========================================================================
   1) HERO — tiêu đề + dải số liệu
   ========================================================================= */
/* Giữ class .theme-listing-hero để header.css cấp padding-top 120px, NHƯNG app.css còn
   gắn cho nó nền xanh cũ + hai pseudo-element trang trí (panel lưới nghiêng) — chúng vẫn
   vẽ đè lên dải số liệu. Tắt hẳn ở đây. */
.tg-hero::before,
.tg-hero::after { content: none; }

.tg-hero {
    /* padding-top do header.css (.theme-listing-hero → 120px) quản lý. */
    padding-bottom: 44px;
    min-height: 0;
    background:
        linear-gradient(180deg,
            rgba(var(--site-primary-rgb, 220, 38, 38), .055) 0,
            rgba(var(--site-primary-rgb, 220, 38, 38), .055) calc(100% - 150px),
            rgba(var(--site-primary-rgb, 220, 38, 38), 0) 100%),
        #ffffff;
}

.tg-crumb { margin-bottom: 20px; }
.tg-crumb ol {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin: 0; padding: 0; list-style: none;
    color: #94a3b8; font-size: 13px; font-weight: 600;
}
.tg-crumb li + li::before { content: '/'; margin-right: 6px; color: #cbd5e1; }
.tg-crumb a { color: #64748b; text-decoration: none; transition: color .2s ease; }
.tg-crumb a:hover { color: var(--site-primary, #dc2626); }
.tg-crumb [aria-current='page'] { color: #0f172b; font-weight: 700; }

.tg-hero__grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: end; }
.tg-hero__head { max-width: 640px; }
.tg-hero__head h1 {
    margin: 0;
    color: #0f172b;
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: -.022em;
    text-wrap: balance;
}
.tg-hero__head p { margin: 14px 0 0; color: #475569; font-size: 16px; line-height: 1.7; max-width: 56ch; }

/* Dải số liệu — hộp kính ngang có vách ngăn, KHÔNG phải 3 card rời */
.tg-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 12px 32px rgba(15, 23, 43, .08), inset 0 1px 0 rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}
.tg-stats > div { padding: 16px 18px; text-align: center; }
.tg-stats > div + div { border-left: 1px solid rgba(15, 23, 43, .08); }
.tg-stats dt {
    color: #94a3b8; font-size: 11.5px; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase;
}
.tg-stats dd {
    margin: 5px 0 0;
    color: #0f172b; font-size: clamp(18px, 2vw, 23px); font-weight: 900;
    letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
}

@media (min-width: 900px) {
    .tg-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; }
}

/* =========================================================================
   2) THANH LỌC — dính khi cuộn
   ========================================================================= */
.tg-filterbar {
    position: sticky;
    /* Ngay dưới hộp pill của header nổi (24px padding + ~52px pill + đệm). */
    top: 96px;
    z-index: 20;
    padding: 12px 0;
}
.tg-filterbar > .site-container {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 16px 38px rgba(15, 23, 43, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(20px) saturate(158%);
    backdrop-filter: blur(20px) saturate(158%);
}

.tg-filter { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tg-filter__search {
    position: relative;
    display: flex; align-items: center; gap: 9px;
    min-height: 44px; padding: 0 14px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid rgba(15, 23, 43, .1);
}
.tg-filter__search svg { width: 17px; height: 17px; color: #94a3b8; flex-shrink: 0; }
.tg-filter__search input {
    width: 100%; border: 0; outline: 0; background: transparent;
    color: #0f172b; font-size: 14px; font-family: inherit;
}
.tg-filter__select select {
    width: 100%; min-height: 44px; padding: 0 34px 0 14px;
    border-radius: 11px; border: 1px solid rgba(15, 23, 43, .1);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center / 15px;
    color: #0f172b; font-size: 14px; font-weight: 600; font-family: inherit;
    appearance: none; -webkit-appearance: none;
    cursor: pointer;
}
.tg-filter__button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px;
    border: 0; border-radius: 11px; cursor: pointer;
    background: linear-gradient(135deg, var(--site-primary-light, #ef4444), var(--site-primary, #dc2626));
    color: #fff; font-size: 14px; font-weight: 700; font-family: inherit;
    box-shadow: 0 10px 24px rgba(var(--site-primary-rgb, 220, 38, 38), .28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.tg-filter__button:hover { transform: translateY(-2px); }
.tg-filter__button svg { width: 16px; height: 16px; }

@media (min-width: 860px) {
    .tg-filter { grid-template-columns: minmax(0, 1fr) 190px 190px auto; align-items: center; }
}

/* Pill ngành nghề */
.tg-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-tab {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 34px; padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 43, .1);
    background: #fff;
    color: #475569; font-size: 13px; font-weight: 700; text-decoration: none;
    transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.tg-tab:hover { transform: translateY(-1px); color: var(--site-primary, #dc2626); border-color: var(--site-primary-soft-border, #fecaca); }
.tg-tab.is-active {
    background: var(--site-primary, #dc2626);
    border-color: var(--site-primary, #dc2626);
    color: #fff;
}
.tg-tab__count {
    display: inline-grid; place-items: center;
    min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 23, 43, .07); color: #64748b;
    font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tg-tab.is-active .tg-tab__count { background: rgba(255, 255, 255, .25); color: #fff; }

/* =========================================================================
   3) LƯỚI MẪU
   ========================================================================= */
.tg-section { padding: 40px 0 56px; }
.tg-section__head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
    margin-bottom: 24px;
}
.tg-section__head h2 {
    margin: 0; color: #0f172b;
    font-size: clamp(22px, 2.3vw, 29px); font-weight: 900;
    letter-spacing: -.018em; line-height: 1.2;
}
.tg-section__head--center { justify-content: center; text-align: center; }
.tg-section__count { margin: 0; color: #94a3b8; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tg-clear {
    margin-left: auto;
    color: var(--site-primary, #dc2626); font-size: 13.5px; font-weight: 800; text-decoration: none;
}
.tg-clear:hover { text-decoration: underline; }

.tg-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }

@media (min-width: 640px) { .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
    .tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Thẻ nổi bật chiếm 2×2. Blade CHỈ gắn .tg-grid--feature khi số mẫu chia hết cho 3
       (1 thẻ 4 ô + n-1 thẻ 1 ô = n+3 ô, khít lưới 3 cột) — nếu không sẽ hở ô cuối lưới. */
    .tg-grid--feature .tg-card--feature { grid-column: span 2; grid-row: span 2; }

    /* Thẻ nổi bật cao gấp đôi. Phải cho KHUNG ẢNH nuốt phần cao dôi ra, còn phần thân
       giữ đúng chiều cao nội dung — nếu để cả hai cùng flex:1 (mặc định .tg-card__body)
       thì chúng chia đôi chỗ trống và thân thẻ phình ra một khoảng trắng lớn giữa giá
       và hàng nút. */
    .tg-grid--feature .tg-card--feature .tg-card__frame { flex: 1 1 auto; min-height: 0; }
    .tg-grid--feature .tg-card--feature .tg-card__body { flex: 0 0 auto; }
    .tg-grid--feature .tg-card--feature .tg-card__shot { aspect-ratio: auto; height: 100%; min-height: 0; }
    .tg-grid--feature .tg-card--feature .tg-card__name { font-size: 20px; }
    .tg-grid--feature .tg-card--feature .tg-card__desc { -webkit-line-clamp: 3; line-clamp: 3; }
}

.tg-card {
    display: flex; flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 12px 30px rgba(15, 23, 43, .07), inset 0 1px 0 rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    transition: transform .25s ease, box-shadow .25s ease;
}
.tg-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(15, 23, 43, .13); }

/* Khung trình duyệt bao quanh ẢNH CHỤP THẬT (không dựng UI giả bằng div) */
.tg-card__frame {
    position: relative;
    display: flex; flex-direction: column;
    background: #eef2f7;
    border-bottom: 1px solid rgba(15, 23, 43, .06);
}
.tg-chrome {
    display: flex; align-items: center; gap: 5px;
    height: 26px; padding: 0 12px; flex-shrink: 0;
    background: #e2e8f0;
}
.tg-chrome span { width: 8px; height: 8px; border-radius: 999px; background: #cbd5e1; }

.tg-card__shot {
    display: block; overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #f1f5f9;
}
.tg-card__shot img {
    display: block; width: 100%; height: 100%;
    /* object-position: top — ảnh chụp giao diện là ảnh DÀI, cắt từ đáy sẽ mất hero
       của mẫu; neo lên đỉnh để luôn thấy phần đầu trang. */
    object-fit: cover; object-position: top center;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.tg-card:hover .tg-card__shot img { transform: scale(1.04); }
.tg-card__placeholder {
    display: grid; place-items: center; width: 100%; height: 100%;
    color: var(--site-primary, #dc2626); font-size: 44px; font-weight: 900;
    background: var(--site-primary-soft, #fef2f2);
}

.tg-card__tags {
    position: absolute; top: 36px; left: 10px;
    display: flex; flex-wrap: wrap; gap: 6px;
    max-width: calc(100% - 20px);
}
.tg-badge {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    color: #0f172b; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.tg-badge--flag {
    background: var(--site-primary, #dc2626);
    border-color: var(--site-primary, #dc2626);
    color: #fff;
}

/* Đỏ commerce — NGOẠI LỆ color-lock, chỉ dùng cho giảm giá & giá bán */
.tg-discount {
    position: absolute; top: 36px; right: 10px;
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ed1c24, #e31d22);
    color: #fff; font-size: 12px; font-weight: 900;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 6px 16px rgba(227, 29, 34, .35);
}

.tg-card__preview {
    position: absolute; right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 13px;
    border-radius: 999px; cursor: pointer;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 8px 20px rgba(15, 23, 43, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    color: #0f172b; font-size: 12.5px; font-weight: 800; font-family: inherit;
    transition: transform .2s ease, color .2s ease;
}
.tg-card__preview:hover { transform: translateY(-2px); color: var(--site-primary, #dc2626); }
.tg-card__preview svg { width: 15px; height: 15px; }

.tg-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.tg-card__name { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.4; letter-spacing: -.01em; }
.tg-card__name a { color: #0f172b; text-decoration: none; }
.tg-card__name a:hover { color: var(--site-primary, #dc2626); }

.tg-card__stats {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    margin-top: 9px;
    color: #94a3b8; font-size: 12.5px; font-weight: 700;
}
.tg-rating { display: inline-flex; align-items: center; gap: 6px; }
.tg-rating b { color: #0f172b; font-variant-numeric: tabular-nums; }
/* Thanh sao tô theo tỉ lệ điểm thật — không vẽ 5 sao đầy mặc định */
.tg-rating__track {
    position: relative; display: block; width: 74px; height: 13px;
    background: rgba(15, 23, 43, .12);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='13' viewBox='0 0 74 13'%3E%3Cg fill='%23000'%3E%3Cpath d='M6.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1L.7 4.2l4.2-.3z'/%3E%3Cpath d='M21.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M36.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M51.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M66.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='13' viewBox='0 0 74 13'%3E%3Cg fill='%23000'%3E%3Cpath d='M6.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1L.7 4.2l4.2-.3z'/%3E%3Cpath d='M21.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M36.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M51.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3Cpath d='M66.5 0l1.6 3.9 4.2.3-3.2 2.7 1 4.1-3.6-2.3-3.6 2.3 1-4.1-3.2-2.7 4.2-.3z'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0;
}
.tg-rating__fill { position: absolute; inset: 0 auto 0 0; background: #f59e0b; }
.tg-downloads { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.tg-downloads svg { width: 14px; height: 14px; }

.tg-card__prices { display: flex; align-items: baseline; gap: 9px; margin-top: 11px; }
.tg-card__prices strong {
    color: #e31d22;
    font-size: 19px; font-weight: 900; letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.tg-card__prices del { color: #94a3b8; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tg-card__desc {
    margin: 10px 0 0;
    color: #64748b; font-size: 13.8px; line-height: 1.65;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden;
}

/* margin-top: auto ghim hàng nút xuống ĐÁY thẻ — các thẻ trong hàng cao lệch nhau
   (mô tả dài ngắn khác nhau) vẫn thẳng hàng nút. */
.tg-card__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; padding-top: 16px; }
.tg-card__actions .tg-btn { flex: 1; min-width: 128px; }

.tg-pagination { margin-top: 34px; }
.tg-pagination .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.tg-empty {
    display: grid; justify-items: center; gap: 12px;
    padding: 52px 24px; text-align: center;
    border-radius: 20px;
    border: 1px dashed #dbe1ea;
    background: rgba(255, 255, 255, .6);
}
.tg-empty h3 { margin: 0; color: #0f172b; font-size: 19px; font-weight: 800; }
.tg-empty p { margin: 0; color: #64748b; font-size: 14.5px; }

/* =========================================================================
   4) CAM KẾT — dải ngang có vách ngăn (KHÔNG phải 4 card đều)
   ========================================================================= */
.tg-commit { padding: 8px 0 56px; }
.tg-commit__band {
    display: grid; grid-template-columns: 1fr;
    border-radius: 22px;
    background: rgba(255, 255, 255, .64);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 16px 40px rgba(15, 23, 43, .08), inset 0 1px 0 rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(20px) saturate(158%);
    backdrop-filter: blur(20px) saturate(158%);
    overflow: hidden;
}
.tg-commit__band article { display: flex; align-items: flex-start; gap: 13px; padding: 20px 22px; }
.tg-commit__band article + article { border-top: 1px solid rgba(15, 23, 43, .07); }
.tg-commit__icon {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(var(--site-primary-rgb, 220, 38, 38), .1);
    color: var(--site-primary, #dc2626);
}
.tg-commit__icon svg { width: 20px; height: 20px; }
.tg-commit__band h3 { margin: 0; color: #0f172b; font-size: 14.5px; font-weight: 800; }
.tg-commit__band p { margin: 5px 0 0; color: #64748b; font-size: 13.4px; line-height: 1.6; }

@media (min-width: 1000px) {
    .tg-commit__band { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tg-commit__band article + article { border-top: 0; border-left: 1px solid rgba(15, 23, 43, .07); }
}

/* =========================================================================
   5) SO SÁNH — split 2 cột
   ========================================================================= */
.tg-compare {
    padding: 56px 0;
    background:
        linear-gradient(180deg,
            rgba(var(--site-primary-rgb, 220, 38, 38), 0) 0,
            rgba(var(--site-primary-rgb, 220, 38, 38), .045) 110px,
            rgba(var(--site-primary-rgb, 220, 38, 38), .045) calc(100% - 110px),
            rgba(var(--site-primary-rgb, 220, 38, 38), 0) 100%),
        #ffffff;
}
.tg-compare__head { max-width: 620px; margin-bottom: 28px; }
.tg-compare__head h2 {
    margin: 0; color: #0f172b;
    font-size: clamp(22px, 2.3vw, 29px); font-weight: 900; letter-spacing: -.018em; line-height: 1.22;
    text-wrap: balance;
}
.tg-compare__head p { margin: 12px 0 0; color: #64748b; font-size: 15px; line-height: 1.7; }

.tg-compare__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .tg-compare__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tg-compare__card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 26px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 14px 36px rgba(15, 23, 43, .08), inset 0 1px 0 rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}
.tg-compare__card--this { border-color: var(--site-primary-soft-border, #fecaca); }
.tg-compare__tag {
    align-self: flex-start; width: fit-content;
    display: inline-flex; align-items: center; height: 24px; padding: 0 11px; margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(var(--site-primary-rgb, 220, 38, 38), .1);
    color: var(--site-primary, #dc2626);
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.tg-compare__card h3 { margin: 0 0 14px; color: #0f172b; font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.tg-compare__card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tg-compare__card li {
    position: relative; padding-left: 26px;
    color: #475569; font-size: 14.2px; line-height: 1.6;
}
.tg-compare__card li::before {
    content: '';
    position: absolute; left: 0; top: 6px;
    width: 16px; height: 16px; border-radius: 999px;
    background: rgba(var(--site-primary-rgb, 220, 38, 38), .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3.2'%3E%3Cpath d='M4 12.5l5 5L20 6.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 10px;
}
.tg-compare__for { margin: 16px 0 0; color: #94a3b8; font-size: 13px; font-weight: 700; }
.tg-compare__card .tg-btn { align-self: flex-start; margin-top: 18px; }

/* =========================================================================
   6) FAQ  (dùng components/faq.blade.php — chỉ chỉnh khung ngoài)
   ========================================================================= */
.tg-faq { padding: 8px 0 56px; }
.tg-faq .faq-block { max-width: 820px; margin: 0 auto; }

/* =========================================================================
   7) CTA cuối
   ========================================================================= */
.tg-cta { padding: 0 0 76px; }
.tg-cta__card {
    display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center;
    padding: 30px 28px;
    border-radius: 24px;
    background:
        radial-gradient(520px 280px at 100% 0, rgba(var(--site-primary-rgb, 220, 38, 38), .14), transparent 66%),
        rgba(255, 255, 255, .66);
    border: 1px solid rgba(255, 255, 255, .74);
    box-shadow: 0 22px 50px rgba(15, 23, 43, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(20px) saturate(158%);
    backdrop-filter: blur(20px) saturate(158%);
}
.tg-cta__card h2 {
    margin: 0; color: #0f172b;
    font-size: clamp(21px, 2.2vw, 27px); font-weight: 900; letter-spacing: -.018em; line-height: 1.25;
    text-wrap: balance;
}
.tg-cta__card p { margin: 9px 0 0; color: #64748b; font-size: 14.8px; line-height: 1.65; }
.tg-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (min-width: 860px) {
    .tg-cta__card { grid-template-columns: minmax(0, 1fr) auto; padding: 34px 36px; }
}

/* =========================================================================
   8) LIGHTBOX XEM TRƯỚC
   ========================================================================= */
.tg-lightbox {
    position: fixed; inset: 0; z-index: 2000;
    display: grid; place-items: center;
    padding: 20px;
}
.tg-lightbox[hidden] { display: none; }
.tg-lightbox__backdrop {
    position: absolute; inset: 0;
    border: 0; padding: 0; cursor: zoom-out;
    background: rgba(15, 23, 43, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.tg-lightbox__panel {
    position: relative;
    display: flex; flex-direction: column;
    width: min(980px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, .74);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 30px 70px rgba(15, 23, 43, .3), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(20px) saturate(158%);
    backdrop-filter: blur(20px) saturate(158%);
}
.tg-lightbox__bar {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 18px; flex-shrink: 0;
    border-bottom: 1px solid rgba(15, 23, 43, .08);
}
.tg-lightbox__name {
    margin: 0; flex: 1; min-width: 0;
    color: #0f172b; font-size: 15.5px; font-weight: 800;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tg-lightbox__close {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(15, 23, 43, .1);
    background: #fff; color: #475569;
    transition: color .2s ease, transform .2s ease;
}
.tg-lightbox__close:hover { color: var(--site-primary, #dc2626); transform: rotate(90deg); }
.tg-lightbox__close svg { width: 16px; height: 16px; }

/* Ảnh chụp giao diện là ảnh DÀI — cho cuộn dọc trong panel thay vì bóp nhỏ lại. */
.tg-lightbox__scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    padding: 16px; display: grid; gap: 14px;
    background: rgba(241, 245, 249, .6);
}
.tg-lightbox__scroll img {
    display: block; width: 100%; height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(15, 23, 43, .12);
}
.tg-lightbox__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 18px; flex-shrink: 0;
    border-top: 1px solid rgba(15, 23, 43, .08);
    color: #64748b; font-size: 13px; font-weight: 700;
}

/* ---- Fallback khi trình duyệt không hỗ trợ backdrop-filter ---- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tg-stats,
    .tg-card,
    .tg-badge,
    .tg-card__preview,
    .tg-commit__band,
    .tg-compare__card,
    .tg-lightbox__panel {
        background: rgba(255, 255, 255, .93);
    }
    .tg-filterbar > .site-container { background: rgba(255, 255, 255, .95); }
    .tg-cta__card { background: rgba(255, 255, 255, .95); }
    .tg-lightbox__backdrop { background: rgba(15, 23, 43, .82); }
}
