/* Mọi bố cục chỉ nằm trong khung Flash Sale. */
.tdfs-section {
  --tdfs-bg: #c9251c;
  --tdfs-card: #fff;
  --tdfs-accent: #d9231e;
  --tdfs-text: #27364b;
  --tdfs-radius: 10px;
  --tdfs-cols: 6;
  --tdfs-slide-rows: 2;
  position: relative;
  isolation: isolate;
  margin: 24px 0;
  box-sizing: border-box;
  min-width: 0;
  padding: var(--tdfs-padding, 14px);
  background: var(--tdfs-bg);
  color: var(--tdfs-text);
  border-radius: var(--tdfs-section-radius, 16px);
}
.tdfs-section .tdfs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; color: #fff; }
.tdfs-section .tdfs-head h2 { margin: 0; color: inherit; font-size: 1.65em; }
.tdfs-section ul.tdfs-products { display: grid !important; grid-template-columns: repeat(var(--tdfs-cols), minmax(0, 1fr)); gap: var(--tdfs-gap, 10px); align-items: stretch; margin: 0 !important; padding: 0 0 8px !important; list-style: none; }
.tdfs-section ul.tdfs-products::before,
.tdfs-section ul.tdfs-products::after { display: none; }
.tdfs-section .tdfs-products > .product { display: flex !important; flex-direction: column; float: none !important; width: auto !important; min-width: 0; margin: 0 !important; padding: 0 !important; background: var(--tdfs-card); color: var(--tdfs-text); border-radius: var(--tdfs-radius); overflow: hidden; box-shadow: 0 3px 12px #1220371a; scroll-snap-align: start; transition: transform .2s, box-shadow .2s; }
.tdfs-section .tdfs-products > .product:hover { transform: translateY(-3px); box-shadow: 0 6px 18px #12203726; }
.tdfs-section .tdfs-products > .product .col-inner,
.tdfs-section .tdfs-products > .product .product-small.box { display: flex; flex: 1; flex-direction: column; width: 100%; height: 100%; margin: 0; background: var(--tdfs-card); }
.tdfs-section .tdfs-products > .product .box-text { display: flex; flex: 1; flex-direction: column; padding: 10px; }
.tdfs-section .tdfs-products > .product .name,
.tdfs-section .tdfs-products > .product .woocommerce-loop-product__title { min-height: 2.7em; line-height: 1.35; }
.tdfs-section .tdfs-products > .product .name a,
.tdfs-section .tdfs-products > .product .woocommerce-loop-product__title { color: var(--tdfs-text); }
.tdfs-section .tdfs-products > .product .price-wrapper { margin-top: auto; }
.tdfs-section .tdfs-products > .product .price { display: block; color: var(--tdfs-accent); }
.tdfs-section .tdfs-products > .product .price ins { display: block; text-decoration: none; }
.tdfs-section .tdfs-products > .product .tdfs-price-old-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.tdfs-section .tdfs-percent { color: var(--tdfs-accent); font-weight: 700; }
.tdfs-section .tdfs-products > .product .add-to-cart-button { margin-top: auto; padding-top: 8px; }
.tdfs-section .tdfs-products > .product .button { background: var(--tdfs-accent); border-color: var(--tdfs-accent); color: #fff; }
.tdfs-section .tdfs-countdown { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px; padding: 6px 8px; border-radius: 5px; background: var(--tdfs-accent); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.tdfs-section .tdfs-controls { position: absolute; top: 50%; left: 4px; right: 4px; z-index: 5; display: flex; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity .2s; }
.tdfs-section:hover .tdfs-controls,
.tdfs-section:focus-within .tdfs-controls { opacity: 1; }
.tdfs-section .tdfs-controls button { display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--tdfs-accent); font-size: 25px; line-height: 1; box-shadow: 0 2px 8px #0003; cursor: pointer; pointer-events: auto; }
.tdfs-section .tdfs-controls button:focus-visible { outline: 2px solid var(--tdfs-accent); outline-offset: 3px; }
.tdfs-section.tdfs-mode-grid .tdfs-controls { display: none; }
.tdfs-section.tdfs-mode-slide.tdfs-dir-horizontal ul.tdfs-products { grid-auto-flow: column; grid-template-columns: none; grid-template-rows: repeat(var(--tdfs-slide-rows), minmax(0, auto)); grid-auto-columns: calc((100% - (var(--tdfs-cols) - 1) * var(--tdfs-gap, 10px)) / var(--tdfs-cols)); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; touch-action: pan-y; cursor: grab; }
.tdfs-section.tdfs-mode-slide.tdfs-dir-vertical ul.tdfs-products { max-height: calc(var(--tdfs-row-size, 360px) * var(--tdfs-slide-rows) + (var(--tdfs-slide-rows) - 1) * var(--tdfs-gap, 10px)); overflow-y: auto; scroll-snap-type: y mandatory; touch-action: pan-x; cursor: grab; }
.tdfs-section ul.tdfs-products.tdfs-dragging { cursor: grabbing; scroll-snap-type: none; }
.tdfs-section ul.tdfs-products.tdfs-dragging * { user-select: none; }
.tdfs-section.tdfs-single { margin: 0 0 14px; padding: 0; background: transparent; }
.tdfs-section .tdfs-banner-single { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; color: #fff; border-radius: 8px; background: linear-gradient(90deg, #c62828, #ef5350); box-shadow: 0 2px 10px #c6282847; }
.tdfs-section .tdfs-left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.tdfs-section .tdfs-flash-icon { font-size: 18px; }
.tdfs-section .tdfs-flash-text { color: #fff; font-weight: 800; font-size: 15px; white-space: nowrap; }
.tdfs-section .tdfs-qty { padding-left: 10px; border-left: 1px solid #ffffff59; font-size: 13px; }
.tdfs-section .tdfs-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 4px 10px; border-radius: 6px; background: #fff; color: #c62828; }
.tdfs-section .tdfs-label { font-size: 12px; color: #666; }
.tdfs-section .tdfs-time { font-variant-numeric: tabular-nums; font-size: 15px; }
@media (max-width: 849px) {
  .tdfs-section { --tdfs-cols: var(--tdfs-tablet-cols, 2) !important; }
}
@media (max-width: 549px) {
  .tdfs-section { --tdfs-cols: var(--tdfs-mobile-cols, 2) !important; padding: var(--tdfs-padding, 8px); }
  .tdfs-section.tdfs-single { padding: 0; }
  .tdfs-section .tdfs-head h2 { font-size: 1.3em; }
  .tdfs-section .tdfs-banner-single { padding: 8px 10px; gap: 8px; }
  .tdfs-section .tdfs-qty,
  .tdfs-section .tdfs-label { display: none; }
  .tdfs-section .tdfs-time { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .tdfs-section .tdfs-products > .product { transition: none; }
  .tdfs-section .tdfs-products > .product:hover { transform: none; }
}

/* Tùy chọn giao diện 2.1, luôn giới hạn trong Flash Sale. */
.tdfs-section.tdfs-mode-grid > ul.products.tdfs-products,
.tdfs-section.tdfs-mode-slide > ul.products.tdfs-products { display:grid!important; }
.tdfs-section .tdfs-head {color:var(--tdfs-header-color,#fff)}
.tdfs-section .tdfs-head h2 {font-size:var(--tdfs-header-size,26px)}
.tdfs-section .tdfs-subtitle {margin:6px 0 0;font-size:14px;color:inherit}
.tdfs-section .tdfs-subtitle:empty {display:none}
.tdfs-section.tdfs-header-align-center .tdfs-head {justify-content:center;text-align:center}
.tdfs-section.tdfs-header-align-right .tdfs-head {justify-content:flex-end;text-align:right}
.tdfs-section.tdfs-header-align-center .tdfs-head>div,
.tdfs-section.tdfs-header-align-right .tdfs-head>div {width:100%}
.tdfs-section .tdfs-products>.product {border:var(--tdfs-border-width,0px) solid var(--tdfs-border-color,#eee);box-sizing:border-box}
.tdfs-section .tdfs-products>.product .box-text {padding:var(--tdfs-card-padding,10px)}
.tdfs-section .tdfs-products>.product .name,
.tdfs-section .tdfs-products>.product .woocommerce-loop-product__title {font-size:var(--tdfs-title-size,14px);min-height:calc(var(--tdfs-title-lines,2)*1.35em);display:-webkit-box;-webkit-line-clamp:var(--tdfs-title-lines,2);-webkit-box-orient:vertical;overflow:hidden}
.tdfs-section .tdfs-products>.product .price ins {font-size:var(--tdfs-price-size,16px);color:var(--tdfs-accent)}
.tdfs-section .tdfs-products>.product .price del {color:var(--tdfs-old-price-color,#888)}
.tdfs-section .tdfs-products>.product .button {background:var(--tdfs-button-color,var(--tdfs-accent));border-color:var(--tdfs-button-color,var(--tdfs-accent));color:var(--tdfs-button-text-color,#fff);border-radius:var(--tdfs-button-radius,4px)}
.tdfs-section .tdfs-countdown {background:var(--tdfs-timer-bg,var(--tdfs-accent));color:var(--tdfs-timer-color,#fff);font-size:var(--tdfs-timer-size,12px);border-radius:var(--tdfs-timer-radius,5px)}
.tdfs-section.tdfs-card-align-center .box-text {text-align:center;align-items:center}
.tdfs-section.tdfs-card-align-right .box-text {text-align:right;align-items:flex-end}
.tdfs-section.tdfs-card-align-center .tdfs-price-old-row {justify-content:center}
.tdfs-section.tdfs-card-align-right .tdfs-price-old-row {justify-content:flex-end}
.tdfs-section.tdfs-shadow-none .tdfs-products>.product,
.tdfs-section.tdfs-shadow-none .tdfs-products>.product:hover {box-shadow:none}
.tdfs-section.tdfs-shadow-strong .tdfs-products>.product {box-shadow:0 5px 18px #0003}
.tdfs-section.tdfs-hide-hover-lift .tdfs-products>.product:hover {transform:none}
.tdfs-section.tdfs-hide-show-header .tdfs-head,
.tdfs-section.tdfs-hide-show-count .tdfs-count,
.tdfs-section.tdfs-hide-show-category .category,
.tdfs-section.tdfs-hide-show-category .product-cat,
.tdfs-section.tdfs-hide-show-rating .star-rating,
.tdfs-section.tdfs-hide-show-cart .add-to-cart-button,
.tdfs-section.tdfs-hide-show-cart .add_to_cart_button,
.tdfs-section.tdfs-hide-show-cart .box-text>.button,
.tdfs-section.tdfs-hide-show-badge .badge-container,
.tdfs-section.tdfs-hide-show-badge .onsale,
.tdfs-section.tdfs-hide-show-old-price .price del,
.tdfs-section.tdfs-hide-show-percent .tdfs-percent,
.tdfs-section.tdfs-hide-show-timer .tdfs-card-timer,
.tdfs-section.tdfs-hide-show-timer .tdfs-products .tdfs-countdown {display:none!important}
.tdfs-section.tdfs-arrows-always .tdfs-controls {opacity:1}
.tdfs-section.tdfs-arrows-off .tdfs-controls {display:none}
.tdfs-section.tdfs-image-ratio-square .box-image {--tdfs-image-ratio:1}
.tdfs-section.tdfs-image-ratio-portrait .box-image {--tdfs-image-ratio:4/5}
.tdfs-section.tdfs-image-ratio-landscape .box-image {--tdfs-image-ratio:4/3}
.tdfs-section.tdfs-image-ratio-square .box-image,
.tdfs-section.tdfs-image-ratio-portrait .box-image,
.tdfs-section.tdfs-image-ratio-landscape .box-image {aspect-ratio:var(--tdfs-image-ratio);overflow:hidden}
.tdfs-section.tdfs-image-ratio-square .box-image>div,
.tdfs-section.tdfs-image-ratio-portrait .box-image>div,
.tdfs-section.tdfs-image-ratio-landscape .box-image>div {height:100%!important;padding-top:0!important;position:relative}
.tdfs-section.tdfs-image-ratio-square .box-image img,
.tdfs-section.tdfs-image-ratio-portrait .box-image img,
.tdfs-section.tdfs-image-ratio-landscape .box-image img {position:static!important;width:100%;height:100%;object-fit:contain}
.tdfs-section.tdfs-image-fit-cover .box-image img {object-fit:cover}
.tdfs-section .tdfs-products>.product[hidden] {display:none!important}
.tdfs-section .tdfs-products>.product .price {display:flex!important;flex-direction:column!important}
.tdfs-section .tdfs-products>.product .price ins {order:0!important}
.tdfs-section .tdfs-products>.product .tdfs-price-old-row {order:1!important}
