/* ============================================
   随心商城 · 商品多图画廊 (运行时增强层)
   前台: 详情页主图 + 缩略图条 + 左右切换箭头
   后台: 商品编辑弹窗多图上传按钮 + 预览条
   ============================================ */

/* 全局: 禁止任何增强元素把页面撑出横向滚动条 */
html, body { max-width: 100%; overflow-x: clip; }

/* ---------- 前台: 详情页画廊 ---------- */

/* 左列改为纵向排布: 主图在上, 缩略图条在下; 压缩原 p-10 大留白, 让图片铺满 */
.suixin-gallery-left {
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 12px;
  padding: 14px !important;
}

/* 主图容器: 拉满左列宽度(覆盖原 max-w-md 限制), 只留小边距
   (大屏拉伸/缩略图排满规则见文件末尾 md+ 媒体查询) */
.suixin-gallery-holder {
  width: 100% !important;
  max-width: 100% !important;
}

/* 主图容器: 保持占位, 加切换过渡 */
.suixin-gallery-main-img {
  transition: opacity 0.28s ease;
}
.suixin-gallery-main-img.is-switching {
  opacity: 0;
}

/* 左右切换箭头 */
.suixin-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #16263a;
  box-shadow: 0 4px 14px rgba(22, 38, 58, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  opacity: 0.65;
}
.suixin-gallery-arrow:hover {
  background: #ffffff;
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}
.suixin-gallery-arrow:active {
  transform: translateY(-50%) scale(0.96);
}
.suixin-gallery-arrow.is-prev { left: 10px; }
.suixin-gallery-arrow.is-next { right: 10px; }
.suixin-gallery-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}
.suixin-gallery-arrow[disabled] {
  opacity: 0.25;
  cursor: default;
}

/* 计数徽章 1/4 */
.suixin-gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(22, 38, 58, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  z-index: 20;
  user-select: none;
  pointer-events: none;
}

/* 缩略图条 */
.suixin-gallery-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 0;
}
.suixin-gallery-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 2px solid rgba(44, 74, 110, 0.15);
  background: #fff;
  box-shadow: 0 2px 8px rgba(22, 38, 58, 0.1);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  flex: none;
}
.suixin-gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 38, 58, 0.18);
}
.suixin-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.suixin-gallery-thumb.is-active {
  border-color: var(--color-brand-800, #2c4a6e);
  box-shadow: 0 0 0 3px rgba(44, 74, 110, 0.18), 0 4px 12px rgba(22, 38, 58, 0.16);
}
.suixin-gallery-thumb.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--color-brand-800, #2c4a6e);
}

/* 暗色模式适配 */
.dark .suixin-gallery-arrow {
  background: rgba(31, 41, 55, 0.85);
  color: #e5e7eb;
}
.dark .suixin-gallery-arrow:hover { background: rgba(55, 65, 81, 0.95); }
.dark .suixin-gallery-thumb {
  background: #1f2937;
  border-color: rgba(156, 163, 175, 0.25);
}
.dark .suixin-gallery-count { background: rgba(0, 0, 0, 0.6); }

/* 移动端: 箭头缩小、缩略图横向滚动 */
@media (max-width: 767px) {
  .suixin-gallery-arrow { width: 32px; height: 32px; }
  .suixin-gallery-arrow.is-prev { left: 6px; }
  .suixin-gallery-arrow.is-next { right: 6px; }
  .suixin-gallery-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .suixin-gallery-thumb { width: 60px; height: 60px; }
}

/* ---------- 后台: 多图上传 ---------- */

.suixin-gallery-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px dashed var(--color-brand-800, #2c4a6e);
  background: rgba(44, 74, 110, 0.06);
  color: var(--color-brand-800, #2c4a6e);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.suixin-gallery-upload-btn:hover {
  background: rgba(44, 74, 110, 0.12);
}
.suixin-gallery-upload-btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.suixin-gallery-upload-btn svg {
  width: 15px;
  height: 15px;
}
.suixin-gallery-admin-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.suixin-gallery-admin-previews:empty { display: none; }
.suixin-admin-preview-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(22, 38, 58, 0.15);
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.suixin-admin-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.suixin-admin-preview-item .suixin-preview-del {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 0 0 0 8px;
  background: rgba(22, 38, 58, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.suixin-admin-preview-item .suixin-preview-del:hover {
  background: #dc2626;
}

/* 详情页画廊激活时: 收缩内容区底部间距(缩略图条与页脚之间的大空白) */
body.suixin-on-product main .max-w-7xl {
  padding-bottom: 16px !important;
}

/* ---------- 详情页: 热销产品区块 ---------- */
.suixin-hot {
  margin-top: 18px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(22, 38, 58, 0.08);
  padding: 20px 22px 22px;
}
.suixin-hot-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}
.suixin-hot-flame { font-size: 20px; }
.suixin-hot-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #16263a;
}
.suixin-hot-sub {
  font-size: 12px;
  color: #9ca3af;
}
.suixin-hot-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.suixin-hot-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid rgba(22, 38, 58, 0.1);
  border-radius: 10px;
  overflow: hidden; /* 图片随卡片圆角裁切, 贴满不留边缘 */
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.suixin-hot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(22, 38, 58, 0.14);
  border-color: rgba(44, 74, 110, 0.35);
}
.suixin-hot-imgwrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0; /* 原独立圆角取消, 图片直接铺到卡片边缘 */
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex: none;
}
.suixin-hot-imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.suixin-hot-info {
  padding: 9px 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.suixin-hot-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.suixin-hot-desc {
  font-size: 12px;
  color: #8a8a8a;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.suixin-hot-pricerow {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 2px;
  overflow: hidden;
}
.suixin-hot-price {
  font-size: 16px;
  font-weight: 800;
  color: #e4393c;
}
.suixin-hot-sold {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 1px;
}
.dark .suixin-hot {
  background: #1f2937;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.dark .suixin-hot-title { color: #f3f4f6; }
.dark .suixin-hot-card {
  background: #111827;
  border-color: rgba(156, 163, 175, 0.15);
}
.dark .suixin-hot-name { color: #e5e7eb; }
.dark .suixin-hot-imgwrap { background: #1f2937; }
@media (max-width: 1023px) {
  .suixin-hot-grid { grid-template-columns: repeat(3, 1fr); }
}
/* 平板竖屏/中窄屏: 左列较窄时主图稍作收敛, 避免被右列撑成过瘦长条 */
@media (min-width: 768px) and (max-width: 1100px) {
  .suixin-gallery-holder {
    flex: 1 1 auto;
    aspect-ratio: auto !important;
    max-height: 620px;
  }
  /* 中窄屏热销 4 列, 卡片不至于过窄 */
  .suixin-hot-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 479px) {
  .suixin-hot { padding: 16px; border-radius: 18px; }
  .suixin-hot-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
/* 极窄屏(<=360): 进一步压缩, 消除横向溢出 */
@media (max-width: 360px) {
  .suixin-hot { padding: 12px; }
  .suixin-hot-grid { gap: 8px; }
  .suixin-hot-name { font-size: 12px; }
  header .max-w-6xl { gap: 6px !important; padding-left: 10px !important; padding-right: 10px !important; }
  header nav { gap: 6px !important; font-size: 12px !important; flex-wrap: wrap; }
  header nav a.inline-block { padding: 5px 8px !important; font-size: 11px !important; }
  /* 极窄屏装饰圆进一步收敛, 避免溢出视口 */
  main .rounded-3xl .absolute[class*="-right-10"],
  main .rounded-3xl .absolute[class*="-left-16"] { width: 90px !important; height: 90px !important; }
  /* 缩略图在极窄屏为可滚动行, 禁止撑破容器 */
  .suixin-gallery-bar { max-width: 100%; overflow-x: auto; }
  .suixin-gallery-thumb { width: 52px !important; height: 52px !important; }
}

/* ---------- 移动端: 兼容原有页头/详情装饰元素, 消除横向溢出 ---------- */
@media (max-width: 767px) {
  /* 页头导航在窄屏压缩留白与字号, 避免撑破视口产生横向滚动 */
  header .max-w-6xl {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 10px !important;
  }
  header nav {
    gap: 10px !important;
    font-size: 13px !important;
  }
  header nav a.inline-block {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  /* 详情卡片左上/右下的大型装饰圆在窄屏收敛, 避免溢出 */
  main .rounded-3xl > .absolute[class*="rounded-full"],
  main .rounded-3xl .absolute[class*="-left-16"],
  main .rounded-3xl .absolute[class*="-right-10"] {
    width: 140px !important;
    height: 140px !important;
  }
}

/* ---------- 手机端详情信息区: 行距收紧 + 文本单行自适应 ---------- */
/* 标题/描述不折行, 超长显示省略号; 字号用 vw 随屏宽自适应缩放 */
@media (max-width: 767px) {
  /* 右列各区块间距: 24px -> 14px, 分区上边距 24px -> 14px */
  body.suixin-on-product main .max-w-7xl .space-y-6 > * + * {
    margin-top: 14px !important;
  }
  /* 关键: Tailwind 每个区块自带 mb-6(24px), 与父级 space-y-6 的 margin-top 叠加,
     导致实际视觉间距 = 24 + 14 = 38px。这里把子区块自身的下边距清零,
     只保留父级 14px 间距, 行间才真正收紧。*/
  body.suixin-on-product main .max-w-7xl .space-y-6 > * {
    margin-bottom: 0 !important;
  }
  /* 第一块(标题/价格区)内部最后一行同样是 mb-6, 一并对齐 */
  body.suixin-on-product main .max-w-7xl .space-y-6 > * > *:last-child {
    margin-bottom: 0 !important;
  }
  body.suixin-on-product main .max-w-7xl .space-y-6 .pt-6 {
    padding-top: 14px !important;
  }
  /* 徽章行与标题间距收紧 */
  body.suixin-on-product main .max-w-7xl .flex.items-center.gap-2.mb-3 {
    margin-bottom: 7px !important;
  }
  /* 商品标题: 单行 + 字号随屏宽自适应(约5.2vw, 17~24px) */
  body.suixin-on-product main h1 {
    font-size: clamp(17px, 5.2vw, 24px) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 5px !important;
  }
  /* 描述: 单行省略 */
  body.suixin-on-product main .max-w-7xl p[class*="text-gray-500"] {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 10px !important;
  }
  /* 价格区上边距收紧 */
  body.suixin-on-product main .max-w-7xl .flex.items-baseline.pt-4 {
    padding-top: 9px !important;
  }
  /* 数量/金额等行内文字稍收, 减少行高 */
  body.suixin-on-product main .max-w-7xl .space-y-6 p,
  body.suixin-on-product main .max-w-7xl .space-y-6 span {
    line-height: 1.4;
  }
}

/* ---------- 大屏(md+)画廊布局精调 ----------
   必须位于所有基础规则之后以保证覆盖生效:
   1) 主图: 高度自适应填满左列剩余空间(左列与右列等高, 上下对齐不留空白)
   2) 缩略图条: margin-top:auto 抵到左列底部, 底边距=上方 14px
   3) 缩略图: 均分整行宽度, 左右刚好与主图边缘对齐 */
@media (min-width: 768px) {
  .suixin-gallery-holder {
    flex: 1 1 auto;
    aspect-ratio: auto !important;
    min-height: 380px;
  }
  .suixin-gallery-bar {
    margin-top: auto;
  }
  .suixin-gallery-thumb {
    flex: 1 1 0;
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 120px;
  }
}

/* ---------- 输入框 placeholder 兼容兜底 ----------
   站点 Tailwind v4 用 oklab()/oklch() 颜色, 老内核手机浏览器不支持,
   placeholder 文字会渲染成透明导致"框里空的不知道填什么"。
   用普通十六进制色强制可见(全视口生效)。 */
main input::placeholder,
main textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
  font-size: 13px !important;
}

/* ---------- 手机端支付方式选项: 单列拉宽变矮 ----------
   原来 grid-cols-2 每个选项只有 142px 宽, 名称/描述文字竖排堆叠很丑;
   改单列后每个选项占满整行, 高度收紧, 文字单行不折行 */
@media (max-width: 767px) {
  body.suixin-on-product main .max-w-7xl .space-y-6 .grid.grid-cols-2.gap-3 {
    grid-template-columns: 1fr !important;
  }
  body.suixin-on-product main .max-w-7xl .space-y-6 .grid.grid-cols-2.gap-3 > label {
    padding: 10px 14px !important;
  }
  body.suixin-on-product main .max-w-7xl .space-y-6 .grid.grid-cols-2.gap-3 label > div {
    min-width: 0 !important;
  }
  body.suixin-on-product main .max-w-7xl .space-y-6 .grid.grid-cols-2.gap-3 label p {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* ---------- 首页/列表页商品卡片: 京东式布局 ---------- */
/* 价格标红加粗 / 划线原价置灰 / 描述单行灰字(全视口) */
a.suixin-jd-card .suixin-jd-price {
  color: #e4393c !important;
  font-weight: 800 !important;
}
/* 划线原价: 已按需求全部删除(不显示) —— 类名由增强层加在带 line-through 的价签上 */
.suixin-jd-orig {
  display: none !important;
}
a.suixin-jd-card .suixin-jd-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: #8a8a8a;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 描述一律单行: 同时作用于注入的描述与站点自带的描述块 */
a.suixin-jd-card .suixin-desc-1line {
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal;
}
/* 标题在 flex 行中占满剩余宽度, 不再被旁边的元素挤到显示不全 */
a.suixin-jd-card h3 {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
/* 移除卡片内"查看详情"圆钮(整卡即可点击, 无需按钮; 手机+电脑端一并移除)。
   注意作用域: 必须限定在商品卡片链接内, 头部"登录/注册"与筛选"全部"按钮
   同用 bg-brand-800 类, 不能误伤 */
main a[href*="/product/"] span.bg-brand-800 {
  display: none !important;
}

/* ---------- 卡片信息区: 京东详情式排版 v3 ----------
   第1行 [自营]红徽标+标题 / 第2行 描边胶囊标签 / 第3行 大红价+灰后缀+加号圆钮 */
/* 红底白字"自营"徽标 */
.suixin-jd-zys {
  display: inline-flex;
  align-items: center;
  background: #e4393c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2.5px 4px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  vertical-align: 1.5px;
}
/* 标题行里站点自带的库存角标隐藏(库存信息移至标签行灰胶囊) */
.suixin-jd-hide { display: none !important; }
/* 标签胶囊行 */
.suixin-jd-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 1px;
  overflow: hidden;
  white-space: nowrap;
}
.suixin-jd-pill {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.6;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ffffff;
}
.dark .suixin-jd-pill { background: transparent; }
.suixin-jd-pill-red {
  color: #e4393c;
  border-color: #f3b3b3;
  background: #fffafa;
}
.dark .suixin-jd-pill-red { color: #f87171; border-color: rgba(248, 113, 113, 0.45); }
.suixin-jd-pill-gray {
  color: #4b5563;
  border-color: #e5e7eb;
  flex-shrink: 0;
}
.dark .suixin-jd-pill-gray { color: #d1d5db; border-color: #4b5563; }
/* 价格分级: ¥ 与小数缩小, 整数加大(如 ¥11998.00) */
a.suixin-jd-card .suixin-jd-price,
.suixin-hot-price {
  display: inline-flex;
  align-items: baseline;
}
.suixin-cur, .suixin-dec {
  font-size: 0.64em;
  font-weight: 700;
}
.suixin-int {
  font-size: 1.14em;
  letter-spacing: -0.2px;
}
/* 价格行灰色后缀(已售 N 件) */
.suixin-jd-suffix {
  font-size: 11px;
  color: #9ca3af;
  margin-left: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
/* 加号圆钮(浅粉底红加号, 京东同款; 整卡即链接) */
.suixin-jd-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffece8;
  color: #e4393c;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  user-select: none;
}

/* 手机端: 网格间距 16px -> 8px, 页面左右留白 16px -> 8px, 卡片紧凑贴边 */
@media (max-width: 767px) {
  .suixin-jd-grid {
    gap: 8px !important;
  }
  .suixin-jd-wrap {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  /* 卡片信息区收紧(京东式小留白), 标题单行; 图区不受影响保持贴边 */
  a.suixin-jd-card > div.p-5,
  a.suixin-jd-card > div.p-3 {
    padding: 9px 10px 11px !important;
  }
  a.suixin-jd-card h3 {
    font-size: 14px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 0 !important;
  }
  .suixin-jd-plus { width: 20px; height: 20px; font-size: 14px; }
}

/* ---------- 收货地址插件: 前台表单(仿京东编辑收货地址) ---------- */
.suixin-addr {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}
.dark .suixin-addr { background: #1f2937; border-color: #374151; }
.suixin-addr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #fff5f5, #ffffff);
  border-bottom: 1px solid #f3f4f6;
}
.dark .suixin-addr-head { background: linear-gradient(90deg, rgba(228,57,60,.12), transparent); border-bottom-color: #374151; }
.suixin-addr-ico { font-size: 16px; }
.suixin-addr-title {
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}
.dark .suixin-addr-title { color: #f3f4f6; }
.suixin-addr-sub { font-size: 11px; color: #9ca3af; flex: 1 1 auto; }
.suixin-addr-fold {
  border: none;
  background: none;
  font-size: 12px;
  color: #e4393c;
  cursor: pointer;
  padding: 2px 4px;
}
.suixin-addr-body { padding: 4px 14px 12px; }
.suixin-addr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #f3f4f6;
}
.dark .suixin-addr-row { border-bottom-color: #374151; }
.suixin-addr-row:last-of-type { border-bottom: none; }
.suixin-addr-row > label {
  flex: none;
  width: 60px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.dark .suixin-addr-row > label { color: #d1d5db; }
.suixin-addr-row input[data-addr-field] {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #1f2937;
}
.dark .suixin-addr-row input[data-addr-field] { color: #f3f4f6; }
.suixin-addr-row input[data-addr-field]::placeholder { color: #c0c6cf; }
.suixin-addr-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.suixin-addr-tag {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.dark .suixin-addr-tag { background: #374151; border-color: #4b5563; color: #d1d5db; }
.suixin-addr-tag.is-on {
  border-color: #e4393c;
  color: #e4393c;
  background: #fff1f0;
  font-weight: 700;
}
.dark .suixin-addr-tag.is-on { background: rgba(228,57,60,.15); }
.suixin-addr-default {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}
.dark .suixin-addr-default { color: #9ca3af; }
.suixin-addr-default input { accent-color: #e4393c; }

/* ---------- 收货地址插件: 后台悬浮按钮 + 管理面板 ---------- */
.suixin-addr-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 1200;
  border: none;
  background: linear-gradient(135deg, #e4393c, #ff6034);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(228, 57, 60, 0.4);
  cursor: pointer;
  transition: transform .15s ease;
}
.suixin-addr-fab:hover { transform: translateY(-2px); }
.suixin-addr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.suixin-addr-modal {
  background: #fff;
  border-radius: 16px;
  width: min(720px, 96vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.suixin-addr-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.suixin-addr-modal-title { font-size: 15px; font-weight: 800; color: #1f2937; flex: none; }
.suixin-addr-search {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
}
.suixin-addr-search:focus { border-color: #e4393c; }
.suixin-addr-export {
  flex: none;
  border: none;
  background: #e4393c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.suixin-addr-close {
  flex: none;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.suixin-addr-list { overflow-y: auto; padding: 12px 16px 16px; }
.suixin-addr-loading, .suixin-addr-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 40px 0;
}
.suixin-addr-item {
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color .15s ease;
}
.suixin-addr-item:hover { border-color: #e4393c66; }
.suixin-addr-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.suixin-addr-no { font-family: monospace; font-size: 12px; color: #6b7280; }
.suixin-addr-time { font-size: 11px; color: #9ca3af; }
.suixin-addr-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
}
.suixin-addr-status.st-paid { background: #dcfce7; color: #16a34a; }
.suixin-addr-status.st-shipped { background: #dbeafe; color: #2563eb; }
.suixin-addr-status.st-completed { background: #e0e7ff; color: #4f46e5; }
.suixin-addr-status.st-cancelled { background: #fee2e2; color: #dc2626; }
.suixin-addr-item-mid { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.suixin-addr-item-addr {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  background: #fffafa;
  border-radius: 8px;
  padding: 8px 10px;
}
.suixin-addr-person { font-size: 13px; font-weight: 700; color: #1f2937; flex: none; }
.suixin-addr-text { font-size: 13px; color: #374151; flex: 1 1 auto; min-width: 200px; }
.suixin-addr-copy2 {
  flex: none;
  border: 1px solid #e4393c;
  background: #fff;
  color: #e4393c;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.suixin-addr-copy2:hover { background: #e4393c; color: #fff; }
/* 后台订单卡片内联地址高亮 */
.suixin-addr-strong { color: #1f2937 !important; font-weight: 600 !important; }
.dark .suixin-addr-strong { color: #f3f4f6 !important; }
.suixin-addr-copy {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 6px;
}
.suixin-addr-copy:hover { border-color: #e4393c; color: #e4393c; }

/* ---------- 手机端修复: 详情页外层 grid 固定列宽导致内容右侧溢出(左右边距异常) ----------
 * 站点结构: div.bg-white(display:grid; overflow:hidden; 宽328)
 *             grid-template-columns 被图片区撑成 378px(固定), > 容器宽度
 *             子项 div.relative + div.p-6 均宽 378 -> 右侧溢出 34px, 被 overflow:hidden 裁掉
 *             桌面端 md:grid-cols-2 时两列各 189 看似正常, 手机端单列才暴露
 * 修复: 手机端强制 grid 单列等宽, 子项 100%, 并把外层左右内边距对齐到 8px(与首页卡片一致)
 */
@media (max-width: 767px) {
  /* 详情页主卡外层: 破掉固定列宽 (由 JS 打标记 data-suixin-detailcard) */
  [data-suixin-detailcard] {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  [data-suixin-detailcard] > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  /* 信息区: 左右收窄到 12px, 与同层区块一致 */
  [data-suixin-detailcard] > .p-6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* 地址卡自身兜底: 永不超出父级 */
  .suixin-addr {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 超窄屏(<=360): 再收紧一档, 避免贴边 */
@media (max-width: 360px) {
  [data-suixin-detailcard] > .p-6 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .suixin-addr-head { padding-left: 12px !important; padding-right: 12px !important; }
  .suixin-addr-body { padding-left: 12px !important; padding-right: 12px !important; }
}

/* 窄屏头部防挤压: 标题/按钮不换行, 副标题省略 */
@media (max-width: 767px) {
  .suixin-addr-head { gap: 6px; }
  .suixin-addr-ico { flex: none; }
  .suixin-addr-title { flex: none !important; white-space: nowrap !important; }
  .suixin-addr-fold { flex: none !important; white-space: nowrap !important; }
  .suixin-addr-sub {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* ---------- 后台登录页: 隐藏暴露的默认账号/密码提示 ----------
 * 该提示硬编码在打包产物里(前端源码不存在), JS 负责移除节点,
 * 此规则负责在 JS 执行前先行隐藏, 避免首屏闪现代码。
 * 通过属性选择器限定: 仅登录卡片内、text-xs + text-gray-400 的 p */
[data-suixin-cred-hint] { display: none !important; }

