.tgs-fs {
    --tgs-fs-red: #d0021b;
    --tgs-fs-red-soft: #f6a3ad;
    --tgs-fs-ink: #1b1b1b;
    --tgs-fs-muted: #8a8a8a;
    margin: 16px 0;
    padding: 14px 0 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbd38d 0%, #fde7c2 46%, #fff4e3 100%);
    color: var(--tgs-fs-ink);
    overflow: hidden;
}
.tgs-fs * { box-sizing: border-box; }

.tgs-fs-head { display: flex; align-items: center; gap: 12px; padding: 0 14px 12px; }
.tgs-fs-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--tgs-fs-ink); white-space: nowrap; }
.tgs-fs-bolt { width: 26px; height: 26px; fill: #e8402f; flex: none; }

.tgs-fs-timer { display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.tgs-fs-timer b { min-width: 38px; padding: 4px 6px; border-radius: 6px; background: var(--tgs-fs-red); color: #fff; font-size: 20px; font-weight: 700; line-height: 1.2; text-align: center; }
.tgs-fs-timer i { font-style: normal; font-weight: 700; color: var(--tgs-fs-ink); }
.tgs-fs-timer-label, .tgs-fs-timer-days { margin-right: 2px; font-size: 13px; font-weight: 600; color: var(--tgs-fs-red); white-space: nowrap; }
.tgs-fs-more { margin-left: auto; font-size: 17px; color: var(--tgs-fs-ink); text-decoration: none; white-space: nowrap; }
.tgs-fs-more:hover { color: var(--tgs-fs-red); }

.tgs-fs-list { display: grid; gap: 12px; padding: 0 14px; }
.tgs-fs[data-layout="slider"] .tgs-fs-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 42%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tgs-fs[data-layout="slider"] .tgs-fs-list::-webkit-scrollbar { display: none; }
.tgs-fs[data-layout="grid"] .tgs-fs-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.tgs-fs-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; border-radius: 12px; background: #fff; color: var(--tgs-fs-ink); text-decoration: none; scroll-snap-align: start; transition: box-shadow .15s ease, transform .15s ease; }
.tgs-fs-card:hover { box-shadow: 0 6px 18px rgba(208, 2, 27, .12); transform: translateY(-2px); color: var(--tgs-fs-ink); }

.tgs-fs-img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #fff; }
.tgs-fs-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tgs-fs-card.is-muted .tgs-fs-img img { opacity: .55; }
.tgs-fs-discount { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 6px; background: #ffe14d; color: var(--tgs-fs-red); font-size: 12px; font-weight: 800; }
.tgs-fs-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 7px 18px; border-radius: 999px; background: rgba(40, 40, 40, .72); color: #fff; font-size: 17px; font-weight: 600; white-space: nowrap; }

.tgs-fs-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; font-size: 15px; line-height: 1.3; }
.tgs-fs-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.tgs-fs-price, .tgs-fs-price .amount { color: var(--tgs-fs-red); font-size: 18px; font-weight: 700; }
.tgs-fs-prices del, .tgs-fs-prices del .amount { color: var(--tgs-fs-muted); font-size: 13px; font-weight: 400; }

.tgs-fs-bar {
    --tgs-fs-progress: 100%;
    position: relative; display: block; margin-top: auto; height: 24px; border-radius: 999px; overflow: hidden;
    background: var(--tgs-fs-red-soft);
}
.tgs-fs-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--tgs-fs-progress); background: linear-gradient(90deg, #d0021b, #ef3d4f); border-radius: inherit; }
.tgs-fs-bar span { position: relative; display: block; text-align: center; color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.tgs-fs-card.is-muted .tgs-fs-bar::before { background: #b8b8b8; }
.tgs-fs-card.is-muted .tgs-fs-bar { background: #d9d9d9; }

.tgs-fs-none { padding: 24px; text-align: center; color: var(--tgs-fs-muted); }

@media (min-width: 768px) {
    /* 5 the moi hang tren may tinh, keo ngang de xem tiep. */
    .tgs-fs[data-layout="slider"] .tgs-fs-list { grid-auto-columns: calc((100% - 4 * 12px) / 5); }
}
@media (max-width: 480px) {
    .tgs-fs-title { font-size: 21px; }
    .tgs-fs-bolt { width: 22px; height: 22px; }
    .tgs-fs-timer b { min-width: 32px; font-size: 17px; padding: 3px 4px; }
    .tgs-fs-more { font-size: 15px; }
    .tgs-fs-head { gap: 8px; flex-wrap: wrap; }
    .tgs-fs-name { font-size: 14px; }
    .tgs-fs-price, .tgs-fs-price .amount { font-size: 16px; }
}

/* Banner chuong trinh (FR-02) */
.tgs-fs-banner { display: block; margin: -14px 0 12px; }
.tgs-fs-banner img { display: block; width: 100%; height: auto; }

/* Trang Flash Sale: tab khung gio (FR-21) */
.tgs-fs-tabs { display: flex; gap: 8px; padding: 0 14px 12px; overflow-x: auto; scrollbar-width: none; }
.tgs-fs-tabs::-webkit-scrollbar { display: none; }
.tgs-fs-tab { flex: none; display: grid; gap: 2px; min-width: 104px; margin: 0; padding: 8px 14px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .7); color: var(--tgs-fs-ink); font: inherit; line-height: 1.2; text-align: center; cursor: pointer; }
.tgs-fs-tab strong { font-size: 17px; }
.tgs-fs-tab small { font-size: 12px; color: var(--tgs-fs-muted); }
.tgs-fs-tab[aria-selected="true"] { background: var(--tgs-fs-red); color: #fff; }
.tgs-fs-tab[aria-selected="true"] small { color: #ffe1e4; }
.tgs-fs-panel-head { display: flex; justify-content: center; padding: 0 14px 12px; }
.tgs-fs-card.is-upcoming .tgs-fs-bar::before { background: linear-gradient(90deg, #f59e0b, #f97316); }

/* Trang chi tiet san pham (FR-23, FR-24) */
.tgs-fs-product { margin: 12px 0 16px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, #fff1f2, #fff7ed); border: 1px solid #fecdd3; color: #1b1b1b; }
.tgs-fs-product * { box-sizing: border-box; }
.tgs-fs-product-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tgs-fs-product-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 18px; color: #d0021b; text-transform: uppercase; }
.tgs-fs-product .tgs-fs-bolt { width: 22px; height: 22px; fill: #e8402f; }
.tgs-fs-product .tgs-fs-timer b { min-width: 32px; font-size: 16px; padding: 3px 5px; border-radius: 6px; background: #d0021b; color: #fff; text-align: center; font-weight: 700; }
.tgs-fs-product .tgs-fs-timer i { font-style: normal; font-weight: 700; }
.tgs-fs-product .tgs-fs-timer-label { font-size: 13px; font-weight: 600; color: #d0021b; margin-right: 2px; }
.tgs-fs-product .tgs-fs-timer { display: flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.tgs-fs-product-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tgs-fs-product-body .tgs-fs-price, .tgs-fs-product-body .tgs-fs-price .amount { color: #d0021b; font-size: 22px; font-weight: 800; }
.tgs-fs-product-body del { color: #8a8a8a; }
.tgs-fs-product-body .tgs-fs-discount { position: static; padding: 2px 7px; border-radius: 6px; background: #ffe14d; color: #d0021b; font-size: 13px; font-weight: 800; }
.tgs-fs-product-meta { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #57534e; }
.tgs-fs-product-meta li { margin: 2px 0; }
.tgs-fs-product .tgs-fs-bar { --tgs-fs-progress: 100%; position: relative; display: block; margin-top: 8px; height: 22px; border-radius: 999px; overflow: hidden; background: #f6a3ad; }
.tgs-fs-product .tgs-fs-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--tgs-fs-progress); background: linear-gradient(90deg, #d0021b, #ef3d4f); border-radius: inherit; }
.tgs-fs-product .tgs-fs-bar span { position: relative; display: block; text-align: center; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-transform: uppercase; }
.tgs-fs-product.is-muted { background: #f5f5f4; border-color: #e7e5e4; }

/* Gio hang: tach gia sale / gia thuong (BR-08) */
.tgs-fs-cart-flash small { color: #d0021b; font-weight: 600; }
.tgs-fs-cart-regular { color: #57534e; }
