/* ========================================
   phone-shopping.css - 查手机购物页面样式
   角色视角的购物记录（订单列表 + 订单详情）
   简约白底，贴近手机购物 App 订单界面
   ======================================== */

/* ====== 全屏容器 ====== */
.psh-screen {
  position: absolute;
  inset: 0;
  max-width: 100%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #f6f6f8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .32s ease, visibility .32s;
  overflow: hidden;
  overflow-x: hidden;
  box-sizing: border-box;
}
.psh-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ====== 列表视图 ====== */
.psh-list-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f6f6f8;
  transition: transform .3s ease;
}
.psh-list-view.is-hidden {
  transform: translateX(-24%);
}

/* ====== 顶部导航栏 ====== */
.psh-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.psh-nav__back,
.psh-nav__action {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #4a4a4a;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.psh-nav__back:active,
.psh-nav__action:active {
  background: rgba(0, 0, 0, .06);
}
.psh-nav__back svg,
.psh-nav__action svg {
  width: 22px;
  height: 22px;
}
.psh-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: .5px;
}
.psh-nav__right {
  display: flex;
  align-items: center;
}

/* ====== 角色身份提示条 ====== */
.psh-owner-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 8px;
}
.psh-owner-bar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0c9a6;
  color: #6a5535;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.psh-owner-bar__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.psh-owner-bar__info {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.psh-owner-bar__name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psh-owner-bar__hint {
  font-size: 13px;
  color: #9a9a9a;
}

/* ====== 购物概况卡片 ====== */
.psh-summary {
  flex-shrink: 0;
  display: flex;
  margin: 4px 14px 8px;
  padding: 16px 6px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.psh-summary__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}
.psh-summary__stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 26px;
  background: rgba(0, 0, 0, .06);
}
.psh-summary__val {
  font-size: 19px;
  font-weight: 700;
  color: #c8893a;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.psh-summary__label {
  font-size: 12px;
  color: #9a9a9a;
}

/* ====== 列表主体（可滚动） ====== */
.psh-list-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 28px;
}

/* 区块标题 */
.psh-section-title {
  padding: 6px 18px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #9a9a9a;
  letter-spacing: .3px;
}

/* ====== 订单列表 ====== */
.psh-orders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px;
}

/* 单条订单卡片 */
.psh-order {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .03);
}
.psh-order:active {
  transform: scale(.985);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

/* 商品图标色块 */
.psh-order__icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.psh-order__icon svg {
  width: 24px;
  height: 24px;
}

/* 图标色调 */
.psh-ic--c1 { background: #d99a5b; }
.psh-ic--c2 { background: #cc7a6b; }
.psh-ic--c3 { background: #6bb0a0; }
.psh-ic--c4 { background: #b08fc4; }
.psh-ic--c5 { background: #6b8cce; }
.psh-ic--c6 { background: #7a9a6b; }

/* 订单文字区 */
.psh-order__body {
  flex: 1;
  min-width: 0;
}
.psh-order__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.psh-order__name {
  font-size: 14.5px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.psh-order__price {
  flex-shrink: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1a1a;
}
.psh-order__spec {
  font-size: 12.5px;
  color: #9a9a9a;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psh-order__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.psh-order__shop {
  font-size: 12px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psh-order__status {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
}
.psh-order__status.is-done {
  color: #6a9a6a;
  background: rgba(106, 154, 106, .12);
}
.psh-order__status.is-shipping {
  color: #c8893a;
  background: rgba(200, 137, 58, .12);
}
.psh-order__status.is-pending {
  color: #cc6b6b;
  background: rgba(204, 107, 107, .12);
}

/* ====== 加载状态 ====== */
.psh-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  gap: 14px;
}
.psh-loading.is-hidden {
  display: none;
}
.psh-loading__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, .08);
  border-top-color: #d99a5b;
  border-radius: 50%;
  animation: pshSpin .8s linear infinite;
}
@keyframes pshSpin {
  to { transform: rotate(360deg); }
}
.psh-loading__text {
  font-size: 13px;
  color: #9a9a9a;
}

/* ====== 空状态 ====== */
.psh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  gap: 10px;
  text-align: center;
}
.psh-empty__icon {
  width: 52px;
  height: 52px;
  color: #cfcfcf;
}
.psh-empty__text {
  font-size: 15px;
  font-weight: 600;
  color: #7a7a7a;
}
.psh-empty__hint {
  font-size: 12.5px;
  color: #a8a8a8;
}

/* ====== 订单详情视图 ====== */
.psh-detail-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f6f6f8;
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 5;
}
.psh-detail-view.is-active {
  transform: translateX(0);
}

/* 详情导航栏 */
.psh-detail-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.psh-detail-nav__back {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #4a4a4a;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.psh-detail-nav__back:active {
  background: rgba(0, 0, 0, .06);
}
.psh-detail-nav__back svg {
  width: 22px;
  height: 22px;
}
.psh-detail-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
}
.psh-detail-nav__right {
  width: 38px;
}

/* 详情主体 */
.psh-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 物流状态条 */
.psh-detail-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d99a5b, #c8893a);
  color: #fff;
}
.psh-detail-status__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.psh-detail-status__icon svg {
  width: 24px;
  height: 24px;
}
.psh-detail-status__icon.is-done {
  background: rgba(255, 255, 255, .22);
}
.psh-detail-status__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.psh-detail-status__main {
  font-size: 16px;
  font-weight: 700;
}
.psh-detail-status__sub {
  font-size: 12.5px;
  opacity: .92;
  line-height: 1.4;
}

/* 商品信息卡片 */
.psh-detail-goods {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border-radius: 14px;
}
.psh-detail-goods__icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.psh-detail-goods__icon svg {
  width: 30px;
  height: 30px;
}
.psh-detail-goods__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.psh-detail-goods__name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}
.psh-detail-goods__spec {
  font-size: 12.5px;
  color: #9a9a9a;
}
.psh-detail-goods__pricerow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
}
.psh-detail-goods__price {
  font-size: 16px;
  font-weight: 700;
  color: #c8893a;
}
.psh-detail-goods__qty {
  font-size: 13px;
  color: #9a9a9a;
}

/* 订单信息网格 */
.psh-detail-info {
  padding: 4px 16px;
  background: #ffffff;
  border-radius: 14px;
}
.psh-detail-info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.psh-detail-info__row:last-child {
  border-bottom: none;
}
.psh-detail-info__label {
  font-size: 13.5px;
  color: #8a8a8a;
  flex-shrink: 0;
}
.psh-detail-info__val {
  font-size: 13.5px;
  color: #3a3a3a;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psh-detail-info__val.is-strong {
  font-weight: 700;
  color: #c8893a;
  font-size: 15px;
}

/* 购买原因 */
.psh-detail-note-wrap {
  padding: 16px;
  background: #ffffff;
  border-radius: 14px;
}
.psh-detail-note-label {
  font-size: 13px;
  font-weight: 600;
  color: #c8893a;
  margin-bottom: 8px;
}
.psh-detail-note {
  font-size: 14px;
  color: #4a4a4a;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 详情底部提示 */
.psh-detail-footer {
  flex-shrink: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .85);
  border-top: 1px solid rgba(0, 0, 0, .05);
}
.psh-detail-footer__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #a8a8a8;
}
.psh-detail-footer__hint svg {
  flex-shrink: 0;
}

/* ====== Toast ====== */
.psh-toast {
  position: absolute;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 100;
  pointer-events: none;
}
.psh-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
