.vpc-product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 30px;
}

.vpc-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Container for the image */
.vpc-card-image {
  width: 200px; /* Set fixed width for square */
  height: 200px; /* Height equal to width to make it square */
  overflow: hidden;
  position: relative;
  margin: 0 auto; /* Center the image container */
}

/* Image inside the container */
.vpc-card-image img {
  width: 100%; /* Make image take full width */
  height: 100%; /* Make image take full height */
  object-fit: cover; /* Ensure image covers the area without stretching */
  transition: transform 0.5s; /* Smooth transition effect */
}

.vpc-product-card:hover .vpc-card-image img {
  transform: scale(1.05);
}

.vpc-sale-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #e53935;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
}

.vpc-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.vpc-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2c3e50;
}

.vpc-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.vpc-card-title a:hover {
  color: #3498db;
  text-decoration: underline;
}

.vpc-card-price {
  font-size: 26px;
  font-weight: bold;
  color: #e53935;
  margin-bottom: 15px;
}

.vpc-card-stock {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpc-card-stock.vpc-in-stock {
  color: #388e3c;
}

.vpc-card-stock.vpc-out-stock {
  color: #e53935;
}

.vpc-card-vendor {
  font-size: 16px;
  color: #666;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid #eee;
}

.vpc-card-button {
  background: #28a745;
  color: white;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.vpc-card-button:hover {
  background: #218838;
}

/* Editor specific styles */
.wp-block-vpc-product-card {
  margin-bottom: 20px;
}

/* Responsive layout */
.vpc-products-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

/* For wider screens, you can add more columns as needed */
@media (min-width: 768px) {
  .vpc-products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .vpc-products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}