/* Flash Sale VN – frontend */
:root {
	--wfs-primary: #ee4d2d;
	--wfs-accent: #ffd424;
	--wfs-text: #fff;
}

/* Nhãn + đồng hồ */
.wfs-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-style: italic; letter-spacing: .02em; text-transform: uppercase; color: var(--wfs-text); }
.wfs-bolt { color: var(--wfs-accent); flex: none; }
.wfs-countdown { display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.wfs-countdown b { display: inline-block; min-width: 1.7em; padding: 2px 4px; border-radius: 3px; background: #1f1f1f; color: #fff; font-weight: 700; font-size: .9em; text-align: center; line-height: 1.4; }
.wfs-countdown b.wfs-cd-d { min-width: 0; padding: 2px 6px; margin-right: 4px; }
.wfs-countdown b[hidden] { display: none; }
.wfs-countdown i { font-style: normal; font-weight: 700; color: inherit; }

/* Thanh tiến trình */
.wfs-progress { position: relative; height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--wfs-primary) 22%, #fff); overflow: hidden; }
.wfs-progress__bar { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--wfs-primary), color-mix(in srgb, var(--wfs-primary) 70%, var(--wfs-accent))); transition: width .4s ease; }
.wfs-progress.is-unlimited .wfs-progress__bar { opacity: .55; }
.wfs-progress.is-soldout .wfs-progress__bar { background: #9e9e9e; }
.wfs-progress__text { position: relative; z-index: 1; display: block; padding: 0 8px; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; text-transform: uppercase; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Trang sản phẩm */
.wfs-single { margin: 0 0 16px; padding: 10px 12px 12px; border-radius: 6px; background: linear-gradient(100deg, var(--wfs-primary), color-mix(in srgb, var(--wfs-primary) 75%, #ff8a00)); color: #fff; }
.wfs-single__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wfs-single .wfs-label { font-size: 18px; }
.wfs-single__timer { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; }
.wfs-single .wfs-progress { background: rgba(255, 255, 255, .3); }
.wfs-single .wfs-progress__bar { background: var(--wfs-accent); }
.wfs-single .wfs-progress__text { color: #3a1a00; text-shadow: none; }
.wfs-single.wfs-state-upcoming { background: linear-gradient(100deg, #26a69a, #00897b); }
.wfs-single__upcoming { font-size: 14px; }
.wfs-single__upcoming .amount { color: var(--wfs-accent); font-size: 1.15em; }

/* Danh sách sản phẩm */
.wfs-loop { margin: 6px 0 4px; }
.wfs-loop .wfs-progress { height: 16px; }
.wfs-loop .wfs-progress__text { font-size: 10px; line-height: 16px; }
.wfs-loop--upcoming { font-size: 12px; color: var(--wfs-primary); }

/* Giỏ hàng */
.wfs-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--wfs-primary); color: #fff; font-size: 10px; font-weight: 700; font-style: italic; line-height: 1.6; vertical-align: middle; white-space: nowrap; }

/* Khối shortcode */
.wfs-block { margin: 0 0 24px; border-radius: 8px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); overflow: hidden; }
.wfs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: linear-gradient(100deg, var(--wfs-primary), color-mix(in srgb, var(--wfs-primary) 75%, #ff8a00)); color: #fff; }
.wfs-head__left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wfs-label--lg { font-size: 22px; }
.wfs-label--lg .wfs-bolt { width: 22px; height: 22px; }
.wfs-head__txt { font-size: 13px; text-transform: uppercase; opacity: .95; }
.wfs-head__more, .wfs-head__more:hover { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.wfs-state-upcoming .wfs-head { background: linear-gradient(100deg, #26a69a, #00897b); }
.wfs-banner img { display: block; width: 100%; height: auto; }
.wfs-products { position: relative; padding: 12px 8px 4px; }
.wfs-empty { padding: 24px; text-align: center; color: #666; }

/* Theme không phải Flatsome: lưới đơn giản */
.wfs-products ul.products:not(.row) { display: grid !important; grid-template-columns: repeat(var(--wfs-cols, 4), minmax(0, 1fr)); gap: 16px; margin: 0; }
.wfs-products ul.products:not(.row)::before, .wfs-products ul.products:not(.row)::after { display: none; }
.wfs-products ul.products:not(.row) li.product { width: auto !important; margin: 0 !important; float: none !important; }

/* Slider (cuộn ngang, không cần thư viện) */
.wfs-layout-slider .products { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 0; }
.wfs-layout-slider .products::-webkit-scrollbar { display: none; }
.wfs-layout-slider .products > * { flex: 0 0 calc(100% / var(--wfs-cols, 4)) !important; max-width: calc(100% / var(--wfs-cols, 4)) !important; scroll-snap-align: start; }
.wfs-layout-slider ul.products:not(.row) > li.product { padding: 0 8px; }
.wfs-nav { position: absolute; top: 40%; z-index: 3; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); color: #333; font-size: 24px; line-height: 32px; cursor: pointer; }
.wfs-nav--prev { left: 4px; }
.wfs-nav--next { right: 4px; }

@media (max-width: 849px) {
	.wfs-products ul.products:not(.row) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wfs-layout-slider .products > * { flex-basis: 45% !important; max-width: 45% !important; }
	.wfs-label--lg { font-size: 18px; }
	.wfs-nav { display: none; }
}
@media (max-width: 549px) {
	.wfs-head { padding: 10px 12px; }
	.wfs-head__txt { display: none; }
}
@supports not (background: color-mix(in srgb, red 50%, white)) {
	.wfs-progress { background: #fde3dc; }
	.wfs-single, .wfs-head { background: var(--wfs-primary); }
}
