/* CXD Flash Sale — khối giảm giá hẹn giờ. Tối giản: thẻ không viền, MỘT điểm nhấn (cyan-700) cho đồng hồ và thanh đã bán.
   Chỉ dùng biến CSS của theme, luôn có giá trị dự phòng — chạy được trên giao diện bất kỳ. */
.cxd-fs {
	--fs-ink: var(--ink, #231f20);
	--fs-ink2: var(--ink-2, #55525a);
	--fs-ink3: var(--ink-3, #6e6a73);
	--fs-accent: var(--cyan-700, #00719c);
	--fs-accent-bg: var(--cyan-50, #e6f7fd);
	--fs-yellow: var(--brand-yellow, #fff200);
	--fs-surface: var(--surface, #fff);
	--fs-radius: var(--r-lg, 12px);
	--fs-shadow: var(--shadow-1, 0 1px 3px rgba(35, 31, 32, .08));
	--fs-font-head: var(--font-head, inherit);
	margin: 32px 0;
	color: var(--fs-ink);
	font-family: var(--font-body, inherit);
	line-height: 1.5;
}
.cxd-fs *, .cxd-fs *::before, .cxd-fs *::after { box-sizing: border-box; }

/* Đầu khối: tiêu đề bên trái, đồng hồ bên phải; hẹp thì xuống dòng */
.cxd-fs__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 8px; }
.cxd-fs .cxd-fs__head .cxd-fs__title { flex: 0 1 auto; width: auto; max-width: 100%; margin: 0; font-family: var(--fs-font-head); font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--fs-ink); text-transform: none; }

/* Đồng hồ: số tabular để không nhảy; không ô màu, không viền */
.cxd-fs__timer { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cxd-fs__lbl { font-size: .875rem; color: var(--fs-ink2); }
.cxd-fs__t { display: inline-flex; align-items: baseline; gap: 2px; font-family: var(--fs-font-head); font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--fs-accent); font-variant-numeric: tabular-nums; }
.cxd-fs__t b { font-weight: 600; box-sizing: content-box; min-width: 2.4ch; text-align: center; }
.cxd-fs__t i { font-style: normal; color: var(--fs-ink3); }
.cxd-fs__days { margin-right: 8px; font-size: 1rem; color: var(--fs-ink2); }
.cxd-fs__days b { min-width: 0; color: var(--fs-accent); font-size: 1.5rem; }
.cxd-fs__days[hidden] { display: none; }

/* Thanh "đã bán" */
.cxd-fs__sold { max-width: 360px; margin: 4px 0 16px; }
.cxd-fs__bar { height: 8px; border-radius: 999px; background: var(--fs-accent-bg); overflow: hidden; }
.cxd-fs__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fs-accent); transition: width .3s ease; }
.cxd-fs__sold-t { margin: 6px 0 0; font-size: .875rem; color: var(--fs-ink2); font-variant-numeric: tabular-nums; }
.cxd-fs__sold-t b { color: var(--fs-ink); font-weight: 700; }

/* Danh sách: cuộn ngang bám mốc, ẩn thanh cuộn nhưng vẫn cuộn được bằng tay/phím */
.cxd-fs__wrap { position: relative; }
.cxd-fs .cxd-fs__track { display: flex; gap: 16px; margin: 0; padding: 4px 2px 8px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cxd-fs__track::-webkit-scrollbar { display: none; }
.cxd-fs .cxd-fs__track .cxd-fs__item { flex: 0 0 clamp(160px, 44vw, 220px); margin: 0; padding: 0; scroll-snap-align: start; list-style: none; } /* chống luật `li { margin-left }` của theme */
.cxd-fs.cxd-fs--grid .cxd-fs__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); overflow: visible; }
.cxd-fs.cxd-fs--grid .cxd-fs__track .cxd-fs__item { flex: none; }

.cxd-fs__card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px; border-radius: var(--fs-radius); background: var(--fs-surface); box-shadow: var(--fs-shadow); color: var(--fs-ink); text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; }
.cxd-fs__card:hover { box-shadow: var(--shadow-2, 0 8px 24px rgba(35, 31, 32, .12)); color: var(--fs-ink); }
.cxd-fs__card:focus-visible { outline: 3px solid var(--fs-accent); outline-offset: 2px; }
.cxd-fs__img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--bg, #fafafb); }
.cxd-fs .cxd-fs__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cxd-fs__badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--fs-yellow); color: #231f20; font-size: .75rem; font-weight: 700; line-height: 20px; font-variant-numeric: tabular-nums; }
.cxd-fs__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; font-size: .875rem; line-height: 1.4; color: var(--fs-ink); }
.cxd-fs__price { margin-top: auto; font-family: var(--fs-font-head); font-weight: 600; font-size: 1rem; color: var(--fs-ink); font-variant-numeric: tabular-nums; }
.cxd-fs__price del { display: block; font-weight: 400; font-size: .8125rem; color: var(--fs-ink3); }
.cxd-fs__price ins { text-decoration: none; background: none; }

/* Nút cuộn: ≥44px, chỉ hiện khi còn nội dung để cuộn */
.cxd-fs__nav { position: absolute; top: 38%; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--fs-surface); color: var(--fs-ink); box-shadow: var(--shadow-2, 0 8px 24px rgba(35, 31, 32, .12)); cursor: pointer; transition: background .15s ease; }
.cxd-fs__nav[hidden] { display: none; }
.cxd-fs__nav:hover { background: var(--fs-yellow); }
.cxd-fs__nav:focus-visible { outline: 3px solid var(--fs-accent); outline-offset: 2px; }
.cxd-fs__nav--prev { left: -8px; }
.cxd-fs__nav--next { right: -8px; }
@media (max-width: 549px) {
	.cxd-fs__nav { display: none; } /* điện thoại: vuốt tay */
}

/* Hộp trên trang sản phẩm: nổi bật bằng nền vàng thương hiệu + đồng hồ dạng ô tối, vẫn không viền */
.cxd-fs--box { margin: 16px 0; padding: 16px 20px; border-radius: var(--fs-radius); background: var(--fs-yellow); color: #231f20; }
.cxd-fs--box .cxd-fs__timer { display: flex; align-items: center; gap: 6px 12px; }
.cxd-fs--box .cxd-fs__lbl { font-size: .9375rem; font-weight: 600; color: #231f20; }
.cxd-fs--box .cxd-fs__t { gap: 4px; font-size: 1.375rem; color: #fff; }
.cxd-fs--box .cxd-fs__t b { box-sizing: content-box; min-width: 2.4ch; text-align: center; padding: 4px 8px; border-radius: 8px; background: #231f20; color: #fff; }
.cxd-fs--box .cxd-fs__t i { color: #231f20; font-weight: 700; }
.cxd-fs--box .cxd-fs__days { margin-right: 4px; font-size: 1rem; font-weight: 600; color: #231f20; }
.cxd-fs--box .cxd-fs__days b { min-width: 0; padding: 4px 8px; font-size: 1.375rem; }
.cxd-fs--box .cxd-fs__sold { max-width: none; margin: 12px 0 0; }
.cxd-fs--box .cxd-fs__bar { height: 10px; background: rgba(255, 255, 255, .85); }
.cxd-fs--box .cxd-fs__bar > span { background: #231f20; }
.cxd-fs--box .cxd-fs__sold-t { color: #231f20; }

/* Khối "chưa có chương trình" (danh_muc / trong) */
.cxd-fs-empty { max-width: 560px; margin: 24px auto; padding: 32px 24px; text-align: center; border: 1px dashed #d8d4cc; border-radius: var(--r-lg, 12px); }
.cxd-fs-empty .cxd-fs-empty__text { margin: 0 0 16px; color: var(--ink-2, #55525a); line-height: 1.6; }
.cxd-fs-empty .cxd-fs-empty__btn { margin: 0; }

@media (prefers-reduced-motion: reduce) {
	.cxd-fs__card, .cxd-fs__nav, .cxd-fs__bar > span { transition: none; }
	.cxd-fs__track { scroll-behavior: auto; }
}
