/* ============= FLASH SALE ============= */
.flash-sale {
  margin-top: 30px;
}

.flash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.flash-header h2 {
  color: #e53935;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-header h2 i {
  animation: boltPulse 1.2s ease-in-out infinite;
}

@keyframes boltPulse {
  0%, 100% { transform: scale(1); color: #e53935; }
  50%      { transform: scale(1.2); color: #ff9800; }
}

/* Countdown */
.countdown {
  display: flex;
  gap: 6px;
}

.time-box {
  background: #263238;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 52px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.time-box strong {
  font-size: 1.1rem;
  color: #ffc107;
}

.time-box small {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #b0bec5;
}

/* Grid produk */
.flash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.flash-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 2px solid transparent;
}

.flash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(229, 57, 53, 0.2);
  border-color: #ffcdd2;
}

/* Badge Hadiah */
.badge-hadiah {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff9800, #e53935);
  color: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(229, 57, 53, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  animation: hadiahPulse 2s ease-in-out infinite;
}

.badge-hadiah i {
  font-size: 0.7rem;
}

@keyframes hadiahPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.flash-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.flash-body {
  padding: 12px;
}

.flash-body h4 {
  font-size: 0.92rem;
  color: #263238;
  margin-bottom: 8px;
  line-height: 1.3;
  min-height: 38px;
}

/* Deskripsi produk */
.produk-deskripsi {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
  margin: 0 0 10px;

  /* Potong setelah 3 baris */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;              /* standar modern */
  -webkit-box-orient: vertical;
  box-orient: vertical;       /* standar (opsional) */
  overflow: hidden;
  text-overflow: ellipsis;    /* tambahkan "..." (opsional, sudah otomatis di line-clamp) */
}

/* Progress bar stok */
.stock-bar {
  background: #ffe5e5;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.stock-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #e53935);
  border-radius: 6px;
  transition: width 0.4s;
}

.stock-text {
  font-size: 0.72rem;
  color: #777;
}

/* Responsive */
@media (max-width: 600px) {
  .flash-header h2 { font-size: 1.2rem; }
  .time-box { min-width: 44px; padding: 5px 8px; }
  .time-box strong { font-size: 0.95rem; }
  .flash-card img { height: 120px; }
  .flash-body h4 { font-size: 0.85rem; }
  .produk-deskripsi { font-size: 0.75rem; }
  .badge-hadiah { font-size: 0.65rem; padding: 4px 8px; }
}

/* ============= FILTER KATEGORI ============= */
.kategori-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #ffe5e5;
}

.kategori-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  color: #555;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
}

.kategori-btn:hover {
  border-color: #e53935;
  color: #e53935;
  transform: translateY(-1px);
}

.kategori-btn.active {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.kategori-btn i {
  font-size: 0.85rem;
}

/* ============= MOBILE ============= */
@media (max-width: 600px) {
  .kategori-bar {
    gap: 6px;
    padding-bottom: 10px;
    overflow: visible;
    flex-wrap: wrap;
  }

  .kategori-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    flex-shrink: 1;
  }

  .kategori-btn i {
    font-size: 0.75rem;
  }
}