/* 木屿 H5 · 订单列表 */

.orders-page {
  padding: 0 0.24rem calc(0.5rem + env(safe-area-inset-bottom));
}

/* 状态筛选 */
.filter-bar {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 0.9rem);
  z-index: 20;
  margin: 0 -0.24rem;
  padding: 0.12rem 0.24rem;
  background: rgba(247, 243, 234, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-track {
  display: flex;
  gap: 0.14rem;
  overflow-x: auto;
}

.filter-tab {
  flex: none;
  padding: 0.12rem 0.26rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.1);
  border-radius: 9.99rem;
  background: #fffcf6;
  color: #7b7466;
  font-size: 0.22rem;
  letter-spacing: 0.01rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-tab--active {
  border-color: #20372c;
  background: #20372c;
  color: #f7f3ea;
}

/* 订单卡片 */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding-top: 0.18rem;
}

.order-card {
  position: relative;
  padding: 0.24rem 0.24rem 0.2rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.07);
  border-radius: 0.24rem;
  background: #fffcf6;
  box-shadow: 0 0.08rem 0.28rem rgba(47, 43, 33, 0.05);
  cursor: pointer;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.18rem;
  border-bottom: 0.01rem solid rgba(36, 38, 31, 0.07);
}

.order-no {
  overflow: hidden;
  color: #9c9587;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.19rem;
  letter-spacing: 0.01rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 状态小标签 */
.status {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 0.4rem;
  padding: 0 0.18rem;
  border-radius: 9.99rem;
  font-size: 0.2rem;
  letter-spacing: 0.01rem;
}

.status-pending-payment {
  background: rgba(176, 95, 64, 0.12);
  color: #b05f40;
}

.status-paid {
  background: rgba(168, 138, 88, 0.16);
  color: #8e743f;
}

.status-shipped {
  background: rgba(47, 107, 79, 0.12);
  color: #2f6b4f;
}

.status-completed {
  background: rgba(47, 107, 79, 0.12);
  color: #2f6b4f;
}

.status-cancelled {
  background: rgba(141, 137, 124, 0.14);
  color: #8d897c;
}

.status-refunding {
  background: rgba(176, 95, 64, 0.12);
  color: #b05f40;
}

.status-refunded {
  background: rgba(141, 137, 124, 0.14);
  color: #8d897c;
}

/* 商品清单 */
.order-items {
  padding: 0.16rem 0 0.08rem;
}

.order-item-row {
  display: flex;
  align-items: center;
  padding: 0.1rem 0;
}

.order-item-media {
  flex: none;
  overflow: hidden;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 0.16rem;
  background: #efe7da;
}

.order-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-copy {
  flex: 1;
  min-width: 0;
  padding: 0 0.18rem;
}

.order-item-name {
  display: block;
  overflow: hidden;
  color: #35382f;
  font-size: 0.24rem;
  font-weight: 500;
  letter-spacing: 0.005rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.order-item-spec {
  display: block;
  margin-top: 0.06rem;
  color: #a29b8d;
  font-size: 0.19rem;
  letter-spacing: 0.005rem;
}

.order-item-side {
  flex: none;
  text-align: right;
}

.order-item-price {
  display: block;
  color: #4a4a40;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.23rem;
}

.order-item-qty {
  display: block;
  margin-top: 0.04rem;
  color: #a29b8d;
  font-size: 0.19rem;
}

.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.14rem;
  border-top: 0.01rem solid rgba(36, 38, 31, 0.07);
}

.order-time {
  color: #aca598;
  font-size: 0.18rem;
  letter-spacing: 0.005rem;
}

.order-total {
  color: #6e6759;
  font-size: 0.2rem;
}

.order-total b {
  color: #b05f40;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.26rem;
  font-weight: 600;
}

/* 操作按钮 */
.order-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.16rem;
  margin-top: 0.18rem;
}

.o-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 0.62rem;
  padding: 0 0.32rem;
  border-radius: 9.99rem;
  font-size: 0.22rem;
  letter-spacing: 0.01rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.o-btn:disabled {
  opacity: 0.5;
}

.o-btn.primary {
  background: #20372c;
  color: #f7f3ea;
}

.o-btn.ghost {
  border: 0.01rem solid rgba(36, 38, 31, 0.16);
  background: transparent;
  color: #5b5547;
}

.o-wait-hint {
  color: #b05f40;
  font-size: 0.2rem;
  letter-spacing: 0.01rem;
}

/* 空态 */
.order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 0 1rem;
}

.order-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #efe9dd;
  color: #b7ac96;
}

.order-empty-icon .icon {
  width: 0.56rem;
  height: 0.56rem;
}

.order-empty-text {
  margin-top: 0.28rem;
  color: #a29b8d;
  font-size: 0.24rem;
  letter-spacing: 0.02rem;
}

.order-empty-btn {
  margin-top: 0.34rem;
}

/* 退款弹层（与 order/address 共用视觉） */
.mori-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(100vw, 480px);
  transform: translateX(-50%);
}

.mori-modal[hidden] {
  display: none;
}

.mori-modal-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(20, 22, 16, 0.42);
}

.mori-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0.36rem 0.36rem calc(0.32rem + env(safe-area-inset-bottom));
  border-radius: 0.32rem 0.32rem 0 0;
  background: #fbf6ec;
  box-shadow: 0 -0.2rem 0.6rem rgba(20, 22, 16, 0.18);
}

.mori-modal-title {
  display: block;
  margin-bottom: 0.24rem;
  color: #30332b;
  font-size: 0.36rem;
  font-weight: 500;
  letter-spacing: 0.01rem;
}

.mori-modal-textarea {
  width: 100%;
  min-height: 1.8rem;
  padding: 0.2rem 0.22rem;
  border: 0.01rem solid rgba(36, 38, 31, 0.12);
  border-radius: 0.18rem;
  background: #fffcf6;
  color: #35382f;
  font-size: 0.24rem;
  line-height: 1.5;
  resize: vertical;
}

.mori-modal-actions {
  display: flex;
  gap: 0.18rem;
  margin-top: 0.28rem;
}

.mori-modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.84rem;
  border-radius: 9.99rem;
  font-size: 0.26rem;
  letter-spacing: 0.01rem;
  cursor: pointer;
}

.mori-modal-btn.primary {
  background: #20372c;
  color: #f7f3ea;
}

.mori-modal-btn.ghost {
  border: 0.01rem solid rgba(36, 38, 31, 0.16);
  color: #5b5547;
}

.mori-modal-btn:disabled {
  opacity: 0.5;
}
