/* 头部样式 & 菜品信息 */
.recipe-header {
  padding: 16px;
  background: white;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column; /* 统一布局方向 */
}

.recipe-header ion-toolbar {
  --background: white;
  --border-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recipe-header .header-title,
.recipe-header .recipe-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--ion-color-dark);
}

.recipe-header .recipe-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.recipe-header .meta-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ion-color-medium);
}

.recipe-header .meta-item ion-icon {
  margin-right: 4px;
  font-size: 1rem;
}

/* 合并后的头部布局（适配不同场景） */
.recipe-header.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recipe-header.flex-between .recipe-title {
  font-size: 1.5rem;
  font-weight: 600;
  flex: 1;
  margin: 0;
}

.recipe-header.flex-between .recipe-rating {
  display: flex;
  align-items: center;
}

.recipe-header.flex-between .recipe-rating ion-icon {
  font-size: 1.2rem;
  margin-right: 2px;
}

.recipe-header.flex-between .recipe-rating .rating-text {
  font-size: 0.9rem;
  color: var(--ion-color-medium);
  margin-left: 4px;
}

.recipe-header .recipe-meta.flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.recipe-header .recipe-meta.flex-wrap .meta-item {
  --padding-start: 0;
  --inner-padding-end: 0;
  --min-height: 32px;
  flex: 1 0 calc(33.333% - 8px);
}

.recipe-header .recipe-meta.flex-wrap .meta-item ion-icon {
  font-size: 1.2rem;
}

.recipe-header .recipe-meta.flex-wrap .meta-item ion-label {
  font-size: 0.85rem;
}

/* 菜品图片容器（合并重复定义） */
.recipe-image-container {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.recipe-image-container .recipe-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-image-container .image-overlay-top {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.recipe-image-container .image-overlay-bottom {
  position: absolute;
  bottom: 16px;
  left: 240px;
  right: 16px;
  display: flex;
  gap: 8px;
  width: 150px;
}

.recipe-image-container ion-chip {
  --background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
}

/* 公共卡片样式（合并阴影层级） */
.section-card {
  margin: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05); /* 合并两种阴影 */
}

.section-card ion-card-header,
.section-card .section-header {
  padding-bottom: 0;
}

.section-card ion-card-title,
.section-card .section-title {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  color: var(--ion-color-dark);
}

.section-card ion-card-title ion-icon,
.section-card .section-title .section-icon {
  margin-right: 8px;
  color: var(--ion-color-primary);
}

/* 步骤列表（统一样式） */
.step-item,
.step-list .step-item {
  --padding-start: 0;
  --inner-padding-end: 0;
  align-items: flex-start;
  padding: 12px 0;
}

.step-item .step-number,
.step-list .step-item .step-number {
  width: 28px;
  height: 28px;
  background: var(--ion-color-primary);
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  margin-right: 12px;
}

.step-item ion-label,
.step-list .step-item .step-text {
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--ion-color-medium);
  line-height: 1.6;
}

.step-item ion-label p {
  margin: 0;
  color: var(--ion-color-dark);
  line-height: 1.5;
}

/* 其他独立样式 */
.recipe-content {
  --background: #f8f9fa;
  padding-bottom: 80px;
}

.recipe-info-section {
  padding: 16px;
  background: white;
  margin-bottom: 16px;
}

.recipe-description {
  font-size: 0.95rem;
  color: var(--ion-color-medium);
  line-height: 1.6;
}

.ingredient-list .ingredient-item {
  --padding-start: 0;
  --inner-padding-end: 0;
  --min-height: 48px;
  border-bottom: 1px dashed var(--ion-color-light-shade);
}

.ingredient-list .ingredient-item:last-child {
  border-bottom: none;
}

.ingredient-list .bullet-icon {
  color: var(--ion-color-primary);
  font-size: 0.6rem;
}

.action-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, white 50%, transparent 100%);
}

/* 响应式调整（合并重复媒体查询） */
@media (min-width: 768px) {
  .recipe-image-container {
    height: 350px;
  }

  .section-card {
    margin: 20px auto;
    max-width: 800px;
  }

  .recipe-info-section {
    padding: 24px;
  }

  .action-buttons {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
  }
}