.flash-sale-container {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  width: 250px;
}

.flash-sale-img {
  display: flex;
  gap: 10px;
  align-items: center;
}

.flash-sale-img img {
  border-radius: 4px;
  width: clamp(100px, 70%, 120px);
  object-fit: cover;
}

.apj-speed-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  flex: 1 0 auto;
  min-height: fit-content;
}

.apj-speed-countdown .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ô số */
.apj-speed-countdown .num {
  width: 36px;
  height: 28px;
  background: #111;
  color: #f8f9fa;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6);
}

.apj-speed-countdown .label {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #555;
}

/* Dấu : */
.apj-speed-countdown .colon {
  font-size: 14px;
  font-weight: bold;
  color: #444;
}

.apj-speed-countdown.is-low .num {
  background: #7a0000;
  color: #fff;
}

.apj-remaining-bar {
  margin-top: 12px;
  width: 100%;
  flex: 1 1 auto;
  height: 28px;
  background: #ccc;
  border-radius: 14px;
  overflow: hidden;
}

.apj-remaining-fill {
  height: 100%;
  background: linear-gradient(90deg, #b08d2f, #e6cf7a, #9a7b1f);
  transition: width 0.4s linear;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apj-remaining-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===================================
   FLASH SALE NOTICES - LUXURY FOMO STYLE
   =================================== */

/* WooCommerce Notice Override */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  position: relative;
  padding: 16px 20px 16px 55px !important;
  margin: 20px 0 !important;
  border-radius: 12px !important;
  border: none !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
  animation: slideInDown 0.4s ease-out;
  overflow: hidden;
}

/* Icon container - absolute positioned */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-error::before {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* SUCCESS - Xanh lá vàng kim */
.woocommerce-message,
.woocommerce .woocommerce-message {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border-left: 4px solid #fbbf24 !important;
}

.woocommerce-message::before,
.woocommerce .woocommerce-message::before {
  content: "✓" !important;
  background: #fbbf24 !important;
  color: #065f46 !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
}

/* INFO - Vàng gold luxury */
.woocommerce-info,
.woocommerce .woocommerce-info {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  border-left: 4px solid #fbbf24 !important;
}

.woocommerce-info::before,
.woocommerce .woocommerce-info::before {
  content: "⚡" !important;
  background: #fef3c7 !important;
  color: #92400e !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ERROR - Đỏ sang trọng */
.woocommerce-error,
.woocommerce .woocommerce-error {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  color: #fff !important;
  border-left: 4px solid #fca5a5 !important;
}

.woocommerce-error::before,
.woocommerce .woocommerce-error::before {
  content: "⚠" !important;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  font-weight: 900 !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  animation: pulse 2s ease-in-out infinite;
}

/* Shimmer effect overlay */
.woocommerce-message::after,
.woocommerce-info::after,
.woocommerce-error::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s infinite;
}

/* Strong text styling */
.woocommerce-message strong,
.woocommerce-info strong,
.woocommerce-error strong,
.woocommerce .woocommerce-message strong,
.woocommerce .woocommerce-info strong,
.woocommerce .woocommerce-error strong {
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  letter-spacing: 0.3px !important;
}

/* Links in notices */
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a,
.woocommerce .woocommerce-message a,
.woocommerce .woocommerce-info a,
.woocommerce .woocommerce-error a {
  color: #fff !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.woocommerce-message a:hover,
.woocommerce-info a:hover,
.woocommerce-error a:hover {
  opacity: 0.85 !important;
  text-decoration: none !important;
}

/* Close button styling */
.woocommerce-message .woocommerce-message-close,
.woocommerce-info .woocommerce-info-close,
.woocommerce-error .woocommerce-error-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.woocommerce-message .woocommerce-message-close:hover,
.woocommerce-info .woocommerce-info-close:hover,
.woocommerce-error .woocommerce-error-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) rotate(90deg);
}

/* FOMO - Urgency Badge */
.flash-sale-urgency {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  animation: pulseBadge 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Special Flash Sale Notice */
.flash-sale-notice-custom {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  padding: 20px 24px;
  border-radius: 16px;
  margin: 20px 0;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(251, 191, 36, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24) 1;
}

.flash-sale-notice-custom::before {
  content: "🔥";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  animation: fire 1s ease-in-out infinite;
}

.flash-sale-notice-custom .notice-text {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding-left: 45px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.flash-sale-notice-custom .highlight {
  color: #fbbf24;
  font-weight: 800;
  font-size: 18px;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.05);
    opacity: 0.95;
  }
}

@keyframes pulseBadge {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes fire {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: translateY(-50%) scale(1.15);
    filter: hue-rotate(10deg);
  }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error,
  .woocommerce .woocommerce-message,
  .woocommerce .woocommerce-info,
  .woocommerce .woocommerce-error {
    padding: 14px 16px 14px 50px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  .woocommerce-message::before,
  .woocommerce-info::before,
  .woocommerce-error::before {
    width: 22px !important;
    height: 22px !important;
    left: 14px !important;
    font-size: 14px !important;
  }

  .flash-sale-notice-custom {
    padding: 16px 20px;
    border-radius: 12px;
  }

  .flash-sale-notice-custom::before {
    font-size: 24px;
    left: 16px;
  }

  .flash-sale-notice-custom .notice-text {
    font-size: 14px;
    padding-left: 40px;
  }

  .flash-sale-notice-custom .highlight {
    font-size: 16px;
  }

  .flash-sale-urgency {
    font-size: 11px;
    padding: 3px 10px;
  }
}

/* ===================================
   SPECIFIC FLASH SALE MESSAGES
   =================================== */

/* Thông báo hết suất */
.flash-sale-soldout {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%) !important;
  border-left: 4px solid #fca5a5 !important;
  position: relative;
  overflow: hidden;
}

.flash-sale-soldout::before {
  content: "😔" !important;
  font-size: 20px !important;
}

/* Thông báo SĐT đã mua */
.flash-sale-phone-used {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  border-left: 4px solid #fed7aa !important;
}

.flash-sale-phone-used::before {
  content: "📱" !important;
  font-size: 18px !important;
}

/* Thông báo giới hạn số lượng */
.flash-sale-limit {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  border-left: 4px solid #ddd6fe !important;
}

.flash-sale-limit::before {
  content: "🛒" !important;
  font-size: 18px !important;
}

/* Glow effect cho notice quan trọng */
.flash-sale-important {
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }
  50% {
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset,
      0 0 20px rgba(251, 191, 36, 0.4);
  }
}
