.recipe-card {
  position: relative;
  min-width: 0;
}

.recipe-card-link {
  display: grid;
  gap: 10px;
  color: var(--text);
  text-decoration: none !important;
}

.recipe-card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--skeleton);
}

.recipe-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease-out;
}

.recipe-card-image.placeholder {
  background: linear-gradient(135deg, var(--surface-subtle), var(--skeleton));
}

.recipe-card h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 23px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 160ms ease-out;
}

.recipe-card p {
  margin: -3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}

.recipe-missing-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: rgba(31, 90, 68, .6);
  color: #fff;
  padding: 6px 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.recipe-missing-overlay span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 12px;
  text-transform: uppercase;
}

.recipe-missing-overlay ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-missing-overlay li {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  box-shadow: var(--shadow-floating);
}

.heart {
  width: 20px;
  height: 20px;
}

.recipe-card-link:hover .recipe-card-image {
  transform: scale(1.025);
}

.recipe-card-link:hover h2 {
  color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .recipe-card-image {
    transition: none;
  }
}

@media (max-width: 599px) {
  .recipe-card h2 {
    font-size: 15px;
    line-height: 20px;
  }

  .recipe-card p {
    font-size: 12px;
    line-height: 17px;
  }

  .favorite-button {
    width: 44px;
    height: 44px;
  }

  .recipe-missing-overlay {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 3px;
    padding: 5px 6px;
  }

  .recipe-missing-overlay span {
    font-size: 8px;
    line-height: 11px;
  }

  .recipe-missing-overlay li {
    padding: 2px 5px;
    font-size: 9px;
    line-height: 13px;
  }
}
