/* ==================== 珠宝通 · 门店PC选品端 共享样式 ==================== */
/* 设计风格：B2B选品平台 · 暖金主调 · 大屏友好 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f7f5f0;
  color: #333;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------- Top Header ---------- */
.store-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.store-header[data-store-nav] { min-height: 108px; visibility: hidden; }
.store-header[data-store-nav].nav-ready { visibility: visible; }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  max-width: 1400px;
  margin: 0 auto;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #d4a574, #c9956c);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(212,165,116,.3);
}
.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: #d4a574;
  letter-spacing: 2px;
}
.logo-text p {
  font-size: 11px;
  color: rgba(255,255,255,.4);
}
.header-search {
  flex: 1;
  max-width: 520px;
  margin: 0 40px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 40px;
  border: none;
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 0 44px 0 20px;
  color: #fff;
  font-size: 13px;
  transition: background .2s;
}
.header-search input::placeholder { color: rgba(255,255,255,.4); }
.header-search input:focus {
  outline: none;
  background: rgba(255,255,255,.15);
}
.header-search .search-btn {
  position: absolute;
  right: 4px; top: 4px;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #d4a574, #c9956c);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  cursor: pointer;
  transition: color .2s;
  position: relative;
}
.header-link:hover { color: #d4a574; }
.header-link.active-link { color: #d4a574; }
.header-link .badge {
  position: absolute;
  top: -6px; right: -10px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.store-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255,255,255,.06);
  border-radius: 20px;
}
.store-switch {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.store-switch label {
  font-size: 10px;
  color: rgba(255,255,255,.45);
}
.store-switch select {
  min-width: 160px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 14px;
  padding: 0 28px 0 10px;
  font-size: 12px;
}
.store-switch select:focus {
  outline: none;
  border-color: rgba(212,165,116,.9);
}
.store-switch select option {
  color: #333;
}
.store-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #d4a574, #c9956c);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 700;
}

/* Nav Bar */
.header-nav {
  background: rgba(0,0,0,.15);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 0;
}
.nav-link {
  padding: 12px 24px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: all .2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-link.active {
  color: #d4a574;
  border-bottom-color: #d4a574;
  font-weight: 600;
}
.nav-link .icon { margin-right: 6px; }

/* ---------- Main Container ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 40px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
}
.breadcrumb a { color: #999; transition: color .2s; }
.breadcrumb a:hover { color: #d4a574; }
.breadcrumb .sep { color: #ddd; }
.breadcrumb .current { color: #333; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #d4a574, #c9956c);
  color: #fff;
  box-shadow: 0 2px 8px rgba(212,165,116,.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(212,165,116,.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: #fff;
  color: #666;
  border: 1px solid #e0dbd2;
}
.btn-secondary:hover { background: #f9f7f3; border-color: #d4a574; }
.btn-success { background: #27ae60; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-outline {
  background: transparent;
  color: #d4a574;
  border: 1px solid #d4a574;
}
.btn-outline:hover { background: rgba(212,165,116,.08); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f0ece4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.card-body { padding: 24px; }

/* ---------- Banner ---------- */
.hero-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  border-radius: 16px;
  padding: 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '💎';
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 140px;
  opacity: .08;
}
.hero-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-content p {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  margin-bottom: 24px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 20px;
}
.hero-stat .num {
  font-size: 28px;
  font-weight: 700;
  color: #d4a574;
}
.hero-stat .lbl {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ---------- Section ---------- */
.section {
  margin-bottom: 32px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-more {
  font-size: 13px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s;
}
.section-more:hover { color: #d4a574; }

/* ---------- Hot Items Grid ---------- */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.hot-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: all .3s;
  cursor: pointer;
}
.hot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.hot-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fef9ef, #fdebd0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}
.hot-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
}
.incentive-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: linear-gradient(135deg, #8e44ad, #6c3483);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
}
.hot-card-info {
  padding: 14px 16px;
}
.hot-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-card-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}
.hot-card-price {
  font-size: 18px;
  font-weight: 700;
  color: #c0392b;
}
.hot-card-price .unit {
  font-size: 12px;
  font-weight: 400;
  color: #999;
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: all .3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fef9ef, #fdebd0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}
.product-card-img .tags {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 6px;
}
.mini-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
}
.mini-tag.hot { background: #e74c3c; color: #fff; }
.mini-tag.incentive { background: #8e44ad; color: #fff; }
.mini-tag.new { background: #d4a574; color: #fff; }
.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f5f0e8;
  color: #b8834a;
}
.tag-blue { background: #ebf5fb; color: #2980b9; }
.tag-green { background: #eafaf1; color: #1e8449; }
.tag-red { background: #fdedec; color: #c0392b; }
.tag-purple { background: #f4ecf7; color: #7d3c98; }
.product-card-price {
  font-size: 18px;
  font-weight: 700;
  color: #c0392b;
  margin-top: auto;
}
.product-card-price .unit {
  font-size: 12px;
  font-weight: 400;
  color: #999;
}
.product-card-footer {
  padding: 12px 16px;
  border-top: 1px solid #f5f3ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.add-cart-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, #d4a574, #c9956c);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.add-cart-btn:hover {
  box-shadow: 0 4px 12px rgba(212,165,116,.4);
  transform: translateY(-1px);
}

/* ---------- Category Tags ---------- */
.category-scroll {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cat-chip {
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #e8e4de;
  border-radius: 24px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all .2s;
}
.cat-chip:hover { border-color: #d4a574; color: #d4a574; }
.cat-chip.active {
  background: rgba(212,165,116,.1);
  border-color: #d4a574;
  color: #b8834a;
  font-weight: 600;
}

/* ---------- Filter Sidebar ---------- */
.filter-sidebar {
  width: 240px;
  flex-shrink: 0;
}
.filter-group {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.filter-group-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f5f3ef;
}
.filter-option {
  padding: 6px 0;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-option:hover { color: #d4a574; }
.filter-option.active { color: #b8834a; font-weight: 600; }
.filter-option .count {
  margin-left: auto;
  font-size: 11px;
  color: #ccc;
}

/* ---------- Tags ---------- */
.tag-gold { background: #fef9ef; color: #b8834a; border: 1px solid #fdebd0; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pending { background: #fef9ef; color: #b8834a; }
.status-pending::before { background: #f39c12; }
.status-confirmed { background: #ebf5fb; color: #2980b9; }
.status-confirmed::before { background: #3498db; }
.status-shipped { background: #eafaf1; color: #1e8449; }
.status-shipped::before { background: #27ae60; }
.status-weighing { background: #f4ecf7; color: #7d3c98; }
.status-weighing::before { background: #8e44ad; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #f0ece4;
}
th { background: #faf8f4; font-weight: 600; color: #666; }
tr:hover td { background: #fdfcfa; }

/* ---------- Spec List ---------- */
.spec-list { width: 100%; }
.spec-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #f5f3ef;
  font-size: 13px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { width: 100px; color: #999; flex-shrink: 0; }
.spec-value { color: #333; flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.toast.show { opacity: 1; }

/* ---------- Footer ---------- */
.store-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.4);
  text-align: center;
  padding: 32px;
  margin-top: 60px;
  font-size: 13px;
}

/* ---------- Layout ---------- */
.layout-sidebar {
  display: flex;
  gap: 24px;
}
.layout-main { flex: 1; min-width: 0; }

/* ---------- Forms ---------- */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #d4a574;
  box-shadow: 0 0 0 3px rgba(212,165,116,.12);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 28px;
}
.pagination button {
  min-width: 36px; height: 36px;
  border: 1px solid #e0dbd2;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all .2s;
}
.pagination button:hover { border-color: #d4a574; color: #d4a574; }
.pagination button.active { background: #d4a574; color: #fff; border-color: #d4a574; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .container { padding: 16px 20px; }
  .header-top { padding: 0 20px; }
  .nav-container { padding: 0 20px; }
  .hero-banner { padding: 32px; }
  .filter-sidebar { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 680px) {
  .store-header[data-store-nav] { min-height: 150px; }
  .header-top { min-height: 64px; height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .logo-text p { display: none; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .header-actions { margin-left: auto; gap: 10px; }
  .header-link span:not(.badge) { display: none; }
  .store-info { padding: 2px 6px; }
  .store-switch select { min-width: 108px; max-width: 128px; }
  .nav-container { padding: 0 12px; overflow-x: auto; }
  .nav-link { padding: 11px 14px; font-size: 13px; }
  .container { padding: 16px; }
  .hero-banner { padding: 24px; margin-bottom: 24px; }
  .hero-content h2 { font-size: 24px; }
  .hero-content p { font-size: 13px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .section-header { align-items: flex-start; gap: 10px; }
  .section-title { font-size: 18px; }
  .layout-sidebar { display: block; }
  .filter-sidebar { display: none; }
  .product-grid, .hot-grid { grid-template-columns: 1fr; }
  .card-header, .card-body { padding-left: 16px; padding-right: 16px; }
  .spec-row { align-items: flex-start; gap: 12px; }
  .spec-label { width: 76px; }
  .store-footer { padding: 24px 16px; }
}
.header-actions .header-link { cursor: pointer; }

/* ========== 动效与优雅入场动画 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in-up {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 旋转加载动画 */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.store-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(212, 165, 116, 0.2);
  border-radius: 50%;
  border-top-color: #d4a574;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.loading-placeholder {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  color: #c9956c;
}

.container {
  min-height: 75vh;
}

/* 淡出动画 */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}
.fade-out {
  animation: fadeOut 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 数量与商品编码样式 */
.product-card-footer .supplier-name {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
  min-width: 0;
}

/* 数量控制器样式 */
.quantity-controller {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d4a574;
  border-radius: 16px;
  height: 32px;
  overflow: hidden;
  background: #fff;
}
.quantity-controller .qty-btn {
  width: 28px;
  height: 100%;
  border: none;
  background: transparent;
  color: #b8834a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
  margin: 0;
}
.quantity-controller .qty-btn:hover {
  background: #faf6f0;
}
.quantity-controller .qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
}
