/**
 * 服务承诺组件样式
 * 展示免费配送、配送保障和安全提醒信息（一行三列布局）
 */

.service-badges {
  position: relative;
  z-index: 10;
  margin-top: -16px;
  padding: 0 0 var(--spacing-padding-bottom, 16px);
}

.service-badges__container {
  padding: 0 16px;
}

/* 卡片容器 */
.service-badges__card {
  background: #f2e9e4;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 三列行布局 */
.service-badges__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* 服务项 */
.service-badges__item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
  padding: 0 20px;
}

/* 安全提醒项特殊样式 */
.service-badges__item--reminder {
  flex: 1.2;
}

/* 分隔线 */
.service-badges__divider {
  width: 1px;
  height: 36px;
  background: rgba(198, 134, 53, 0.2);
  flex-shrink: 0;
}

/* 移动端分隔线（默认隐藏） */
.service-badges__divider_mobile {
  display: none;
}

/* 图标 */
.service-badges__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-badges__icon svg {
  width: 26px;
  height: 26px;
}

.service-badges__icon--shipping {
  /* background: rgba(193, 154, 87, 0.15); */
  color: #c68635;
}

.service-badges__icon--guarantee {
  /* background: rgba(193, 154, 87, 0.15); */
  color: #c68635;
}

.service-badges__icon--warning {
  width: 28px;
  height: 28px;
  /* background: rgba(193, 154, 87, 0.15); */
  color: #c68635;
}

.service-badges__icon--warning svg {
  width: 26px;
  height: 26px;
}

/* 文字 */
.service-badges__text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.service-badges__title {
  font-size: 14px;
  font-weight: 700;
  color: #c68635;
  line-height: 1.3;
  white-space: nowrap;
}

.service-badges__subtitle {
  font-size: 12px;
  color: #c68635;
  line-height: 1.3;
}

/* 移动端适配 - 保持一行三列但缩小间距 */
@media (max-width: 959px) {
  .service-badges__card {
    padding: 16px 8px;
    height: 92px;
  }

  .service-badges__item {
    gap: 8px;
    padding: 0 12px;
  }

  /* 移动端文字上下布局 */
  .service-badges__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }


  .service-badges__icon {
    width: 16px;
    height: 16px;
  }

  .service-badges__icon svg {
    width: 16px;
    height: 16px;
  }

  .service-badges__icon--warning {
    width: 16px;
    height: 16px;
  }

  .service-badges__icon--warning svg {
    width: 16px;
    height: 16px;
  }

  .service-badges__title {
    font-size: 10px;
  }

  .service-badges__subtitle {
    font-size: 10px;
    font-weight: 400;
    color: rgba(198, 134, 53, 0.8);
  }

  .service-badges__divider {
    height: 28px;
  }
}

/* 小屏幕适配 - 换行显示 */
@media (max-width: 749px) {
  .service-badges__row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .service-badges__item {
    flex: 1 1 45%;
    min-width: 140px;
    padding: 0 4px;

    justify-content: flex-start;
  }

  /* 小屏幕下统一图标大小为 16px */
  .service-badges__icon {
    width: 19px;
    height: 19px;
  }

  .service-badges__icon svg {
    width: 19px;
    height: 19px;
  }

  .service-badges__icon--warning {
    width: 19px;
    height: 19px;
  }

  .service-badges__icon--warning svg {
    width: 19px;
    height: 19px;
  }

  /* 安全提醒项保持一行，缩小 padding 和间距 */
  .service-badges__item--reminder {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 2px;
    gap: 4px;
    flex-shrink: 1;
  }

  /* 安全提醒项文字允许换行，但保持在一行内 */
  .service-badges__item--reminder .service-badges__text {
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .service-badges__item--reminder .service-badges__title,
  .service-badges__item--reminder .service-badges__subtitle {
    white-space: nowrap;
    flex-shrink: 1;
  }

  .service-badges__divider {
    display: none;
  }

  /* 小屏幕下显示移动端分隔线（只在免费配送和配送保障之间） */
  .service-badges__divider_mobile {
    display: block;
    width: 1px;
    height: 28px;
    background: rgba(198, 134, 53, 0.2); /* #C68635 20% 透明度 */
    flex-shrink: 0;
  }
}

/* 超小屏幕适配 */
@media (max-width: 374px) {
  .service-badges__item {
    flex: 1 1 100%;
    justify-content: center;
  }

  .service-badges__title {
    font-size: 11px;
  }

  .service-badges__subtitle {
    font-size: 9px;
  }
}
