/* Main Card Styling */
.cpl-product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
  transition: transform .15s, box-shadow .15s;
  flex-wrap: wrap; /* Allow content to wrap */
}

/* Hover Effects */
.cpl-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

/* Product Image */
.cpl-product-image {
  width: 82px;
  height: auto;
  margin-right: 16px;
  border-radius: 6px;
  margin-bottom: 12px; /* Added margin for mobile */
}

/* Product Info Section */
.cpl-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  word-wrap: break-word; /* Allow text to wrap within the container */
  overflow-wrap: break-word; /* Ensure long words wrap correctly */
}

/* Product Title */
.cpl-product-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  white-space: normal; /* Allow text to wrap */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price and Status */
.cpl-price-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Price Styling */
.cpl-price {
  font-weight: 700;
  color: #d00000;
}

/* Status Styling */
.cpl-status {
  font-weight: 700;
}

.cpl-status.in {
  color: #22863a;
}

.cpl-status.out {
  color: #d00000;
}

/* Action Button and Vendor Info */
.cpl-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: 16px;
}

/* Button Styling */
.cpl-button {
  background: #28a745;
  color: #fff;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-block;
}

.cpl-button:hover {
  background: #218838;
}

/* Vendor Info Styling */
.cpl-vendor {
  font-size: .92rem;
  color: #666;
}

/* Product Title Link Styling */
.cpl-product-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.cpl-product-title a:hover {
  color: #3498db;
  text-decoration: underline;

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .cpl-product-card {
    flex-direction: column; /* Stack content vertically on mobile */
    align-items: flex-start; /* Align items to the left */
    text-align: left;
  }

  .cpl-product-image {
    margin-right: 0; /* Remove right margin */
    margin-bottom: 12px; /* Add bottom margin */
  }

  .cpl-action {
    align-items: flex-start; /* Align the button and status to the left */
    margin-left: 0;
    margin-top: 10px; /* Add margin for better spacing */
  }

  .cpl-product-info h3 {
    font-size: 16px; /* Adjust title size on smaller screens */
    white-space: normal; /* Allow wrapping on smaller screens */
  }

  .cpl-price-status {
    flex-direction: column; /* Stack price and status vertically on mobile */
    gap: 8px;
  }

  .cpl-button {
    width: 100%; /* Make the button take full width on mobile */
    text-align: center;
  }
}
