/* ===== Khối danh sách Flash Sale (shortcode) ===== */
.fsw-list-wrap {
  background: linear-gradient(135deg, #fde8dc 0%, #fdf3ea 100%);
  border-radius: 16px;
  margin: 20px 0;
  overflow: hidden;
}
.fsw-list-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.fsw-list-title {
  background: rgba(255,200,150,0.25);
  border-bottom: 1px solid rgba(255,160,80,0.2);
  color: #c85a10;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  letter-spacing: 2px;
}
.fsw-list-title span {
	display: block;
	padding: 20px 24px;
	position: relative;
	width: fit-content;
}
.fsw-list-title span::before {
	content: "";
	display: block;
	width: 100%;
	height: 2px;
	position: absolute;
	bottom: 0;
	left: 0;
	background: linear-gradient(90deg, #e8873a, #f0a060);
}
.fsw-tabs {
  display: flex;
  gap: 10px;
  padding-left: 24px;
}
.fsw-tab-btn {
  background: rgba(255,200,150,0.15);
  border: 1px solid rgba(220,130,60,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12.5px;
  cursor: pointer;
  color: rgba(160,80,20,0.6);
  margin: 0;
  line-height: 1;
}
.fsw-tab-btn.is-active {
  background: rgba(232,135,58,0.15);
  border-color: rgba(232,135,58,0.5);
  color: #c85a10;
  font-weight: bold;
}
.fsw-tab-btn em {
  font-style: normal;
  opacity: 0.75;
}

.fsw-header-countdown {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 24px;
}
.fsw-header-countdown-label {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #7a5230;
  text-transform: uppercase;
  font-weight: 600;
}
.fsw-header-timer {
	font-size: 20px;
}
.fsw-header-timer .fsw-cd-part {
  display: inline-block;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(220, 130, 60, 0.3);
  color: #e0621a;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  min-width: 26px;
  text-align: center;
  margin: 0 5px;
  min-width: 56px;
  text-align: center;
}
.fsw-header-timer .fsw-cd-part:last-child {
	margin-right: 0;
}

.fsw-products-grid {
  display: grid;
  grid-template-columns: repeat(var(--fsw-cols, 5), 1fr);
  gap: 18px;
}


.fsw-tab-panel {
	padding: 20px 24px;
}

.fsw-product-card {
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  border: 1px solid rgba(255,200,160,0.5);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(200,100,30,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.fsw-product-card:hover {
	transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(200,100,30,0.15);
}
.fsw-product-thumb {
  position: relative;
  display: block;
}
.fsw-product-thumb img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.fsw-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #ffb347, #e8873a);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 0 18px 0 12px;
}
.fsw-product-info {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fsw-product-name {
  color: #333;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
  min-height: 38px;
}
.fsw-product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.fsw-price-sale {
  color: #e0621a;
  font-weight: 700;
  font-size: 20px;
}
.fsw-price-sale span.amount {
	color: #d45a10;
}

.fsw-price-regular span.amount {
  font-size: 12px;
  font-weight: 400;
	color: #999;
	text-decoration: line-through;
}
.fsw-progress-wrap {
  margin-top: 2px;
  position: relative;
}
.fsw-progress-bar {
  background: #f5dfc9;
  border-radius: 20px;
  height: 16px;
  overflow: hidden;
}
.fsw-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f6a94a, #e0621a);
  border-radius: 20px;
}
.fsw-progress-label {
  font-size: 11px;
  color: #7a3a08;
  text-align: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  font-weight: bold;
}

.fsw-buy-btn {
  margin-top: 6px;
  background: linear-gradient(90deg, #e82020, #c00000);
  color: #fff !important;
  text-align: center;
  padding:5px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 1.5px;
}
.fsw-buy-btn:hover {
  background: #b31a21;
}

/* ===== Khối countdown trang chi tiết sản phẩm ===== */
.fsw-countdown-box.fsw-full {
  background: #d4222a;
  color: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fsw-cd-badge {
  font-weight: 700;
  font-size: 14px;
}
.fsw-full .fsw-cd-label {
  font-size: 12px;
  opacity: 0.85;
  margin-right: 6px;
}
.fsw-full .fsw-cd-timer {
  display: inline-flex;
  gap: 2px;
}
.fsw-full .fsw-cd-part {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  padding: 4px 8px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.fsw-countdown-box.fsw-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e0621a;
}
.fsw-compact .fsw-cd-part {
  background: #fce4d6;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 700;
}

.fsw-empty {
  color: #999;
  font-style: italic;
}

/* Chiến dịch sắp diễn ra: không đếm ngược, chỉ hiện nhãn giờ bắt đầu */
.fsw-header-timer-upcoming .fsw-upcoming-label {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
/* Ẩn chữ "KẾT THÚC SAU" khi timer đang hiển thị là upcoming */
.fsw-header-countdown:has(.fsw-header-timer-upcoming.is-active)
  .fsw-header-countdown-label {
  display: none;
}

@media (max-width: 1024px) {
  .fsw-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 640px) {
	
	.fsw-list-title span {
		font-size: 12px;
		padding: 12px 20px;
	}
	.fsw-tab-btn {
		white-space: nowrap;
		font-size: 11px;
	}
	.fsw-header-countdown-label {
		font-size: 10px;
	}
	.fsw-tab-panel {
		padding: 15px 15px;
	}
	.fsw-header-timer {
		font-size: 16px;
	
	}
	.fsw-header-timer .fsw-cd-part {
	padding: 4px 9px;
		min-width: 34px;
	}
  .fsw-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
	gap: 10px;
  }

  .fsw-tabs {
	padding-left: 15px;
	padding-right: 15px;
	overflow-x: scroll;
	overflow-y: hidden;
  }

  .fsw-header-countdown {
	padding-left: 15px;
	padding-right: 15px;
	width: 100%;
  }

  .fsw-product-info {
	padding: 10px;
  }
  .fsw-badge {
	font-size: 10px;
	padding: 4px 8px;
  }
  .fsw-product-name {
	font-size: 12px;
  }
  .fsw-price-sale {
	font-size: 16px;
  }
  .fsw-price-regular span.amount {
	font-size: 10px;
  }

}