// ── Design tokens ──────────────────────────────────────────────────────────
$flash-red:       #e53935;
$flash-dark-red:  #c62828;
$flash-accent:    #ff6b6b;
$flash-yellow:    #FFD54F;
$white:           #fff;

// ── Section wrapper ────────────────────────────────────────────────────────
.flashSales {
  margin: 28px 0;
  border-radius: 12px;
//   overflow: hidden;
  background: $white;
  box-shadow: 0 4px 24px rgba(229, 57, 53, 0.15);
  border: 1.5px solid rgba(229, 57, 53, 0.18);
}

// ── Gradient header ────────────────────────────────────────────────────────
.header {
  padding: 14px 20px;
  background: linear-gradient(120deg, $flash-red 0%, $flash-dark-red 100%);
  gap: 12px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;

  @media (max-width: 480px) {
    padding: 10px 14px;
    gap: 8px;
  }
}

// ── Left: label ────────────────────────────────────────────────────────────
.flashLabel {
  flex-shrink: 0;
}

.zapWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px;
}

.zapIcon {
  color: $flash-yellow;
  filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.8));
  animation: zapPulse 1s ease-in-out infinite alternate;
  display: block;
}

@keyframes zapPulse {
  from { opacity: 0.75; transform: scale(1); }
  to   { opacity: 1;    transform: scale(1.2); }
}

.flashText {
  font-size: 1.35rem;
  font-weight: 900;
  color: $white;
  letter-spacing: 2.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  white-space: nowrap;

  @media (max-width: 480px) {
    font-size: 1.05rem;
    letter-spacing: 1.5px;
  }
}

.saleTitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;

  @media (max-width: 480px) {
    display: none;
  }
}

// ── Right: timer ───────────────────────────────────────────────────────────
.timerWrapper {
  flex-shrink: 0;
}

.timerLabel {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  font-weight: 500;

  @media (max-width: 600px) {
    display: none;
  }
}

.timerBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  padding: 5px 11px;
  min-width: 44px;
  backdrop-filter: blur(4px);

  @media (max-width: 480px) {
    min-width: 36px;
    padding: 4px 8px;
  }
}

.timerDigit {
  font-size: 1.25rem;
  font-weight: 800;
  color: $white;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;

  @media (max-width: 480px) {
    font-size: 1rem;
  }
}

.timerUnit {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-top: 2px;
}

.timerSep {
  color: $white;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px; // optical alignment with digit row
  user-select: none;
}

// ── Swiper container ───────────────────────────────────────────────────────
.swiperWrapper {
  padding: 16px 24px;
  background: #fff8f8;
  border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;

  @media (max-width: 480px) {
    padding: 12px 10px;
  }

  // Navigation arrows
  :global(.swiper-button-next),
  :global(.swiper-button-prev) {
    color: $flash-red !important;
    background: $white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    box-shadow: 0 2px 10px rgba(229, 57, 53, 0.25);
    transition: background 0.2s, color 0.2s;

    &::after {
      font-size: 13px;
      font-weight: 900;
    }

    &:hover {
      background: $flash-red !important;
      color: $white !important;
    }
  }

  :global(.swiper-button-disabled) {
    opacity: 0.3;
    pointer-events: none;
  }
}

.swiper {
  padding: 6px 2px 10px !important;
}

.slide {
  height: auto;
  display: flex;
  align-items: stretch;
  // Make ProductCard fill the slide height
  > * {
    // height: 100%;
    // min-height: 100%;
    // max-height: 100%;
    display: flex;
    flex-direction: column;
  }
}
