/* ============================================================
   商品中心 · 页面样式（阿里式商品列表）
   ============================================================ */

.shop-header .nav .active { color: var(--blue); }
.shop-header .nav .active::after { width: 100%; }

/* ---------------- 搜索条 ---------------- */
.shop-bar {
  background: var(--blue-deep);
  padding: 22px max(28px, calc((100vw - var(--max)) / 2));
}
.shop-bar-inner {
  max-width: var(--max);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.crumb { color: rgba(255,255,255,.75); font-size: 14px; }
.crumb a { color: rgba(255,255,255,.75); }
.crumb a:hover { color: var(--lime); }
.crumb strong { color: var(--white); }
.shop-search { display: flex; gap: 8px; flex: 1; max-width: 480px; }
.shop-search input {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
}
.shop-search button {
  border: 0;
  border-radius: 6px;
  background: var(--lime);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  transition: filter .2s ease;
}
.shop-search button:hover { filter: brightness(0.94); }

.shop-notice {
  max-width: var(--max);
  margin: 18px auto 0;
  padding: 10px 16px;
  background: #fff7e0;
  border: 1px solid #f0dc9a;
  border-radius: 8px;
  color: #8a6d1a;
  font-size: 13px;
}

/* ---------------- 布局 ---------------- */
.shop-layout {
  max-width: var(--max);
  margin: 30px auto 80px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 26px;
  align-items: start;
}

.shop-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.shop-sidebar h3 {
  margin: 0;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  letter-spacing: 2px;
  padding: 15px 18px;
}
.shop-sidebar ul { list-style: none; margin: 0; padding: 8px 0; }
.shop-sidebar li button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: 0;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.shop-sidebar li button:hover { background: var(--sky); color: var(--blue); }
.shop-sidebar li button.active { background: var(--sky); color: var(--blue); font-weight: 700; }
.shop-sidebar li .count { font-size: 12px; color: var(--muted); }

/* ---------------- 工具栏 ---------------- */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.sort-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sort-btn {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--muted);
  transition: all .18s ease;
}
.sort-btn:hover { border-color: var(--blue); color: var(--blue); }
.sort-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.result-count { font-size: 13px; color: var(--muted); }

/* ---------------- 商品网格 ---------------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.shop-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex;
  flex-direction: column;
}
.shop-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(10, 143, 71, 0.12); border-color: var(--blue); }
.shop-card .thumb {
  position: relative;
  background: var(--sky);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.shop-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.shop-card:hover .thumb img { transform: scale(1.05); }
.shop-card .badge-featured {
  position: absolute; top: 12px; left: 12px;
  background: var(--lime);
  color: var(--blue-deep);
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.shop-card .body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-card .name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
}
.shop-card .price-row { display: flex; align-items: baseline; gap: 6px; }
.shop-card .price { color: #d23a1e; font-size: 20px; font-weight: 800; }
.shop-card .price small { font-size: 12px; font-weight: 600; }
.shop-card .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.shop-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.shop-card .tag {
  background: var(--sky);
  color: var(--blue);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  transition: all .18s ease;
}
.pagination button:hover { border-color: var(--blue); color: var(--blue); }
.pagination button.active { background: var(--blue); border-color: var(--blue); color: var(--white); font-weight: 700; }
.pagination button:disabled { opacity: .4; cursor: default; }

/* ---------------- 详情弹窗 ---------------- */
.detail-modal { max-width: 820px; }
.detail-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; }
.detail-img { background: var(--sky); border-radius: 12px; overflow: hidden; }
.detail-img img { width: 100%; display: block; }
.detail-info h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.4; }
.detail-price {
  background: #fff3ee;
  border: 1px solid #f7d9cd;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.detail-price .lbl { font-size: 12px; color: var(--muted); }
.detail-price .val { color: #d23a1e; font-size: 26px; font-weight: 800; }
.detail-price .val small { font-size: 13px; }
.detail-spec { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 14px; }
.detail-spec td { padding: 9px 12px; border: 1px solid var(--line); }
.detail-spec td:first-child { width: 110px; background: var(--sky); color: var(--muted); font-weight: 600; }
.detail-desc { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 0 18px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 合作模式 / 双价格 */
.price-oem { margin-top: 6px; font-size: 13px; color: var(--blue); font-weight: 700; }
.modes { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 2px; }
.mode-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--sky);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cfe9dc;
}
.detail-mode-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--sky);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid #cfe9dc;
}

/* ---------------- 空状态 ---------------- */
.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.shop-empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shop-layout { grid-template-columns: 1fr; padding: 0 20px; }
  .shop-sidebar { position: static; }
  .shop-sidebar ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; }
  .shop-sidebar li button { width: auto; border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; font-size: 13px; }
  .shop-sidebar li .count { display: none; }
  .shop-bar { padding: 18px 20px; }
  .shop-search { max-width: 100%; }
  .detail-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}
