/* ==================== 联通 VI 基础色 ==================== */
:root {
  --unicom-red: #E60012;
  --unicom-red-dark: #B8000E;
  --unicom-red-light: #FFEBEC;
  --unicom-blue: #0066B3;
  --unicom-green: #00A86B;
  --gray-900: #1A202C;
  --gray-700: #2D3748;
  --gray-500: #4A5568;
  --gray-300: #CBD5E0;
  --gray-100: #F7FAFC;
  --gray-50:  #FAFAFA;
  --bg:       #F2F3F5;
  --white:    #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 80px; /* 给底部按钮留位 */
}

/* ==================== 顶部导航 ==================== */
.top-nav {
  background: linear-gradient(135deg, #C8102E 0%, #E8263E 50%, #FF6B6B 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(200,16,46,0.25);
}

/* 头部 Banner */
.top-banner {
  width: 100%;
  background: #000;
  overflow: hidden;
}
.top-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.nav-back {
  font-size: 28px;
  color: var(--white);
  text-decoration: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  margin-left: -8px;
}
.nav-back:active { background: rgba(255,255,255,0.3); transform: scale(0.92); }

.nav-title {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  text-align: center;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.nav-action:active { background: rgba(255,255,255,0.3); transform: scale(0.92); }

/* ==================== 区段卡片 ==================== */
.block {
  background: var(--white);
  margin: 12px 12px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

/* 步骤区段差异化背景 */
#section-phone { border-left: 3px solid #3B9CFF; }
#section-package { border-left: 3px solid #00A86B; }
#section-gifts { border-left: 3px solid #FFB800; }
#section-customer { border-left: 3px solid #9B59B6; }

/* 联通购机一点通高亮 */
.bill-section {
  background: linear-gradient(135deg, #FFF8F8 0%, #FFF0F0 100%);
  border: 2px solid var(--unicom-red);
  box-shadow: 0 4px 16px rgba(230,0,18,0.08);
}
.bill-section .block-head {
  background: linear-gradient(135deg, var(--unicom-red) 0%, #FF6B6B 100%);
  border-bottom: none;
}
.bill-section .block-num {
  background: var(--white);
  color: var(--unicom-red);
}
.bill-section .block-title {
  color: var(--white);
}
.bill-section .bill-date {
  color: rgba(255,255,255,0.85);
}

.block-head {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
}

.block-num {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--unicom-red) 0%, #FF6B6B 100%);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(230,0,18,0.25);
}

.block-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  flex: 1;
  letter-spacing: 0.3px;
}

.btn-link {
  background: linear-gradient(135deg, rgba(230,0,18,0.06) 0%, rgba(230,0,18,0.02) 100%);
  border: 1px solid rgba(230,0,18,0.12);
  color: var(--unicom-red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 10px;
  transition: all 0.2s;
}
.btn-link:active {
  background: linear-gradient(135deg, rgba(230,0,18,0.12) 0%, rgba(230,0,18,0.06) 100%);
  transform: scale(0.96);
}

.bill-date {
  font-size: 11px;
  color: var(--gray-500);
}

/* ==================== 手机卡 ==================== */
.phone-card {
  position: relative;
  display: flex;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.phone-card:active { background: var(--gray-50); }

.phone-card.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  color: var(--gray-500);
  min-height: 140px;
}
.phone-card.empty::before {
  content: '📱';
  display: block;
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.phone-card.empty::after {
  content: '点击选择手机，开启专属方案';
  display: block;
  font-size: 14px;
  color: var(--gray-400);
}

.phone-thumb {
  width: 88px;
  height: 110px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  margin-right: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.phone-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--gray-100);
}

/* 卡片右上角黑龙江库存角标 */
.phone-thumb-jx {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C24 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(255,107,0,0.4);
  z-index: 5;
  letter-spacing: 0.2px;
}

/* 主页面"仅剩 1 台"提示 */
.phone-stock-low {
  font-size: 10px;
  color: #C62828;
  background: linear-gradient(135deg, #FFEBEE 0%, #FFF5F5 100%);
  border: 1px solid #FFCDD2;
  padding: 2px 6px;
  border-radius: 6px;
  margin: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.phone-info {
  flex: 1;
  min-width: 0;
}

.phone-brand {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
}

.phone-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 2px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.3px;
}

.phone-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--unicom-red);
  background: linear-gradient(135deg, var(--unicom-red-light) 0%, #FFF0F0 100%);
  padding: 3px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  font-weight: 600;
  border: 1px solid rgba(230,0,18,0.1);
}

.phone-color-row {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-price-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.phone-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--unicom-red);
  line-height: 1;
  letter-spacing: -0.5px;
}
.phone-price-orig {
  font-size: 12px;
  color: var(--gray-300);
  text-decoration: line-through;
}
.phone-discount {
  font-size: 11px;
  color: var(--white);
  background: linear-gradient(135deg, var(--unicom-red) 0%, #FF6B6B 100%);
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(230,0,18,0.2);
  width: fit-content;
}

/* ==================== 套餐卡 ==================== */
.pkg-card {
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.pkg-card:active { background: var(--gray-50); }
.pkg-card:not(.empty):hover { background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%); }
.pkg-card.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  color: var(--gray-500);
  min-height: 120px;
}
.pkg-card.empty::before {
  content: '📋';
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.6;
}
.pkg-card.empty::after {
  content: '点击选择套餐，匹配最优资费';
  display: block;
  font-size: 14px;
  color: var(--gray-400);
}

.pkg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pkg-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.pkg-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--unicom-red-light);
  color: var(--unicom-red);
  font-weight: 600;
}

.pkg-fee-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}
.pkg-fee {
  font-size: 32px;
  font-weight: 900;
  color: var(--unicom-red);
  line-height: 1;
  letter-spacing: -1px;
}
.pkg-fee-unit {
  font-size: 14px;
  color: var(--gray-500);
}

.pkg-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--gray-500);
  padding-top: 10px;
  border-top: 1px dashed var(--gray-100);
}

.pkg-detail-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pkg-detail-item .v {
  color: var(--gray-700);
  font-weight: 600;
}

/* ==================== 优惠换购摘要 ==================== */
.gifts-summary {
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.gifts-summary:active { background: var(--gray-50); }
.gifts-summary:not(.empty):hover { background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%); }
.gifts-summary.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--gray-500);
  padding: 40px 16px;
  min-height: 120px;
}
.gifts-summary.empty::before {
  content: '🎁';
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.6;
}
.gifts-summary.empty::after {
  content: '点击选配优惠换购，叠加更多福利';
  display: block;
  font-size: 14px;
  color: var(--gray-400);
}

.gifts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--unicom-red-light) 0%, #FFF5F5 100%);
  color: var(--unicom-red);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(230,0,18,0.08);
  box-shadow: 0 1px 3px rgba(230,0,18,0.06);
}
.gift-value {
  font-size: 11px;
  color: var(--gray-500);
  margin-left: 2px;
}
.gifts-total {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-100);
}
.gifts-total .v {
  color: var(--unicom-red);
  font-weight: 700;
  font-size: 14px;
}

/* ==================== 客户表单 ==================== */
.customer-form {
  padding: 8px 16px 16px;
  background: linear-gradient(135deg, var(--white) 0%, #FAFAFA 100%);
}
.form-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  padding: 12px 0;
}
.form-row:last-child { border-bottom: none; }
.form-label {
  width: 80px;
  font-size: 13px;
  color: var(--gray-500);
  flex-shrink: 0;
}
.form-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--gray-900);
  background: transparent;
  padding: 0;
  transition: all 0.2s;
}
.form-row input::placeholder { color: var(--gray-300); }
.form-row input:focus {
  color: var(--unicom-red);
}

/* ==================== 联通购机一点通 ==================== */
.bill-section { background: var(--gray-50); }

.bill {
  background: linear-gradient(135deg, var(--white) 0%, #FFFCFC 100%);
  margin: 12px 16px 16px;
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--unicom-red);
  box-shadow: 0 6px 24px rgba(230,0,18,.12), 0 2px 8px rgba(230,0,18,.06);
}

.bill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--unicom-red) 0%, #FF6B6B 60%, #FFB199 100%);
}

.bill-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--gray-200);
  margin-bottom: 16px;
  position: relative;
}

.bill-head-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}
.bill-logo {
  flex-shrink: 0;
  width: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}
.bill-logo img {
  display: block;
  width: 96px;
  height: auto;
  margin-top: 2px;
}
.bill-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--unicom-red);
  background: rgba(230,0,18,.08);
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.bill-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 4px;
  letter-spacing: .5px;
}
.bill-sub {
  font-size: 11px;
  color: var(--gray-500);
}
.bill-sub .bill-date-tag {
  display: inline-block;
  background: var(--gray-100);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--gray-700);
  margin-left: 4px;
}

.bill-customer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--gray-700);
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: visible;
  word-break: keep-all;
}
.bill-customer span { display: inline-block; white-space: nowrap; letter-spacing: 0.3px; flex-shrink: 0; min-width: max-content; }

.bill-section-row {
  margin-bottom: 14px;
}
.bill-section-row h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--unicom-red);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}
.bill-section-row h4::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--unicom-red);
  margin-right: 6px;
  border-radius: 1.5px;
}

.bill-phone {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--gray-50);
  border-radius: 6px;
}
.bill-phone-icon {
  font-size: 28px;
  margin-right: 10px;
}
.bill-phone-thumb {
  width: 56px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  flex-shrink: 0;
  margin-right: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bill-phone-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bill-phone-thumb .fallback {
  font-size: 28px;
}
.bill-phone-info {
  flex: 1;
  min-width: 0;
}
.bill-phone-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.bill-phone-spec {
  font-size: 11px;
  color: var(--gray-500);
}
.bill-phone-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--unicom-red);
  text-align: right;
}
.bill-phone-orig {
  font-size: 10px;
  color: var(--gray-300);
  text-decoration: line-through;
  display: block;
}

.bill-package {
  background: linear-gradient(135deg, var(--unicom-red) 0%, var(--unicom-red-dark) 100%);
  color: var(--white);
  padding: 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bill-pkg-name {
  font-size: 14px;
  font-weight: 700;
}
.bill-pkg-detail {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}
.bill-pkg-fee {
  text-align: right;
}
.bill-pkg-fee-main {
  font-size: 18px;
  font-weight: 800;
}
.bill-pkg-fee-sub {
  font-size: 10px;
  opacity: 0.85;
}

.bill-gifts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bill-gift-chip {
  background: var(--gray-50);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--gray-700);
}

.bill-summary {
  background: linear-gradient(135deg, var(--gray-50) 0%, #F8F9FA 100%);
  padding: 14px;
  border-radius: 10px;
  margin: 14px 0;
  border: 1px solid rgba(0,0,0,0.04);
}
.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-700);
  padding: 3px 0;
}
.bill-row .v { font-weight: 600; }
.bill-row.total {
  border-top: 2px dashed var(--gray-300);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
}
.bill-row.total .v {
  font-size: 22px;
  color: var(--unicom-red);
  font-weight: 900;
  letter-spacing: -0.5px;
}

.bill-foot {
  display: grid;
  grid-template-columns: 1fr 70px;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--gray-500);
  padding-top: 12px;
  border-top: 2px dashed var(--gray-200);
  margin-top: 12px;
}
.bill-foot-text { line-height: 1.5; }
.bill-foot .brand {
  color: var(--unicom-red);
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 3px;
  letter-spacing: .5px;
}
.bill-foot .bill-tip {
  font-size: 9px;
  color: var(--gray-400);
  margin-top: 4px;
}
.bill-foot .bill-qrcode {
  width: 70px;
  height: 70px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background:
    repeating-linear-gradient(45deg, var(--gray-200) 0 4px, transparent 4px 8px),
    var(--white);
  position: relative;
  flex-shrink: 0;
}
.bill-foot .bill-qrcode::after {
  content: '扫码咨询';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: var(--gray-600);
  background: rgba(255,255,255,.85);
  border-top: 1px solid var(--gray-200);
  padding: 1px 0;
  border-radius: 0 0 5px 5px;
}

.bill-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bill-empty::before {
  content: '💡';
  display: block;
  font-size: 48px;
  opacity: 0.5;
}
.bill-empty::after {
  content: '选择手机和套餐后，自动生成专属消费方案';
  display: block;
  color: var(--gray-400);
  font-size: 13px;
}

/* ==================== 底部按钮 ==================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 90;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-secondary:active { background: var(--gray-300); transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, #C8102E 0%, #E8263E 50%, #FF6B6B 100%);
  color: var(--white);
  flex: 2.5;
  box-shadow: 0 4px 16px rgba(200,16,46,0.35);
  font-size: 16px;
  font-weight: 700;
}
.btn-primary:active { transform: translateY(2px) scale(0.98); box-shadow: 0 2px 8px rgba(200,16,46,0.4); }

.btn-block { width: 100%; }

.btn-icon { font-size: 16px; }

/* ==================== 弹窗 ==================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  z-index: 200;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}
.modal.show { display: flex; }

/* 全屏弹窗 */
.modal-fullscreen {
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
}
.modal-fullscreen .modal-sheet {
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
}
.modal-fullscreen .modal-body {
  max-height: calc(100vh - 60px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--white);
  width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
  overflow: hidden;
}

/* 手机选择弹窗全屏 */
.modal-sheet-phone {
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  animation: slideUpFull 0.3s ease;
}
@keyframes slideUpFull { from { transform: translateY(30%); } to { transform: translateY(0); } }

.modal-sheet-phone .modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 海报弹窗特殊样式 - 支持长图滚动 */
.modal-sheet-poster {
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  background: #000;
  animation: none; /* 移除动画防止闪烁 */
  overflow: hidden;
}
.modal-sheet-poster .modal-head {
  background: #000;
  color: #fff;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.modal-sheet-poster .modal-close {
  background: #333;
  color: #fff;
}
.modal-fullscreen .modal-sheet-poster .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: #000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  max-height: none !important;
}
.modal-sheet-poster .poster-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  border: none;
}
.modal-sheet-poster .poster-card-img {
  min-height: auto;
  height: auto;
  display: block;
}
.modal-sheet-poster .poster-card-img img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}

/* 官方长图特殊处理 */
.poster-official-long {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============ 专属优惠券弹窗样式 ============ */
.modal-sheet-coupon {
  max-width: 360px;
  margin: auto;
  border-radius: var(--radius-lg);
}

/* ============ 库存分布弹窗样式 ============ */
.modal-sheet-stock {
  max-width: 480px;
  margin: auto;
  border-radius: var(--radius-lg);
  max-height: 80vh;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.stock-table th {
  background: var(--gray-50);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 1;
}

.stock-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}

.stock-table tr:hover {
  background: var(--gray-50);
}

.stock-table .col-code {
  width: 100px;
  font-family: monospace;
  font-size: 11px;
}

.stock-table .col-qty {
  width: 50px;
  text-align: center;
  font-weight: 600;
}

.stock-table .col-location {
  width: 120px;
}

/* ============ 库存底部合计栏 ============ */
.stock-summary {
  background: var(--gray-50);
  padding: 16px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.stock-summary-label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 14px;
}

.stock-summary-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--unicom-red);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

/* ============ 库存筛选按钮 ============ */
.stock-filters {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.stock-filter-group {
  margin-bottom: 10px;
}

.stock-filter-group:last-child {
  margin-bottom: 0;
}

.stock-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-filter-btns {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.stock-filter-btns::-webkit-scrollbar {
  display: none;
}

.stock-filter-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 14px;
  background: var(--gray-200);
  font-size: 12px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.stock-filter-btn:hover {
  background: var(--gray-300);
}

.stock-filter-btn.active {
  background: var(--unicom-red);
  color: var(--white);
}

/* ============ 库存表格优化 ============ */
.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stock-table th {
  background: var(--gray-50);
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stock-table td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
  line-height: 1.4;
}

.stock-table tr:hover {
  background: var(--gray-50);
}

/* 物资编码 - 固定宽度 */
.stock-table th:nth-child(1),
.stock-table td:nth-child(1) {
  width: 85px;
  min-width: 85px;
}

/* 物资规格 - 自适应，可展开 */
.stock-table th:nth-child(2),
.stock-table td:nth-child(2) {
  min-width: 120px;
  max-width: 180px;
}

.stock-table td:nth-child(2) .spec-text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.4;
}

.stock-table td:nth-child(2) .spec-text.expanded {
  -webkit-line-clamp: unset;
  white-space: normal;
}

/* 地市 - 居中 */
.stock-table th:nth-child(3),
.stock-table td:nth-child(3) {
  width: 50px;
  min-width: 50px;
  text-align: center;
}

/* 库存 - 右对齐加粗 */
.stock-table th:nth-child(4),
.stock-table td:nth-child(4) {
  width: 50px;
  min-width: 50px;
  text-align: right;
}

.stock-table td:nth-child(4) {
  font-weight: 700;
  font-size: 14px;
  color: var(--unicom-red);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

/* 地点描述 - 较宽 */
.stock-table th:nth-child(5),
.stock-table td:nth-child(5) {
  min-width: 100px;
}

/* 地点编码 - 压缩 */
.stock-table th:nth-child(6),
.stock-table td:nth-child(6) {
  width: 70px;
  min-width: 70px;
  font-size: 11px;
  color: var(--gray-500);
}

.stock-table .col-code {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: -0.3px;
}

/* ============ 库存卡片列表 ============ */
.stock-cards {
  padding: 12px 16px;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.stock-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stock-card:last-child {
  margin-bottom: 0;
}

.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stock-card-code {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  font-size: 12px;
  color: var(--gray-500);
}

.stock-card-qty {
  font-size: 18px;
  font-weight: 700;
  color: var(--unicom-red);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

.stock-card-spec {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.5;
  margin-bottom: 10px;
  word-break: break-all;
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

.stock-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

.stock-card-city {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 10px;
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

.stock-card-location {
  font-size: 12px;
  color: var(--gray-500);
  text-align: right;
  max-width: 60%;
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

.coupon-input-wrap {
  margin-bottom: 20px;
}

.coupon-label {
  display: block;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.coupon-input-box {
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 52px;
  transition: border-color 0.2s;
}

.coupon-input-box:focus-within {
  border-color: var(--unicom-red);
}

.coupon-currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-700);
  margin-right: 8px;
}

.coupon-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  outline: none;
  width: 100%;
}

.coupon-input::placeholder {
  color: var(--gray-300);
}

.coupon-quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.coupon-quick-btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 0;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.coupon-quick-btn:hover {
  border-color: var(--unicom-red);
  color: var(--unicom-red);
  background: var(--unicom-red-light);
}



.modal-head {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  text-align: center;
  margin-left: -40px; /* 平衡左右按钮宽度 */
}

.modal-close {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 22px;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.modal-close:active {
  background: var(--gray-300);
  transform: scale(0.92);
}

.modal-hint {
  position: absolute;
  right: 56px;
  font-size: 11px;
  color: var(--gray-500);
}

.modal-filters {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  scrollbar-width: none;
}
.modal-filters::-webkit-scrollbar { display: none; }

/* 价位筛选行 */
.modal-filters-price {
  border-bottom: 1px solid var(--gray-100);
  padding-top: 8px;
  padding-bottom: 10px;
  align-items: center;
}
.filter-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  padding: 0 4px 0 2px;
  flex-shrink: 0;
}

.chip {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--gray-700);
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:active { transform: scale(0.95); }
.chip-active {
  background: linear-gradient(135deg, var(--unicom-red) 0%, #FF6B6B 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(230,0,18,0.25);
  border-color: transparent;
}

/* 黑龙江供货 chip：橙色主题 */
.chip-hlj {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  color: #E65100;
  border: 1px solid #FFB74D;
  font-weight: 600;
}
.chip-hlj.chip-active {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C24 100%);
  color: var(--white);
  border-color: #FF6B00;
  box-shadow: 0 2px 6px rgba(255,107,0,0.35);
}
.hlj-chip-count {
  display: inline-block;
  background: rgba(255,255,255,0.7);
  color: #E65100;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 7px;
  margin-left: 3px;
  vertical-align: 1px;
}
.chip-hlj.chip-active .hlj-chip-count {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  padding: 12px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* ==================== 列表项（弹窗内） ==================== */
.list-item {
  display: flex;
  padding: 14px 12px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
  margin: 0 4px;
}
.list-item:active { background: var(--gray-50); transform: scale(0.99); }
.list-item:last-child { border-bottom: none; }

.list-item.selected {
  background: linear-gradient(135deg, var(--unicom-red-light) 0%, #FFF8F8 100%);
  border: 1px solid rgba(230,0,18,0.15);
  box-shadow: 0 2px 8px rgba(230,0,18,0.08);
}

.list-item-icon {
  width: 48px;
  height: 48px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* 商品图（弹窗列表项） */
.list-item-img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  border: 1px solid var(--gray-100);
  margin-right: 12px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.list-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.list-item-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--gray-100);
}

/* 黑龙江供货角标 */
.heilongjiang-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C24 100%);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(255,107,0,0.3);
  vertical-align: middle;
}
.heilongjiang-badge .hlj-icon {
  font-size: 11px;
}
.heilongjiang-badge .hlj-count {
  font-size: 12px;
  font-weight: 900;
  background: rgba(255,255,255,0.25);
  padding: 0 4px;
  border-radius: 6px;
  margin: 0 1px;
}

/* 库存状态徽章 */
.stock-low, .stock-empty {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.stock-low {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE8CC 100%);
  color: #E65100;
  border: 1px solid #FFCC80;
}
.stock-empty {
  background: linear-gradient(135deg, #FFEBEE 0%, #FFE0E0 100%);
  color: #C62828;
  border: 1px solid #FFCDD2;
}

/* 列表项 meta 行 */
.list-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* 库存备注（已废弃，统一用角标显示） */
.list-item-note {
  display: none;
}

.list-item-info {
  flex: 1;
  min-width: 0;
}

.list-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.list-item-storage {
  font-size: 13px;
  font-weight: 600;
  color: var(--unicom-red);
  background: var(--unicom-red-light);
  padding: 1px 6px;
  border-radius: 4px;
}

.list-item-tag {
  font-size: 11px;
  color: var(--unicom-red);
  background: var(--unicom-red-light);
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 4px;
}

.list-item-detail {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
  line-height: 1.5;
}

.list-item-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--unicom-red);
  align-self: center;
  white-space: nowrap;
}

/* 价格区域包裹 */
.list-item-price-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  align-self: center;
}

/* 修改价格按钮 */
.list-item-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: var(--unicom-blue);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
  padding: 0;
}
.list-item-edit-btn svg {
  display: block;
  pointer-events: none;
}
.list-item-edit-btn:active {
  opacity: 0.8;
  transform: scale(0.92);
}

/* 价格输入框 */
.price-input {
  width: 70px;
  font-size: 15px;
  font-weight: 700;
  color: var(--unicom-red);
  border: 2px solid var(--unicom-blue);
  border-radius: 6px;
  padding: 4px 6px;
  text-align: center;
  outline: none;
  -webkit-appearance: none;
}

/* 保存/取消按钮组 */
.price-btn-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.price-save-btn,
.price-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.price-save-btn {
  background: var(--unicom-green);
  color: #fff;
}
.price-cancel-btn {
  background: var(--gray-300);
  color: var(--gray-700);
}
.price-save-btn:active,
.price-cancel-btn:active {
  transform: scale(0.92);
}

.list-item-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  margin-left: 10px;
  align-self: center;
  position: relative;
  flex-shrink: 0;
}
.list-item.selected .list-item-check {
  background: var(--unicom-red);
  border-color: var(--unicom-red);
}
.list-item.selected .list-item-check::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.85);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 300;
  white-space: nowrap;
  max-width: 80vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== 平板/桌面适配 ==================== */
@media (min-width: 768px) {
  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 40px rgba(0,0,0,0.08); }
  .top-nav { max-width: 480px; margin: 0 auto; border-radius: 0 0 16px 16px; }
  .bottom-bar { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
}

@media (min-width: 1024px) {
  body { max-width: 540px; }
  .top-nav { max-width: 540px; }
  .bottom-bar { max-width: 540px; }
}

/* ==================== 资料库 ==================== */
.block-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-link-lib {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 102, 179, 0.08);
  color: var(--unicom-blue);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
}
.btn-link-lib:active { opacity: 0.6; }

.modal-sheet-lib {
  /* 资料库比一般弹窗稍大 */
  max-height: 88vh;
}

.lib-hero {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #FAFAFA 0%, #F0F4F8 100%);
  border-radius: 10px;
  margin: 12px 12px 8px;
  align-items: center;
}
.lib-hero-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.lib-hero-img img,
.lib-hero-img svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.lib-hero-info {
  flex: 1;
  min-width: 0;
}
.lib-hero-brand {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.lib-hero-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.lib-hero-price {
  font-size: 13px;
  color: var(--unicom-red);
  font-weight: 600;
}
.lib-hero-stock {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.lib-section {
  margin: 12px 12px 0;
}
.lib-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-100);
}
.lib-section-title-icon {
  font-size: 16px;
}

.lib-highlight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--gray-800);
  line-height: 1.5;
}
.lib-highlight::before {
  content: '✓';
  color: var(--unicom-red);
  font-weight: 700;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.lib-specs {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 4px 0;
}
.lib-spec-row {
  display: flex;
  font-size: 13px;
  line-height: 1.6;
}
.lib-spec-key {
  flex-shrink: 0;
  width: 70px;
  color: var(--gray-500);
  padding: 8px 12px;
}
.lib-spec-val {
  flex: 1;
  color: var(--gray-900);
  padding: 8px 12px;
  border-left: 1px solid #EEE;
}

.lib-pitch {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
  border-left: 3px solid var(--unicom-red);
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gray-800);
  line-height: 1.6;
}

.lib-actions {
  display: flex;
  gap: 8px;
  margin: 16px 12px 12px;
  flex-wrap: wrap;
}
.lib-action {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-800);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.lib-action:active {
  background: var(--gray-100);
}
.lib-action-primary {
  background: var(--unicom-red);
  color: #fff;
  border-color: var(--unicom-red);
}
.lib-action-primary:active {
  background: #C00010;
}

.lib-empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}
.lib-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.lib-brand-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 8px;
}
.lib-brand-tab {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 12px;
  background: var(--gray-50);
  color: var(--gray-700);
  border: none;
  cursor: pointer;
}
.lib-brand-tab.active {
  background: var(--unicom-red);
  color: #fff;
}

/* 多存储版本切换器（资料库详情页用） */
.lib-storage-tabs {
  padding: 12px 14px 4px;
  border-bottom: 1px solid var(--gray-100);
}
.lib-storage-tabs-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.lib-storage-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lib-storage-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 16px;
  background: var(--gray-50);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all .2s;
}
.lib-storage-tab .lib-storage-stock {
  font-size: 11px;
  color: var(--gray-500);
}
.lib-storage-tab.active {
  background: var(--unicom-red);
  color: #fff;
  border-color: var(--unicom-red);
}
.lib-storage-tab.active .lib-storage-stock {
  color: rgba(255,255,255,.85);
}
/* 单版本静态 chip（不可点） */
.lib-storage-tab-single {
  cursor: default;
  background: var(--gray-50);
  color: var(--gray-700);
  border-color: var(--gray-200);
}

.lib-phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
}
.lib-phone-row:active {
  background: var(--gray-50);
}
.lib-phone-row-img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.lib-phone-row-img img,
.lib-phone-row-img svg {
  max-width: 100%;
  max-height: 100%;
}
.lib-phone-row-info {
  flex: 1;
  min-width: 0;
}
.lib-phone-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.lib-phone-row-meta {
  font-size: 11px;
  color: var(--gray-500);
}
.lib-phone-row-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--unicom-red);
  flex-shrink: 0;
}

.lib-badge-soon {
  display: inline-block;
  font-size: 10px;
  background: #FFF5F5;
  color: var(--unicom-red);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 500;
}

/* ==================== 弹窗搜索框 ==================== */
.modal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
  position: relative;
}
.modal-search-icon {
  position: absolute;
  left: 22px;
  font-size: 14px;
  color: var(--gray-500);
  pointer-events: none;
  z-index: 1;
}
.modal-search-input {
  flex: 1;
  height: 40px;
  padding: 0 36px 0 36px;
  border: 1.5px solid var(--gray-100);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  font-size: 14px;
  color: var(--gray-900);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s;
}
.modal-search-input:focus {
  background: var(--white);
  border-color: var(--unicom-red);
  box-shadow: 0 0 0 3px rgba(230,0,18,0.1);
}
.modal-search-input::placeholder {
  color: var(--gray-500);
}
.modal-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.modal-search-clear {
  position: absolute;
  right: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-300);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.modal-search-clear:active {
  background: var(--gray-500);
}

/* ==================== 列表项内的参数按钮 ==================== */
.list-item-spec-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--unicom-blue);
  background: rgba(0, 102, 179, 0.08);
  border: 1px solid rgba(0, 102, 179, 0.15);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.list-item-spec-btn:active {
  background: rgba(0, 102, 179, 0.18);
  transform: scale(0.96);
}

.list-item-poster-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  margin-left: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: #C2185B;
  background: rgba(194, 24, 91, 0.08);
  border: 1px solid rgba(194, 24, 91, 0.15);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.list-item-poster-btn:active {
  background: rgba(194, 24, 91, 0.18);
  transform: scale(0.96);
}

/* 悬浮于产品图右上角的海报按钮 */
.list-item-img .list-item-poster-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  margin: 0;
  padding: 2px 5px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #C2185B;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  z-index: 2;
}
.list-item-img .list-item-poster-btn:active {
  background: #fff;
  transform: scale(0.94);
}

/* ==================== 海报 ==================== */
.modal-fullscreen .modal-sheet-poster .modal-body-poster {
  padding: 12px;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.poster-card {
  width: 320px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F8 100%);
  border-radius: 20px;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(230, 0, 18, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  position: relative;
  border: 1px solid rgba(230,0,18,0.08);
}
.poster-card-img {
  width: 100%;
  min-height: 300px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.poster-card-img img {
  max-width: 100%;
  max-height: none;
  height: auto;
  display: block;
}

/* 官方长图特殊处理 */
.poster-card-img img.poster-official-long {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
.poster-card-img-fallback {
  font-size: 80px;
}
.poster-card-brand {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.poster-card-price-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--unicom-red);
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}
.poster-card-discount {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
}
.poster-card-body {
  padding: 16px;
}
.poster-card-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.poster-card-tagline {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.poster-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.poster-card-highlight {
  font-size: 11px;
  color: var(--unicom-red);
  background: rgba(230, 0, 18, 0.08);
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 500;
}
.poster-card-pitch {
  background: linear-gradient(135deg, #FFF8F8 0%, #FFEBEC 100%);
  border-left: 3px solid var(--unicom-red);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--gray-800);
  line-height: 1.5;
  border-radius: 4px;
  margin-bottom: 12px;
}
.poster-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 2px dashed var(--gray-100);
}
.poster-card-logo {
  font-size: 14px;
  font-weight: 800;
  color: var(--unicom-red);
  letter-spacing: 1px;
}
.poster-card-stock {
  font-size: 11px;
  color: var(--gray-500);
}
.poster-card-stock-num {
  color: var(--unicom-red);
  font-weight: 600;
}

.poster-actions {
  display: flex;
  gap: 10px;
  width: 320px;
  margin-top: 14px;
}
.poster-action {
  flex: 1;
  padding: 12px 14px;
  font-size: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  transition: all 0.2s;
}
.poster-action-primary {
  background: linear-gradient(135deg, var(--unicom-red) 0%, #FF6B6B 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(230,0,18,0.3);
}
.poster-action-primary:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(230,0,18,0.4); }
.poster-action-secondary {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
}
.poster-action-secondary:active { background: var(--gray-100); transform: translateY(1px); }


/* 国补开关 */
.subsidy-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.subsidy-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--unicom-red); cursor: pointer; flex-shrink: 0; }
.subsidy-toggle-label { font-size: 13px; color: var(--gray-700); user-select: none; }
