/* Product Card Uniform Height Styles */

/* Make all product cards the same height */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
  padding: 20px;
  transition: all 0.3s ease;
}

/* Image container with fixed height */
.product-card .product-img {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 12px;
}

.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Title with fixed height and overflow handling */
.product-card .title {
  display: block;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Description with fixed height and overflow handling */
.product-card .desc {
  min-height: 80px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 16px;
  line-height: 1.6;
  flex-grow: 1;
}

/* Action block always at the bottom */
.product-card .action-block {
  margin-top: auto;
}

/* Ensure parent column has equal heights */
.row.products-row {
  display: flex;
  flex-wrap: wrap;
}

.row.products-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  .product-card {
    min-height: 500px;
  }
}

@media (max-width: 991px) {
  .product-card {
    min-height: 480px;
  }
}

@media (max-width: 767px) {
  .product-card {
    min-height: 460px;
  }

  .product-card .product-img {
    height: 180px;
  }
}

@media (max-width: 575px) {
  .product-card {
    min-height: auto;
  }
}

/* Hover effect */
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
