<template>
  <section class="product-cards single-layout">
    <div class="single-card">
      <h3 class="card-title">{{ card.title }}</h3>
      <p class="card-description">{{ card.description }}</p>
      <div class="card-features">
        <span v-for="(feature, idx) in card.features" :key="idx" class="feature-tag">{{ feature }}</span>
      </div>
      <div class="card-actions">
        <button class="btn-primary">更多详情</button>
        <button class="btn-secondary">0元体验</button>
      </div>
    </div>
  </section>
</template>

<script setup>
const props = defineProps({
  cards: {
    type: Array,
    required: true
  }
})
const card = computed(() => props.cards[0])
</script>

<style scoped lang="scss">
.single-layout {
  display: flex;
}

.single-card {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: auto;
  min-height: 474px;
  padding: 42px 69px 69px 69px;
  box-sizing: border-box;


  .card-title {
    position: relative;
    color: #FFF;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;

    &::before {
      position: absolute;
      left: 0;
      bottom: -22px;
      content: '';
      width: 100%;
      height: 1px;
      background: rgba(255, 255, 255, 0.40);

    }
  }

  .card-description {
    color: rgba(255, 255, 255, 0.60);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
  }

  .card-features {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    .feature-tag {
      font-size: 14px;
      font-weight: 400;
      line-height: 14px;
      color: #9b71ff;
      margin-bottom: 12px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .card-actions {
    display: flex;
    gap: 24px;

    .btn-primary {
      width: 140px;
      height: 48px;
      border-radius: 8px;
      background: linear-gradient(24.74deg, rgba(163, 157, 255, 1) 0%, rgba(125, 70, 255, 1) 100%);
      border: none;
      
      font-size: 16px;
      font-weight: 400;
      color: #ffffff;
      cursor: pointer;
      transition: opacity 0.3s ease;

      &:hover {
        opacity: 0.8;
      }
    }

    .btn-secondary {
      width: 140px;
      height: 48px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.5);
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(15.2px);
      
      font-size: 16px;
      font-weight: 400;
      color: #ffffff;
      cursor: pointer;
      transition: opacity 0.3s ease;

      &:hover {
        opacity: 0.8;
      }
    }
  }
}
</style>
