/* ================= SECTION ================= */
.deal-section {
  padding: 40px 0px;
}

/* ================= HEADER ================= */
.deal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}

.deal-header h2 {
  font-size: 30px;
  color: #1c2b39;
}

.deal-link {
  text-decoration: none;
  color: #6c7a89;
  font-weight: 500;
}

/* ================= GRID ================= */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 25px;

  /* prevent stretching when fewer cards */
  justify-content: start;
}

/* ================= CARD ================= */
.deal-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* animation base */
  /* opacity:0; */
  /* transform:translateY(40px); */
  /* transition:opacity .6s ease, transform .6s ease; */
}

.deal-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= IMAGE ================= */
.deal-img {
  position: relative;
}

.deal-img img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

/* ================= TIMER ================= */
.deal-timer {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.deal-timer span {
  background: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: center;
  min-width: 44px;
  display: flex; /* perfect vertical alignment */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.deal-timer b {
  color: #00b96b;
  font-size: 18px;
  font-size: 14px; /* smaller number */
  line-height: 1;
}

.deal-timer small {
  display: block;
  color: #666;
  font-size: 10px; /* smaller label */
  margin-top: 3px;
  line-height: 1;
}

/* ================= INFO ================= */
.deal-info {
  padding: 18px;
  flex: 1; /* take remaining space */
  display: flex;
  flex-direction: column;
}

.deal-info h3 {
  font-size: 16px;
  color: #1c2b39;
  margin-bottom: 8px;
}

.deal-rating {
  color: #f4b400;
  font-size: 14px;
}

.deal-rating span {
  color: #777;
}

.deal-brand {
  font-size: 14px;
  color: #888;
  margin: 6px 0 15px;
}

.deal-brand span {
  color: #00b96b;
}

/* ================= BOTTOM ================= */
.deal-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;  
}

.deal-price strong {
  color: #00b96b;
  font-size: 20px;
}

.deal-price del {
  color: #999;
  margin-left: 6px;
}

.deal-btn {
  background: #dff8ec;
  color: #00b96b;
  border: none;

  /* 🔥 FIXES */
  min-width: 110px; /* enough for "Go to Cart" */
  padding: 10px 18px;
  white-space: nowrap; /* prevent text wrap */
  display: inline-flex; /* perfect centering */
  align-items: center;
  justify-content: center;
  gap: 6px;

  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.25s ease;
}

.deal-btn:hover {
  background: #00b96b;
  color: #fff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .deal-header h2 {
    font-size: 24px;
  }
  .deal-section {
    padding: 20px 0px;
  }
}

/* ================= RESPONSIVE BREAKPOINTS ================= */
@media (max-width: 1400px) {
  .deal-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }
}

@media (max-width: 1100px) {
  .deal-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}

@media (max-width: 800px) {
  .deal-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 520px) {
  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 cards */
    gap: 12px; /* compact gap */
  }

  .deal-card {
    border-radius: 14px; /* compact look */
  }

  .deal-img img {
    height: 150px; /* compact image height */
  }

  .deal-info {
    padding: 12px; /* compact padding */
  }

   .deal-info h3{
    min-height: 40px;           /* keeps titles same height */
    line-height: 1.2;
  }

  .deal-brand {
    font-size: 12px;
    margin: 4px 0 10px;
  }

  .deal-price strong {
    font-size: 16px;
  }

  .deal-btn {
    min-width: auto;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 7px;
  }

  .deal-timer {
    bottom: 10px;
    gap: 5px;
  }

  .deal-timer span {
    padding: 5px 6px;
    min-width: 40px;
    border-radius: 7px;
  }

  .deal-timer b {
    font-size: 13px;
  }

  .deal-timer small {
    font-size: 9px;
  }
  .deal-bottom {
    gap: 10px;
  }

  .deal-btn {
    min-width: 0 !important; /* allow shrinking */
    padding: 8px 10px !important;
    font-size: 12px !important;
    border-radius: 7px;
    flex: 0 0 auto; /* button won't stretch */
    max-width: 110px; /* prevents breaking */
  }

  /* keep text in one line */
  .deal-btn span,
  .deal-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* price area should not be crushed */
  .deal-price {
    flex: 1;
    min-width: 0;
  }
}
