/* variables.css - Auto-split from styles.css */
:root {
  --bg: #ffffff;
  --text: #222;
  --sub: #777;
  --muted: #9a9a9a;
  --line: #111;
  --chip-bg: #f4f4f4;
  --chip-text: #222;
  --card-bg: #fafafa;
}

html {
  height: 100%;
  scrollbar-gutter: stable;
}

body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    Segoe UI, Roboto, Arial, "PingFang SC", "Microsoft Yahei", sans-serif;
}

/* base.css - Auto-split from styles.css */
.wrap {
  max-width: 1280px;
  margin: 0 auto 80px;
  padding: 0 40px;
}

/* KREAM Logo */
.logo {
  margin-bottom: 8px;
  padding-left: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: inline-block;
}

.logo:hover {
  opacity: 0.8;
}

.logo:active {
  opacity: 0.6;
}

/* 搜索头部 */
.search_hdr {
    padding-top: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.ipt {
    width: 100%;
    min-width: 120px;
    max-width: 560px;
    border: none;
    outline: none;
    color: #000;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 29px;
    padding: 0 40px 0 0;
    background: transparent;
    text-align: left;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
}

.ipt::placeholder {
  color: #9c9c9c;
}

.btn-clear {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 20px;
  height: 20px;
  position: absolute;
  right: 1px;
  top: 50%;
  transform: translateY(-50%);
}

.btn-clear::before,
.btn-clear::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: #9c9c9c;
  top: 50%;
  left: 50%;
}

.btn-clear::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.btn-clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.btn-clear:hover::before,
.btn-clear:hover::after {
  background: #666;
}

/* 区块样式 */
.section {
  margin-top: 24px;
}

.section .title {
  font-size: 16px;
  font-weight: 700;
  margin: 14px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title .ts {
  font-weight: 400;
  font-size: 12px;
  color: var(--sub);
}

/* 搜索结果 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 16px;
  margin-top: 24px;
}

/* 商品卡片外链（支持右键「在新标签页中打开链接」） */
a.product-card-link,
.product-card-link,
a.product-card-link:link,
a.product-card-link:visited,
a.product-card-link:hover,
a.product-card-link:active {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}
/* 卡片内文案不显示下划线（shop/搜索/品牌页/最近浏览 统一，强制覆盖浏览器默认） */
a.product-card-link .product-brand,
a.product-card-link .product-name,
a.product-card-link .product-price,
a.product-card-link .product-stats,
a.product-card-link .product-translated-name,
.product-card-link .product-brand,
.product-card-link .product-name,
.product-card-link .product-price,
.product-card-link .product-stats,
.product-card-link .product-translated-name {
  text-decoration: none !important;
}
/* 让图片/占位符不抢右键，这样右键菜单是链接的「在新标签页中打开」而非「在新窗口中打开图片」 */
.product-card-link .product-image img,
.product-card-link .product-image-placeholder {
  pointer-events: none;
}

/* 商品卡片 */
.product-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 0;
}

.product-card:hover {
  transform: none;
  box-shadow: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f4f4f4;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* 图片占位符样式（绝对定位填满 .product-image，新窗口打开时旋转图也能居中） */
.product-image-placeholder {
  position: absolute;
  inset: 0;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-placeholder .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #222;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.product-image-placeholder .loading-text {
  font-size: 14px;
  color: #666;
  font-family: var(--font-primary);
}

.product-image-placeholder .error-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.product-image-placeholder .error-icon {
  font-size: 24px;
  color: #dc2626;
}

.product-image-placeholder .error-text {
  font-size: 12px;
  color: #dc2626;
  font-family: var(--font-primary);
}

/* 加载中占位符样式（填满占位区并居中 spinner） */
.product-image-placeholder .loading-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.product-image-placeholder .loading-placeholder .loading-text {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  font-weight: 500;
}

.product-card:hover .product-image img {
  transform: scale(1.02);
}

.product-status {
  position: absolute;
  top: 6px;
  right: 4px;
  background: transparent;
  color: rgb(78, 78, 78);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.product-info {
  padding: 12px 0;
}

.product-brand {
  font-size: 12px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.2;
}

.product-name {
  font-size: 13px;
  font-weight: 400;
  color: #222;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-translated-name {
  font-size: 11px;
  color: #a7a7a7;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

/* 快速配送和쿠폰标签 */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
}

.product-tag.delivery {
  background: #f2f9f6;
  color: #31b46e;
}

.product-tag.coupon {
  background: #f4f4f4;
  color: #828b9d;
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.2;
}

.product-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #666;
  line-height: 1.2;
}

.product-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* 分页控制 */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--chip-bg);
  margin-top: 30px;
}

.pagination-info {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--sub);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-controls .page-info {
  font-size: 14px;
  color: #666;
  min-width: 60px;
  text-align: center;
}

.page-btn {
  padding: 12px 20px;
  border: 2px solid var(--text);
  background: var(--text);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: white;
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--sub);
}

.search-loading {
  text-align: center;
  margin-top: 120px;
  padding: 80px 20px;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 18px;
  color: var(--sub);
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--sub);
  border-radius: 50%;
  animation: dots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dots {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 小尺寸 loading-spinner（详情页等上下文） */
.detail-loading .loading-spinner,
.search-loading ~ .loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================
   KREAM 统一 Header（主页/登录/后台共用）
   完全自包含：不依赖任何页面的全局 reset
   ============================================================ */

/* 盒子图标 SVG（全站统一替换 📦） */
.icon-box { display: inline-flex; align-items: center; justify-content: center; }
.icon-box svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 入库/下载图标 SVG（全站统一替换 📥） */
.icon-inbox { display: inline-flex; align-items: center; justify-content: center; }
.icon-inbox svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 购物车图标 SVG（全站统一替换 🛒） */
.icon-cart { display: inline-flex; align-items: center; justify-content: center; }
.icon-cart svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 得物图标 SVG（价格对比等处替换 🛍️得物） */
.icon-dewu { display: inline-flex; align-items: center; justify-content: center; }
.icon-dewu svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* KREAM logo SVG（商品详情价格表等处替换 KREAM 文字） */
.icon-kream { display: inline-flex; align-items: center; justify-content: center; }
.icon-kream svg { width: 40px; height: 15px; max-width: 100%; vertical-align: middle; flex-shrink: 0; }

/* 热门/火焰图标 SVG（全站统一替换 🔥） */
.icon-hot { display: inline-flex; align-items: center; justify-content: center; }
.icon-hot svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 清单/库存图标 SVG（全站统一替换 📋） */
.icon-inventory { display: inline-flex; align-items: center; justify-content: center; }
.icon-inventory svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 键盘图标 SVG（全站统一替换 ⌨️） */
.icon-keyboard { display: inline-flex; align-items: center; justify-content: center; }
.icon-keyboard svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 手机扫码/二维码图标 SVG（入库/发货等处替换 📱） */
.icon-qrcode { display: inline-flex; align-items: center; justify-content: center; }
.icon-qrcode svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 摄像头图标 SVG（全站统一替换 📷） */
.icon-camera { display: inline-flex; align-items: center; justify-content: center; }
.icon-camera svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 韩元/人民币切换按钮图标 */
.icon-krw { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2em; }
.icon-krw svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }
.icon-rmb { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2em; }
.icon-rmb svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 原始价/到手价切换按钮图标 */
.icon-net { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2em; }
.icon-net svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }
.icon-delivered { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2em; }
.icon-delivered svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* 国内比价按钮图标（下载） */
.icon-download { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2em; }
.icon-download svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

/* --- 统一字体 + 固定顶部 --- */
#kreamHeaderMount {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
}

/* --- 顶部小字链接栏 --- */
.kream-header-top {
  position: relative;
  z-index: 5;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.kream-header-top .top_inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 22px;
  padding: 6px 40px 0;
  max-width: 1360px;
  margin: 0 auto;
  box-sizing: border-box;
}

.kream-header-top .top_list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.kream-header-top .top_list li {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.kream-header-top .top_link,
.kream-header-top .top_link:link,
.kream-header-top .top_link:visited,
.kream-header-top .top_link:hover,
.kream-header-top .top_link:active {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.06px;
  color: rgba(34,34,34,0.8);
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none !important;
  margin: 0;
  padding: 0;
}

.kream-header-top .top_link:hover {
  color: #222;
}

/* --- 主导航栏（Logo） --- */
.kream-header-main {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-bottom: none;
}

.kream-header-main .main_inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.kream-header-main .header-logo {
  padding-left: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  flex-shrink: 0;
}

.kream-header-main .header-logo:hover { opacity: 0.8; }
.kream-header-main .header-logo:active { opacity: 0.6; }
/* 右侧 VIP logo（略大于 KREAM 字高，与 KREAM 留小间距） */
.kream-header-main .header-logo .header-cnlogo {
  width: auto;
  height: 30px;
  max-height: 30px;
  margin-left: 3px;
  vertical-align: top;
}

/* --- 主导航 GNB（HOME / SHOP） --- */
.gnb_area {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.gnb_list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnb_item {
  margin: 0 0 0 24px;
  padding: 0;
}

.gnb_item .gnb_link,
.gnb_item .gnb_link:link,
.gnb_item .gnb_link:visited,
.gnb_item .gnb_link:hover,
.gnb_item .gnb_link:active {
  display: flex;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: #222;
  text-decoration: none !important;
  position: relative;
  transition: opacity 0.15s;
}

.gnb_item .gnb_link.active {
  font-weight: 700;
}

.gnb_item .gnb_link:hover {
  opacity: 0.6;
}

/* --- TOOLS 下拉菜单 --- */
.gnb_item_tools {
  position: relative;
}
/* TOOLS 右侧下拉指示（小三角） */
.gnb_tools_chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  opacity: 0.7;
  vertical-align: middle;
}
.gnb_tools_chevron svg {
  display: block;
}
.gnb_dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: 8px;
  z-index: 1000;
  animation: gnbDropFade .15s ease;
}
.gnb_dropdown.open { display: block; }
@keyframes gnbDropFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.gnb_dropdown_item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #222;
  text-decoration: none !important;
  transition: background .15s;
}
.gnb_dropdown_item:hover { background: #f5f5f5; }
.gnb_dropdown_item svg { flex-shrink: 0; color: #666; }
.gnb_dropdown_title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.gnb_dropdown_desc {
  display: block;
  font-size: 11px;
  color: #999;
  line-height: 1.3;
  margin-top: 2px;
}

/* --- 全局搜索按钮（放大镜） --- */
.gnb_search_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  color: #222;
  line-height: 1;
}
.gnb_search_btn:hover {
  background: #f0f0f0;
}
.gnb_search_btn:active {
  transform: scale(0.92);
}
.gnb_search_btn svg {
  display: block;
}

/* --- 全局搜索栏（覆盖层） --- */
.global-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  pointer-events: none;
}
.global-search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.global-search-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.global-search-input {
  flex: 1;
  border: none;
  border-bottom: 2px solid #e8e8e8;
  font-size: 22px;
  font-weight: 600;
  font-family: inherit;
  padding: 12px 0;
  outline: none;
  background: transparent;
  color: #333;
  letter-spacing: -0.15px;
  transition: border-color 0.2s;
}
.global-search-input:focus {
  border-bottom-color: #aaa;
}
.global-search-input::placeholder {
  color: #ccc;
  font-weight: 400;
}
.global-search-close {
  background: none;
  border: none;
  font-size: 28px;
  color: rgba(34,34,34,0.25);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.global-search-close:hover {
  color: #666;
}
/* 搜索栏打开时的背景遮罩 */
.global-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(255,255,255,0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}
.global-search-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* --- 响应式 --- */
@media (max-width: 1200px) {
  .kream-header-top .top_inner {
    padding: 6px 32px 0;
  }
  .kream-header-main .main_inner {
    padding: 0 32px;
  }
}

@media (max-width: 960px) {
  .kream-header-top .top_inner {
    padding: 6px 24px 0;
  }
  .kream-header-main .main_inner {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .kream-header-top .top_inner {
    padding: 6px 16px 0;
    min-height: 22px;
  }
  .kream-header-top .top_link,
  .kream-header-top .top_link:link,
  .kream-header-top .top_link:visited,
  .kream-header-top .top_link:hover,
  .kream-header-top .top_link:active {
    font-size: 12px;
    line-height: 1.2;
    -webkit-text-size-adjust: 100%;
  }
  .kream-header-main .main_inner {
    padding: 0 16px;
    height: 52px;
  }
  .kream-header-main .header-logo {
    padding-left: 0;
    /* 手机版 Logo 略大以便识别 */
  }
  .kream-header-main .header-logo svg {
    width: 98px;
    height: auto;
    max-height: 24px;
  }
  .kream-header-main .header-logo img,
  .kream-header-main .header-logo .header-cnlogo {
    height: 24px !important;
    max-height: 24px;
    width: auto;
  }
  .kream-header-main .header-logo .header-cnlogo {
    margin-left: 4px;
  }
  .gnb_item {
    margin-left: 10px;
  }
  .gnb_item .gnb_link {
    font-size: 14px;
    padding: 10px 2px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .gnb_search_btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .gnb_area {
    flex-shrink: 0;
    min-width: 0;
  }
  .gnb_item_tools {
    position: static;
  }
  .gnb_dropdown {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: auto;
    min-width: 0;
    width: auto;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    z-index: 1100;
    animation: gnbDropMobile .2s ease;
  }
  @keyframes gnbDropMobile {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .gnb_dropdown_item {
    padding: 14px 16px;
  }
  .global-search-bar {
    padding: 20px 16px;
  }
  .global-search-input {
    font-size: 18px;
  }
}

/* 超小屏：Logo 略大以便识别，同时保证搜索图标可见 */
@media (max-width: 480px) {
  .kream-header-main .main_inner {
    padding: 0 12px;
  }
  .kream-header-main .header-logo svg {
    width: 78px;
    max-height: 20px;
  }
  .kream-header-main .header-logo img,
  .kream-header-main .header-logo .header-cnlogo {
    height: 20px !important;
    max-height: 20px;
    width: auto;
  }
  .kream-header-main .header-logo .header-cnlogo {
    margin-left: 3px;
  }
  .gnb_item {
    margin-left: 6px;
  }
  .gnb_item .gnb_link {
    font-size: 12px;
    padding: 8px 2px;
  }
  .gnb_search_btn {
    min-width: 40px;
    min-height: 40px;
    padding: 2px;
  }
  .gnb_search_btn svg {
    width: 20px;
    height: 20px;
  }
}

/* 页面全屏时：header 与下方内容一致铺满，左右留白对齐 */
body.page-fullscreen .kream-header-top .top_inner,
body.page-fullscreen .kream-header-main .main_inner {
  max-width: none;
  width: 100%;
  padding-left: 24px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* 首页/搜索等使用 .wrap 的页面：下方主内容区也全屏 */
body.page-fullscreen .wrap {
  max-width: none;
  width: 100%;
  padding-left: 24px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* 全屏模式下搜索栏与最近搜索保持居中窄宽度，与非全屏一致 */
body.page-fullscreen .search_hdr,
body.page-fullscreen .recent-searches-section {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* 首页全屏时：最近浏览、收藏区域与热门搜索保持同一内容宽度（与 .wrap 内边距一致） */
body.page-fullscreen .recently-viewed-section,
body.page-fullscreen .saved-products-home-section {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* 搜索页面全屏时：每行显示 7 个商品 */
body.page-fullscreen .section .products-grid {
  grid-template-columns: repeat(7, 1fr);
}

/* 我的页面 (/my) 使用 .container-my：下方主内容区也全屏（与 admin.css 保持一致，确保全站生效） */
body.page-fullscreen .container-my {
  max-width: none;
  width: 100%;
  padding-left: 24px;
  padding-right: 16px;
  box-sizing: border-box;
}



/* 全屏切换按钮（与右上角铃铛左对齐：right 与 .global-notify-bell 一致，同宽同右缘） */
.btn-page-fullscreen {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 900;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(34,34,34,0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  color: #222;
  transition: background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-page-fullscreen:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.btn-page-fullscreen:active {
  background: #eee;
}
.btn-page-fullscreen svg {
  width: 20px;
  height: 20px;
}
.btn-page-fullscreen.exit-fullscreen svg.expand-icon { display: none; }
.btn-page-fullscreen.exit-fullscreen svg.shrink-icon { display: block; }
.btn-page-fullscreen svg.expand-icon { display: block; }
.btn-page-fullscreen svg.shrink-icon { display: none; }
@media (max-width: 768px) {
  .btn-page-fullscreen {
    display: none !important; /* 手机版不显示全屏按钮 */
  }
}

/* 临时禁用 Pretendard，使用系统默认字体看效果（恢复时删掉下面这段即可） */
body, #kreamHeaderMount {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

/* product-cards.css - Auto-split from styles.css */
.no-results {
  text-align: center;
  padding: 40px;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
  margin: 0 auto;
  grid-column: 1 / -1;
}

/* sort-filter.css - 搜索结果排序/筛选组件 */

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
}

.sort-filter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.search-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #d3d3d3;
  border-radius: 18px;
  background: #fff;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.search-toggle-btn:hover {
  background: #f5f5f5;
  border-color: #222;
}

.sort-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #d3d3d3;
  border-radius: 18px;
  background: #fff;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.sort-btn:hover {
  background: #f5f5f5;
  border-color: #222;
}
.sort-btn.active {
  border-color: #222;
}

.sort-current {
  font-size: 12px;
}

.sort-arrow {
  width: 14px;
  height: 14px;
  transition: transform .2s;
  flex-shrink: 0;
}
.sort-btn.active .sort-arrow {
  transform: rotate(180deg);
}

.sort-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 100;
  padding: 6px 0;
  list-style: none;
  margin: 0;
}
.sort-dropdown.show {
  display: block;
}

.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 13px;
  color: #222;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.sort-item:hover {
  background: #f5f5f5;
}
.sort-item.active {
  font-weight: 600;
}

.sort-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: none;
}
.sort-item.active .sort-check {
  display: block;
}

/* SHOP 分类导航栏（KREAM 风格） */
.shop-tabs {
  margin: 24px 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.shop-tabs .shop-tabs-ul {
  display: inline-flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 8px 0 6px;
  white-space: nowrap;
  min-width: min-content;
}
.shop-tabs .shop-tabs-li {
  flex-shrink: 0;
}
.shop-tabs .shop-tabs-a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: #222;
  text-decoration: none;
  border-radius: 18px;
  transition: background .15s, color .15s;
}
/* 未选中：正常字重，仅选中项加粗 */
.shop-tabs .shop-tabs-a:not(.active) {
  font-weight: 400;
}
.shop-tabs .shop-tabs-a:hover {
  background: #f5f5f5;
}
.shop-tabs .shop-tabs-a.active {
  font-weight: 600;
  background: #222;
  color: #fff;
}

/* SHOP 第二行快捷入口（봄 위시리스트、지금 인기 等） */
.shop-shortcuts-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.shop-shortcuts-scroll {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0 14px;
  min-width: min-content;
}
.shop-shortcut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 80px;
  text-decoration: none;
  color: #222;
}
.shop-shortcut-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}
.shop-shortcut-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-shortcut-label {
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  max-width: 80px;
}
@media (min-width: 768px) {
  .shop-shortcut-item { width: 96px; }
  .shop-shortcut-img { width: 96px; height: 96px; }
  .shop-shortcut-label { max-width: 96px; }
}

/* 小分类区域内的加载动画（与页面 loading 一致，尺寸略小） */
.shop-shortcuts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 16px 0;
}
.shop-shortcuts-loading .loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.shop-shortcuts-loading .loading-spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
.shop-shortcuts-loading .loading-dots span {
  width: 6px;
  height: 6px;
}

/* product-detail.css - Auto-split from styles.css */

/* 商品详情页面：与 header Logo 左对齐（.wrap 已有 40px 左内边距，此处左侧不再加 padding） */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 20px 0;
}

/* 商品详情页图标：包裹/盒子 SVG（替换 📦） */
.icon.icon-package { display: inline-flex; align-items: center; }
.icon.icon-package svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 闪电图标 SVG（替换 ⚡） */
.icon.icon-flash { display: inline-flex; align-items: center; }
.icon.icon-flash svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 95分/奖章图标 SVG（替换 🧪） */
.icon.icon-flask { display: inline-flex; align-items: center; }
.icon.icon-flask svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 差价/金额图标 SVG（替换 💰） */
.icon.icon-dollar { display: inline-flex; align-items: center; }
.icon.icon-dollar svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 天马/店铺图标 SVG（替换 🏪） */
.icon.icon-tianma { display: inline-flex; align-items: center; }
.icon.icon-tianma svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 共鞋出货/店铺图标 SVG（替换 🏭） */
.icon.icon-store { display: inline-flex; align-items: center; }
.icon.icon-store svg { width: 1em; height: 1em; vertical-align: -0.15em; }

/* 商品详情加载状态 */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  font-size: 18px;
  color: #666;
}


.detail-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid #ebebeb;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.detail-search-btn:hover {
  background: #f5f5f5;
  border-color: #d5d5d5;
}

.detail-search-btn svg {
  width: 18px;
  height: 18px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-button:hover {
  opacity: 0.7;
}

.back-icon {
  width: 20px;
  height: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 560px 1fr;
  gap: 80px;
  margin-bottom: 40px;
  position: relative;
}

.detail-content::before {
  content: '';
  position: absolute;
  left: 600px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #ebebeb;
  z-index: 1;
}

/* 左侧图片区域 */
.detail-left {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.image-gallery {
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
}

.main-image-container {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
}

.main-image-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.main-image-loading .loading-spinner {
  width: 40px;
  height: 40px;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumbnails {
  display: flex;
  gap: 8px;
  padding: 16px;
  overflow-x: auto;
}

.thumbnail {
  width: 60px;
  height: 60px;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: #222;
}

/* 图片加载状态 */
.image-loader,
.thumbnail-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  border-radius: 8px;
  min-height: 100px;
}

.thumbnail-loader {
  min-height: 60px;
  border-radius: 6px;
}

.image-error {
  color: #999;
  font-size: 12px;
  text-align: center;
}

.thumbnail-container {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  transition: border-color 0.2s;
}

.thumbnail-container:hover,
.thumbnail-container.active {
  border-color: #222;
}

/* 右侧信息区域 */
.detail-right {
  padding-top: 0;
  padding-left: 0;
}

.detail-right .product-info {
  padding: 0;
  margin: 0;
}

.product-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.product-subtitle {
  font-size: 14px;
  color: var(--sub);
  margin: 0;
  font-weight: 400;
  transition: color 0.2s ease;
}

.product-subtitle:hover {
  color: #3366cc;
  text-decoration: underline;
}

.product-dewu-title {
  margin: 0 0 8px 0;
}

/* 货号、30日得物销量：标签药丸形背景 */
.dewu-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 0;
}
.dewu-meta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--chip-bg, #f4f4f4);
  color: var(--chip-text, #222);
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
}

/* 商品详情页：副标题与分类同一行 */
.subtitle-with-category {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px 0;
}
/* 评价/收藏/销量未获取时，收藏按钮放在副标题同一行 */
.subtitle-with-category.subtitle-row-with-save {
  align-items: center;
}
.subtitle-with-category.subtitle-row-with-save .save-product-btn {
  flex-shrink: 0;
}
.product-category-row {
  display: none;
}
.product-category-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--chip-bg, #f4f4f4);
  color: var(--chip-text, #222);
  font-size: 13px;
  font-weight: 500;
}

.rating-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.star-icon {
  width: 16px;
  height: 16px;
}

.review-count {
  font-size: 13px;
  color: var(--sub);
}

.wish-count {
  font-size: 13px;
  color: var(--sub);
}

.transaction-count {
  font-size: 13px;
  color: var(--sub);
}

.price-section {
  margin-bottom: 16px;
}

.current-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-size: 14px;
  color: var(--sub);
}

.price-amount {
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
}

.product-details-table {
  margin-bottom: 12px;
  margin-left: 0;
  padding-left: 0;
}

/* 商品详情容器 */
.product-details {
  margin-bottom: 12px;
}

/* 🆕 尺码价格显示区域 */
.size-prices-section {
  margin-top: 30px;
  margin-bottom: 20px;
}

.size-prices-section .section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.size-prices-body {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.size-price-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.size-price-row:last-child {
  border-bottom: none;
}

.size-price-row:hover {
  background-color: #fafafa;
}

.size-price-cell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-price-cell.size-cell {
  font-weight: 600;
  color: #222;
  min-width: 60px;
  flex: 0 0 60px; /* 固定宽度 */
}

.size-price-cell.price-cell {
  justify-content: flex-start;
  flex: 1; /* 价格单元格平均分配剩余空间 */
}

.size-price-cell .price-label {
  font-size: 13px;
  color: #777;
  min-width: 50px;
  white-space: nowrap;
}

.size-price-cell .price-value {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.sales-header {
  display: table;
  width: 100%;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.sales-header .sales-cell {
  display: table-cell;
  width: 20%;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-align: center;
  border-right: 1px solid #e0e0e0;
  vertical-align: middle;
  box-sizing: border-box;
  min-height: 40px;
  line-height: 1.4;
}

.sales-header .sales-cell:last-child {
  border-right: none;
}

.sales-body {
  max-height: 300px;
  overflow-y: auto;
  display: table;
  width: 100%;
}

.sales-row {
  display: table-row;
  border-bottom: 1px solid #f0f0f0;
}

.sales-row:last-child {
  border-bottom: none;
}

.sales-row:hover {
  background: #f8f9fa;
}

.sales-row .sales-cell {
  display: table-cell;
  width: 20%;
  padding: 10px 8px;
  font-size: 14px;
  color: #333;
  text-align: center;
  border-right: 1px solid #f0f0f0;
  vertical-align: middle;
  box-sizing: border-box;
  word-break: break-word;
  overflow: hidden;
  min-height: 48px;
  line-height: 1.4;
}

.sales-row .sales-cell:last-child {
  border-right: none;
}

.sales-row .sales-cell:first-child {
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.sales-row .sales-cell:first-child .eu-size {
  color: #666;
  font-size: 11px;
  font-weight: 400;
}

/* 商品详情行样式 */
.detail-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 4px;
}

.detail-row .detail-label {
  min-width: 60px;
  flex-shrink: 0;
}

.detail-row .detail-value {
  flex: 1;
}

.details-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.details-content {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.detail-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 0;
  height: auto;
  flex: none;
}

.detail-item:not(:first-child)::before {
  content: '|';
  color: #d3d3d3;
  margin: 0 10px;
  font-size: 12px;
}

.detail-label {
  font-size: 12px;
  color: #999;
  letter-spacing: -0.33px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.detail-value {
  font-size: 12px;
  color: #222;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  max-width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🆕 货号点击复制样式（支持手机和电脑） */
.detail-value.copy-article-number {
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;
}

.detail-value.copy-article-number:hover {
  color: #2196F3;
  background-color: rgba(33, 150, 243, 0.08);
}

.detail-value.copy-article-number:active {
  color: #1976D2;
  background-color: rgba(33, 150, 243, 0.15);
}

/* 货号需要完整显示 */
#modelNumber {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* 商品详情展开按钮 */
.details-expand-btn {
  margin-left: 10px;
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
  padding: 0 4px;
  flex-shrink: 0;
  z-index: 2;
}

.details-expand-btn:hover {
  color: #222;
}

/* 商品详情模态框 */
.product-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-details-modal-content {
  background: var(--bg);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-details-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #ebebeb;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg, #fff);
  border-radius: 12px 12px 0 0;
}

.product-details-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.product-details-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.product-details-modal-close:hover {
  background: #f4f4f4;
  color: #222;
}

.product-details-modal-body {
  padding: 24px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f4f4f4;
}

.modal-detail-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modal-detail-label {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.modal-detail-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  word-wrap: break-word;
}

/* 发售价单行显示 */
#releasePrice {
  line-height: 1.4;
  white-space: nowrap;
}

/* 最近成交价字体大小 */
#recentPrice {
  font-size: 14px;
}

/* 价格历史区域 */
.price-history-section {
  margin-top: 15px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px 0;
}

.price-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #ebebeb;
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.tab-button:hover {
  color: var(--text);
}

.price-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebebeb;
}

/* 手机版在 responsive-mobile.css 中改为 overflow: auto 并限制高度以显示滚动条 */

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th {
  background: #f8f8f8;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  border-bottom: 1px solid #ebebeb;
}

.price-table th.align-right {
  text-align: right;
}

.price-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
}

/* 尺码信息区域样式 */
.size-info-section {
  margin-top: 24px;
  border-top: 1px solid #ebebeb;
  padding-top: 20px;
}

.size-info-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
}

/* 尺码信息表格样式 */
.size-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  margin-top: 0;
}

.size-table-wrapper {
  overflow-x: auto;
  position: relative;
}

.size-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.size-table th {
  background: #f8f8f8;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #f0f0f0;
  white-space: nowrap;
  min-width: 40px;
  vertical-align: middle;
}

.size-table th.pin {
  background: #f5f5f5;
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 60px;
  color: #333;
}

.size-table th.column_header {
  background: #f8f8f8;
  font-size: 12px;
  padding: 8px 4px;
}

.size-table td {
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid #f5f5f5;
  border-right: 1px solid #f5f5f5;
  text-align: center;
  white-space: nowrap;
  min-width: 40px;
  vertical-align: middle;
}

.size-table th.row_header {
  background: #f0f0f0;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 8px;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 60px;
  vertical-align: middle;
}

.size-table th.row_header,
.size-table td {
  border-right: 1px solid #f0f0f0;
}

.size-table th.row_header:last-child,
.size-table td:last-child {
  border-right: none;
}

.size-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* EU行高亮显示 */
.size-table tbody tr.highlight-eu {
  background-color: #f5f5f5;
  font-weight: 600;
}

.size-table tbody tr.highlight-eu:hover {
  background-color: #eeeeee;
}


.price-table td.align-right {
  text-align: right;
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================== 我的库存信息卡片 ==================== */
.my-stock-section {
  margin: 16px 0 0;
  border: 1px solid #e2e6ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.my-stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0f2f8 0%, #e6eaf2 100%);
  border-bottom: 1px solid #e2e6ec;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.my-stock-header:hover {
  background: linear-gradient(135deg, #e8ebf4 0%, #dde2ee 100%);
}

.my-stock-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.my-stock-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5b6abf;
  color: #fff;
  border-radius: 6px;
}

.my-stock-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.my-stock-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #5b6abf;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.my-stock-badge.transit {
  background: #f57c00;
}

.my-stock-badge.sold {
  background: #43a047;
}

.my-stock-chevron {
  font-size: 11px;
  color: #aaa;
  transition: transform 0.25s;
}

.my-stock-section.collapsed .my-stock-chevron {
  transform: rotate(-90deg);
}

.my-stock-section.collapsed .my-stock-body {
  display: none;
}

.my-stock-body {
  padding: 10px 12px 12px;
}

.my-stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.my-stock-stat {
  flex: 1;
  min-width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 6px;
  background: #f5f7fb;
  border-radius: 8px;
  border: 1px solid #eaecf2;
}

.my-stock-stat.transit {
  background: #fff8e1;
  border-color: #ffe0b2;
}

.my-stock-stat-label {
  font-size: 10px;
  color: #999;
  margin-bottom: 2px;
  font-weight: 500;
}

.my-stock-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.my-stock-stat-value.positive {
  color: #e53935;
}

.my-stock-stat-value.negative {
  color: #1976d2;
}

.my-stock-divider {
  height: 1px;
  background: #eef0f4;
  margin: 10px 0;
}

.my-stock-detail-title {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.my-stock-detail-title .count {
  color: #aaa;
  font-weight: 400;
  font-size: 10px;
}

/* 库存表格 */
.my-stock-table {
  border: 1px solid #eaecf2;
  border-radius: 8px;
  overflow: hidden;
}

.my-stock-table-head {
  display: flex;
  background: #f5f7fb;
  border-bottom: 1px solid #eaecf2;
  padding: 5px 0;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.my-stock-table-head.sold {
  background: #f0faf0;
  border-color: #d6ecd6;
}

.my-stock-table-row {
  display: flex;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.my-stock-table-row:last-child {
  border-bottom: none;
}

.my-stock-table-row:hover {
  background: #fafbfe;
}

.my-stock-table-head span,
.my-stock-table-row span {
  text-align: center;
}

.col-size {
  flex: 0 0 20%;
  font-weight: 600;
  color: #333;
}

.col-qty {
  flex: 0 0 15%;
  color: #666;
}

.col-cost {
  flex: 0 0 22%;
  color: #666;
}

.col-sell {
  flex: 0 0 22%;
  color: #444;
}

.col-profit {
  flex: 0 0 21%;
  font-weight: 700;
}

.col-profit.positive {
  color: #e53935;
}

.col-profit.negative {
  color: #1976d2;
}

.col-sell .waiting {
  color: #ccc;
  font-size: 10px;
  font-style: italic;
}

/* Restock suggestion banner */
.restock-hint-banner {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}

.restock-hint-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #e65100;
  margin-bottom: 4px;
}

.restock-hint-title svg {
  flex-shrink: 0;
}

.restock-hint-desc {
  font-size: 10px;
  color: #bf6c00;
  margin-bottom: 8px;
}

.restock-hint-table {
  border: 1px solid #ffe082;
  border-radius: 6px;
  overflow: hidden;
}

.restock-hint-head {
  display: flex;
  background: rgba(255, 224, 130, 0.35);
  padding: 4px 0;
  font-size: 10px;
  font-weight: 600;
  color: #8d6e00;
}

.restock-hint-row {
  display: flex;
  padding: 5px 0;
  font-size: 12px;
  border-top: 1px solid #ffe9a0;
}

.restock-hint-head span,
.restock-hint-row span {
  text-align: center;
}

.rh-size {
  flex: 0 0 20%;
  font-weight: 600;
  color: #333;
}

.rh-cost {
  flex: 0 0 25%;
  color: #666;
}

.rh-sell {
  flex: 0 0 25%;
  color: #444;
}

.rh-margin {
  flex: 0 0 30%;
  font-weight: 700;
}

.rh-margin.positive {
  color: #e53935;
}

.rh-margin small {
  font-weight: 400;
  font-size: 10px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .my-stock-section {
    margin: 12px 0 0;
  }
  .my-stock-summary {
    gap: 4px;
  }
  .my-stock-stat {
    min-width: 60px;
    padding: 5px 4px;
  }
  .my-stock-stat-value {
    font-size: 13px;
  }
  .col-size { flex: 0 0 18%; }
  .col-qty { flex: 0 0 14%; }
  .col-cost { flex: 0 0 22%; }
  .col-sell { flex: 0 0 22%; }
  .col-profit { flex: 0 0 24%; }
  .rh-size { flex: 0 0 18%; }
  .rh-cost { flex: 0 0 24%; }
  .rh-sell { flex: 0 0 24%; }
  .rh-margin { flex: 0 0 34%; }
}

/* responsive-search.css - Auto-split from styles.css */

/* 响应式设计 */
@media (max-width: 1024px) {
  .detail-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .detail-content::before {
    display: none;
  }
  
  .detail-right {
    padding-left: 0;
  }
  
  .detail-left {
    position: static;
  }
  
  .product-detail {
    padding: 20px 24px;
  }
}

@media (max-width: 768px) {
  .product-detail {
    padding: 20px 16px;
  }
  
  .product-title {
    font-size: 20px;
  }
  
  .product-subtitle {
    font-size: 14px;
  }
  
  .price-amount {
    font-size: 24px;
  }
  
  .detail-item {
    height: auto;
    min-height: 48px;
    padding-right: 8px;
  }
  
  .detail-value {
    max-width: 232px;
    min-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.no-results h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.no-results p {
  font-size: 14px;
  color: var(--sub);
}

/* 响应式设计 */
@media (min-width: 1281px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px 16px;
  }
}

@media (max-width: 1280px) {
  .wrap {
    max-width: 100%;
    padding: 0 40px;
  }
  
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px 14px;
  }
}

@media (max-width: 1200px) {
  .wrap {
    padding: 0 32px;
  }
  
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px 12px;
  }
}

@media (max-width: 960px) {
  .wrap {
    padding: 0 24px;
  }
  
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px 10px;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 20px;
  }
  
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 8px;
  }
  
  .product-status {
    font-size: 12px;
    top: 6px;
    right: 4px;
    padding: 3px 6px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  
  .ipt {
    font-size: 20px;
  }
  
  .search-loading {
    margin-top: 100px;
    padding: 60px 16px;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
  }
  
  .loading-text {
    font-size: 16px;
  }
  
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px 6px;
  }
  
  .product-info {
    padding: 10px 0 0 0;
  }
  
  .product-name {
    font-size: 12px;
  }
  
  .product-translated-name {
    font-size: 10px;
  }
  
  .product-price {
    font-size: 13px;
  }
  
  .product-status {
    font-size: 12px;
    top: 6px;
    right: 4px;
    padding: 2px 4px;
  }
  
  .pagination {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px 4px;
  }
  
  .product-image {
    border-radius: 8px;
  }
  
  .product-status {
    font-size: 12px;
    top: 6px;
    right: 4px;
    padding: 2px 4px;
  }
}

/* 主图片容器样式 */
.main-image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 560px;
  aspect-ratio: 1;
  background-color: #f4f4f4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* related-products.css - Auto-split from styles.css */

/* 同款商品区域 */
.related-products-section {
    margin: 20px 0 0 0;
    padding: 0;
}

.related-products-section .section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
}

.product-linked-group-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.product-linked-group-list::-webkit-scrollbar {
  height: 6px;
}

.product-linked-group-list::-webkit-scrollbar-track {
  background: transparent;
}

.product-linked-group-list::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 3px;
}

.product-linked-group-list::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

.linked-group-item {
  flex: 0 0 auto;
}

.content_image.border.linked_product_image {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid #EBEBEB;
  background-color: #f4f4f4;
}

.content_image.border.linked_product_image:hover {
  transform: scale(1.05);
  border-color: #222;
}

.content_image.border.linked_product_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 价格参数显示样式 */
.section-title-with-params {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.price-params-display {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.param-display {
  font-size: 12px;
  color: #666;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

/* 价格显示样式 */
.price-original {
  font-size: 12px;
  color: #666;
  text-decoration: line-through;
  opacity: 0.7;
  line-height: 1.1;
  margin-bottom: 1px;
}

.price-final {
  font-size: 14px;
  font-weight: 600;
  color: #e74c3c;
  line-height: 1.1;
}

/* 🆕 获取价格按钮样式 */
.fetch-price-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.fetch-price-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

.fetch-price-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
}

.fetch-price-button:active {
  transform: translateY(0);
}

.fetch-price-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.fetch-icon {
  font-size: 18px;
}

/* 🆕 小尺寸获取价格按钮（放在设置信息后面） */
.fetch-price-button-small {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(255, 102, 0, 0.3);
}

.fetch-price-button-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.4);
}

.fetch-price-button-small:active {
  transform: translateY(0);
}

.fetch-price-button-small:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.fetch-price-button-small .fetch-icon {
  font-size: 14px;
}

/* 🆕 设置按钮样式 */
.settings-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.settings-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-button:active {
  transform: translateY(0);
}

.settings-icon {
  font-size: 18px;
}

/* 🆕 小尺寸设置按钮（放在设置信息后面） */
.settings-button-small {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.settings-button-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.settings-button-small:active {
  transform: translateY(0);
}

.settings-button-small .settings-icon {
  font-size: 14px;
}

/* 设置弹窗 - 统一区块与层级 */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.settings-modal-content {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #fff;
}

.settings-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.close-settings-button {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.close-settings-button:hover {
  background: #e2e8f0;
  color: #334155;
}

.settings-modal-body {
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.settings-modal-body label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
}

.settings-modal-body input[type="number"],
.settings-modal input[type="number"] {
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
  text-align: center !important;
}

.settings-modal-body input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}

/* 通用区块 */
.settings-section {
  margin-bottom: 18px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.settings-section-heading {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

.settings-section-desc {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #64748b;
}

.settings-section-desc:empty {
  display: none;
}

/* 汇率区块 */
.settings-section-rate .settings-rate-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-rate-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: #fff;
  border: 1px solid transparent;
}

.settings-rate-option:hover {
  background: #f1f5f9;
}

.settings-rate-option:has(input:checked) {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.settings-rate-option input[type="radio"] {
  accent-color: #3b82f6;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.settings-rate-name {
  flex: 1;
}

.settings-rate-value {
  font-weight: 600;
  color: #2563eb;
  font-size: 14px;
}

.settings-rate-option-custom {
  flex-wrap: wrap;
}

.settings-rate-custom-input {
  width: 76px;
  margin-left: auto;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  background: #fff;
  box-sizing: border-box;
}

.settings-rate-custom-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.settings-fee-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.settings-fee-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0 !important;
}

.settings-fee-input {
  width: 64px !important;
  min-width: 64px;
  padding: 8px 8px !important;
  border-radius: 8px !important;
}

/* 兼容旧结构（若有其他地方引用） */
.settings-params-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 16px;
}

.settings-params-left,
.settings-params-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-inline-label {
  flex: 0 0 auto;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600;
  color: #475569;
}

.settings-rate-input {
  width: 68px !important;
  min-width: 68px;
  margin-bottom: 0 !important;
  padding: 8px 6px !important;
  text-align: center !important;
}

.fetch-rate-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.settings-fee-input {
  width: 56px !important;
  min-width: 56px;
  margin-bottom: 0 !important;
  padding: 8px 6px !important;
  text-align: center !important;
}

.fetch-rate-btn:hover:not(:disabled) {
  background: #a7f3d0;
  color: #065f46;
}

.fetch-rate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 历史运费区块 */
.settings-section-history {
  margin-bottom: 18px;
}

.historical-shipping-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  user-select: none;
}

.historical-shipping-label input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.historical-shipping-text {
  font-weight: 600;
  flex: 1;
}

.historical-shipping-info {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

/* 按分类设置运费区块 */
.settings-section-shipping .settings-section-heading {
  margin-bottom: 6px;
}

.settings-section-shipping .settings-category-list {
  margin-top: 10px;
}

.settings-category-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  border: 1px solid #e2e8f0;
}

/* 每个大分类组 */
.settings-cat-group {
  display: flex;
  flex-direction: column;
}
.settings-cat-group.expanded {
  flex-basis: 100%;
}

.settings-big-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.settings-big-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* 🆕 当前分类高亮样式 */
.settings-big-chip.current-category-highlight {
  border: 2px solid #007bff;
  background: #e7f3ff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.settings-category-row.current-category-highlight {
  background: #e7f3ff;
  border-radius: 6px;
  padding: 4px;
  margin: -4px;
}

.settings-category-fee-input.current-category-highlight {
  border: 2px solid #007bff !important;
  background: #e7f3ff !important;
}

.settings-big-plus {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.settings-big-name {
  font-size: 13px;
  color: #334155;
  white-space: nowrap;
}

.settings-category-fee-input {
  width: 44px !important;
  min-width: 44px;
  padding: 4px 2px !important;
  font-size: 12px;
  text-align: center !important;
}

.settings-small-block {
  margin-top: 8px;
  padding: 10px;
  background: #e2e8f0;
  border-radius: 8px;
  box-sizing: border-box;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
}

.settings-cat-group.expanded .settings-small-block {
  display: grid;
}

.settings-small-block-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

.settings-category-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  padding-left: 4px;
}

.settings-category-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.settings-category-row label {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-category-row input,
.settings-category-row .settings-category-fee-input {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  margin-bottom: 0;
  padding: 5px 4px;
  font-size: 13px;
  text-align: center !important;
}

.settings-expand-small-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.settings-expand-small-btn:hover {
  background: #e5e7eb;
  color: #4f46e5;
}

.settings-category-small-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.settings-category-loading,
.settings-category-empty,
.settings-category-error {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.settings-category-error {
  color: #dc2626;
}

.settings-status {
  margin-top: 16px;
  margin-bottom: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  min-height: 20px;
}

.settings-status.success {
  color: #059669;
}

.settings-status.error {
  color: #dc2626;
}

.settings-modal-footer {
  padding: 18px 20px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.save-settings-button {
  width: 100%;
  padding: 14px 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.save-settings-button:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.save-settings-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.fetch-status {
  font-size: 13px;
  color: #666;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

/* 🆕 价格对比表格样式 - 完全按照Chrome插件样式 */
.price-comparison-section {
  margin: 15px 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #2b2d42;
}

.price-comparison-table {
  overflow-x: auto;
  margin-top: 15px;
  width: 100%;
}

.price-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
  max-width: 100%;
}

.price-comparison-table thead tr {
  background: #f2f2f2;
}

.price-comparison-table th {
  padding: 3px 2px;
  text-align: center;
  font-size: 11px;
  word-wrap: break-word;
}

.price-comparison-table td {
  padding: 3px 2px;
  text-align: center;
  border-bottom: 1px solid #eee;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-comparison-table tbody tr:hover {
  background: #f8f9fa;
}

.price-comparison-table tbody tr.highlight {
  background: rgba(40, 167, 69, 0.1);
}

/* 🆕 表格加载动画 */
.table-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px;
  min-height: 120px;
}

.table-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e9ecef;
  border-top: 3px solid #222;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 🆕 页面淡入效果 */
.detail-fade-in {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🆕 逐个元素依次淡入效果 */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 1.0s ease-out forwards;
}

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 不同元素的延迟时间（基础延迟0.6s + 每个间隔0.35s） */
.stagger-delay-1 { animation-delay: 0.6s; }
.stagger-delay-2 { animation-delay: 0.95s; }
.stagger-delay-3 { animation-delay: 1.3s; }
.stagger-delay-4 { animation-delay: 1.65s; }
.stagger-delay-5 { animation-delay: 2.0s; }
.stagger-delay-6 { animation-delay: 2.35s; }
.stagger-delay-7 { animation-delay: 2.7s; }
.stagger-delay-8 { animation-delay: 3.05s; }
.stagger-delay-9 { animation-delay: 3.4s; }

/* 🆕 表格淡入效果 */
.table-fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 🆕 图片切换按钮样式 */
.main-image-container {
  position: relative;
  cursor: pointer;
}

/* 🆕 主图放大镜图标 */
.main-image-zoom-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0.7;
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 5;
}

.main-image-zoom-icon svg {
  width: 18px;
  height: 18px;
}

.main-image-container:hover .main-image-zoom-icon {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

.main-image-zoom-icon:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .main-image-zoom-icon {
    width: 28px;
    height: 28px;
    right: 8px;
    bottom: 8px;
  }
  
  .main-image-zoom-icon svg {
    width: 16px;
    height: 16px;
  }
}

.image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.image-nav-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-nav-prev {
  left: 10px;
}

.image-nav-next {
  right: 10px;
}

/* 图片指示器 */
.image-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

/* 缩略图列表 */
.image-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.thumbnail-item {
  flex-shrink: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-item:hover {
  transform: scale(1.05);
}

.thumbnail-item.active {
  border-color: #222 !important;
}

.image-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-indicator.active {
  background: #222;
  width: 20px;
  border-radius: 4px;
}

.image-indicator:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* 🆕 同类商品区域样式 */
.related-products-section {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.product-linked-group-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.product-linked-group-list::-webkit-scrollbar {
  height: 4px;
}

.product-linked-group-list::-webkit-scrollbar-track {
  background: transparent;
}

.product-linked-group-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.linked-group-item {
  flex-shrink: 0;
  width: 45px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* 同款商品使用 <a> 以便右键「在新窗口中打开」 */
a.linked-group-item {
  text-decoration: none;
  color: inherit;
}

.linked-group-item:hover {
  transform: translateY(-2px);
}

.linked-group-item .item-image {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  background: #f4f4f4;
  border: 1px solid #ebebeb;
}

.linked-group-item .item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 移动端完整响应式适配 → 见 responsive-mobile.css */

/* responsive-mobile.css - Auto-split from styles.css */

/* KR码括号部分：桌面单行，小屏换行 */
.col-kr { white-space: nowrap; }
.col-kr .kr-sub { /* 桌面：与数字同行显示 */ }
@media (max-width: 640px) {
    .col-kr { white-space: normal; }
    .col-kr .kr-sub { display: block; font-weight: normal; font-size: 0.78em; opacity: 0.55; line-height: 1.3; }
}

/* 全局移动端修复 */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.wrap {
  overflow-x: hidden;
}

.product-detail {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 小平板/大手机 (640px - 768px) */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
  }
  
  .product-card .img img {
    border-radius: 8px;
  }
  
  .product-card .title {
    font-size: 12px;
    margin-top: 8px;
  }
  
  .product-card .desc {
    font-size: 11px;
  }
  
  .product-card .amount {
    font-size: 13px;
  }
  
  .product-card .desc.express_mark {
    font-size: 10px;
  }
}

/* 手机设备 (max-width: 640px) */
@media (max-width: 640px) {
  .wrap {
    padding: 0 12px;
  }
  
  .logo {
    padding: 12px 0;
  }
  
  .logo svg {
    width: 90px;
    height: 20px;
  }
  
  .search_hdr {
    padding: 6px 0 2px;
  }
  
  .ipt {
    font-size: 18px;
    padding: 6px 0;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
  }
  
  .product-card .title {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }
  
  .product-card .desc {
    font-size: 10px;
  }
  
  .product-card .amount {
    font-size: 12px;
  }
  
  .product-status {
    font-size: 10px;
    padding: 2px 5px;
    top: 4px;
    right: 4px;
  }

  .product-card .product-info {
    padding-top: 8px;
  }

  .product-card .product-name {
    min-height: 0;
  }
  
  /* 分页控制 */
  .pagination-controls {
    gap: 8px;
  }
  
  .page-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* 小手机设备 (max-width: 480px) */
@media (max-width: 480px) {
  .wrap {
    padding: 0 10px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 6px;
  }
  
  .product-card .img {
    border-radius: 6px;
  }
  
  .product-card .title {
    font-size: 10px;
    margin-top: 6px;
  }
  
  .product-card .desc {
    font-size: 9px;
    margin-top: 2px;
  }
  
  .product-card .amount {
    font-size: 11px;
    margin-top: 4px;
  }
  
  .product-card .desc.express_mark {
    font-size: 9px;
    margin-top: 4px;
  }
}

/* ========================================
   商品详情页移动端适配
   ======================================== */
@media (max-width: 768px) {
  .product-detail {
    padding: 4px 12px 12px;
    border-radius: 0;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* 返回按钮 - 防止换行 */
  .detail-header {
    padding: 0;
    margin-left: -8px;
    margin-bottom: 4px;
  }
  
  .back-button {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 4px 10px 4px 6px;
    font-size: 14px;
    width: auto;
    height: auto;
  }
  
  .back-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  
  .detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    overflow-x: hidden;
  }
  .detail-content::before {
    display: none;
  }
  
  /* 左侧图片区域 */
  .detail-left {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: static;
  }
  
  .image-gallery {
    width: 100%;
    max-width: 100%;
  }
  
  .main-image-container {
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
  }
  
  .main-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  
  .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .image-nav-btn {
    width: 32px;
    height: 32px;
  }
  
  .image-nav-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .image-indicators {
    bottom: 8px;
    gap: 5px;
  }
  
  .image-indicator {
    width: 5px;
    height: 5px;
  }
  
  /* 同类商品 */
  .related-products-section {
    margin-top: 10px;
    padding-top: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }
  
  .product-linked-group-list {
    gap: 4px;
    max-width: 100%;
  }
  
  .linked-group-item {
    width: 36px;
  }
  
  .linked-group-item .item-image {
    width: 36px;
    height: 36px;
    border-radius: 4px;
  }
  
  /* 右侧信息区域 */
  .detail-right {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    margin-top: 6px;
  }
  
  .product-info {
    max-width: 100%;
    padding: 0;
    margin: 0;
    display: block !important;
  }

  .detail-right > .product-info {
    position: relative;
  }

  .detail-right > .product-info > .save-product-btn {
    position: absolute;
    top: 2px;
    right: 0;
    width: 36px;
    height: 36px;
  }

  .detail-right > .product-info > .save-product-btn svg {
    width: 22px;
    height: 22px;
  }

  .detail-right .product-info-left {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding-right: 40px;
  }
  
  .detail-right .product-title,
  .detail-right .product-subtitle {
    display: block !important;
    visibility: visible;
  }
  
  .detail-right .product-title {
    margin-bottom: 6px;
  }
  
  /* 确保所有模块宽度一致 */
  .product-details-table,
  .rating-section,
  .price-info-bar,
  .size-price-table-container,
  .settings-info-bar,
  .price-table,
  #tableDiv {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 详情页价格对比表格 - 手机版允许横向滚动以完整显示尺码 */
  .price-comparison-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  #priceComparisonTable.price-comparison-table {
    overflow-x: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .price-comparison-table table,
  .price-comparison-table .price-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    font-size: 9px !important;
  }
  .price-comparison-table th,
  .price-comparison-table td {
    padding: 7px 4px !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
  .price-comparison-table .settings-info-bar {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
  .price-comparison-table .settings-info-bar button {
    padding: 3px 6px !important;
    font-size: 9px !important;
  }
  
  .settings-info-bar {
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    justify-content: center !important;
  }
  
  .settings-info-bar > div {
    justify-content: center !important;
  }
  
  /* 隐藏整体对比放大镜（移动端每张图已有自己的放大功能） */
  .modal-compare-zoom-btn {
    display: none !important;
  }
  
  /* 价格对比弹窗 - 手机版：左右留 6px 空白，圆角 */
  #fullPriceModal .full-price-modal-content {
    max-width: calc(100% - 12px) !important;
    width: calc(100% - 12px) !important;
    margin: 0 auto !important;
    max-height: min(82vh, calc(100vh - 24px)) !important;
    border-radius: 10px !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }
  
  #fullPriceModal .full-price-modal-body {
    min-height: 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 弹窗头部紧凑 */
  #fullPriceModal .full-price-modal-content > div:first-child {
    padding: 8px 12px !important;
    flex-shrink: 0 !important;
  }
  #fullPriceModal .full-price-modal-content > div:first-child h3 {
    font-size: 14px !important;
  }
  
  /* 得物信息行紧凑 */
  #fullPriceModal .full-price-dewu-info-row {
    padding: 8px 10px !important;
    gap: 6px 8px !important;
  }
  #fullPriceModal .full-price-dewu-info-row .dewu-thumb,
  #fullPriceModal .full-price-dewu-info-row img {
    width: 36px !important;
    height: 36px !important;
  }
  #fullPriceModal .full-price-dewu-info-row > div:first-child {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
  #fullPriceModal .full-price-dewu-info-row > div[style*="flex:1"] {
    min-width: 0 !important;
  }
  #fullPriceModal .full-price-dewu-info-row > div[style*="flex:1"] > div:first-child {
    font-size: 12px !important;
  }
  #fullPriceModal .full-price-dewu-info-row button {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
  
  /* 价格对比弹窗表格 - 手机版完整显示，不允许横向滑动 */
  #fullPriceTableContainer {
    padding: 4px 4px 12px !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
  }
  
  #fullPriceTableContainer table {
    font-size: 9px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }
  
  #fullPriceTableContainer th,
  #fullPriceTableContainer td {
    padding: 3px 2px !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
  }
  
  #fullPriceTableContainer th:first-child,
  #fullPriceTableContainer td:first-child {
    padding: 3px 3px !important;
    white-space: nowrap;
  }
  
  .brand-name {
    font-size: 12px;
  }
  
  .product-title {
    font-size: 15px;
    word-break: break-word;
  }
  
  .product-subtitle {
    font-size: 11px;
    word-break: break-word;
    margin-bottom: 6px;
  }
  
  /* 评分区域 */
  .rating-section {
    padding: 4px 0;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .rating-number {
    font-size: 13px;
  }
  
  .review-count,
  .wish-count,
  .transaction-count {
    font-size: 11px;
  }
  
  /* 详情表格 - 紧凑横向显示 */
  .product-details-table {
    margin-bottom: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid #ebebeb;
    border-bottom: 1px solid #ebebeb;
    padding: 6px 0;
  }
  
  .details-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
    justify-content: flex-start;
  }
  
  .detail-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    padding: 0;
    min-height: auto;
    min-width: auto;
    max-width: none;
    flex: none;
  }
  
  .detail-item:not(:first-child)::before {
    content: '|';
    color: #d3d3d3;
    margin: 0 8px;
    font-size: 11px;
  }
  
  .detail-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 0;
  }
  
  .detail-value {
    font-size: 11px;
    color: #222;
    max-width: none;
  }
  
  /* 价格区域 */
  .price-section {
    padding: 12px 0;
  }
  
  .price-label {
    font-size: 10px;
  }
  
  .price-amount {
    font-size: 18px;
  }
  
  .original-price {
    font-size: 11px;
  }
  
  .discount-rate {
    font-size: 14px;
  }
  
  /* 商品信息区域 */
  .detail-box {
    padding: 0;
  }
  
  .detail-title {
    font-size: 11px;
    min-width: 60px;
  }
  
  /* 尺码表格 */
  .size-price-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  
  .size-price-table {
    font-size: 10px;
    min-width: 500px;
  }
  
  .size-price-table th,
  .size-price-table td {
    padding: 6px 4px;
  }
  
  /* 底部按钮 */
  .action-buttons {
    gap: 6px;
    padding: 10px;
    flex-wrap: wrap;
  }
  
  .action-buttons button {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  #fetchPriceButton {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  .fetch-icon {
    font-size: 12px;
  }
  
  /* 交易记录/出售报价/求购报价表格 - 横竖都可滚动 + 明显滚动条（覆盖 overflow:hidden） */
  .price-history-section {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  .price-history-section .price-table-container {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    max-height: 280px !important; /* 固定高度上限，确保出现竖向滚动条 */
    min-height: 120px;
    /* 始终显示滚动条，方便手机版发现可滚动 */
    scrollbar-width: thin;
    scrollbar-color: #999 #e8e8e8;
  }
  
  .price-history-section .price-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  .price-history-section .price-table-container::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 4px;
  }
  
  .price-history-section .price-table-container::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
  }
  
  .price-history-section .price-table-container::-webkit-scrollbar-thumb:hover {
    background: #666;
  }
  
  .price-history-section .price-table {
    min-width: 400px;
  }
  
  .price-history-section .price-table th,
  .price-history-section .price-table td {
    padding: 10px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* 手机详情页 (max-width: 480px) */
@media (max-width: 480px) {
  .product-detail {
    padding: 2px 8px 10px;
  }
  
  .detail-header {
    padding: 0;
    margin-left: -6px;
    margin-bottom: 2px;
  }
  
  .back-button {
    padding: 3px 8px 3px 4px;
    font-size: 13px;
    gap: 2px;
  }
  
  .back-button svg {
    width: 18px;
    height: 18px;
  }
  
  .detail-content {
    gap: 12px;
  }
  
  .main-image-container {
    border-radius: 8px;
  }
  
  .image-nav-btn {
    width: 28px;
    height: 28px;
  }
  
  .linked-group-item {
    width: 32px;
  }
  
  .linked-group-item .item-image {
    width: 32px;
    height: 32px;
  }
  
  .product-title {
    font-size: 14px;
  }
  
  .product-subtitle {
    font-size: 10px;
    margin-bottom: 4px;
  }
  
  .rating-section {
    padding: 2px 0;
    margin-bottom: 4px;
    gap: 4px;
  }
  
  .rating-number {
    font-size: 12px;
  }
  
  .review-count,
  .wish-count,
  .transaction-count {
    font-size: 10px;
  }
  
  /* 详情表格 */
  .product-details-table {
    margin-bottom: 4px;
    padding: 5px 0;
  }
  
  .detail-item {
    gap: 2px;
  }
  
  .detail-item:not(:first-child)::before {
    margin: 0 6px;
    font-size: 10px;
  }
  
  .detail-label {
    font-size: 10px;
  }
  
  .detail-value {
    font-size: 10px;
  }
  
  .price-amount {
    font-size: 16px;
  }
  
  .discount-rate {
    font-size: 13px;
  }
  
  .size-price-table {
    font-size: 9px;
  }
  
  .size-price-table th,
  .size-price-table td {
    padding: 5px 3px;
  }
  
  #fetchPriceButton {
    padding: 6px 10px;
    font-size: 10px;
  }
  
  .fetch-icon {
    font-size: 11px;
  }
}

/* ========================================
   弹窗移动端适配（价格对比等）
   ======================================== */
@media (max-width: 768px) {
  #fullPriceModal .modal-content,
  .modal-content {
    width: 95% !important;
    max-width: none !important;
    margin: 10px auto !important;
    max-height: 90vh !important;
    border-radius: 12px !important;
  }
  
  /* 价格对比弹窗 - 768px 下留小空白、限制高度 */
  #fullPriceModal .full-price-modal-content {
    max-width: calc(100% - 16px) !important;
    width: calc(100% - 16px) !important;
    margin: 0 auto !important;
    max-height: 85vh !important;
    border-radius: 12px !important;
  }
  #fullPriceModal .full-price-modal-body {
    min-height: 0 !important;
  }
  #fullPriceTableContainer {
    overflow-x: hidden !important;
    width: 100%;
  }
  #fullPriceTableContainer table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }
  
  #fullPriceModal h2,
  .modal-content h2 {
    font-size: 16px !important;
    padding: 12px 16px !important;
  }
  
  #fullPriceModal table,
  .modal-content table {
    font-size: 11px !important;
  }
  
  #fullPriceModal th,
  #fullPriceModal td,
  .modal-content th,
  .modal-content td {
    padding: 6px 4px !important;
  }
  
  #fullPriceModal .close-btn,
  .modal-close-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
  }
}

@media (max-width: 480px) {
  #fullPriceModal .modal-content,
  .modal-content {
    width: calc(100% - 12px) !important;
    margin: 5px auto !important;
    border-radius: 8px !important;
  }
  
  #fullPriceModal h2,
  .modal-content h2 {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
  
  #fullPriceModal table,
  .modal-content table {
    font-size: 10px !important;
  }
  
  #fullPriceModal th,
  #fullPriceModal td,
  .modal-content th,
  .modal-content td {
    padding: 5px 3px !important;
  }
}

/* ========================================
   设置弹窗移动端适配
   ======================================== */
@media (max-width: 640px) {
  .settings-modal {
    padding: 12px;
  }
  
  .settings-modal-content {
    max-width: 100%;
    max-height: 92vh;
  }
  
  .settings-modal-header,
  .settings-modal-body {
    padding: 14px 16px;
  }
  
  .settings-modal-header h2 {
    font-size: 16px;
  }
  
  .settings-modal-body label {
    font-size: 12px;
  }
  
  .settings-modal-body input {
    font-size: 14px;
    padding: 10px;
  }
  
  .settings-category-list {
    max-height: 220px;
  }
  
  .settings-params-row {
    gap: 6px 10px;
  }
  
  .save-settings-button {
    padding: 12px;
    font-size: 14px;
  }
}

/* ========================================
   加载动画移动端适配
   ======================================== */
@media (max-width: 480px) {
  .search-loading {
    margin-top: 60px;
    padding: 40px 12px;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
  }
  
  .loading-text {
    font-size: 14px;
  }
  
  .loading-dots span {
    width: 6px;
    height: 6px;
  }
}

/* ========================================
   触摸设备优化
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* 移除hover效果，优化触摸体验 */
  .product-card:hover {
    transform: none;
  }
  
  .linked-group-item:hover {
    transform: none;
  }
  
  /* 增大点击区域 */
  .product-card {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  .back-button,
  .page-btn,
  .action-buttons button {
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  /* 优化滚动 */
  .product-linked-group-list {
    -webkit-overflow-scrolling: touch;
  }
  
  .size-price-table-container {
    -webkit-overflow-scrolling: touch;
  }
}

/* ========================================
   iPhone 安全区域适配
   ======================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .product-detail {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  
  .action-buttons {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  
  #fullPriceModal .modal-content {
    padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
}

/* ========================================
   横屏模式适配
   ======================================== */
@media (max-width: 896px) and (orientation: landscape) {
  .product-detail {
    padding: 12px;
  }
  
  .detail-content {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }
  
  .detail-left {
    flex: 0 0 40%;
    max-width: 40%;
  }
  
  .detail-right {
    flex: 1;
  }
  
  .main-image-container {
    max-height: 60vh;
  }
}

/* 手机版热门搜索：可点击、有滚动条（兼容 iOS/微信/安卓），z-index 提高避免被遮挡 */
@media (max-width: 640px) {
  .hot-keywords-section {
    position: relative;
    z-index: 15;
    pointer-events: auto;
    isolation: isolate;
  }
  .hot-keywords-list {
    pointer-events: auto;
  }
  .hot-keyword-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
    min-height: 44px;
    box-sizing: border-box;
    cursor: pointer;
    pointer-events: auto;
  }
}

/* 交易记录区域样式 → 见 transaction-inline.css */

/* transaction-inline.css - Auto-split from styles.css */

/* ========================================
   交易记录区域样式 - 三列布局
   ======================================== */
.transaction-history-section {
  margin-top: 24px;
  border-top: 1px solid #ebebeb;
  padding-top: 20px;
}

.transaction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.transaction-column {
  border: 1px solid #ebebeb;
  border-radius: 8px;
  overflow: hidden;
}

.transaction-title {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  background: #f8f9fa;
  border-bottom: 1px solid #ebebeb;
  text-align: center;
}

/* 尺码筛选区域 */
.transaction-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #fafafa;
  border-bottom: 1px solid #ebebeb;
  gap: 8px;
}

.filter-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* 尺码筛选下拉框（嵌入表头） */
.size-filter-select {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 11px;
  color: #999;
  cursor: pointer;
  outline: none;
  text-align: center;
  text-align-last: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 8px 5px;
  padding-right: 12px;
  transition: color 0.15s ease;
}

.size-filter-select:hover {
  color: #333;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23333'/%3E%3C/svg%3E");
}

.size-filter-select:focus {
  color: #333;
}

.size-filter-select option {
  text-align: left;
  font-size: 12px;
  color: #333;
  padding: 4px 8px;
}

.transaction-header {
  display: flex;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 11px;
  color: #999;
  background: #fafafa;
}

.transaction-header .th-option {
  min-width: 70px;
  width: auto;
  text-align: center;
  white-space: nowrap;
}

.transaction-header .th-price {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.transaction-header .th-date,
.transaction-header .th-count {
  width: 80px;
  text-align: center;
}

.transaction-body {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
}

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f8f8f8;
  font-size: 12px;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item .ti-option {
  min-width: 70px;
  width: auto;
  text-align: center;
  color: #666;
  font-size: 11px;
}

.ti-option .size-sub {
  display: block;
  font-size: 0.8em;
  opacity: 0.6;
  line-height: 1.2;
  font-weight: normal;
}

.transaction-item .ti-price {
  flex: 1;
  color: #222;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-item .ti-price .price-text {
  text-align: center;
}

.transaction-item .ti-date,
.transaction-item .ti-count {
  width: 80px;
  text-align: center;
  color: #999;
  font-size: 11px;
}

.lightning-icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  flex-shrink: 0;
}

.lightning-placeholder {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 2px;
}

.transaction-loading,
.transaction-empty {
  padding: 20px;
  text-align: center;
  color: #999;
}

/* 加载动画容器 */
.transaction-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
}

/* 加载旋转动画（交易记录区域） */
.transaction-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #007bff;
  animation: spin 0.8s linear infinite;
}

.transaction-more {
  padding: 10px;
  text-align: center;
  color: #007bff;
  font-size: 12px;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  display: none; /* 初始隐藏，等数据加载完成后再显示 */
}

.transaction-more:hover {
  background-color: #f8f9fa;
  color: #0056b3;
  font-size: 12px;
}

/* 🆕 日期范围选择器容器 */
.transaction-date-range-picker {
  /* 移除动画效果 */
}

/* 🆕 日期快捷按钮样式 - 简洁版 */
.date-quick-btn {
  padding: 5px 10px;
  font-size: 11px;
  background: white;
  color: #666;
  border: 1px solid #d5d5d5;
  flex: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 400;
  white-space: nowrap;
}

.date-quick-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.date-quick-btn:active {
  transform: scale(0.98);
}

.date-quick-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  font-weight: 600;
}

.date-quick-btn.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: white;
}

/* 🆕 日期快捷按钮容器 - 桌面端可以一行显示 */
@media (min-width: 769px) {
  .date-quick-buttons-container {
    flex-direction: row !important;
    flex-wrap: wrap;
  }
  
  .date-quick-buttons-container > div {
    flex: 1;
    min-width: 0;
  }
  
  /* 桌面端：显示标题行的复制按钮 */
  #copySizeStatsBtn {
    display: flex !important;
  }
  
  /* 桌面端：隐藏选项卡行的移动端复制按钮 */
  #copySizeStatsBtnMobile {
    display: none !important;
  }
}

/* 交易记录移动端适配 */
@media (max-width: 768px) {
  .transaction-history-section {
    margin-top: 16px;
    padding-top: 12px;
  }
  
  .transaction-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .transaction-title {
    padding: 10px;
    font-size: 13px;
  }
  
  .transaction-filter {
    padding: 6px 10px;
    gap: 6px;
  }
  
  .filter-label {
    font-size: 11px;
  }
  
  .size-filter-select {
    font-size: 10px;
    padding-right: 10px;
    background-size: 6px 4px;
  }
  
  .transaction-header {
    font-size: 10px;
    padding: 6px 10px;
  }
  
  .transaction-header .th-date,
  .transaction-header .th-count {
    width: 60px;
  }
  .transaction-header .th-option {
    min-width: 60px;
    width: auto;
    white-space: nowrap;
  }
  
  .transaction-body {
    max-height: 180px;
    /* 手机版显示可见滚动条 */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  
  .transaction-body::-webkit-scrollbar {
    width: 4px;
    display: block;
  }
  
  .transaction-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  
  .transaction-body::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .transaction-item {
    font-size: 11px;
    padding: 6px 10px;
  }
  
  .transaction-item .ti-date,
  .transaction-item .ti-count {
    width: 60px;
    font-size: 10px;
  }
  .transaction-item .ti-option {
    min-width: 60px;
    width: auto;
    font-size: 10px;
  }
  
  .lightning-icon {
    width: 10px;
    height: 10px;
  }
  
  .size-info-section {
    margin-top: 16px;
    padding-top: 12px;
  }
  
  .size-info-title {
    font-size: 14px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .transaction-grid {
    gap: 10px;
  }
  
  .size-info-section {
    margin-top: 12px;
    padding-top: 10px;
  }
  
  .size-info-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .transaction-title {
    padding: 8px;
    font-size: 12px;
  }
  
  .transaction-modal-size-filter {
    font-size: 9px !important;
    padding: 2px 1px !important;
  }
  
  /* 🆕 480px下分布图自动换行+自适应高度 */
  .distribution-chart {
    height: auto;
    min-height: 0;
    max-height: none; /* 移除高度限制让其自适应 */
    overflow: hidden; /* 防止溢出 */
    flex-wrap: wrap; /* 🆕 关键：让柱状图自动换行 */
    justify-content: center;
    gap: 4px 6px; /* 调整换行后的间距 */
  }
  
  .distribution-bar-wrapper {
    padding-top: 25px;
    width: 55px; /* 缩小宽度以适应更多列 */
    height: 50px;
    flex: 0 0 auto;
  }
  
  .distribution-title {
    margin-bottom: 12px;
  }
  
  .bar-value {
    top: -14px;
    font-size: 9px;
  }
  
  .distribution-label {
    font-size: 7px;
  }
  
  .transaction-modal-load-btn {
    padding: 6px 12px;
    font-size: 11px;
    min-width: 80px;
  }
  
  .transaction-modal-list {
    max-height: 150px;
  }
  
  .transaction-filter {
    padding: 5px 8px;
    gap: 5px;
  }
  
  .filter-label {
    font-size: 10px;
  }
  
  .size-filter-select {
    font-size: 9px;
    padding-right: 8px;
    background-size: 5px 3px;
  }
  
  .transaction-header {
    font-size: 9px;
    padding: 5px 8px;
  }
  
  .transaction-header .th-date,
  .transaction-header .th-count {
    width: 50px;
  }
  .transaction-header .th-option {
    min-width: 50px;
    width: auto;
    white-space: nowrap;
  }
  
  .transaction-body {
    max-height: 140px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  
  .transaction-body::-webkit-scrollbar {
    width: 4px;
    display: block;
  }
  
  .transaction-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  
  .transaction-body::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .transaction-item {
    font-size: 10px;
    padding: 5px 8px;
  }
  
  .transaction-item .ti-date,
  .transaction-item .ti-count {
    width: 50px;
    font-size: 9px;
  }
  .transaction-item .ti-option {
    min-width: 50px;
    width: auto;
    font-size: 9px;
  }
}

/* 🆕 货号选择对话框动画 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ========================================
   交易记录完整数据模态框
   ======================================== */
.transaction-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
}

/* transaction-modal.css - Auto-split from styles.css */

/* 打开交易记录/出售报价/求购报价模态框时锁定背景滚动，避免手机端滑动表格时详情页在动 */
html.transaction-modal-open,
body.transaction-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
}

.transaction-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.transaction-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  width: clamp(640px, 80vw, 780px);
  height: 82vh;
  min-height: 82vh;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* 🆕 选项卡和内容的主容器 */
.transaction-modal-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 🆕 左侧选项卡区域 - 浅色调设计 */
.transaction-modal-sidebar {
  width: 140px;
  background: linear-gradient(180deg, #f8f9fc 0%, #f0f2f7 100%);
  border-right: 1px solid #e5e8ef;
  display: flex;
  flex-direction: column;
  padding: 16px 8px;
  gap: 8px;
  flex-shrink: 0;
}

/* 🆕 选项卡样式 - 浅色调 */
.transaction-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.transaction-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 0 3px 3px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transaction-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #374151;
  transform: translateX(2px);
  border-color: rgba(59, 130, 246, 0.1);
}

.transaction-tab.active {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: #1f2937;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

.transaction-tab.active::before {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.transaction-tab.active .tab-icon {
  color: #3b82f6;
  filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.3));
}

/* 添加选项卡点击反馈 */
.transaction-tab:active {
  transform: scale(0.98) translateX(1px);
}

/* 🆕 选项卡图标 */
.tab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🆕 选项卡文字 */
.tab-text {
  white-space: nowrap;
  flex: 1;
}

.transaction-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e8ef;
  background: linear-gradient(180deg, #fafbfc 0%, #f8f9fc 100%);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

.transaction-modal-header h3 {
  color: #1f2937;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.transaction-modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.transaction-modal-header-left h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.transaction-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

/* 模态框货币切换按钮 */
#modalToggleCurrencyButton {
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#modalToggleCurrencyButton:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#modalToggleCurrencyButton:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.transaction-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.transaction-modal-close:hover {
  background: #f4f4f4;
  color: #222;
}

.transaction-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.transaction-modal-filter {
  margin-bottom: 16px;
  display: flex;
  justify-content: flex-end;
}

.transaction-modal-select {
  padding: 6px 10px;
  font-size: 13px;
  color: #222;
  background: #fff;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  min-width: 100px;
}

.transaction-modal-select-compact {
  padding: 4px 6px;
  font-size: 11px;
  min-width: 70px;
}

.transaction-modal-select:hover {
  border-color: #999;
}

.transaction-modal-select:focus {
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.transaction-modal-table {
  border: 1px solid #ebebeb;
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  flex: 1; /* 🆕 填充剩余空间 */
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 🆕 AI分析面板 */
.transaction-modal-ai {
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 0 auto 12px;
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
  /* display 由 JS 控制，这里不设置 */
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* 当 AI 面板显示时应用 flex 布局 */
.transaction-modal-ai[style*="display: block"],
.transaction-modal-ai[style*="display:block"] {
  display: flex !important;
}

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

.ai-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap; /* 🆕 防止标题换行 */
  flex-shrink: 0;
}

.ai-panel-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-action-btn {
  padding: 6px 10px;
  font-size: 11px;
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-action-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.ai-action-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.ai-action-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.ai-panel-status {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.ai-status-error {
  color: #dc2626;
}

.ai-panel-content {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.8;
  color: #e5e5e5;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 300px;
  flex: 1 1 auto;
  overflow-y: auto;
  letter-spacing: 0.3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
  font-weight: 400;
}

/* ====== AI Wizard 重新设计 ====== */
.ai-wizard {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #1e293b;
}

.ai-wz-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* 进度条 - 圆点+连线 */
.ai-wz-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 10px;
}

.ai-wz-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.ai-wz-dot span {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  line-height: 1;
}

.ai-wz-dot.active {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ai-wz-dot.active span {
  color: #fff;
}

.ai-wz-dot.done {
  border-color: #10b981;
  background: #10b981;
}

.ai-wz-dot.done span {
  color: #fff;
  font-size: 0;
}

.ai-wz-dot.done::after {
  content: '✓';
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

.ai-wz-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  min-width: 12px;
  max-width: 36px;
}

/* 内容区 */
.ai-wz-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-wz-step-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.ai-wz-step-desc {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}

.ai-wz-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-wz-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ai-wz-label {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

.ai-wz-input,
.ai-wz-select,
.ai-wz-textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  box-sizing: border-box;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ai-wz-input::placeholder,
.ai-wz-textarea::placeholder {
  color: #94a3b8;
}

.ai-wz-textarea {
  min-height: 44px;
  resize: vertical;
}

.ai-wz-textarea[rows="1"] {
  min-height: 36px;
}

.ai-wz-textarea[rows="2"] {
  min-height: 40px;
}

.ai-wz-input:focus,
.ai-wz-select:focus,
.ai-wz-textarea:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 按钮选择组 */
.ai-wz-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-wz-opt-btn {
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 60px;
  text-align: center;
}

.ai-wz-opt-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.ai-wz-opt-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.ai-wz-opt-btn.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.ai-wz-note {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  padding: 6px 8px;
  background: #f1f5f9;
  border-radius: 6px;
  border-left: 3px solid #2563eb;
  line-height: 1.5;
}

/* 底部操作栏 */
.ai-wz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
}

.ai-wz-footer-right {
  display: flex;
  gap: 6px;
}

.ai-wz-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.ai-wz-btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.ai-wz-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ai-wz-btn-outline {
  background: #fff;
  color: #475569;
  border-color: #d1d5db;
}

.ai-wz-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.ai-wz-btn-ghost {
  background: transparent;
  color: #94a3b8;
  border-color: transparent;
  font-weight: 500;
}

.ai-wz-btn-ghost:hover {
  color: #64748b;
  background: #f1f5f9;
}

/* 🆕 移动端AI分析界面优化 - 紧凑版 */
@media (max-width: 480px) {
  /* AI面板头部 */
  .ai-panel-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  
  .ai-panel-title {
    font-size: 13px;
    margin-right: auto;
  }
  
  .ai-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .ai-action-btn {
    padding: 4px 8px;
    font-size: 10px;
    white-space: nowrap;
  }
  
  /* AI分析面板容器 - 手机版填满高度 */
  /* 注意：不能用 display: flex !important，会覆盖 JS 的 display: none */
  .transaction-modal-ai[style*="display: block"],
  .transaction-modal-ai[style*="display:block"] {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    height: 100% !important;
  }
  
  /* AI分析内容区域 - 手机版高度自适应填满 */
  .ai-panel-content {
    min-height: 100px !important;
    height: auto !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
  }
  
  .ai-panel-status {
    margin-bottom: 4px;
  }
  
  .ai-panel-meta {
    margin-top: 4px;
  }
  
  /* 新版 Wizard 移动端适配 - 极紧凑 */
  .ai-wz-card {
    padding: 8px 10px;
  }
  
  .ai-wz-progress {
    margin-bottom: 6px;
    gap: 0;
  }
  
  .ai-wz-dot {
    width: 18px;
    height: 18px;
  }
  
  .ai-wz-dot span {
    font-size: 8px;
  }
  
  .ai-wz-dot.done::after {
    font-size: 9px;
  }
  
  .ai-wz-dot.active {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  }
  
  .ai-wz-line {
    min-width: 6px;
    max-width: 16px;
  }
  
  .ai-wz-content {
    gap: 4px;
  }
  
  .ai-wz-step-title {
    font-size: 13px;
  }
  
  .ai-wz-step-desc {
    font-size: 10px;
    margin-bottom: 0;
  }
  
  .ai-wz-fields {
    gap: 6px;
  }
  
  .ai-wz-label {
    font-size: 10px;
  }
  
  .ai-wz-input,
  .ai-wz-select,
  .ai-wz-textarea {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .ai-wz-opt-btn {
    flex: 1 1 calc(50% - 3px);
    min-width: 50px;
    max-width: calc(50% - 3px);
    padding: 6px 4px;
    font-size: 12px;
  }
  
  .ai-wz-btn-group {
    gap: 5px;
  }
  
  .ai-wz-footer {
    margin-top: 6px;
    padding-top: 6px;
  }
  
  .ai-wz-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
  
  .ai-wz-textarea {
    min-height: 50px !important;
  }
  
  .ai-wz-note {
    font-size: 10px;
    padding: 4px 6px;
  }
  
  .ai-wizard-date-picker {
    margin-top: 5px !important;
    padding-top: 5px !important;
  }
  
  .ai-wizard-date-picker > div:first-child {
    font-size: 10px !important;
    margin-bottom: 4px !important;
  }
  
  .ai-wizard-date-input {
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
}

.ai-panel-meta {
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transaction-sidebar-footer {
  margin-top: auto;
  padding: 8px 4px 4px;
}

.transaction-sidebar-product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.transaction-sidebar-image-wrapper {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 🆕 放大镜图标 */
.image-zoom-icon {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.image-zoom-icon svg {
  width: 12px;
  height: 12px;
}

.transaction-sidebar-image-wrapper:hover .image-zoom-icon {
  opacity: 1;
}

.transaction-sidebar-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.transaction-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 2px 2px 0;
}

.transaction-sidebar-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 11px;
  color: #4b5563;
  white-space: normal;
  flex-wrap: wrap;
  line-height: 1.4;
}

.transaction-sidebar-name-row {
  align-items: flex-start;
  white-space: normal;
  margin-bottom: 2px;
}

.transaction-sidebar-label {
  color: #9ca3af;
  flex-shrink: 0;
  font-size: 10px;
}

.transaction-sidebar-value {
  color: #1f2937;
  font-weight: 600;
  min-width: 0;
  word-break: break-all;
}

/* 🆕 侧边栏货号点击复制样式（支持手机和电脑） */
.transaction-sidebar-value.copy-model-number {
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 3px;
  padding: 1px 4px;
  margin: -1px -4px;
}

.transaction-sidebar-value.copy-model-number:hover {
  color: #2196F3 !important;
  background-color: rgba(33, 150, 243, 0.1);
}

.transaction-sidebar-value.copy-model-number:active {
  color: #1976D2 !important;
  background-color: rgba(33, 150, 243, 0.2);
}

.transaction-sidebar-name {
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  font-size: 12px;
  color: #111;
}

.transaction-modal-header-row {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #ebebeb;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  align-items: center;
  flex-shrink: 0; /* 🆕 防止表头被压缩 */
}

/* 模态框表头中的尺码筛选下拉框 */
.transaction-modal-size-filter {
  outline: none;
  transition: all 0.2s ease;
}

.transaction-modal-size-filter:hover {
  border-color: #999 !important;
  background: #f8f9fa !important;
}

.transaction-modal-size-filter:focus {
  border-color: #222 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

.transaction-modal-list {
  flex: 1; /* 🆕 填充剩余空间 */
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto; /* 尺码列不换行时允许横向滚动 */
}

.transaction-modal-item {
  display: flex;
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
  font-size: 13px;
  min-width: min-content; /* 避免整行被压缩导致尺码换行 */
}

/* 尺码列：固定最小宽度且不换行 */
.transaction-modal-item > div:first-child {
  min-width: 130px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 模态框中价格列的对齐样式 */
.modal-price-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.transaction-modal-item .price-text {
  display: inline-block;
  text-align: left;
  white-space: nowrap;
}

.modal-price-cell svg,
.modal-price-cell > span[style*="width: 12px"] {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: inline-block;
}

.transaction-modal-item:last-child {
  border-bottom: none;
}

.transaction-modal-item:hover {
  background: #fafafa;
}

.transaction-modal-loading {
  padding: 40px;
  text-align: center;
  color: #999;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.transaction-modal-empty {
  padding: 40px;
  text-align: center;
  color: #999;
}

.transaction-modal-load-more {
  padding: 12px 20px;
  text-align: center;
  border-top: 1px solid #ebebeb;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
}

.transaction-modal-load-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #0c4a6e;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
  flex: 0 0 auto;
}

.transaction-modal-load-btn:hover:not(:disabled) {
  background: #bae6fd;
  border-color: #38bdf8;
}

.transaction-modal-load-btn:active:not(:disabled) {
  background: #7dd3fc;
  border-color: #38bdf8;
}

.transaction-modal-load-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 加载全部按钮样式 - 与加载下一页保持一致 */
.transaction-modal-load-all-btn {
  background: #e0f2fe;
  color: #0c4a6e;
  border-color: #7dd3fc;
}

.transaction-modal-load-all-btn:hover:not(:disabled) {
  background: #bae6fd;
  border-color: #38bdf8;
}

.transaction-modal-load-all-btn:active:not(:disabled) {
  background: #7dd3fc;
  border-color: #38bdf8;
}

.transaction-modal-footer {
  padding: 8px 16px;
  border-top: none;
  text-align: center;
  font-size: 14px;
  color: #666;
  flex-shrink: 0;
  background: #fff;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .transaction-modal-content {
    width: 92%;
    min-width: 280px;
    max-width: 480px;
    height: 85vh;
    min-height: 50vh;
    max-height: 88vh;
    top: 50%; /* 居中显示 */
  }
  
  /* 移动端选项卡调整 */
  .transaction-modal-sidebar {
    width: 120px;
    padding: 12px 6px;
    gap: 6px;
  }
  
  /* 移动端商品信息缩小 */
  .transaction-sidebar-footer {
    padding: 4px 2px 2px;
  }
  
  .transaction-sidebar-product {
    padding: 8px;
    gap: 6px;
  }
  
  .transaction-sidebar-image-wrapper {
    height: 80px;
  }
  
  .transaction-sidebar-name-row {
    display: none !important;
  }
  
  .transaction-sidebar-row {
    font-size: 10px;
  }
  
  .transaction-tab {
    padding: 10px 8px;
    gap: 6px;
    font-size: 12px;
  }
  
  .tab-icon {
    width: 16px;
    height: 16px;
  }
  
  .tab-text {
    font-size: 12px;
  }
  
  /* 🆕 768px下交易记录体不滚动，只有下方表格列表可滚动 */
  .transaction-modal-body {
    padding: 16px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }
  
  .transaction-modal-list {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overflow-y: scroll !important;
    scrollbar-width: thin;
    scrollbar-color: #999 #e8e8e8;
  }
  
  .transaction-modal-list::-webkit-scrollbar {
    width: 8px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 4px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
  }
  
  /* 🆕 平板/手机版日期选择器缩小 */
  .transaction-date-range-picker .date-range-row {
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  
  .transaction-date-range-picker .date-input {
    padding: 3px 4px !important;
    font-size: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: 0 !important;
  }
  
  /* 隐藏日期选择器的日历图标，避免遮挡日期文字 */
  .transaction-date-range-picker .date-input::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
  }
  
  .transaction-date-range-picker .date-quick-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
  
  .transaction-date-range-picker #loadByDateRangeBtn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  .transaction-modal-header {
    padding: 10px 16px;
  }
  
  .transaction-modal-header h3 {
    font-size: 15px;
  }
  
  .transaction-modal-header-left {
    gap: 8px;
  }
  
  #modalToggleCurrencyButton {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .transaction-modal-select {
    font-size: 13px;
    padding: 6px 10px;
    min-width: 100px;
  }
  
  .transaction-modal-size-filter {
    font-size: 10px !important;
    padding: 3px 2px !important;
  }
  
  .transaction-modal-load-btn {
    padding: 7px 14px;
    font-size: 12px;
    min-width: 90px;
  }
  
  /* AI分析面板容器 - 平板版填满高度 */
  /* 注意：不能用 display: flex !important，会覆盖 JS 的 display: none */
  .transaction-modal-ai[style*="display: block"],
  .transaction-modal-ai[style*="display:block"] {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    height: 100% !important;
  }
  
  /* AI分析内容区域 - 平板版高度自适应填满 */
  .ai-panel-content {
    min-height: 150px !important;
    height: auto !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
  }
  
  .transaction-modal-table {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none !important;
  }
  
  .transaction-modal-list {
    flex: 1;
    max-height: none !important;
    overflow-y: scroll;
    min-height: 0;
    /* 手机版显示可见滚动条 */
    scrollbar-width: thin;
    scrollbar-color: #bbb #f0f0f0;
  }
  
  .transaction-modal-list::-webkit-scrollbar {
    width: 6px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-thumb:hover {
    background: #999;
  }
  
  .transaction-modal-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
  }
  
  .transaction-modal-footer {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* 小屏幕移动端适配 */
@media (max-width: 480px) {
  .transaction-modal-content {
    width: 95%;
    min-width: 260px;
    border-radius: 12px;
    height: 82vh;
    min-height: 50vh;
    max-height: 88vh;
    top: 50%; /* 居中显示 */
  }
  
  .transaction-modal-header {
    padding: 8px 12px;
  }
  
  .transaction-modal-header h3 {
    font-size: 14px;
  }
  
  .transaction-modal-close {
    font-size: 22px;
    width: 28px;
    height: 28px;
  }
  
  .transaction-modal-header-left {
    gap: 5px;
  }
  
  #modalToggleCurrencyButton {
    font-size: 10px;
    padding: 3px 7px;
  }
  
  /* 小屏幕选项卡进一步缩小 */
  .transaction-modal-sidebar {
    width: 75px;
    padding: 10px 4px;
    gap: 5px;
  }
  
  .transaction-tab {
    padding: 8px 6px;
    gap: 4px;
    font-size: 11px;
    border-radius: 8px;
  }
  
  .tab-icon {
    width: 14px;
    height: 14px;
  }
  
  .tab-text {
    font-size: 10px;
  }
  
  /* 🆕 480px下交易记录体不滚动，只有下方表格列表可滚动，避免滑动时背后详情页在动 */
  .transaction-modal-body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden !important;
  }
  
  /* 🆕 手机版日期选择器缩小 */
  .transaction-date-range-picker {
    padding: 6px !important;
    margin-bottom: 6px !important;
  }
  
  .transaction-date-range-picker .date-quick-btn {
    padding: 3px 6px !important;
    font-size: 9px !important;
  }
  
  /* 日期行：不换行，输入框自适应缩小 */
  .transaction-date-range-picker .date-range-row {
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  
  .transaction-date-range-picker .date-input {
    padding: 2px 2px !important;
    font-size: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: 0 !important;
  }
  
  .transaction-date-range-picker #loadByDateRangeBtn {
    padding: 2px 8px !important;
    font-size: 9px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  /* 🆕 出售报价/求购报价页面 - 限制上方区域高度 */
  .price-distribution {
    flex: 0 0 auto;
    min-height: auto;
    max-height: 25vh !important; /* 🆕 限制最大高度，给表格留空间 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 6px 0 !important;
    padding: 8px !important;
  }
  
  /* 🆕 缩小价格分布图表 */
  .distribution-chart {
    padding: 8px !important;
  }
  
  .distribution-bar-wrapper {
    height: 45px !important;
    padding-top: 20px !important;
  }
  
  /* 🆕 缩小支撑价/压力价区域 */
  .distribution-stats {
    margin-top: 6px !important;
    padding-top: 6px !important;
    gap: 6px !important;
  }
  
  .stat-badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  
  .transaction-modal-table {
    flex: 1;
    min-height: 180px; /* 🆕 增加最小高度 */
    max-height: none !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  /* 🆕 交易记录列表：唯一可滚动区域，捕获触摸 + 滚动条默认可见 */
  .transaction-modal-list {
    flex: 1;
    max-height: none !important;
    min-height: 120px;
    overflow-y: scroll !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: #999 #e8e8e8;
  }
  
  .transaction-modal-list::-webkit-scrollbar {
    width: 8px;
    -webkit-appearance: none;
  }
  
  .transaction-modal-list::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 4px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
  }
  
  .transaction-modal-list::-webkit-scrollbar-thumb:hover {
    background: #666;
  }
  
  .transaction-modal-distribution-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
}

/* 🆕 第一行：筛选 */
.transaction-modal-filter-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  position: relative;
  overflow: visible;
  flex-wrap: wrap;
}

.transaction-modal-filter {
  flex-shrink: 0;
}

/* 🆕 第二行：总数量 + 支撑价 + 压力价 */
.transaction-modal-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 🆕 总数量显示 */
.transaction-modal-count {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #e8f4f8;
  border: 1px solid #b8dce8;
  border-radius: 5px;
  flex-shrink: 0;
}

.count-label {
  font-size: 11px;
  color: #2c5f75;
  font-weight: 600;
}

.count-value {
  font-size: 13px;
  font-weight: 700;
  color: #1a4d63;
}

/* 🆕 支撑价显示 - 使用自定义tooltip */
.distribution-support {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  flex-shrink: 0;
  cursor: help;
  position: relative;
  transition: background-color 0.2s ease;
}

.distribution-support:hover {
  background: #dcfce7;
}

.distribution-support::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 99999;
}

.distribution-support::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 99999;
}

.distribution-support:hover::after,
.distribution-support:hover::before {
  opacity: 1;
}

.support-label {
  font-size: 11px;
  color: #15803d;
  font-weight: 600;
}

.support-value {
  font-size: 12px;
  font-weight: 700;
  color: #166534;
}

/* 🆕 压力价显示 - 使用自定义tooltip */
.distribution-resistance {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 5px;
  flex-shrink: 0;
  cursor: help;
  position: relative;
  transition: background-color 0.2s ease;
}

.distribution-resistance:hover {
  background: #fee2e2;
}

.distribution-resistance::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 99999;
}

.distribution-resistance::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 99999;
}

.distribution-resistance:hover::after,
.distribution-resistance:hover::before {
  opacity: 1;
}

.resistance-label {
  font-size: 11px;
  color: #b91c1c;
  font-weight: 600;
}

.resistance-value {
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
}

/* 🆕 第二行：价格指标 */
.transaction-modal-stats-row {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: visible;
}

.transaction-modal-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  position: relative;
}

/* 🆕 第三行：价格区间分布 */
.transaction-modal-distribution-row {
  margin: 4px 12px 12px 0;
  display: flex;
  justify-content: center;
  overflow: visible;
  max-height: none;
}

.price-distribution {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  min-height: auto;
  max-height: none;
  width: calc(100% - 12px);
  margin: 0 12px 0 0;
  overflow: visible;
}

.distribution-meta {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.distribution-divider {
  color: #d1d5db;
  font-size: 12px;
}

.distribution-title {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 0.5px;
}

.distribution-chart {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: auto;
  min-height: auto;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
  overflow: visible;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 🆕 求购报价滚动条美化 */
#distributionChart::-webkit-scrollbar {
  width: 6px;
}

#distributionChart::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

#distributionChart::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
  transition: background-color 0.2s;
}

#distributionChart::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.distribution-bar-wrapper {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  height: 60px;
  justify-content: flex-end;
  padding-top: 20px;
}

.distribution-bar {
  width: 100%;
  min-height: 6px;
  background: linear-gradient(to top, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 -2px 6px rgba(59, 130, 246, 0.3);
}

.distribution-bar.median-zone {
  background: linear-gradient(to top, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  box-shadow: 0 -2px 10px rgba(16, 185, 129, 0.5);
  border: 1px solid #10b981;
}

.distribution-bar:hover {
  transform: translateY(-3px) scaleY(1.05);
  box-shadow: 0 -4px 12px rgba(59, 130, 246, 0.5);
}

.distribution-bar.median-zone:hover {
  box-shadow: 0 -4px 12px rgba(16, 185, 129, 0.6);
}

.bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.median-zone .bar-value {
  color: #059669;
  font-size: 12px;
}

.distribution-label {
  font-size: 9px;
  color: #6b7280;
  margin-top: 6px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  width: 100%;
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.stats-item {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 自定义tooltip - 使用全局tooltip系统 */
.stats-item.stats-tooltip {
  cursor: help;
  padding: 3px 5px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.stats-item.stats-tooltip:hover {
  background-color: #e9ecef;
}

/* 禁用CSS伪元素tooltip */
.stats-item.stats-tooltip::after,
.stats-item.stats-tooltip::before {
  display: none !important;
}

.stats-divider {
  color: #dee2e6;
  font-size: 12px;
  flex-shrink: 0;
}

.stats-label {
  font-size: 11px;
  color: #6c757d;
  font-weight: 500;
}

.stats-value {
  font-size: 13px;
  font-weight: 700;
  color: #495057;
}

/* 筛选行样式 */
.transaction-modal-filter-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 价格指标区域样式 */
.distribution-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* 筛选和统计移动端适配 */
@media (max-width: 768px) {
  .transaction-modal-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .distribution-stats {
    margin-top: 10px !important;
    padding-top: 10px !important;
  }
  
  .distribution-stats > div {
    gap: 6px !important;
    padding: 6px 8px !important;
  }
  
  .distribution-stats .stats-item {
    padding: 3px 6px !important;
  }
  
  .distribution-stats .stats-label {
    font-size: 10px !important;
  }
  
  .distribution-stats .stats-value {
    font-size: 11px !important;
  }
  
  .transaction-modal-stats {
    padding: 6px 10px;
    gap: 6px;
    justify-content: center;
  }
  
  .stats-label {
    font-size: 10px;
  }
  
  .stats-value {
    font-size: 12px;
  }
  
  .stats-divider {
    font-size: 11px;
  }
  
  /* 🆕 768px下分布图自动换行+自适应高度 */
  .distribution-chart {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
  }
  
  .distribution-bar-wrapper {
    padding-top: 18px;
    width: 65px;
    height: 55px;
    flex: 0 0 auto;
  }
  
  /* 🆕 移动端列表尺码数量容器优化 */
  .asks-size-count-list {
    max-height: 150px !important;
    padding: 4px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  
  .distribution-title {
    margin-bottom: 14px;
  }
  
  .bar-value {
    top: -16px;
    font-size: 10px;
  }
  
  .distribution-label {
    font-size: 8px;
  }
  
  /* 🆕 尺码统计卡片 - 一行显示3个 */
  .size-stat-card {
    min-width: calc(33.333% - 6px) !important;
    max-width: calc(33.333% - 6px) !important;
    flex: 0 0 calc(33.333% - 6px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* 优化卡片内部字体 */
  .size-stat-card > div > span {
    font-size: 11px !important;
  }
}

/* 🆕 复制按钮通用样式 */
.copy-data-btn {
  transition: all 0.2s ease;
}

/* 🆕 尺码统计区域容器（桌面端） */
.size-statistics-section,
.asks-tab-panel,
.price-distribution {
  overflow: visible !important;
}

/* 移动端溢出限制 → 见 size-stats.css */

/* size-stats.css - Auto-split from styles.css */

/* 全端：折叠栏可见，支持点击展开/收起 */
.size-statistics-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: -4px -8px 8px -8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  background: rgba(255,255,255,0.6);
  border: 1px solid #e0e4e8;
  user-select: none;
  transition: background 0.15s;
}
.size-statistics-toggle:hover {
  background: rgba(255,255,255,0.9);
}
.size-stat-chevron {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
  transition: transform 0.2s;
}
.size-statistics-section.size-stat-collapsed #sizeStatisticsHeader,
.size-statistics-section.size-stat-collapsed #sizeStatisticsList {
  display: none !important;
}
.size-statistics-section.size-stat-collapsed .size-statistics-toggle {
  margin-bottom: 0;
}

.distribution-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 0 0 8px 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  background: rgba(255,255,255,0.6);
  border: 1px solid #e0e4e8;
  user-select: none;
  transition: background 0.15s;
}
.distribution-toggle:hover {
  background: rgba(255,255,255,0.9);
}
.distribution-chevron {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
  transition: transform 0.2s;
}
.transaction-modal-distribution-row.distribution-row-collapsed .price-distribution {
  display: none !important;
}

/* 🆕 移动端必须限制溢出 */
@media (max-width: 768px) {
  .price-distribution {
    flex: 0 0 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
    max-height: 28vh !important; /* 🆕 限制最大高度，给表格更多空间 */
    margin-bottom: 6px !important;
  }
  
  .distribution-chart {
    overflow: hidden !important;
    flex-wrap: wrap !important;
  }
  
  /* 🆕 表格填充剩余空间 */
  .transaction-modal-table {
    flex: 1 !important;
    min-height: 180px !important;
  }
}

/* 🆕 尺码列表容器 */
#sizeStatisticsList {
  max-height: 240px !important;
}

/* 🆕 尺码统计卡片默认样式（桌面端）*/
.size-stat-card {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 120px;
  max-width: 160px;
  overflow: visible;
  position: relative;
}

/* 🆕 主力尺码占比/价格相对位置摘要 */
.size-stat-summary {
  width: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.size-stat-summary-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.size-stat-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.size-stat-summary-item {
  font-size: 11px;
  color: #374151;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1.5;
  font-weight: 500;
}

.size-stat-summary-line {
  font-size: 11px;
  color: #4b5563;
  margin-top: 4px;
}

.size-stat-summary-params {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.size-stat-summary-param {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 10px;
  transition: all 0.2s ease;
}

.size-stat-summary-param:hover {
  background: #fafbfc;
  border-color: #d1d5db;
}

.size-stat-summary-param .param-label {
  color: #6b7280;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.size-stat-summary-param .param-value {
  color: #1e40af;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #93c5fd;
}

/* 移动端尺码统计摘要样式优化 */
@media (max-width: 480px) {
  /* 🆕 两个参数在同一行显示 */
  .size-stat-summary-params {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
  }
  
  .size-stat-summary-param {
    flex: 0 1 auto;
    justify-content: center;
    padding: 2px 5px;
    gap: 3px;
  }
  
  .size-stat-summary-param .param-label {
    font-size: 8px;
  }
  
  .size-stat-summary-param .param-value {
    font-size: 10px;
    padding: 1px 4px;
  }
}

.size-stat-ratio-inline {
  font-size: 10px;
  color: #2563eb;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  margin-left: auto;
}

/* 🆕 求购报价标题容器 */
.bids-title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bids-tab-container,
.asks-tab-container {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}

.bids-tab-hint {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(100, 116, 139, 0.05);
  border-radius: 6px;
  white-space: nowrap;
}

.bids-tab-hint svg {
  width: 11px;
  height: 11px;
  fill: #64748b;
  flex-shrink: 0;
}

.bids-tab,
.asks-tab {
  padding: 4px 12px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.bids-tab:not(.active):hover,
.asks-tab:not(.active):hover {
  background: #f5f5f5;
}

.bids-tab.active,
.asks-tab.active {
  background: #2196F3;
  border-color: #2196F3;
  color: #fff;
  font-weight: 600;
}

.asks-tab-panel {
  display: block;
}

.bids-depth-empty {
  padding: 20px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px dashed #e2e8f0;
}

.bids-depth-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 4px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 🆕 移动端求购深度高度限制 */
@media (max-width: 768px) {
  .bids-depth-grid {
    max-height: 110px;
  }
  
  #bidsDepthContainer {
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .bids-depth-grid {
    max-height: 90px;
    gap: 5px;
  }
  
  #bidsDepthContainer {
    max-height: 100px;
  }
  
  /* 🆕 缩小求购深度卡片 */
  .bids-depth-card {
    min-width: 110px;
    max-width: 130px;
    padding: 6px 8px;
  }
  
  .bids-depth-size {
    font-size: 11px;
    margin-bottom: 4px;
    padding-bottom: 3px;
  }
  
  .bids-depth-level {
    font-size: 10px;
    padding: 2px 3px;
  }
}

.bids-depth-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 140px;
  max-width: 160px;
}

.bids-depth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.bids-depth-size {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}

.bids-depth-levels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bids-depth-level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  padding: 3px 4px;
  background: #f8fafc;
  border-radius: 4px;
}

.bids-depth-rank {
  color: #94a3b8;
  font-weight: 600;
  font-size: 10px;
  min-width: 18px;
}

.bids-depth-price {
  color: #2563eb;
  font-weight: 700;
  font-size: 11px;
  flex: 1;
}

.bids-depth-qty {
  color: #64748b;
  font-weight: 600;
  font-size: 10px;
  background: #e3f2fd;
  padding: 1px 4px;
  border-radius: 3px;
}

/* 🆕 求购报价卡片样式优化 */
.price-bucket {
  transition: all 0.2s ease;
}

/* 🆕 求购报价移动端优化 */
@media (max-width: 768px) {
  /* 移动端保持横向布局，隐藏提示文本 */
  .bids-title-container {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  
  /* 隐藏提示文本，节省空间 */
  .bids-hint-text,
  .bids-tab-hint {
    display: none !important;
  }
  
  /* 🆕 出售报价和求购报价标题区域移动端优化 - 保持一行 */
  #asksDistributionHeader,
  #asksSizeHeader,
  #bidsDistributionHeader {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    padding-bottom: 6px !important;
    overflow-x: auto !important;
  }
  
  #asksDistributionHeader .asks-tab,
  #bidsDistributionHeader .bids-tab {
    padding: 3px 6px !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
  }
  
  #asksDistributionHeader #asksTotalCount,
  #bidsDistributionHeader > span {
    padding: 2px 4px !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
  }
  
  #asksDistributionHeader button[onclick*="copy"],
  #asksSizeHeader button[onclick*="copy"],
  #bidsDistributionHeader button[onclick*="copy"] {
    padding: 3px 5px !important;
    font-size: 9px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }
  
  #asksDistributionHeader button[onclick*="copy"] svg,
  #asksSizeHeader button[onclick*="copy"] svg,
  #bidsDistributionHeader button[onclick*="copy"] svg {
    width: 9px !important;
    height: 9px !important;
  }
  
  /* 尺码统计标题区域移动端优化 */
  #sizeStatisticsHeader {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding-bottom: 8px !important;
  }
  
  #sizeStatisticsHeader > div:first-child {
    display: flex !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }
  
  #sizeStatisticsHeader > div:last-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
  }
  
  #sizeStatisticsTitle {
    font-size: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  #sizeStatisticsTitle > span {
    display: inline-block !important;
    margin: 0 3px !important;
  }
  
  /* 移动端复制按钮优化 */
  #copySizeStatsBtn {
    padding: 3px 7px !important;
    font-size: 10px !important;
    gap: 3px !important;
  }
  
  #copySizeStatsBtn svg {
    width: 10px !important;
    height: 10px !important;
  }
  
  /* 移动端：缩小选项卡按钮 */
  .size-stat-tab,
  .asks-tab,
  .bids-tab {
    padding: 3px 8px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }
  
  /* 🆕 移动端：支撑价/压力价一行显示 */
  .distribution-meta {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    margin-top: 2px !important;
  }
  
  .distribution-support,
  .distribution-resistance {
    padding: 3px 6px !important;
    gap: 2px !important;
  }
  
  .support-label,
  .resistance-label {
    font-size: 9px !important;
  }
  
  .support-value,
  .resistance-value {
    font-size: 10px !important;
  }
  
  .distribution-divider {
    font-size: 10px !important;
    margin: 0 2px !important;
  }
  
  /* 列表尺码数量标题区域移动端优化 */
  .asks-size-title-container {
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  
  .asks-size-title-container > span:first-of-type {
    font-size: 11px !important;
  }
  
  .asks-size-title-container > span:nth-of-type(2) {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }
  
  /* 复制按钮移动端优化 - 缩小尺寸但保留文字 */
  #copySizeStatsBtn,
  button[onclick*="copy"] {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }
  
  #copySizeStatsBtn span,
  button[onclick*="copy"] span {
    display: inline !important;
  }
  
  /* 图标尺寸优化 */
  #copySizeStatsBtn svg,
  button[onclick*="copy"] svg {
    width: 11px !important;
    height: 11px !important;
  }
  
  /* 卡片尺寸调整 */
  .price-bucket {
    min-width: 85px !important;
    max-width: 95px !important;
    padding: 8px 8px !important;
  }
  
  .price-bucket .bucket-size {
    font-size: 11px !important;
  }
  
  .price-bucket .bucket-value {
    font-size: 11px !important;
    padding: 2px 6px !important;
  }
  
  /* 🆕 移动端尺码统计列表限制高度 */
  #sizeStatisticsList {
    flex: 0 0 auto !important;
    max-height: 100px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  
  /* 🆕 移动端尺码统计区域限制高度 */
  .size-statistics-section {
    max-height: none !important;
    padding: 10px !important;
    margin-bottom: 10px !important;
  }
  
  /* 移动端折叠状态额外优化 */
  .size-statistics-section.size-stat-collapsed {
    flex: 0 0 auto !important;
    min-height: 0 !important;
  }
  .size-statistics-toggle,
  .distribution-toggle {
    -webkit-tap-highlight-color: transparent;
  }
  .transaction-modal-distribution-row {
    flex-direction: column;
    flex: 0 0 auto;
  }
  .transaction-modal-distribution-row.distribution-row-collapsed {
    flex: 0 0 auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 480px) {
  /* 🆕 480px下尺码统计列表限制高度 */
  #sizeStatisticsList {
    flex: 0 0 auto !important;
    max-height: 90px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  
  /* 🆕 480px下尺码统计区域限制高度 */
  .size-statistics-section {
    max-height: none !important;
    padding: 8px !important;
    margin-bottom: 8px !important;
  }
  
  /* 尺码统计标题在小屏幕上进一步缩小 */
  #sizeStatisticsTitle {
    font-size: 10px !important;
    gap: 3px !important;
  }
  
  /* 小屏幕：进一步缩小选项卡和移动端复制按钮 */
  .size-stat-tab {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  
  #copySizeStatsBtnMobile {
    padding: 2px 5px !important;
    font-size: 9px !important;
  }
  
  #copySizeStatsBtnMobile svg {
    width: 9px !important;
    height: 9px !important;
  }
  
  /* 列表尺码数量标题在小屏幕上进一步缩小 */
  .asks-size-title-container > span:first-of-type {
    font-size: 10px !important;
  }
  
  .asks-size-title-container > span:nth-of-type(2) {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
  
  /* 复制按钮在小屏幕上进一步优化 */
  #copySizeStatsBtn,
  button[onclick*="copy"] {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  
  #copySizeStatsBtn span,
  button[onclick*="copy"] span {
    display: inline !important;
  }
  
  #copySizeStatsBtn svg,
  button[onclick*="copy"] svg {
    width: 10px !important;
    height: 10px !important;
  }
  
  /* 🆕 小屏手机尺码统计卡片 - 一行显示2个 */
  .size-stat-card {
    min-width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
    flex: 0 0 calc(50% - 5px) !important;
    padding: 5px 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* 进一步缩小字体 */
  .size-stat-card > div > span {
    font-size: 10px !important;
  }
  
  /* 小屏幕价格指标优化 */
  .distribution-stats > div {
    gap: 4px !important;
    padding: 4px 6px !important;
  }
  
  .distribution-stats .stats-item {
    padding: 2px 5px !important;
  }
  
  .distribution-stats .stats-label {
    font-size: 9px !important;
  }
  
  .distribution-stats .stats-value {
    font-size: 10px !important;
  }
  
  .distribution-stats .stats-divider {
    font-size: 10px !important;
  }
  
  /* 小屏幕价格分布图高度调整 */
  .distribution-bar-wrapper {
    padding-top: 16px !important;
    height: 50px !important;
  }
  
  /* 小屏幕列表尺码数量容器 */
  .asks-size-count-list {
    max-height: 95px !important;
    padding: 3px !important;
  }
}

/* 🆕 尺码统计列表滚动条样式 */
#sizeStatisticsList {
  scrollbar-width: thin;
  scrollbar-color: #bbb #f5f5f5;
}

#sizeStatisticsList::-webkit-scrollbar {
  width: 6px;
}

#sizeStatisticsList::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

#sizeStatisticsList::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 3px;
  transition: background-color 0.2s;
}

#sizeStatisticsList::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

/* 🆕 出售报价尺码数量统计容器 */
#asksSizeStatsContainer {
  max-height: none;
  position: relative;
  z-index: 1;
}

/* 🆕 移动端尺码数量容器限制高度防止溢出 */
@media (max-width: 768px) {
  #asksSizeStatsContainer {
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  #asksSizeStatsContainer {
    max-height: 100px;
  }
}

.asks-size-count-list::-webkit-scrollbar {
  width: 6px;
}

.asks-size-count-list::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.asks-size-count-list::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.asks-size-count-list::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

/* 移动端优化出售报价尺码卡片 */
@media (max-width: 768px) {
  .asks-size-count-list > div {
    padding: 6px 10px !important;
    gap: 5px !important;
  }
  
  .asks-size-count-list > div > span:first-child {
    font-size: 12px !important;
  }
  
  .asks-size-count-list > div > span:last-child {
    font-size: 10px !important;
    padding: 2px 6px !important;
    min-width: 24px !important;
  }
  
  /* 移动端容器内边距优化 */
  #asksSizeStatsContainer > div {
    padding: 8px 16px 10px !important;
  }
  
  #asksSizeStatsContainer > div > div:first-child {
    margin-bottom: 6px !important;
  }
  
  /* 平板日期选择器优化 */
  .transaction-date-range-picker {
    padding: 6px !important;
  }
  
  .date-quick-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .asks-size-count-list {
    gap: 8px !important;
    padding: 3px !important;
    max-height: 130px !important;
    overflow-y: auto !important;
  }
  
  .asks-size-count-list > div {
    padding: 5px 8px !important;
    gap: 4px !important;
  }
  
  .asks-size-count-list > div > span:first-child {
    font-size: 11px !important;
  }
  
  .asks-size-count-list > div > span:last-child {
    font-size: 9px !important;
    padding: 2px 5px !important;
    min-width: 22px !important;
  }
  
  /* 小屏容器内边距 */
  #asksSizeStatsContainer > div {
    padding: 6px 12px 8px !important;
  }
  
  #asksSizeStatsContainer > div > div:first-child {
    margin-bottom: 5px !important;
  }
  
  /* 小屏求购报价卡片 */
  .price-bucket {
    min-width: 75px !important;
    max-width: 85px !important;
    padding: 6px 6px !important;
  }
  
  /* 🆕 小屏求购报价自适应高度 */
  #distributionChart {
    flex: 1 !important;
    max-height: none !important;
    min-height: 0 !important;
  }
  
  .price-bucket .bucket-size {
    font-size: 10px !important;
  }
  
  .price-bucket .bucket-value {
    font-size: 10px !important;
    padding: 2px 5px !important;
  }
  
  .price-bucket > div:last-child {
    font-size: 9px !important;
    padding: 1px 4px !important;
  }
  
  /* 小屏幕复制按钮 */
  #copySizeStatsBtn,
  button[onclick*="copy"] {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  
  #copySizeStatsBtn svg,
  button[onclick*="copy"] svg {
    width: 9px !important;
    height: 9px !important;
  }
  
  #copySizeStatsBtn span,
  button[onclick*="copy"] span {
    display: none;
  }
  
  /* 小屏日期选择器优化 */
  .transaction-date-range-picker {
    padding: 6px !important;
  }
  
  .date-quick-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
  
  .date-input {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }
  
  #loadByDateRangeBtn {
    padding: 3px 10px !important;
    font-size: 10px !important;
  }
}

/* 🆕 全局tooltip样式 - 附加到body，最高层级 */
.global-tooltip {
  position: fixed;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
  max-width: 260px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* 🆕 尺码统计卡片 tooltip 样式 - 禁用CSS tooltip，使用JS全局tooltip */
.size-stat-tooltip {
  cursor: help;
  padding: 2px 3px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.size-stat-tooltip:hover {
  background-color: #f0f0f0;
}

/* 禁用CSS伪元素tooltip */
.size-stat-tooltip::after,
.size-stat-tooltip::before {
  display: none !important;
}

/* recent-searches.css - 最近搜索区域样式（仿 KREAM） */

.recent-searches-section {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 0 0;
}

.recent-searches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.recent-searches-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.recent-searches-clear {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.15s;
}

.recent-searches-clear:hover {
  color: var(--text);
}

.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-search-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ebebeb;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  max-width: 250px;
}

.recent-search-tag:hover {
  border-color: #222;
  background: #fafafa;
}

.recent-search-tag-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  line-height: 30px;
}

.recent-search-tag-main {
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-search-tag-cn {
  font-size: 11px;
  color: var(--muted, #9a9a9a);
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.recent-search-tag-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.recent-search-tag-delete:hover {
  opacity: 1;
}

.recent-search-tag-delete svg {
  width: 12px;
  height: 12px;
}

/* 空状态 */
.recent-searches-empty {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  text-align: center;
  padding: 20px 0;
}

/* 响应式 */
@media (max-width: 640px) {
  .recent-searches-section {
    padding: 16px 12px 0;
  }

  .recent-searches-title {
    font-size: 14px;
  }

  .recent-searches-clear {
    font-size: 12px;
  }

  .recent-search-tag {
    height: 28px;
    padding: 0 8px;
    gap: 3px;
  }

  .recent-search-tag-text {
    font-size: 12px;
    max-width: 150px;
  }
}

/* hot-keywords.css - 热门搜索词样式（从 styles.css 拆分） */

/* 电脑版：取消独立 max-width，由父级 .wrap 控制宽度，与 logo 左对齐 */

.hot-keywords-section {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px 0;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}

.hot-keywords-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.hot-keywords-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.hot-keywords-time {
  font-size: 12px;
  color: #999;
}

.hot-keywords-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  touch-action: pan-y;
}

.hot-keywords-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 30px;
}

.loading-spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid #f0f0f0;
  border-top-color: #222;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hot-keyword-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  -webkit-user-drag: none;
}

.hot-keyword-item:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.hot-keyword-item:active {
  transform: translateY(0);
}

.hot-keyword-rank {
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  margin-right: 10px;
  border-radius: 4px;
}

.hot-keyword-rank.top3 {
  background: #222;
  color: #fff;
}

.hot-keyword-rank:not(.top3) {
  color: #888;
}

.hot-keyword-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hot-keyword-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hot-keyword-title {
  font-size: 14px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-keyword-subtitle {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-keyword-change {
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.hot-keyword-change.up {
  color: #f15746;
}

.hot-keyword-change.down {
  color: #41a0ff;
}

.hot-keyword-change.new {
  color: #f15746;
  font-weight: 600;
}

.hot-keyword-change.same {
  color: #999;
}

.hot-keywords-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* 热门搜索加载失败时显示，点击重试（微信等环境） */
.hot-keywords-retry {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  background: #f5f5f5;
  border-radius: 8px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.hot-keywords-retry:hover {
  background: #eee;
  color: #222;
}

@media (max-width: 1024px) {
  .hot-keywords-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hot-keywords-section {
    margin: 10px 0 10px;
    padding: 10px 0;
  }

  .hot-keywords-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .hot-keyword-item {
    padding: 8px 10px;
  }

  .hot-keyword-title {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hot-keywords-list {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .hot-keyword-rank {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    margin-right: 8px;
  }

  .hot-keyword-title {
    font-size: 12px;
  }

  .hot-keyword-change {
    font-size: 10px;
  }
}

/* recently-viewed.css - 最近浏览商品样式 */

/* ============================================
   首页横向滚动条
   ============================================ */
/* 电脑版：取消独立 max-width，由父级 .wrap 控制宽度，与 logo 左对齐 */

.recently-viewed-section {
  margin-top: 16px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.recently-viewed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.recently-viewed-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.recently-viewed-more {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.15s;
}

.recently-viewed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recently-viewed-clear {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.15s;
}

.recently-viewed-clear:hover {
  color: var(--text);
}

.recently-viewed-more:hover {
  color: var(--text);
}

.recently-viewed-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.recently-viewed-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.rv-card {
  flex: 0 0 auto;
  width: 120px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: opacity 0.15s;
}

/* 作为链接时保持外观一致，无下划线，并让右键落在链接上 */
a.rv-card.product-card-link,
a.rv-card.product-card-link .rv-card-name {
  text-decoration: none !important;
  color: inherit;
}
a.rv-card.product-card-link .rv-card-image,
a.rv-card.product-card-link .rv-card-image img {
  pointer-events: none;
}

.rv-card:hover {
  opacity: 0.8;
}

.rv-card-image {
  width: 120px;
  height: 120px;
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rv-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rv-card-name {
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.rv-card-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================
   /saved 完整页面 — 网格布局（仿 KREAM 我的页面）
   ============================================ */
.rv-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

.rv-page-header {
  padding: 32px 0 20px;
  border-bottom: 1px solid #ebebeb;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rv-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.rv-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rv-page-clear {
  font-size: 14px;
  color: var(--muted, #9a9a9a);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 0;
  transition: color 0.15s;
}

.rv-page-clear:hover {
  color: var(--text);
}

.rv-page-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 16px;
}

/* 单个商品卡片（大卡片，含品牌、名称、价格、统计等） */
.rv-grid-card {
  cursor: pointer;
  transition: opacity 0.15s;
}

.rv-grid-card:hover {
  opacity: 0.85;
}

.rv-grid-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.rv-grid-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
  z-index: 1;
}

.rv-grid-card-delete:hover {
  background: rgba(0,0,0,0.75);
}

.rv-grid-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 收藏图标（右上角） */
.rv-grid-card-bookmark {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rv-grid-card-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.rv-grid-card-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
  min-height: calc(1.4em * 2);
}

.rv-grid-card-subtitle {
  font-size: 11px;
  color: #a7a7a7;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.rv-grid-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.rv-grid-card-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
  background: #f2f9f6;
  color: #31b46e;
}

.rv-grid-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.rv-grid-card-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #999;
}

/* 空状态 */
.rv-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted, #9a9a9a);
}

.rv-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.rv-empty-text {
  font-size: 14px;
}

/* ============================================
   响应式
   ============================================ */
@media (min-width: 1400px) {
  .rv-page-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1024px) {
  .rv-page-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .rv-page {
    padding: 0 20px;
  }

  .rv-page-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
  }

  .rv-card {
    width: 100px;
  }

  .rv-card-image {
    width: 100px;
    height: 100px;
  }

  .rv-card-name {
    font-size: 11px;
  }

  .rv-card-price {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  /* 手机版显示滚动条 */
  .recently-viewed-scroll {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  .recently-viewed-scroll::-webkit-scrollbar {
    display: block;
    height: 4px;
  }
  .recently-viewed-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  .recently-viewed-scroll::-webkit-scrollbar-track {
    background: transparent;
  }
}

@media (max-width: 640px) {
  .recently-viewed-title {
    font-size: 14px;
  }

  .rv-page {
    padding: 0 16px;
  }

  .rv-page-header {
    padding: 20px 0 14px;
  }

  .rv-page-title {
    font-size: 18px;
  }

  .rv-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 8px;
  }

  .rv-card {
    width: 90px;
  }

  .rv-card-image {
    width: 90px;
    height: 90px;
    border-radius: 8px;
  }

  .rv-card-name {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .rv-card {
    width: 80px;
  }

  .rv-card-image {
    width: 80px;
    height: 80px;
  }

  .rv-card-name {
    font-size: 10px;
  }

  .rv-card-price {
    font-size: 11px;
  }
}

/* saved-products.css - 商品收藏样式 */

/* ============================================
   首页横向滚动条（收藏的商品）
   ============================================ */
/* 电脑版：取消独立 max-width，由父级 .wrap 控制宽度，与 logo 左对齐 */

.saved-products-home-section {
  margin-top: 16px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.saved-products-home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.saved-products-home-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.saved-products-home-more {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.15s;
}

.saved-products-home-more:hover {
  color: var(--text);
}

.saved-products-home-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.saved-products-home-scroll::-webkit-scrollbar {
  display: none;
}

.sp-home-card {
  flex: 0 0 auto;
  width: 120px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: opacity 0.15s;
}

.sp-home-card:hover {
  opacity: 0.8;
}

.sp-home-card-image {
  width: 120px;
  height: 120px;
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sp-home-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-home-card-name {
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

/* ============================================
   商品详情页 — 收藏按钮（书签图标）
   ============================================ */
.save-product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  border-radius: 50%;
  transition: background 0.2s, transform 0.15s;
  vertical-align: middle;
  flex-shrink: 0;
}

.save-product-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.save-product-btn:active {
  transform: scale(0.9);
}

.save-product-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* 收藏动画 */
.save-product-btn.save-animate {
  animation: savePopBounce 0.4s ease;
}

@keyframes savePopBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ============================================
   /saved/tab/saved-product 页面
   ============================================ */
.sp-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

.sp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 20px;
  border-bottom: 1px solid #ebebeb;
  margin-bottom: 24px;
}

.sp-page-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.sp-clear-all-btn {
  font-size: 13px;
  color: #999;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.sp-clear-all-btn:hover {
  color: #ef6253;
  border-color: #ef6253;
}

.sp-clear-all-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sp-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text, #222);
}

.sp-page-count {
  font-size: 14px;
  color: var(--muted, #9a9a9a);
  font-weight: 400;
}

.sp-page-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 16px;
}

/* 单个商品卡片 */
.sp-grid-card {
  cursor: pointer;
  transition: opacity 0.15s;
}

.sp-grid-card:hover {
  opacity: 0.85;
}

.sp-grid-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.sp-grid-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 取消收藏按钮（卡片右上角） */
.sp-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.sp-grid-card:hover .sp-remove-btn {
  opacity: 1;
}

.sp-remove-btn:hover {
  background: rgba(239, 98, 83, 0.9);
}

.sp-grid-card-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #222);
  margin-bottom: 4px;
  line-height: 1.2;
}

.sp-grid-card-name {
  font-size: 13px;
  color: var(--text, #222);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
  min-height: calc(1.4em * 2);
}

.sp-grid-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #222);
  margin-bottom: 6px;
}

/* 空状态 */
.sp-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted, #9a9a9a);
}

.sp-empty-icon {
  margin-bottom: 16px;
  opacity: 0.4;
}

.sp-empty-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #666;
}

.sp-empty-hint {
  font-size: 13px;
  color: #aaa;
}

/* ============================================
   响应式
   ============================================ */
@media (min-width: 1400px) {
  .sp-page-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1024px) {
  .sp-page-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .sp-page {
    padding: 0 20px;
  }

  .sp-page-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
  }
}

@media (max-width: 640px) {
  .sp-page {
    padding: 0 16px;
  }

  .sp-page-header {
    padding: 20px 0 14px;
  }

  .sp-page-title {
    font-size: 18px;
  }

  .sp-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 8px;
  }
}

@media (max-width: 480px) {
  .sp-remove-btn {
    opacity: 1;
  }
}

/* ============================================
   首页横向滚动 — 响应式
   ============================================ */
@media (max-width: 768px) {
  .saved-products-home-section {
    padding: 0;
  }

  .saved-products-home-scroll {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  .saved-products-home-scroll::-webkit-scrollbar {
    display: block;
    height: 4px;
  }
  .saved-products-home-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  .saved-products-home-scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .sp-home-card {
    width: 100px;
  }

  .sp-home-card-image {
    width: 100px;
    height: 100px;
  }

  .sp-home-card-name {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .saved-products-home-section {
    margin-top: 12px;
    padding: 0;
  }

  .saved-products-home-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .saved-products-home-section {
    padding: 0;
  }

  .sp-home-card {
    width: 90px;
  }

  .sp-home-card-image {
    width: 90px;
    height: 90px;
    border-radius: 8px;
  }

  .sp-home-card-name {
    font-size: 10px;
  }
}

/* brand-products.css - 品牌商品列表页面专有样式 */
/* 网格/卡片/排序/切换按钮 等样式全部复用搜索结果页（base.css / sort-filter.css） */

/* ==================== 商品详情页 - 品牌链接（标题上方） ==================== */
.product-brand-link {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 6px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.product-brand-link:hover {
  color: var(--sub);
}

.product-brand-link:active {
  opacity: 0.7;
}

/* ==================== 品牌商品列表页 - 品牌头部 ==================== */
.brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid #ebebeb;
  margin-bottom: 24px;
}

.brand-header-logo {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: contain;
  background: #f4f4f4;
  padding: 8px;
}

.brand-header-info {
  flex: 1;
}

.brand-header-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.brand-header-translated {
  font-size: 16px;
  color: var(--sub);
  margin: 0 0 8px 0;
}

.brand-header-stats {
  font-size: 14px;
  color: var(--muted);
}

/* ==================== 错误/空状态 ==================== */
.brand-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  text-align: center;
}

.brand-error-icon {
  width: 64px;
  height: 64px;
  color: #e74c3c;
}

.brand-error-message {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.brand-error-retry {
  padding: 10px 24px;
  font-size: 14px;
  color: white;
  background: var(--text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.brand-error-retry:hover {
  opacity: 0.8;
}

.brand-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  text-align: center;
}

.brand-empty-icon {
  width: 64px;
  height: 64px;
  color: var(--muted);
}

.brand-empty-message {
  font-size: 16px;
  color: var(--sub);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
  .brand-header-logo {
    width: 64px;
    height: 64px;
  }

  .brand-header-name {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
  }

  .brand-header-logo {
    width: 56px;
    height: 56px;
  }

  .brand-header-name {
    font-size: 20px;
  }

  .brand-header-translated {
    font-size: 14px;
  }

  /* 商品详情页 - 品牌链接移动端 */
  .product-brand-link {
    font-size: 12px;
    margin-bottom: 4px;
  }
}

@media (max-width: 480px) {
  .brand-header-name {
    font-size: 18px;
  }

  .brand-header-stats {
    font-size: 13px;
  }
}
