/* Product Card Component Styles */
.product-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f3f4f6;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #e5e7eb;
}

/* Image Container */
.product-card__image-container {
  position: relative;
  width: 100%;
  height: 12rem;
  background-color: #f9fafb;
  overflow: hidden;
}

.product-card__image {
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.05);
}

.product-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #9ca3af;
}

.product-card__placeholder-icon {
  width: 3rem;
  height: 3rem;
}

/* Category Badge */
.product-card__category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(107, 114, 128, 0.95);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.75rem;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Stock Badge */
.product-card__stock-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.75rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-card__stock-badge--in-stock {
  background: rgba(16, 185, 129, 0.95);
  color: white;
}

.product-card__stock-badge--low-stock {
  background: rgba(245, 158, 11, 0.95);
  color: white;
}

.product-card__stock-badge--out-of-stock {
  background: rgba(239, 68, 68, 0.95);
  color: white;
}

/* Content */
.product-card__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Company Info */
.product-card__company {
  margin-bottom: 1rem;
}

.product-card__company-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card__company-logo {
  border-radius: 0.375rem;
  -o-object-fit: cover;
     object-fit: cover;
}

.product-card__company-logo-placeholder {
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-card__company-name {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.product-card__verified-icon {
  width: 1rem;
  height: 1rem;
  color: #10b981;
  flex-shrink: 0;
}

/* Title */
.product-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Description */
.product-card__description {
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.product-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #059669;
  flex-shrink: 0;
}

/* Actions */
.product-card__actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.product-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.product-card__link:hover {
  color: #1d4ed8;
  background-color: #eff6ff;
  border-color: #dbeafe;
  gap: 0.75rem;
}

.product-card__link-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.product-card__link:hover .product-card__link-icon {
  transform: translateX(2px);
}

/* Responsive */
@media (max-width: 640px) {
  .product-card__image-container {
    height: 10rem;
  }

  .product-card__content {
    padding: 1.25rem;
  }

  .product-card__title {
    font-size: 1.125rem;
  }

  .product-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .product-card__price {
    font-size: 1.25rem;
    text-align: center;
  }

  .product-card__actions {
    justify-content: center;
  }

  .product-card__category-badge,
  .product-card__stock-badge {
    top: 0.5rem;
    font-size: 0.625rem;
    padding: 0.25rem 0.375rem;
  }

  .product-card__category-badge {
    left: 0.5rem;
  }

  .product-card__stock-badge {
    right: 0.5rem;
  }
}

/* Grid Layout Support */
@media (min-width: 768px) {
  .product-card {
    max-width: none;
  }
}

/* Animation for loading state */
.product-card--loading {
  pointer-events: none;
}

.product-card--loading .product-card__image-container {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Out of stock overlay */
.product-card--out-of-stock {
  opacity: 0.7;
}

.product-card--out-of-stock .product-card__image {
  filter: grayscale(50%);
}

.product-card--out-of-stock .product-card__link {
  pointer-events: none;
  opacity: 0.5;
}
