/* SKU 规格选择器 */
.sku-section { padding: 16px; background: #fff; margin-top: 8px; }
.sku-label { font-size: 14px; font-weight: 500; margin-bottom: 10px; color: #1a1a1a; }
.sku-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sku-option {
  padding: 8px 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.sku-option.selected { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.sku-option.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.sku-color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #ddd; vertical-align: middle; margin-right: 4px; }

.qty-picker { display: flex; align-items: center; gap: 16px; }
.qty-picker button { width: 32px; height: 32px; border: 1px solid #eee; border-radius: 8px; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.qty-picker span { font-size: 16px; min-width: 24px; text-align: center; }

/* 商品图集轮播 */
.detail-gallery-wrap { position: relative; background: #fff; }
.detail-gallery {
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}
.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  pointer-events: none;
}
.gallery-dots { display: flex; justify-content: center; gap: 6px; padding: 8px; background: #fff; }
.gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd; cursor: pointer; }
.gallery-dot.active { background: #1a1a1a; width: 16px; border-radius: 3px; }

/* 图文详情（全宽展示，适配 750 详情长图） */
.detail-desc-wrap {
  background: #fff;
  margin-top: 8px;
  border-top: 8px solid #f5f5f5;
}
.detail-desc-title {
  font-size: 15px;
  font-weight: 600;
  padding: 16px 16px 12px;
  color: #1a1a1a;
}
.detail-desc-body { padding-bottom: 8px; }
.desc-rich-text {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  padding: 0 16px 12px;
  word-break: break-word;
}
.desc-rich-text p { margin: 0 0 12px; }
.desc-rich-text p:last-child { margin-bottom: 0; }
.desc-rich-text h3, .desc-rich-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 16px 0 8px;
}
.desc-rich-text ul, .desc-rich-text ol {
  margin: 0 0 12px 20px;
  padding: 0;
}
.desc-rich-text li { margin-bottom: 6px; }
.desc-rich-text strong, .desc-rich-text b { font-weight: 600; color: #1a1a1a; }
.desc-rich-text em, .desc-rich-text i { font-style: italic; }
.desc-text-block { font-size: 14px; line-height: 1.8; color: #666; margin: 0 16px 12px; white-space: pre-wrap; word-break: break-word; }

/* 分享面板 */
.share-sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9000; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.share-sheet-mask.show { opacity: 1; pointer-events: auto; }
.share-sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%); width: 100%; max-width: 750px; background: #fff; border-radius: 16px 16px 0 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); z-index: 9001; transition: transform 0.3s; }
.share-sheet-mask.show .share-sheet { transform: translateX(-50%) translateY(0); }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; margin-bottom: 16px; }
.share-item { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.share-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.share-brand-icon--img {
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
}
.share-brand-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.share-item .label { font-size: 11px; color: #666; }

/* 订单详情时间线 */
.order-timeline { padding: 16px 16px 16px 32px; position: relative; }
.order-timeline::before { content: ''; position: absolute; left: 20px; top: 24px; bottom: 24px; width: 2px; background: #eee; }
.timeline-item { position: relative; padding: 8px 0 16px 16px; }
.timeline-item::before { content: ''; position: absolute; left: -17px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #ddd; border: 2px solid #fff; }
.timeline-item.active::before { background: #1a1a1a; }
.timeline-item .time { font-size: 12px; color: #999; }
.timeline-item .text { font-size: 14px; margin-top: 2px; }

.order-tabs { display: flex; overflow-x: auto; background: #fff; padding: 0 8px; border-bottom: 1px solid #eee; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tab { flex: 0 0 auto; padding: 12px 16px; font-size: 14px; color: #999; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.order-tab.active { color: #1a1a1a; border-bottom-color: #1a1a1a; font-weight: 500; }

/* 搜索联想 */
.search-suggest {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  max-height: 360px;
  overflow-y: auto;
  z-index: 500;
}
.search-suggest.show { display: block; }
.suggest-section { padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.suggest-section:last-child { border-bottom: none; }
.suggest-label { padding: 6px 16px; font-size: 11px; color: #999; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; font-size: 14px; }
.suggest-item:active { background: #f5f5f5; }
.suggest-icon { color: #ccc; font-size: 12px; }
.suggest-product img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.suggest-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.suggest-price { font-size: 12px; color: #e63946; margin-top: 2px; }

/* 收藏按钮（样式见 icons.css） */
.fav-btn.active { color: #f0a500; }

/* 优惠券 */
.coupon-card { display: flex; background: linear-gradient(135deg, #fff5f5, #fff); border: 1px dashed #e63946; border-radius: 12px; overflow: hidden; margin-bottom: 10px; cursor: pointer; }
.coupon-card.selected { border-style: solid; background: #fff5f5; }
.coupon-card.disabled { opacity: 0.5; cursor: not-allowed; }
.coupon-left { width: 90px; background: #e63946; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 8px; flex-shrink: 0; }
.coupon-left .amount { font-size: 22px; font-weight: 700; }
.coupon-left .unit { font-size: 11px; }
.coupon-right { flex: 1; padding: 12px; }
.coupon-right .name { font-size: 14px; font-weight: 500; }
.coupon-right .cond { font-size: 12px; color: #999; margin-top: 4px; }
.coupon-input-row { display: flex; gap: 8px; margin-top: 8px; }
.coupon-input-row input { flex: 1; padding: 8px 12px; border: 1px solid #eee; border-radius: 8px; font-size: 14px; }
.coupon-input-row button { padding: 8px 16px; background: #1a1a1a; color: #fff; border: none; border-radius: 8px; font-size: 13px; }

.review-form textarea { width: 100%; padding: 12px; border: 1px solid #eee; border-radius: 8px; font-size: 14px; resize: vertical; min-height: 80px; margin: 8px 0; }

.img-upload-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.img-upload-item { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.img-upload-item img { width: 100%; height: 100%; object-fit: cover; }
.img-upload-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.img-upload-add { width: 72px; height: 72px; border: 1px dashed #ddd; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #bbb; cursor: pointer; background: #fafafa; }
.img-upload-tip { font-size: 12px; color: #bbb; margin-top: 8px; }
.review-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.review-images img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; }

/* After-sale list */
.after-sale-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 0;
  font-size: 12px;
  color: #999;
}

.after-sale-card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.after-sale-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f3f3f3;
}

.after-sale-card__order {
  min-width: 0;
}

.after-sale-card__order-no {
  font-size: 13px;
  color: #666;
  word-break: break-all;
}

.after-sale-card__time {
  font-size: 12px;
  color: #bbb;
  margin-top: 4px;
}

.after-sale-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.after-sale-status--0 { background: #fff4e5; color: #b86a00; }
.after-sale-status--1 { background: #eef4ff; color: #2f6fed; }
.after-sale-status--2 { background: #e8f7ee; color: #1a8f4a; }
.after-sale-status--3 { background: #fdecec; color: #d93025; }
.after-sale-status--4 { background: #f2f2f2; color: #666; }
.after-sale-status--tone-warning { background: #fff4e5; color: #b86a00; }
.after-sale-status--tone-info { background: #eef4ff; color: #2f6fed; }
.after-sale-status--tone-success { background: #e8f7ee; color: #1a8f4a; }
.after-sale-status--tone-danger { background: #fdecec; color: #d93025; }

.after-sale-type-tag--refund { background: #fde8e8; color: #e63946; }
.after-sale-type-tag--return { background: #fff3cd; color: #856404; }
.after-sale-type-tag--exchange { background: #e8f4fd; color: #2980b9; }

.after-sale-logistics {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

.after-sale-return-ship {
  margin-top: 12px;
  padding: 12px;
  background: #fff8f0;
  border: 1px dashed #e67e22;
  border-radius: 10px;
}

.after-sale-return-ship__title {
  font-size: 13px;
  font-weight: 600;
  color: #b86a00;
  margin-bottom: 10px;
}

.after-sale-return-ship__input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.after-sale-return-ship__btn { margin-top: 4px; }

.order-card--refunded { border: 1px solid #fde8e8 !important; }
.order-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.order-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.order-badge--refund { background: #fde8e8; color: #e63946; }
.order-badge--after-sale { background: #fff8f0; color: #b86a00; }
.order-badge--pending-refund { background: #fff4e5; color: #b86a00; }

.after-sale-card__body {
  padding: 14px 16px;
}

.after-sale-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.after-sale-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.after-sale-reason {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.45;
}

.after-sale-desc {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.after-sale-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.after-sale-images img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eee;
  cursor: pointer;
}

.after-sale-reply {
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffaf3 0%, #fff6ea 100%);
  border: 1px solid #ffe8c7;
}

.after-sale-reply__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #b87400;
  margin-bottom: 6px;
}

.after-sale-reply__text {
  font-size: 14px;
  color: #664400;
  line-height: 1.6;
}

.after-sale-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #f3f3f3;
  background: #fafafa;
}

.after-sale-card__foot-link {
  font-size: 13px;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
}

.after-sale-card__foot-link:active { opacity: 0.7; }

.after-sale-empty {
  padding-top: 48px;
}

.after-sale-empty__icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.45;
}

.after-sale-empty__hint {
  font-size: 13px;
  color: #bbb;
  margin-top: 8px;
  line-height: 1.5;
}

.after-sale-preview {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.after-sale-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.after-sale-preview__close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0));
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.star-picker { display: flex; gap: 4px; font-size: 24px; cursor: pointer; }
.star-picker span { color: #ddd; }
.star-picker span.on { color: #f5a623; }
