<template>
  <view class="benefits-grid">
    <view
      v-for="(item, index) in list"
      :key="index"
      class="benefit-item"
    >
      <view class="icon-wrapper">
        <text class="i-carbon-star icon"></text>
      </view>
      <text class="name">{{ item }}</text>
    </view>
  </view>
</template>

<script setup lang="ts">
interface Props {
  list: string[]
}

defineProps<Props>()
</script>

<style lang="scss" scoped>
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24rpx;
  padding: 24rpx;
  background: #fff;
  border-radius: 16rpx;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16rpx;
}

.icon-wrapper {
  width: 88rpx;
  height: 88rpx;
  background: #fff7e6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  .icon {
    font-size: 40rpx;
    color: #fa8c16;
  }
}

.name {
  font-size: 24rpx;
  color: #333;
  text-align: center;
}
</style>
