<view class="page" wx:if="{{drug.id}}">
  <navigation-bar title="{{drug.name}}" back="{{true}}" color="white" background="#4A90D9" />

  <view class="drug-header">
    <image class="header-img" src="{{drugImage}}" mode="aspectFit" />
    <view class="drug-meta">
      <view class="meta-item">{{drug.category}}</view>
      <view class="meta-item">{{drug.form}}</view>
      <view class="meta-item" wx:if="{{drug.isOTC}}">OTC</view>
      <view class="meta-item rx" wx:else>Rx</view>
    </view>
  </view>

  <view class="section">
    <view class="section-title">📋 药品简介</view>
    <view class="section-content">{{drug.description}}</view>
    <view class="info-row" wx:if="{{drug.manufacturer}}">
      <view class="info-label">生产厂家</view>
      <view class="info-value">{{drug.manufacturer}}</view>
    </view>
    <view class="info-row" wx:if="{{drug.price}}">
      <view class="info-label">参考价格</view>
      <view class="info-value price">{{drug.price}}</view>
    </view>
  </view>

  <view class="section">
    <view class="section-title">💡 用法用量</view>
    <view class="section-content">{{drug.usage || drug.dosage}}</view>
  </view>

  <view class="section">
    <view class="section-title">⏰ 服用时间</view>
    <view class="section-content">{{drug.timing}}</view>
  </view>

  <view class="section warning">
    <view class="section-title">⚠️ 注意事项</view>
    <view class="section-content">
      <view wx:for="{{drug.precautions}}" wx:key="index" class="precaution-item">{{index + 1}}. {{item}}</view>
    </view>
  </view>

  <view class="section">
    <view class="section-title">🩺 不良反应</view>
    <view class="section-content">{{drug.sideEffects}}</view>
  </view>

  <view class="section tip">
    <view class="section-title">📌 温馨提示</view>
    <view class="section-content">{{drug.tip}}</view>
  </view>

  <view class="disclaimer">本内容仅供参考，具体用药请遵医嘱</view>
</view>

<view class="page empty-page" wx:else>
  <navigation-bar title="药品详情" back="{{true}}" color="black" background="#ffffff" />
  <view class="empty-msg">
    <view class="empty-icon">🔍</view>
    <view class="empty-text">未找到药品信息</view>
  </view>
</view>
