/* 我的展销页面样式 */

/* 顶部导航 */
.nav-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 750px;
  height: 50px;
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.nav-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-action {
  padding: 6px 12px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 13px;
  border-radius: var(--radius-md);
  text-decoration: none;
}

/* 标签切换 */
.product-tabs {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 750px;
  display: flex;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  z-index: 99;
}

.product-tab {
  flex: 1;
  text-align: center;
  padding: var(--spacing-md);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.product-tab.active {
  color: var(--primary-color);
  font-weight: 500;
}

.product-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 商品列表 */
.product-list {
  margin-top: 100px;
  padding: var(--spacing-md);
  padding-bottom: calc(var(--spacing-xl) + var(--safe-area-bottom));
}

/* 商品卡片 */
.product-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.product-no {
  font-size: 12px;
  color: var(--text-light);
}

.product-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.product-status.pending {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--accent-color);
}

.product-status.active {
  background-color: rgba(46, 204, 113, 0.1);
  color: #27ae60;
}

.product-status.expired {
  background-color: rgba(149, 165, 166, 0.1);
  color: #95a5a6;
}

.product-body {
  display: flex;
  padding: var(--spacing-lg);
  gap: var(--spacing-md);
}

.product-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-spec {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

.product-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: auto;
}

.product-price::before {
  content: "¥";
  font-size: 12px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-gray);
}

.product-stats {
  display: flex;
  gap: var(--spacing-lg);
  font-size: 12px;
  color: var(--text-light);
}

.product-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.product-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-btn.primary {
  background-color: var(--primary-color);
  color: #fff;
}

.product-btn.secondary {
  background-color: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px var(--spacing-lg);
  margin-top: 100px;
}

.empty-icon {
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

.empty-btn {
  padding: 10px 30px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 14px;
  border-radius: var(--radius-xl);
  text-decoration: none;
}

/* 加载指示器 */
.loading-indicator {
  display: flex;
  justify-content: center;
  padding: var(--spacing-lg);
}

/* 骨架屏 */
.skeleton-product-item {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.skeleton-product-header {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.skeleton-product-no {
  width: 100px;
  height: 14px;
}

.skeleton-product-status {
  width: 50px;
  height: 20px;
  border-radius: var(--radius-sm);
}

.skeleton-product-body {
  display: flex;
  padding: var(--spacing-lg);
  gap: var(--spacing-md);
}

.skeleton-product-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
}

.skeleton-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.skeleton-product-name {
  width: 100%;
  height: 16px;
}

.skeleton-product-spec {
  width: 60%;
  height: 12px;
}

.skeleton-product-price {
  width: 80px;
  height: 20px;
  margin-top: auto;
}
