* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 320px;
  width: 100%;
  overflow: hidden;
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card__header {
  position: relative;
  width: 100%;
  height: 320px;
  background: #f5f5f5;
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card__header:hover .product-card__image {
  transform: scale(1.1);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ff4757;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.product-card__favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
  font-size: 20px;
}

.product-card__favorite:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card__favorite--active {
  color: #ff4757;
}

.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card__title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5a6c7d;
}

.product-card__stars {
  display: flex;
  gap: 2px;
}

.product-card__star {
  font-size: 14px;
  color: #ffc107;
}

.product-card__price-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-card__price {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
}

.product-card__price--old {
  font-size: 14px;
  color: #a0a9b8;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.product-card__button {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.product-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.product-card__button:active {
  transform: translateY(0);
}


@media (max-width: 768px) {
  .product-card {
    max-width: 280px;
  }

  .product-card__header {
    height: 280px;
  }

  .product-card__title {
    font-size: 16px;
  }

  .product-card__price {
    font-size: 20px;
  }
}

@media (max-width: 375px) {
  body {
    padding: 12px;
  }

  .product-card {
    max-width: 100%;
  }

  .product-card__header {
    height: 240px;
  }

  .product-card__body {
    padding: 16px;
    gap: 10px;
  }

  .product-card__title {
    font-size: 15px;
  }

  .product-card__price {
    font-size: 18px;
  }

  .product-card__button {
    font-size: 13px;
    padding: 10px 14px;
  }
}
