/*
 * @added 2026-12-02 by Tieu — theme-store Dot 1 (docs/theme-store/02 §6)
 * Chi nap khi co app/data/theme_store.json list_v1 bat (hoac ?preview_store=1 noi bo) — xem template/theme.php.
 * Khong sua v1/css/main.css (dung chung).
 */

/* K01: khung anh co ti le co dinh => khong nhay trang khi anh lazy tai xong */
.theme-overlay.image img[width="520"] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
    background: #f3f4f6;
}

/* Sap xep */
.ts-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 10px 0;
}
.ts-sort label {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}
.ts-sort select {
    min-height: 40px;
    padding: 6px 32px 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}
.ts-sort select:focus-visible {
    outline: 2px solid #c75000;
    outline-offset: 2px;
}
@media (min-width: 992px) {
    .section-theme-menu-bar.new-version .container { position: relative; }
    .section-theme-menu-bar.new-version .ts-sort {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
}

/* K06: nut mo bang loc tren mobile (thay o go gia) */
.ts-filter-btn {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 10px 0 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}
@media (min-width: 992px) {
    .ts-filter-btn { display: none; }
}
/* Linh vuc dang chon tren mobile phai nhin thay */
.filter-theme-mb .ck-button input[type=radio]:checked + span {
    background: #c75000;
    border-color: #c75000;
    color: #fff;
}

/* K04: dang tai + trang thai rong */
#result {
    transition: opacity .15s ease;
}
#result.ts-loading {
    opacity: .45;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    #result { transition: none; }
}
.ts-empty {
    max-width: 560px;
    margin: 24px auto 40px;
    padding: 32px 24px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    background: #fff;
}
.ts-empty__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}
.ts-empty__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}
.ts-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
}
.ts-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid #c75000;
    border-radius: 6px;
    font-weight: 600;
    color: #c75000;
    background: #fff;
    text-decoration: none;
}
.ts-btn:hover,
.ts-btn:focus-visible {
    text-decoration: none;
    color: #fff;
    background: #c75000;
}
.ts-btn--primary {
    color: #fff;
    background: #c75000;
}
.ts-btn--primary:hover,
.ts-btn--primary:focus-visible {
    background: #a64300;
    border-color: #a64300;
}
.ts-error {
    padding: 24px;
    text-align: center;
    color: #4b5563;
}

/* =====================================================================
 * @added 2026-12-02 by Tieu — theme-store Dot 2 (co list_v2) — chi tac dung trong body.ts-v2
 * Q4: 1 mau hanh dong cam dam #c75000 (chu trang 4,59:1) + font Be Vietnam Pro
 * ===================================================================== */
body.ts-v2,
body.ts-v2 main,
body.ts-v2 .ts-card,
body.ts-v2 .section-title,
body.ts-v2 input,
body.ts-v2 select,
body.ts-v2 button {
    font-family: 'Be Vietnam Pro', Arial, Helvetica, sans-serif;
}

/* K23: menu phu — tab dang mo ro rang, "Dung thu" la nut that (khong giong tab) */
body.ts-v2 .extra-header .menu li.active > a {
    color: #c75000;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #c75000;
}
body.ts-v2 .extra-header .menu a.btn.btn-zozo {
    margin: 0 24px;
    padding: 8px 20px;
    border: 1px solid #c75000;
    border-radius: 6px;
    background: #c75000;
    color: #fff;
    font-weight: 600;
}
body.ts-v2 .extra-header .menu a.btn.btn-zozo:hover,
body.ts-v2 .extra-header .menu a.btn.btn-zozo:focus-visible {
    background: #a64300;
    border-color: #a64300;
    color: #fff;
}

/* Hero: nut tim cung mau hanh dong */
body.ts-v2 #search .search-button {
    background: #c75000;
    border-color: #c75000;
}
body.ts-v2 #search .search-button:hover,
body.ts-v2 #search .search-button:focus-visible {
    background: #a64300;
    border-color: #a64300;
}

/* Tieu de khoi */
.ts-all-title,
.ts-new__title {
    margin: 32px 0 8px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}
.ts-new {
    padding: 8px 0 24px;
    background: #fff7f0;
}
.ts-new__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 8px;
}
.ts-new__more {
    font-weight: 600;
    color: #c75000;
}
.ts-new__more:hover,
.ts-new__more:focus-visible {
    color: #a64300;
}

/* Luoi the */
.ts-grid > .ts-col {
    display: flex;
    margin-bottom: 24px;
}

/* The mau (K02, K27) */
.ts-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.ts-card:hover,
.ts-card:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}
@media (prefers-reduced-motion: reduce) {
    .ts-card { transition: none; }
}
.ts-card__media {
    display: block;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
}
.ts-card__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
}
.ts-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 20px);
}
.ts-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.ts-badge--new { background: #c75000; }
.ts-badge--std { background: #047857; }   /* xanh dam 5,5:1 voi chu trang — nhan trang thai, khong phai nut */
.ts-badge--pre { background: #1f2937; }
.ts-card__body {
    flex: 1 1 auto;
    padding: 14px 16px 4px;
}
.ts-card__cat {
    margin: 0 0 4px;
    font-size: 13px;
    color: #4b5563;
}
.ts-card__cat a {
    color: #4b5563;
}
.ts-card__cat a:hover,
.ts-card__cat a:focus-visible {
    color: #c75000;
}
.ts-card__name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}
.ts-card__name a {
    color: #111827;
}
.ts-card__name a:hover,
.ts-card__name a:focus-visible {
    color: #c75000;
    text-decoration: none;
}
.ts-card__price {
    margin: 0 0 8px;
    font-size: 15px;
    color: #111827;
}
.ts-card__price del {
    margin-left: 6px;
    font-size: 13px;
    color: #6b7280;
}
.ts-card__customers {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    color: #4b5563;
}
.ts-card__logos {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ts-card__logos li + li {
    margin-left: -8px;
}
.ts-card__logos span {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #fff center / contain no-repeat;
    box-shadow: 0 0 0 1px #e5e7eb;
}
.ts-card__actions {
    display: flex;
    gap: 8px;
    padding: 8px 16px 16px;
}
.ts-card__actions .ts-btn {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
    font-size: 15px;
    text-align: center;
    white-space: nowrap;
}
.ts-btn--block {
    display: flex;
    justify-content: center;
    margin: 0 16px 16px;
}
.ts-card .ts-btn:focus-visible {
    outline: 2px solid #c75000;
    outline-offset: 2px;
}
/* Mobile 1 cot: khung anh 4:3 (van la phan dau trang mau) => trang ngan ~1/3 */
@media (max-width: 575px) {
    .ts-card__media img { aspect-ratio: 4 / 3; }
    .ts-all-title, .ts-new__title { font-size: 22px; margin-top: 24px; }
}

/* Dot 2 — 1 mau hanh dong cho cac khoi dung chung CHI trong trang kho (body.ts-v2); trang khac khong doi */
.ts-new__more { color: #a64300; }                      /* 4,33:1 -> ~6:1 tren nen #fff7f0 */
.ts-new__more:hover, .ts-new__more:focus-visible { color: #7c3200; }
body.ts-v2 .form-requirement .send-contact,
body.ts-v2 .business-platform-area .btn-zozo.btn-green {
    background: #c75000 !important;                    /* global .btn-green / .btn-primary co !important */
    border-color: #c75000 !important;
    color: #fff !important;
}
body.ts-v2 .form-requirement .send-contact:hover,
body.ts-v2 .form-requirement .send-contact:focus-visible,
body.ts-v2 .business-platform-area .btn-zozo.btn-green:hover,
body.ts-v2 .business-platform-area .btn-zozo.btn-green:focus-visible {
    background: #a64300 !important;
    border-color: #a64300 !important;
}
body.ts-v2 .form-requirement .add-features { color: #a64300; }
body.ts-v2 .form-requirement .project-types__item .text-value,
body.ts-v2 .form-requirement label { color: #374151; }

/* =====================================================================
 * @added 2026-12-02 by Tieu — theme-store Dot 3 (co detail_v3) — trang chi tiet + demo, chi trong body.ts-v3
 * ===================================================================== */
body.ts-v3,
body.ts-v3 main,
body.ts-v3 input,
body.ts-v3 button {
    font-family: 'Be Vietnam Pro', Arial, Helvetica, sans-serif;
}
body.ts-v3 .extra-header .menu li.active > a {
    color: #c75000;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #c75000;
}
body.ts-v3 .extra-header .menu a.btn.btn-zozo {
    margin: 0 24px;
    padding: 8px 20px;
    border: 1px solid #c75000;
    border-radius: 6px;
    background: #c75000;
    color: #fff;
    font-weight: 600;
}

/* Anh lon: bam la xem truoc */
.ts3-shot {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}
.ts3-shot img { display: block; width: 100%; height: auto; }
.ts3-shot__hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .85);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.ts3-shot:hover .ts3-shot__hint,
.ts3-shot:focus-visible .ts3-shot__hint { background: #c75000; }
.ts3-demo-off {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid #c75000;
    background: #fff7f0;
    font-size: 14px;
    color: #374151;
}

/* K16: gia khong con xanh la 2,07:1 */
.ts3-price {
    margin: 0 0 16px;
    font-size: 26px;
    color: #111827;
}
.ts3-price strong { font-weight: 700; }
.ts3-price del { margin-left: 8px; font-size: 16px; color: #6b7280; }

/* 2 phuong an */
.ts3-options { margin: 0 0 16px; padding: 0; border: 0; }
.ts3-option {
    display: block;
    margin: 0 0 10px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.ts3-option:has(input:checked) {
    border-color: #c75000;
    box-shadow: 0 0 0 1px #c75000;
    background: #fff7f0;
}
.ts3-option__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.ts3-option__head input { width: 18px; height: 18px; margin: 0; accent-color: #c75000; }
.ts3-option__desc { display: block; margin: 6px 0 0 28px; font-size: 14px; color: #4b5563; }
.ts3-option__sum { display: block; margin: 6px 0 0 28px; font-size: 15px; color: #111827; }
.ts3-option__sum small { display: block; font-size: 13px; color: #4b5563; }

/* K14: Mua ngay cam canh Xem truoc */
.ts3-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ts3-actions .ts-btn { flex: 1 1 160px; justify-content: center; font-size: 16px; }
.ts3-buy { cursor: pointer; }
.ts3-trial { margin: 12px 0 0; font-size: 14px; color: #4b5563; }
.ts3-trial a { font-weight: 600; color: #a64300; text-decoration: underline; }
.ts3-customers { display: flex; align-items: center; gap: 10px; }
.ts3-customers .ts-card__logos span { width: 32px; height: 32px; }

/* Khoi cuoi trang + tieu de "Giao dien tuong tu" (K16) */
body.ts-v3 .try-this .btn-zozo.btn-green {
    background: #fff !important;
    border-color: #fff !important;
    color: #a64300 !important;
    font-weight: 700;
}
body.ts-v3 .related-theme .section-title__title,
body.ts-v3 .theme-related h2,
body.ts-v3 .related-themes h2 { color: #111827; }

/* K29: trang demo loi */
.ts3-demo-down {
    padding: 40px 16px 64px;
    background: #f9fafb;
}
.ts3-demo-down__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px;
    max-width: 1040px;
    margin: 0 auto;
}
.ts3-demo-down__img {
    flex: 0 0 320px;
    max-width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
.ts3-demo-down__text { flex: 1 1 320px; text-align: left; color: #374151; font-size: 16px; line-height: 1.6; }
.ts3-demo-down__title { margin: 0 0 12px; font-size: 24px; font-weight: 700; line-height: 1.35; color: #111827; }
.ts3-demo-down__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.ts3-demo-down__text a:not(.ts-btn) { color: #a64300; font-weight: 600; }
body.ts-v3 .admin-header .btn-orange { background: #c75000 !important; border-color: #c75000 !important; color: #fff !important; }
body.ts-v3 .related-themes h2.text-orange { color: #111827 !important; }
/* Dot 3 — tuong phan con lai tren trang chi tiet (do cdp2/audit) */
.ts3-shot__hint { background: #111827; }                                   /* nen dac, khong phu thuoc anh */
body.ts-v3 .try-this.bg-orange { background: #c75000 !important; }         /* chu trang 2,65 -> 4,59:1 */
body.ts-v3 .try-this .highlight,
body.ts-v3 .try-this .try-this-description,
body.ts-v3 .try-this .text-content-white { color: #fff !important; }
body.ts-v3 .related-themes .btn-zozo.btn-orange.btn-border {
    border-color: #c75000 !important;
    color: #a64300 !important;
    background: #fff !important;
}
body.ts-v3 .related-themes .btn-zozo.btn-orange.btn-border:hover,
body.ts-v3 .related-themes .btn-zozo.btn-orange.btn-border:focus-visible {
    background: #c75000 !important;
    color: #fff !important;
}
/* Demo loi: thanh tren co dinh che tieu de; an nut doi kich thuoc man hinh (khong co gi de xem) */
body.ts3-down .ts3-demo-down { padding-top: 104px; }
body.ts3-down .view-demo-menu { visibility: hidden; }
body.ts-v3 .view-demo-menu .demo-icon.active { color: #a64300; }

/* ==========================================================================
   @added 2026-12-02 by Tieu — Dot 4 (co ai_v4): nhan AI DESIGNED + khoi MagpenAI
   Tim dam: chu trang tren #5b21b6 ~ 8,6:1 — nhan trang thai, khong phai nut (nut van cam #c75000)
   ========================================================================== */
.ts-badge--ai {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 100%);
    letter-spacing: .04em;
}
.ts-badge--ai::before {
    content: "\2726";
    margin-right: 4px;
    font-size: 11px;
}
.ts4-ai-badge {
    margin-bottom: 8px;
    vertical-align: middle;
}

.ts-ai {
    padding: 56px 0;
    background: #f5f3ff;
    border-top: 1px solid #ede9fe;
    border-bottom: 1px solid #ede9fe;
}
.ts-ai__head {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}
.ts-ai__eyebrow {
    display: inline-block;
    margin: 0 0 8px;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5b21b6;
    background: #ede9fe;
}
.ts-ai__title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}
.ts-ai__lead {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}
.ts-ai__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ts-ai__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    text-align: left;
}
.ts-ai__step {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #ddd6fe;
}
.ts-ai__icon {
    margin-bottom: 14px;
    padding: 10px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    color: #5b21b6;
    background: #ede9fe;
    box-sizing: border-box;
}
.ts-ai__item-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}
.ts-ai__item-desc {
    flex: 1 1 auto;
    margin: 0 0 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #4b5563;
}
.ts-ai__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}
@media (max-width: 1199px) {
    .ts-ai__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .ts-ai { padding: 40px 0; }
    .ts-ai__title { font-size: 23px; }
    .ts-ai__grid { grid-template-columns: 1fr; gap: 14px; }
    .ts-ai__actions .ts-btn { width: 100%; }
}

/* ==========================================================================
   @added 2026-12-02 by Tieu — Dot 4 (co hero_v4): hero 2 cot + slider "Mau moi"
   Bo cuc tham khao hero kho giao dien Haravan (trai chu + tim + chip, phai cum anh nghieng), mau/chu/anh cua Zozo.
   ========================================================================== */
body.theme-page .ts-hero {
    box-shadow: none;
    margin-bottom: 0;
}
body.theme-page .ts-hero .wrapper-mainbanner {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60% 80% at 85% 30%, rgba(199, 80, 0, .10) 0, rgba(199, 80, 0, 0) 70%),
        linear-gradient(180deg, #fff7f0 0%, #ffffff 100%);
}
.ts-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    min-height: 560px;
    padding: 40px 0 56px;
}
.ts-hero__text { text-align: left; }
.ts-hero__title {
    margin: 0 0 16px;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.01em;
    color: #111827;
}
.ts-hero__title span { color: #c75000; }
.ts-hero__desc {
    max-width: 560px;
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.65;
    color: #374151;
}
.ts-hero__search {
    display: flex;
    gap: 8px;
    max-width: 580px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08);
}
.ts-hero__search .search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    font-size: 16px;
    color: #111827;
    background: transparent;
}
.ts-hero__search:focus-within {
    border-color: #c75000;
    box-shadow: 0 0 0 3px rgba(199, 80, 0, .15), 0 10px 30px rgba(17, 24, 39, .08);
}
.ts-hero__search .ts-btn { flex: 0 0 auto; height: 48px; padding: 0 22px; }
.ts-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.ts-hero__chips a {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    transition: border-color .15s ease, color .15s ease;
}
.ts-hero__chips a:hover,
.ts-hero__chips a:focus-visible {
    border-color: #c75000;
    color: #a64300;
    text-decoration: none;
}
.ts-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* Cum anh: 3 cot cuon cham nguoc chieu, nghieng nhe */
.ts-hero__art {
    position: relative;
    height: 520px;
}
.ts-hero__wall {
    position: absolute;
    top: -40px;
    right: -40px;
    bottom: -40px;
    left: 0;
    display: flex;
    gap: 18px;
    transform: rotate(-6deg);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.ts-hero__col {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}
.ts-hero__col--2 { margin-top: -60px; }
.ts-hero__col--3 { margin-top: 40px; }
.ts-hero__track {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: tsHeroUp 38s linear infinite;
}
.ts-hero__col--2 .ts-hero__track { animation-name: tsHeroDown; animation-duration: 44s; }
.ts-hero__col--3 .ts-hero__track { animation-duration: 50s; }
.ts-hero__art:hover .ts-hero__track,
.ts-hero__art:focus-within .ts-hero__track { animation-play-state: paused; }
@keyframes tsHeroUp   { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 9px)); } }
@keyframes tsHeroDown { from { transform: translateY(calc(-50% - 9px)); } to { transform: translateY(0); } }
.ts-hero__shot {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
    box-shadow: 0 14px 34px rgba(17, 24, 39, .16);
    transition: transform .25s ease, box-shadow .25s ease;
}
.ts-hero__shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
}
.ts-hero__shot:hover,
.ts-hero__shot:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(17, 24, 39, .22);
}
.ts-hero__shot-name {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .82);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
}
.ts-hero__shot-name em {
    margin-left: 4px;
    font-style: normal;
    color: #c4b5fd;
}
.ts-hero__shot:hover .ts-hero__shot-name,
.ts-hero__shot:focus-visible .ts-hero__shot-name { opacity: 1; transform: none; }

/* The so lieu noi */
.ts-hero__stat {
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(17, 24, 39, .14);
    font-size: 14px;
    line-height: 1.35;
    color: #374151;
    animation: tsHeroFloat 6s ease-in-out infinite;
}
.ts-hero__stat strong {
    display: block;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #c75000;
}
.ts-hero__stat--a { top: 36px; right: -8px; }
.ts-hero__stat--b {
    left: -28px;
    bottom: 56px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation-delay: -3s;
}
@keyframes tsHeroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
    .ts-hero__track,
    .ts-hero__stat { animation: none; }
    .ts-hero__shot,
    .ts-hero__shot-name { transition: none; }
}
@media (max-width: 1199px) {
    .ts-hero__title { font-size: 38px; }
}
@media (max-width: 991px) {
    .ts-hero__grid { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding: 24px 0 32px; }
    .ts-hero__title { font-size: 32px; }
    .ts-hero__art { height: 300px; }
    .ts-hero__wall { top: -30px; right: 0; bottom: -30px; left: 0; }
    .ts-hero__stat--b { left: 8px; bottom: 16px; }
    .ts-hero__stat--a { right: 8px; top: 16px; }
}
@media (max-width: 575px) {
    .ts-hero__title { font-size: 27px; }
    .ts-hero__desc { font-size: 15.5px; }
    .ts-hero__search { flex-wrap: wrap; }
    .ts-hero__search .ts-btn { width: 100%; }
    .ts-hero__actions .ts-btn { flex: 1 1 100%; justify-content: center; text-align: center; }
    .ts-hero__art { height: 240px; }
    .ts-hero__stat { padding: 10px 12px; font-size: 12.5px; }
    .ts-hero__stat strong { font-size: 22px; }
}

/* Slider "Mau moi" */
.ts-slider {
    position: relative;
    margin: 0 -8px;
}
.ts-slider__track {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 8px 8px 16px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.ts-slider__track::-webkit-scrollbar { display: none; }
.ts-slider__track:focus-visible { outline: 2px solid #c75000; outline-offset: 2px; }
.ts-slider__item {
    display: flex;
    flex: 0 0 calc((100% - 60px) / 4);
    scroll-snap-align: start;
}
.ts-slider__nav {
    position: absolute;
    top: 38%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .14);
    font-size: 26px;
    line-height: 1;
    color: #111827;
    cursor: pointer;
    transition: opacity .2s ease, background .2s ease;
}
.ts-slider__nav:hover,
.ts-slider__nav:focus-visible { background: #c75000; border-color: #c75000; color: #fff; }
.ts-slider__nav[disabled] { opacity: 0; pointer-events: none; }
.ts-slider__nav--prev { left: -14px; }
.ts-slider__nav--next { right: -14px; }
.ts-slider.is-static .ts-slider__nav { display: none; }
@media (max-width: 1199px) { .ts-slider__item { flex-basis: calc((100% - 40px) / 3); } }
@media (max-width: 991px)  { .ts-slider__item { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 575px)  {
    .ts-slider__item { flex-basis: 82%; }
    .ts-slider__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ts-slider__track { scroll-behavior: auto; } }
.ts-hero__actions .ts-btn span { margin-left: 6px; }
.ts-slider__track { scroll-padding-left: 8px; scroll-padding-right: 8px; }
/* .slider-area (global.css) to nen cam phan dem cho header co dinh o man < 1200 */
body.theme-page .ts-hero.slider-area { background: #fff7f0; }

/* ==========================================================================
   @added 2026-12-02 by Tieu — Dot 4: chuan hoa theo docs/landing-system (theme Web) — chi trong body.ts-v4 (co hero_v4)
   Mau: navy #0f1b3d + quang cam (nen dam) · CTA duy nhat #c75000 · nhan chu vang #ffd166 · ink #16161d · muted #5f5e66
   Chu: Be Vietnam Pro 800 cho tieu de, chu thuong theo cau · bo goc nut 999px, the 16-20px · moi man <= 1 nut cam
   Tuong phan (WCAG): trang/navy 16,9:1 · rgba(255,255,255,.82)/navy ~12:1 · #a84300/#fff3e8 5,55:1 · #5f5e66/trang 6,4:1
   ========================================================================== */
body.ts-v4 {
    --ts-navy: #0f1b3d;
    --ts-ink: #16161d;
    --ts-muted: #5f5e66;
    --ts-line: #e7e8ee;
    --ts-soft: #f7f7fb;
    --ts-cta: #c75000;
    --ts-cta-hover: #a84300;
    --ts-tint: #fff3e8;
    --ts-mark: #ffd166;
}

/* U01 dau section */
body.ts-v4 .ts-eyebrow {
    display: inline-block;
    margin: 0 0 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ts-tint);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ts-cta-hover);
}
body.ts-v4 .ts-eyebrow--dark {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
body.ts-v4 .ts-mark {
    display: inline-block;
    padding: 0 .28em;
    border-radius: 12px;
    background: var(--ts-mark);
    color: var(--ts-ink);
    transform: rotate(-1.5deg);
    line-height: 1.25;
}
body.ts-v4 .ts-lead {
    max-width: 640px;
    margin: 10px 0 0;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ts-muted);
}
body.ts-v4 .ts-new__title,
body.ts-v4 .ts-all-title {
    margin: 0;
    font-size: clamp(26px, 3.1vw, 40px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.02em;
    color: var(--ts-ink);
}

/* U02 nut: vien thuoc, cao >= 48px */
body.ts-v4 .ts-btn {
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
body.ts-v4 .ts-btn--primary { box-shadow: 0 10px 24px -10px rgba(199, 80, 0, .7); }
body.ts-v4 .ts-btn--primary:hover { transform: translateY(-1px); }
body.ts-v4 .ts-btn--ghost {
    border: 1.5px solid rgba(255, 255, 255, .6);
    background: transparent;
    color: #fff;
}
body.ts-v4 .ts-btn--ghost:hover,
body.ts-v4 .ts-btn--ghost:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
body.ts-v4 a:focus-visible,
body.ts-v4 button:focus-visible,
body.ts-v4 .ts-hero__search:focus-within {
    outline: 3px solid #ffc83d;
    outline-offset: 2px;
}

/* H01 hero toi */
body.theme-page.ts-v4 .ts-hero.slider-area,
body.theme-page.ts-v4 .ts-hero .wrapper-mainbanner {
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 120, 0, .28), transparent 45%),
        radial-gradient(circle at 8% 90%, rgba(255, 209, 102, .10), transparent 40%),
        var(--ts-navy);
}
body.ts-v4 .ts-hero__grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 48px;
    min-height: 540px;
    padding: 48px 0 64px;
}
body.ts-v4 .ts-hero__title {
    margin: 0 0 16px;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.025em;
    color: #fff;
    text-wrap: balance;
}
body.ts-v4 .ts-hero__title .ts-mark { white-space: nowrap; }
body.ts-v4 .ts-hero__desc {
    max-width: 520px;
    margin: 0 0 28px;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
}
body.ts-v4 .ts-hero__search {
    position: relative;
    align-items: center;
    max-width: 560px;
    padding: 6px 6px 6px 0;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45);
}
body.ts-v4 .ts-hero__search-icon {
    flex: 0 0 auto;
    margin: 0 0 0 18px;
    color: #6b7280;
}
body.ts-v4 .ts-hero__search .search-input { height: 48px; padding: 0 10px; font-size: 16px; }
body.ts-v4 .ts-hero__search .search-input::placeholder { color: #6b7280; }
body.ts-v4 .ts-hero__search .ts-btn { height: 48px; min-height: 48px; }
body.ts-v4 .ts-hero__actions { margin-top: 20px; }
body.ts-v4 .ts-hero__shot {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6);
}
body.ts-v4 .ts-hero__shot-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    max-width: calc(100% - 20px);
    background: rgba(15, 27, 61, .9);
}
body.ts-v4 .ts-hero__shot-name small { font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .78); }
body.ts-v4 .ts-hero__shot-name em { margin: 0; color: var(--ts-mark); }
body.ts-v4 .ts-hero__stat { border-radius: 16px; color: var(--ts-ink); }
body.ts-v4 .ts-hero__stat strong { font-weight: 800; color: var(--ts-cta); }
body.ts-v4 .ts-hero__stat--b { left: -24px; }

/* Mau moi (nen trang ngay sau hero toi) */
body.ts-v4 .ts-new {
    padding: 72px 0 40px;
    background: #fff;
}
body.ts-v4 .ts-new__head {
    align-items: flex-end;
    margin-bottom: 28px;
}
body.ts-v4 .ts-new__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--ts-cta-hover);
}
body.ts-v4 .ts-all-head { padding-top: 56px; padding-bottom: 8px; }
body.ts-v4 .ts-all-head .ts-all-title { margin: 0; }

/* The mau: vien manh, bo 16px, nhac khi hover; trong the KHONG co nut cam dac (<= 1 nut cam moi man) */
body.ts-v4 .ts-card {
    border-color: var(--ts-line);
    border-radius: 16px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body.ts-v4 .ts-card:hover,
body.ts-v4 .ts-card:focus-within {
    transform: translateY(-3px);
    border-color: #f3c9a6;
    box-shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 16px 36px -14px rgba(15, 27, 61, .28);
}
body.ts-v4 .ts-card__name { font-weight: 800; color: var(--ts-ink); }
body.ts-v4 .ts-card__cat,
body.ts-v4 .ts-card__cat a { color: var(--ts-muted); }
body.ts-v4 .ts-card__actions .ts-btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14.5px;
}
body.ts-v4 .ts-card__actions .ts-btn--primary {
    border-color: var(--ts-tint);
    background: var(--ts-tint);
    color: var(--ts-cta-hover);
    box-shadow: none;
}
body.ts-v4 .ts-card__actions .ts-btn--primary:hover,
body.ts-v4 .ts-card__actions .ts-btn--primary:focus-visible {
    border-color: var(--ts-cta);
    background: var(--ts-cta);
    color: #fff;
}
body.ts-v4 .ts-card__actions .ts-btn:not(.ts-btn--primary) {
    border-color: var(--ts-line);
    background: #fff;
    color: var(--ts-ink);
}
body.ts-v4 .ts-card__actions .ts-btn:not(.ts-btn--primary):hover,
body.ts-v4 .ts-card__actions .ts-btn:not(.ts-btn--primary):focus-visible {
    border-color: var(--ts-cta);
    color: var(--ts-cta-hover);
}

/* Khoi MagpenAI: khoi toi giua trang */
body.ts-v4 .ts-ai {
    padding: 88px 0;
    border: 0;
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 120, 0, .22), transparent 40%),
        radial-gradient(circle at 92% 90%, rgba(255, 209, 102, .10), transparent 40%),
        var(--ts-navy);
}
body.ts-v4 .ts-ai__head { margin-bottom: 44px; }
body.ts-v4 .ts-ai__title {
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}
body.ts-v4 .ts-ai__lead { color: rgba(255, 255, 255, .82); font-size: 17px; }
body.ts-v4 .ts-ai__grid { gap: 24px; }
body.ts-v4 .ts-ai__item {
    padding: 28px 24px 24px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    background: rgba(255, 255, 255, .05);
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
body.ts-v4 .ts-ai__item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 209, 102, .5);
    background: rgba(255, 255, 255, .08);
}
body.ts-v4 .ts-ai__step { font-weight: 800; color: rgba(255, 255, 255, .16); }
body.ts-v4 .ts-ai__icon {
    border-radius: 14px;
    background: rgba(255, 120, 0, .16);
    color: #ffb27a;
}
body.ts-v4 .ts-ai__item-title { font-weight: 800; color: #fff; }
body.ts-v4 .ts-ai__item-desc { color: rgba(255, 255, 255, .78); }

@media (prefers-reduced-motion: reduce) {
    body.ts-v4 .ts-btn,
    body.ts-v4 .ts-card,
    body.ts-v4 .ts-ai__item { transition: none; }
    body.ts-v4 .ts-card:hover,
    body.ts-v4 .ts-ai__item:hover,
    body.ts-v4 .ts-btn--primary:hover { transform: none; }
}
@media (max-width: 991px) {
    body.ts-v4 .ts-hero__grid { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 32px 0 40px; }
    body.ts-v4 .ts-hero__stat--b { left: 8px; }
    body.ts-v4 .ts-new__head { align-items: flex-start; }
}
@media (max-width: 767px) {
    body.ts-v4 .ts-new { padding: 48px 0 24px; }
    body.ts-v4 .ts-ai { padding: 56px 0; }
    body.ts-v4 .ts-all-head { padding-top: 40px; }
    body.ts-v4 .ts-lead,
    body.ts-v4 .ts-hero__desc,
    body.ts-v4 .ts-ai__lead { font-size: 16px; }
}
@media (max-width: 575px) {
    body.ts-v4 .ts-hero__search { flex-wrap: nowrap; padding: 5px 5px 5px 0; }
    body.ts-v4 .ts-hero__search-icon { margin-left: 14px; }
    body.ts-v4 .ts-hero__search .ts-btn { width: auto; padding: 0 16px; font-size: 14px; }
    body.ts-v4 .ts-hero__actions .ts-btn { width: 100%; }
    body.ts-v4 .ts-hero__stat { display: none; }
}
/* Dot 4 tinh chinh: cot chu rong hon + H1 nho lai (2 dong o 1440), du cho placeholder o tim */
@media (min-width: 992px) { body.ts-v4 .ts-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
body.ts-v4 .ts-hero__title { font-size: clamp(28px, 2.9vw, 40px); }
body.ts-v4 .ts-hero__search { max-width: 580px; }
body.ts-v4 .ts-hero__search .ts-btn { padding: 0 20px; }

/* @added 2026-12-02 by Tieu — Dot 4: re chuot the => cuon anh ca trang tu dau toi cuoi (anh dai nap qua theme-store.js) */
.ts-card__media--scroll { overflow: hidden; }
.ts-card__media--scroll img {
    object-position: 50% 0;
    transition: object-position .6s ease-out;
}
.ts-card:hover .ts-card__media--scroll.is-long img,
.ts-card:focus-within .ts-card__media--scroll.is-long img {
    object-position: 50% 100%;
    transition: object-position var(--ts-scroll-dur, 6s) linear;
}
@media (prefers-reduced-motion: reduce) {
    .ts-card__media--scroll img { transition: none; }
    .ts-card:hover .ts-card__media--scroll.is-long img { object-position: 50% 0; }
}
/* Nhan tren the: chu nho lai de "Dat 90+ Google PageSpeed" + "AI DESIGNED" + "Moi" khong tran dong */
.ts-card__badges { gap: 4px; max-width: calc(100% - 16px); top: 8px; left: 8px; }
.ts-card__badges .ts-badge { padding: 2px 8px; font-size: 11px; line-height: 1.55; letter-spacing: 0; white-space: nowrap; }
.ts-card__badges .ts-badge--ai::before { font-size: 9px; margin-right: 3px; }
/* Nhan PageSpeed o goc duoi khung anh: lop phu cung ti le voi anh (4:5, mobile 4:3), day nhan xuong day */
.ts-card__badges--foot {
    top: 0; left: 0; right: 0; max-width: none;
    aspect-ratio: 4 / 5;
    align-content: flex-end;
    padding: 0 8px 10px;
    pointer-events: none;
}
.ts-card__badges--foot .ts-badge { pointer-events: auto; box-shadow: 0 2px 6px rgba(15, 27, 61, .18); }
@media (max-width: 575px) { .ts-card__badges--foot { aspect-ratio: 4 / 3; } }
