<template>
	<view class="pet-detail-page">
		<view class="pet-hero">
			<image src="https://images.unsplash.com/photo-1552053831-71594a27632d?q=80&w=600&auto=format&fit=crop"
				class="hero-img" mode="aspectFill"></image>
			<view class="hero-overlay"></view>
			<view class="hero-info">
				<text class="pet-name">旺财</text>
				<text class="pet-breed">金毛寻回犬 · 公 · 3岁</text>
			</view>
		</view>
		<view class="info-card">
			<view class="info-row"><text class="label">体重</text><text class="value">30 kg</text></view>
			<view class="info-row"><text class="label">健康状况</text><text class="value">健康</text></view>
			<view class="info-row"><text class="label">绝育状态</text><text class="value">已绝育</text></view>
			<view class="info-row"><text class="label">疫苗状态</text><text class="value green">已接种 (3/3)</text></view>
			<view class="info-row"><text class="label">性格特点</text><text class="value">活泼好动，喜欢球类玩具</text></view>
			<view class="info-row"><text class="label">主人</text><text class="value">张先生 13800138000</text></view>
		</view>
		<button class="edit-btn" @click="goToEdit">编辑档案</button>
	</view>
</template>

<script setup>
const goToEdit = () => uni.navigateTo({ url: '/pages/my/pet/edit/index' })
</script>

<style lang="scss" scoped>
.pet-detail-page { min-height: 100vh; background: #f7f8fa; padding-bottom: 160rpx; }
.pet-hero { position: relative; height: 480rpx; overflow: hidden; }
.hero-img { width: 100%; height: 100%; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.7) 100%); }
.hero-info { position: absolute; bottom: 40rpx; left: 40rpx; z-index: 2; }
.pet-name { display: block; font-size: 48rpx; font-weight: 900; color: #fff; }
.pet-breed { display: block; font-size: 28rpx; color: rgba(255, 255, 255, 0.9); margin-top: 8rpx; }
.info-card { background: #fff; border-radius: 32rpx 32rpx 0 0; margin-top: -40rpx; position: relative; z-index: 3; padding: 40rpx 32rpx; }
.info-row { display: flex; justify-content: space-between; padding: 24rpx 0; border-bottom: 1rpx solid #f5f5f5; }
.info-row:last-child { border-bottom: none; }
.label { font-size: 28rpx; color: #999; }
.value { font-size: 28rpx; color: #333; font-weight: 500; }
.value.green { color: #4caf50; }
.edit-btn { margin: 40rpx 32rpx; width: calc(100% - 64rpx); height: 96rpx; background: linear-gradient(90deg, #ffd53f, #ff9500); color: #333; border: none; border-radius: 48rpx; font-size: 32rpx; font-weight: bold; line-height: 96rpx; }
</style>
