.products {
  padding: 40px 20px;
  background: #fdfdfd;
}

.products h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: #222;
  border-bottom: 2px solid #0077cc;
  display: inline-block;
  padding-bottom: 5px;
}

.sub-header {
  text-align: center;
  font-size: 1.6rem;
  margin: 20px 0;
  color: #0077cc;
}

.grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.grid.rtl {
  flex-direction: row-reverse; /* ✅ Right-to-left order */
}

.card {
  flex: 1 1 300px;
  max-width: 320px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.card img.product-img {
  width: 100%;
  height: 250px;       /* ✅ Same image size */
  object-fit: cover;   /* ✅ Crops/scales consistently */
  display: block;
}

/* 📱 Mobile View */
@media (max-width: 768px) {
  .grid {
    flex-direction: column;
    align-items: center;
  }
  .card {
    max-width: 90%;
  }
}