.ml-product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--ml-radius-lg);
  background: var(--ml-color-surface-paper);
  border: 1px solid var(--ml-color-surface-line);
  overflow: hidden;
  transition:
    transform var(--ml-motion-duration-base) var(--ml-motion-ease-standard),
    box-shadow var(--ml-motion-duration-base) var(--ml-motion-ease-standard);
}

.ml-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(18, 14, 10, 0.12);
}

.ml-product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ml-color-surface-cream);
}

.ml-product-card__media picture,
.ml-product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ml-motion-duration-slow) var(--ml-motion-ease-standard);
}

.ml-product-card:hover .ml-product-card__media img {
  transform: scale(1.04);
}

.ml-product-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: var(--ml-font-size-sm);
  color: var(--ml-color-text-tertiary);
}

.ml-product-card__badge {
  position: absolute;
  top: var(--ml-space-3);
  left: var(--ml-space-3);
  z-index: 1;
}

[dir="rtl"] .ml-product-card__badge {
  left: auto;
  right: var(--ml-space-3);
}

.ml-product-card__body {
  padding: var(--ml-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--ml-space-2);
}

.ml-product-card__name {
  font-size: var(--ml-font-size-lg);
  margin: 0;
  font-family: var(--ml-font-family-serif);
}

.ml-product-card__category {
  margin: 0;
  font-size: var(--ml-font-size-sm);
  color: var(--ml-color-text-secondary);
}

.ml-product-card__price {
  margin: 0;
  font-weight: var(--ml-font-weight-medium);
}

/* Skeleton */
.ml-product-card--skeleton {
  pointer-events: none;
}

.ml-product-card--skeleton:hover {
  transform: none;
  box-shadow: none;
}

.ml-product-card__skeleton-pulse {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--ml-color-surface-line) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    var(--ml-color-surface-line) 100%
  );
  background-size: 200% 100%;
  animation: ml-card-skel 1.4s ease-in-out infinite;
}

@keyframes ml-card-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.ml-product-card__skeleton-line {
  height: 0.65rem;
  border-radius: var(--ml-radius-sm);
  background: var(--ml-color-surface-line);
  animation: ml-card-skel 1.4s ease-in-out infinite;
  background-size: 200% 100%;
}

.ml-product-card__skeleton-line--title {
  width: 70%;
  height: 0.85rem;
}

.ml-catalog-grid .ml-product-card:nth-child(1),
.ml-home-grid .ml-product-card:nth-child(1) { animation-delay: 0ms; }
.ml-catalog-grid .ml-product-card:nth-child(2),
.ml-home-grid .ml-product-card:nth-child(2) { animation-delay: 50ms; }
.ml-catalog-grid .ml-product-card:nth-child(3),
.ml-home-grid .ml-product-card:nth-child(3) { animation-delay: 100ms; }
.ml-catalog-grid .ml-product-card:nth-child(4),
.ml-home-grid .ml-product-card:nth-child(4) { animation-delay: 150ms; }
.ml-catalog-grid .ml-product-card:nth-child(5) { animation-delay: 200ms; }
.ml-catalog-grid .ml-product-card:nth-child(6) { animation-delay: 250ms; }
.ml-catalog-grid .ml-product-card:nth-child(7) { animation-delay: 300ms; }
.ml-catalog-grid .ml-product-card:nth-child(8) { animation-delay: 350ms; }
.ml-catalog-grid .ml-product-card:nth-child(9) { animation-delay: 400ms; }
.ml-catalog-grid .ml-product-card:nth-child(10) { animation-delay: 450ms; }
.ml-catalog-grid .ml-product-card:nth-child(11) { animation-delay: 500ms; }
.ml-catalog-grid .ml-product-card:nth-child(12) { animation-delay: 550ms; }

.ml-catalog-grid .ml-product-card,
.ml-home-grid .ml-product-card:not(.ml-product-card--skeleton) {
  animation: ml-slide-up 0.45s var(--ml-motion-ease-standard) both;
}
