/* 私域店铺样式。买家端按淘宝/京东店铺页，商家后台按商家工作台。 */
:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --ink: #222222;
  --ink-2: #666666;
  --muted: #999999;
  --line: #ebebeb;
  --line-2: #f5f5f5;
  /* 主题色由店铺设置下发，改这一个值整站换色 */
  --theme: #c9502f;
  --primary: var(--theme);
  --primary-dark: color-mix(in srgb, var(--theme) 85%, #000);
  --primary-soft: color-mix(in srgb, var(--theme) 9%, #fff);
  --red: #e1251b;
  --price: var(--theme);
  --orange: #ff8f1f;
  --brand: #23201d;
  --brand-soft: #f7f4f0;
  --ok: #12a15c;
  --warn: #b25b00;
  --danger: #d9382c;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --serif: "Times New Roman", "Songti SC", "SimSun", serif;
  --wa-color-brand-60: var(--theme);
  --symbol-color-active: var(--theme);
  font-family: "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(1226px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.serif { font-family: var(--serif); }

/* ================= 按钮 ================= */
.btn, .btn-line, .btn-ghost, .btn-buy, .btn-cart, .btn-mini {
  border: 0; border-radius: 6px; padding: 10px 20px; font-size: 14px;
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
  white-space: nowrap;
}
.btn { background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-dark); }
.btn-line { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-line:hover { background: var(--primary-soft); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-buy { background: var(--primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--theme) 30%, transparent); }
.btn-buy:hover { background: var(--primary-dark); }
.btn-cart { background: var(--primary); color: #fff; }
.btn-big { padding: 16px 42px; font-size: 16px; border-radius: 8px; }
.btn-mini { padding: 4px 12px; font-size: 12px; border-radius: 4px; }
.btn:disabled, .btn-line:disabled, .btn-buy:disabled, .btn-cart:disabled { opacity: 0.4; cursor: not-allowed; }
.link { color: var(--primary); }
.link:hover { text-decoration: underline; }

/* ================= 顶部一行：店铺名 + 购物车 / 订单 / 浏览记录 ================= */
.strip { background: #fff; border-bottom: 2px solid var(--primary); color: var(--ink-2); font-size: 16px; }
/* 用店铺主题色兑出来的浅底，商家在「首页装修 → 首页样式」里可以关掉 */
.strip.tinted {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme) 14%, #fff), color-mix(in srgb, var(--theme) 7%, #fff));
}
/* 过线的那一段渐变画在页面背景上（body），而不是盖在内容上。
   这样它只出现在没有卡片的地方，购物车、订单页签、浏览记录的面板都不会被压住。
   色值和 .strip 底部的 7% 对齐，所以在边框那里接得上。 */
body.tinted {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--theme) 7%, #fff) 0,
      color-mix(in srgb, var(--theme) 7%, #fff) 70px,
      var(--bg) 130px
    )
    no-repeat top / 100% 130px,
    var(--bg);
}
.strip .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 14px; overflow-x: auto; }
.strip > .wrap > * { flex-shrink: 0; }
.strip nav { display: flex; align-items: center; }
.strip nav > * { padding: 0 17px; border-right: 1px solid var(--line); }
.strip nav > *:last-child { border-right: 0; padding-right: 0; }
.strip nav > *:first-child { padding-left: 0; }
.strip a { color: var(--ink-2); }
.strip a:hover, .strip button:hover { color: var(--primary); }
.strip button { background: none; border: 0; padding: 0; font-size: 16px; color: var(--ink-2); }

.strip-shop { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.strip-mark {
  width: 41px; height: 41px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: grid; place-items: center; font-size: 19px; font-weight: 700;
  color: #fff; background: linear-gradient(140deg, var(--theme), var(--primary-dark));
  font-family: var(--serif);
}
.strip-name { font-size: 23px; font-weight: 700; letter-spacing: 2px; font-family: var(--serif); }
.strip-shop:hover .strip-name { color: var(--primary); }
.strip-login { color: var(--primary); }

/* 搜索框，放在「全部商品」这一行标题旁边；右侧留给「查看全部」 */
.search { display: flex; height: 38px; border: 2px solid var(--primary); border-radius: 8px; overflow: hidden; background: #fff; }
.search input { flex: 1; border: 0; outline: none; padding: 0 14px; font-size: 14px; min-width: 0; }
.search button { border: 0; background: var(--primary); color: #fff; padding: 0 24px; font-size: 14px; letter-spacing: 1px; }
.search button:hover { background: var(--primary-dark); }
.all-search { width: 280px; flex-shrink: 0; }

/* ================= 合集页：左侧筛选 + 右侧商品 ================= */
.collection { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; padding-bottom: 40px; }
.collection > * { min-width: 0; }
.collection-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.collection-head {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.collection-head h2 { font-size: 24px; letter-spacing: 1px; font-family: var(--serif); }
.collection-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.collection-title-row h2 { margin: 0; }
.collection-sort {
  position: relative; color: var(--ink-2); font-size: 13px; z-index: 5;
}
.collection-sort-trigger {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 8px; line-height: 18px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); transition: border-color .15s, background .15s;
}
.collection-sort-trigger::-webkit-details-marker { display: none; }
.collection-sort-trigger:hover, .collection-sort[open] .collection-sort-trigger {
  color: var(--theme); border-color: color-mix(in srgb, var(--theme) 35%, white); background: var(--primary-soft);
}
.sort-chevron { display: block; width: 12px; height: 12px; flex: 0 0 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.collection-sort[open] .sort-chevron { transform: rotate(180deg); }
.collection-sort-menu {
  position: absolute; left: 0; top: calc(100% + 5px); width: 154px; padding: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  box-shadow: 0 8px 24px #38251b14;
}
.collection-sort-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 7px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer;
}
.collection-sort-menu button:hover { background: var(--brand-soft); }
.collection-sort-menu button.on { background: var(--primary-soft); color: var(--theme); font-weight: 600; }
.sort-check { width: 14px; text-align: center; }
.collection-sort-trigger:focus-visible, .collection-sort-menu button:focus-visible { outline: 2px solid var(--theme); outline-offset: 2px; }
.collection-head .muted { margin-top: 4px; }
.collection-search { width: 300px; flex-shrink: 0; }
.collection-main .grid { padding-bottom: 0; }
.cat-sort { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 6px; }
.cat-sort-title { padding: 10px 16px 4px; font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* 左侧筛选栏 */
.cat-side { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.cat-side h3 {
  padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
}
.cat-side h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.cat-side button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; padding: 12px 16px; font-size: 14px; color: var(--ink-2);
  border-left: 3px solid transparent; text-align: left; transition: all 0.15s;
}
.cat-side button:hover { background: var(--primary-soft); color: var(--primary); }
.cat-side button.on { border-left-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cat-side button i { font-style: normal; font-size: 12px; color: var(--muted); }

/* 主视觉 */
.banner {
  border-radius: var(--radius); overflow: hidden; position: relative; margin-bottom: 14px;
  min-height: 240px; display: flex; align-items: center; box-shadow: var(--shadow);
}
.banner .bg { position: absolute; inset: 0; }
.banner .bg img { width: 100%; height: 100%; object-fit: cover; }
.banner .veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(28, 24, 20, 0.86) 8%, rgba(28, 24, 20, 0.55) 48%, rgba(28, 24, 20, 0.15) 100%);
}
.banner .inner {
  position: relative; padding: 36px 42px; color: #fff; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.banner .inner > * { min-width: 0; }
.banner .eyebrow { font-size: 12px; letter-spacing: 6px; color: rgba(255, 255, 255, 0.6); }
.banner h2 { font-size: 34px; letter-spacing: 3px; margin-top: 10px; font-family: var(--serif); }
.banner p { color: rgba(255, 255, 255, 0.82); margin-top: 12px; max-width: 520px; }
.banner .actions { display: flex; gap: 12px; margin-top: 22px; }
.banner .share {
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px; padding: 16px 22px; font-size: 12px; text-align: center;
  backdrop-filter: blur(6px);
}
.banner .share b { display: block; font-size: 22px; letter-spacing: 4px; margin: 6px 0 10px; }
.banner .share button { background: #fff; color: var(--brand); border: 0; border-radius: 6px; padding: 6px 16px; font-size: 12px; }

/* 服务承诺条 */
.promises {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); margin: 46px 0 0; overflow: hidden;
}
.promises div {
  padding: 18px 16px; text-align: center; border-right: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2);
}
.promises div:last-child { border-right: 0; }
.promises b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }

/* 区块标题 */
.section-title {
  display: flex; align-items: baseline; gap: 12px; margin: 22px 0 12px;
}
.section-title h2 { font-size: 20px; letter-spacing: 1px; }
.section-title span { color: var(--muted); font-size: 13px; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* ================= 商品卡 ================= */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; padding-bottom: 36px; }
/* 商品卡只在图片上叠加信息，不再有下方文字区 */
.pcard {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: box-shadow 0.22s, transform 0.22s;
  position: relative;
}
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
/* 卡片宽度在不同位置差很多（一行三个 / 四个），角标和图标按卡片宽度缩，小卡片上不会显胖 */
.pcard .thumb { position: relative; background: #f7f7f7; aspect-ratio: 1 / 1; overflow: hidden; display: block; container-type: inline-size; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.pcard:hover .thumb img { transform: scale(1.06); }
/* 左上角角标：底色和字色都由商家配的颜色推出来，浅底 + 同色字，不用白字 */
.pcard .tag {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  --tag: var(--theme);
  background: color-mix(in srgb, var(--tag) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--tag) 30%, #fff);
  color: color-mix(in srgb, var(--tag) 84%, #000);
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13); white-space: nowrap;
}
.thumb-cart {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  color: #fff; font-size: 17px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--theme) 88%, transparent);
  box-shadow: var(--shadow);
  transition: transform 0.15s, background 0.15s;
}
.thumb-cart:hover { transform: scale(1.1); background: var(--primary-dark); }

/* 悬停时在图片顶部浮出名称和价格，平时只有图。
   上边距比角标下沿再低一点，文字不会被角标压住 */
.thumb-name {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 3px;
  padding: 46px 14px 16px; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.35;
  background: linear-gradient(180deg, rgba(26, 22, 19, 0.82), rgba(26, 22, 19, 0));
  opacity: 0; transform: translateY(-6px); transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}
.thumb-name .hover-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 浏览记录是跨店铺的，浮层里标一下来自哪家 */
.thumb-name .hover-shop { font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.78); }
.thumb-name .hover-price { display: flex; align-items: baseline; gap: 4px; font-weight: 700; }
.thumb-name .hover-price i { font-size: 0.72em; font-style: normal; font-weight: 400; }
.thumb-name .hover-price b { font-size: 1.18em; font-family: var(--serif); letter-spacing: -0.5px; }
.thumb-name .price-was { color: rgba(255, 255, 255, 0.72); font-size: 0.72em; margin-left: 2px; }

/* 有容器查询的浏览器里，角标和图标跟着卡片宽度一起缩 */
@supports (container-type: inline-size) {
  .pcard .tag { font-size: clamp(9.5px, 3.9cqw, 12px); padding: 0.32em 0.9em; border-radius: 0.55em; }
  .thumb-cart {
    width: clamp(30px, 12cqw, 40px); height: clamp(30px, 12cqw, 40px);
    font-size: clamp(13px, 5.6cqw, 18px);
    left: clamp(9px, 3.4cqw, 12px); bottom: clamp(9px, 3.4cqw, 12px);
  }
  .thumb-name { font-size: clamp(13px, 4.6cqw, 16px); padding-top: clamp(42px, 12cqw, 50px); }
  .thumb-name .hover-price b { font-size: clamp(15px, 5.4cqw, 19px); }
}
.pcard:hover .thumb-name { opacity: 1; transform: translateY(0); }

/* 浏览记录里的卡片仍然需要名称、店铺和标签，所以保留文字区 */
.pcard .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard .title {
  font-size: 14px; line-height: 1.5; height: 42px; overflow: hidden; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pcard:hover .title { color: var(--primary); }
.pcard .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pcard .meta .ship-tag { margin-left: auto; }
.pcard .foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; }
.price { color: var(--price); font-weight: 700; }
.price i { font-size: 12px; font-style: normal; font-weight: 400; }
.price b { font-size: 20px; font-family: var(--serif); }
.price-was { color: var(--muted); font-size: 12px; text-decoration: line-through; margin-left: 6px; }
.ship-tag {
  font-size: 11px; color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 35%, #fff);
  border-radius: 3px; padding: 0 5px; background: color-mix(in srgb, var(--ok) 7%, #fff);
}

/* 评分 */
.stars { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-size: 13px; }
.rating-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
wa-rating.stars-widget { font-size: 14px; }
wa-rating.stars-widget::part(rating) { gap: 1px; }

/* 评价列表 */
.review { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.review:last-child { border-bottom: 0; }
.review .who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.review .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.review p { margin-top: 10px; color: var(--ink); }

/* ================= 商品详情 ================= */
.crumb { padding: 16px 0 12px; font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--primary); }
.detail {
  display: grid;
  /* 三个竖栏：缩略图 / 主图 / 商品信息，主图最宽，信息栏收得比较窄 */
  grid-template-columns: 100px minmax(0, 1fr) 400px;
  gap: 20px; align-items: start;
  background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
/* 网格子项默认 min-width:auto，会被图片的原始宽度撑开，这里压住 */
.detail > * { min-width: 0; }
/* 让 .gallery 这一层不产生盒子，缩略图和主图各自占一栏 */
.detail .gallery { display: contents; }
.detail .thumbs { display: flex; flex-direction: column; gap: 12px; max-height: 640px; overflow-y: auto; }
.detail .thumbs::-webkit-scrollbar { width: 4px; }
.detail .thumbs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.detail .thumbs button {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border: 2px solid transparent;
  border-radius: 8px; overflow: hidden; padding: 0; background: #f7f7f7;
  transition: border-color 0.15s, transform 0.15s;
}
.detail .thumbs button:hover { border-color: color-mix(in srgb, var(--theme) 45%, #fff); }
.detail .thumbs button.on { border-color: var(--primary); }
.detail .thumbs img { width: 100%; height: 100%; object-fit: cover; }
/* 缩略图下沿用规格名标一下，一眼看出这张图对应哪个规格 */
.thumb-spec {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; line-height: 1.6;
  color: #fff; background: linear-gradient(180deg, rgba(26, 22, 19, 0), rgba(26, 22, 19, 0.75));
  padding: 10px 4px 3px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.detail .main { position: relative; border-radius: 10px; overflow: hidden; background: #f7f7f7; }
.detail .main img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
/* 主图上的当前规格角标 */
.shot-spec {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(26, 22, 19, 0.55); color: #fff; font-size: 13px; letter-spacing: 1px;
  padding: 5px 12px; border-radius: 6px; backdrop-filter: blur(2px);
}
/* 主图两侧的左右箭头，和首页轮播一样是半透明圆钮 */
.shot-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(26, 22, 19, 0.26); color: rgba(255, 255, 255, 0.95);
  font-size: 29px; line-height: 1; padding-bottom: 4px; z-index: 2;
  display: grid; place-items: center; backdrop-filter: blur(2px);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, border-color 0.2s;
}
.shot-nav:hover { background: rgba(26, 22, 19, 0.45); border-color: rgba(255, 255, 255, 0.3); }
.shot-nav[hidden] { display: none; }
.shot-nav.prev { left: 14px; }
.shot-nav.next { right: 14px; }
.detail .info { padding: 0 4px; }
.detail h1 { font-size: 22px; line-height: 1.45; }
.detail .sub-title { color: var(--ink-2); font-size: 13px; margin-top: 8px; }
.pricebox {
  background: linear-gradient(100deg, color-mix(in srgb, var(--theme) 8%, #fff), #fffdfc);
  border-radius: 8px; padding: 18px 22px; margin: 16px 0 8px;
}
.pricebox .line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pricebox .big { font-size: 34px; color: var(--price); font-weight: 700; font-family: var(--serif); }
.pricebox .big i { font-size: 17px; font-style: normal; font-weight: 400; }
.pricebox .old { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.pricebox .off {
  background: var(--primary); color: #fff; border-radius: 4px; padding: 1px 8px; font-size: 12px;
}
.pricebox .stock { color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.promotions { display: flex; gap: 14px; padding: 12px 0 0; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.promotions b { color: var(--primary); font-weight: 600; }
.field-label { font-size: 13px; color: var(--muted); margin: 18px 0 8px; }
.sku-list { display: flex; gap: 10px; flex-wrap: wrap; }
.sku-list button {
  position: relative; border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 10px 22px; font-size: 14px; color: var(--ink-2); transition: all 0.15s;
}
.sku-list button:hover { border-color: var(--primary); color: var(--primary); }
.sku-list button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sku-list button.on::after {
  content: ""; position: absolute; right: 0; bottom: 0; border: 8px solid transparent;
  border-right-color: var(--primary); border-bottom-color: var(--primary);
}
.sku-list button.dead { color: #c8c8c8; border-style: dashed; cursor: not-allowed; background: #fafafa; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: #fafafa; color: var(--ink-2); font-size: 16px; }
.qty button:hover { background: var(--line-2); color: var(--primary); }
.qty input { width: 60px; border: 0; text-align: center; outline: none; }
.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.services {
  display: flex; gap: 20px; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line);
  color: var(--ink-2); font-size: 13px; flex-wrap: wrap;
}
.services span::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: 6px; }

.section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; }
.section-head { display: flex; border-bottom: 1px solid var(--line); padding: 0 24px; }
.section-head span {
  padding: 15px 24px; font-size: 15px; color: var(--ink-2); border-bottom: 2px solid transparent;
  cursor: pointer;
}
.section-head span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.section-body { padding: 26px; line-height: 1.95; color: var(--ink-2); }
.section-body h4 { color: var(--ink); }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 11px 15px; font-size: 13px; text-align: left; }
.spec-table th { background: #fafafa; color: var(--muted); font-weight: 500; width: 130px; }

/* 详情页购买栏：滑过主按钮后从顶部吸顶滑出 */
.buy-bar {
  position: fixed; left: 0; right: 0; top: 0; background: #fff; z-index: 40;
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
  transform: translateY(-110%); transition: transform 0.25s;
}
.buy-bar.show { transform: translateY(0); }
.buy-bar .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.buy-bar .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.buy-bar .p { color: var(--price); font-weight: 700; font-size: 20px; font-family: var(--serif); }
.buy-bar .spacer { flex: 1; }

/* ================= 购物车 ================= */
.cart-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
/* 一进来就是面板的页面（购物车 / 结算 / 浏览记录 / 待评价）留一点上边距，
   顶栏那层浅色才有地方收口，面板也不会紧贴着那条线 */
.cart-panel, .checkout, .panel.saved-panel, main.wrap > div > .panel:first-child { margin-top: 14px; }
.cart-head, .cart-row {
  display: grid; grid-template-columns: 44px 92px 1fr 110px 132px 110px 70px;
  gap: 14px; align-items: center; padding: 14px 20px;
}
.cart-head { background: #fafafa; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.cart-row { border-bottom: 1px solid var(--line-2); }
.cart-row:hover { background: #fffdfc; }
.cart-row img { width: 92px; height: 92px; object-fit: cover; border-radius: 6px; background: #f7f7f7; }
.check { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.cart-bar {
  position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--primary);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.07); padding: 14px 20px; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-radius: var(--radius);
}
.cart-bar .sum { font-size: 14px; color: var(--ink-2); }
.cart-bar .sum b { font-size: 26px; color: var(--price); font-weight: 700; font-family: var(--serif); }
.cart-bar .left { display: flex; align-items: center; gap: 20px; }

/* ================= 结算 ================= */
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.addr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.addr {
  border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff;
  text-align: left; line-height: 1.6; position: relative; transition: all 0.15s;
}
.addr:hover { border-color: #ccc; }
.addr.on { border: 2px solid var(--primary); background: var(--primary-soft); padding: 13px 15px; }
.addr.on::after { content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--primary); font-weight: 700; }
.addr b { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fff; width: 100%;
  outline: none; transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.aside-total { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14px; }
.aside-total.final { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; }
.aside-total.final b { color: var(--price); font-size: 26px; font-family: var(--serif); }

/* ================= 订单 ================= */
.tabs {
  display: flex; background: #fff; border-radius: var(--radius); padding: 0 10px;
  box-shadow: var(--shadow); margin: 16px 0; overflow-x: auto;
}
.tabs button {
  border: 0; background: none; padding: 15px 22px; color: var(--ink-2); white-space: nowrap;
  border-bottom: 2px solid transparent; font-size: 14px;
}
.tabs button:hover { color: var(--primary); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.order { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line-2); }
/* 订单三段底色分开：台头浅主题色 + 主题色下边框、明细纯白、底部灰，一眼分清上下 */
.order-head {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; align-items: center;
  padding: 14px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--theme) 19%, #fff), color-mix(in srgb, var(--theme) 8%, #fff));
  border-bottom: 2px solid color-mix(in srgb, var(--theme) 26%, #fff);
  font-size: 13px; color: var(--ink-2);
}
.order-head .no { font-weight: 600; color: var(--ink); letter-spacing: 0.4px; }
.order-head .right { text-align: right; }
.order-line {
  display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line-2);
  align-items: center; background: #fff;
}
/* 商品行一深一浅，多件商品时上下能分开 */
.order-line.alt { background: #fbf8f6; }
.order-line:last-of-type { border-bottom: 0; }
.order-line img { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; background: #f7f7f7; }
.order-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 18px;
  padding: 15px 20px; background: #f4f2f1; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.countdown { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 13px; }
.countdown b { font-variant-numeric: tabular-nums; }

/* ================= 状态标签 ================= */
.pill { display: inline-flex; align-items: center; border-radius: 4px; padding: 2px 9px; font-size: 12px; font-weight: 500; }
.pill.on, .pill.open, .pill.paid { background: #edf9f2; color: var(--ok); border: 1px solid #cdefdd; }
.pill.off, .pill.closed, .pill.completed { background: #f5f5f5; color: var(--ink-2); border: 1px solid var(--line); }
.pill.banned, .pill.cancelled { background: #fdeeec; color: var(--danger); border: 1px solid #f8d5d1; }
.pill.pending { background: #fff6e8; color: var(--warn); border: 1px solid #ffe0b2; }
.pill.shipped { background: #eef4fe; color: #1f6feb; border: 1px solid #cfe0fb; }

/* ================= 助手 ================= */
.chat-fab {
  position: fixed; right: 26px; bottom: 26px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 0; font-size: 22px; box-shadow: var(--shadow-lg);
  z-index: 8; transition: transform 0.2s, background 0.2s;
}
.chat-fab:hover { transform: scale(1.07); background: var(--primary-dark); }
.chat {
  position: fixed; right: 26px; bottom: 26px; width: 360px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 9; display: flex; flex-direction: column;
  max-height: 78vh;
}
.chat header {
  background: linear-gradient(120deg, #2b2521, color-mix(in srgb, var(--theme) 60%, #2b2521));
  color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
}
.chat header b { font-size: 15px; }
.chat header small { display: block; opacity: 0.78; font-weight: 400; font-size: 12px; }
.chat .close { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; }
.chat .log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f8f9; }
.bubble {
  max-width: 86%; padding: 10px 13px; border-radius: 10px; background: #fff; box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.65; word-break: break-word;
}
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; }
.chat form { display: flex; border-top: 1px solid var(--line); }
.chat input { flex: 1; border: 0; padding: 14px; outline: none; }
.chat form button { border: 0; background: var(--primary); color: #fff; padding: 0 22px; }
.chat .tips { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }
.chat .tips button {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 3px 10px;
  margin: 0 6px 5px 0; font-size: 12px; color: var(--ink-2);
}
.chat .tips button:hover { border-color: var(--primary); color: var(--primary); }

/* ================= 首页：轮播主视觉 =================
   图片后面垫一层同图的模糊放大版，主图两侧用 mask 淡出，
   看起来就是「图片的渐变 / 模糊」一直延伸到两边。 */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #2a2521;
  height: var(--hero-h, 640px); box-shadow: var(--shadow); margin: 22px 0 0;
}
.hero .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero .slide { cursor: pointer; }
.hero .slide.on { opacity: 1; pointer-events: auto; }
.hero .blur {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.3) brightness(0.94);
  transform: scale(1.08);
}
/* 主图不用铺满：两边留出来给后面那层模糊图，看着就是图片往外糊出去。
   缝留得比较窄，渐变范围大约是之前的三分之一 */
.hero .slide > img {
  position: relative; display: block; width: 93.4%; height: 100%; margin: 0 auto; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.hero .slide .veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(26, 22, 19, 0.88) 10%, rgba(26, 22, 19, 0.5) 52%, rgba(26, 22, 19, 0.08) 100%);
}
.hero .caption {
  position: absolute; left: 46px; top: 50%; transform: translateY(-50%);
  color: #fff; max-width: 560px;
}
.hero .caption h1 { font-size: 36px; letter-spacing: 3px; font-family: var(--serif); }
.hero .caption p { color: rgba(255, 255, 255, 0.84); margin-top: 12px; }
/* 圆钮做小、符号放大，底色很淡，尽量不挡后面的图 */
.hero .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.94);
  font-size: 27px; line-height: 1; padding-bottom: 4px;
  display: grid; place-items: center; backdrop-filter: blur(1px);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.hero .nav:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.hero .nav.prev { left: 16px; }
.hero .nav.next { right: 16px; }
.hero .dots {
  position: absolute; left: 46px; bottom: 26px; display: flex; gap: 8px;
}
.hero .dots button {
  width: 26px; height: 4px; border-radius: 2px; border: 0; padding: 0;
  background: rgba(255, 255, 255, 0.35); transition: background 0.2s, width 0.2s;
}
.hero .dots button.on { background: #fff; width: 40px; }

/* ================= 首页：横向商品位 ================= */
.row-sec { margin-top: 46px; }
.row-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.row-head h2 { font-size: 30px; letter-spacing: 2px; font-family: var(--serif); }
.row-head .sub { color: var(--muted); font-size: 13px; }
.row-head .spacer { flex: 1; }
.row-head .see-all {
  color: var(--ink-2); font-size: 14px; white-space: nowrap;
  transition: color 0.2s;
}
.row-head .see-all:hover { color: var(--primary); }

/* 左右箭头浮在图片两侧、垂直居中，和轮播主视觉一致 */
.rail { position: relative; }
.rail-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(28, 24, 21, 0.1); color: rgba(255, 255, 255, 0.95);
  font-size: 25px; line-height: 1; padding-bottom: 4px;
  display: grid; place-items: center; z-index: 3;
  backdrop-filter: blur(1px); text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.rail-nav:hover:not(:disabled) {
  background: rgba(28, 24, 21, 0.24);
  border-color: rgba(255, 255, 255, 0.2);
}
.rail-nav:disabled { opacity: 0; pointer-events: none; }
.rail-nav.prev { left: 10px; }
.rail-nav.next { right: 10px; }

.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 34px) / 3);
  gap: 17px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }

/* ================= 首页：全部商品 + 展开 ================= */
.all-sec { margin-top: 50px; }
.all-foot { text-align: center; margin: 24px 0 4px; }
.expand {
  border: 1px solid var(--line); background: #fff; border-radius: 24px;
  padding: 11px 46px; font-size: 14px; color: var(--ink-2); transition: all 0.18s;
}
.expand:hover { border-color: var(--primary); color: var(--primary); }
.expand[disabled] { opacity: 0.5; cursor: default; }
.all-foot[hidden] { display: none; }

/* 后台分类标签：一行一个标签，名字可以直接改 */
.cat-name {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 12px; font-size: 14px; color: var(--ink); background: #fff;
}
.cat-name:focus { outline: none; border-color: var(--primary); }

/* 后台商品标签：色块、买家端角标预览、商品编辑里的多选 */
.tag-color {
  width: 42px; height: 36px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; padding: 2px; cursor: pointer; flex-shrink: 0;
}
/* .field input 会把宽度撑满，这里压回去 */
.field .tag-color { width: 54px; padding: 3px; }
.field small { font-size: 12px; }
/* 商品标签的预览角标：和买家端商品卡上那个保持一致（浅底 + 同色字） */
.tag-preview {
  --tag: var(--theme);
  background: color-mix(in srgb, var(--tag) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--tag) 30%, #fff);
  color: color-mix(in srgb, var(--tag) 84%, #000);
  font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 7px;
  letter-spacing: 1px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.tag-picker { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 20px;
  padding: 7px 17px; font-size: 14px; transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on {
  border-color: transparent; background: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme) 28%, transparent);
}

/* 规格表里的图片格：预览 + 上传 / 清除一行，路径输入框单独一行 */
.table td .field.sku-image { width: 178px; gap: 5px; }
.sku-image-head { gap: 6px; flex-wrap: nowrap; }
.sku-image-preview {
  width: 38px; height: 38px; border-radius: 6px; flex-shrink: 0;
  background: #f2f4f6 center / cover no-repeat; border: 1px solid var(--line);
}
.sku-image-preview.empty {
  background-image: none;
  border-style: dashed;
  background-image: linear-gradient(45deg, transparent 46%, var(--line) 46%, var(--line) 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--line) 46%, var(--line) 54%, transparent 54%);
}
/* .field input 会撑满整行，这里让它有个合理的宽度 */
.table td .field.sku-image > input { width: 100%; font-size: 12px; padding: 6px 8px; }
.table td .field.sku-image .btn-mini { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.spec-input { width: 108px; }

/* 删除前的二次确认 */
.confirm-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(26, 22, 19, 0.42);
  display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px);
}
.confirm-panel { width: min(400px, 100%); padding: 22px 24px; }
.confirm-panel h3 { font-size: 17px; color: var(--ink); }
.confirm-panel p { margin-top: 8px; }
.confirm-actions { justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn.danger-fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.danger-fill:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }

/* 后台首页样式：售后保障条一行一条 */
.promise-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.promise-row { display: grid; grid-template-columns: 180px 1fr 76px; gap: 10px; align-items: center; }
.promise-row input {
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 14px;
  color: var(--ink); background: #fff; outline: none; min-width: 0;
}
.promise-row input:focus { border-color: var(--primary); }

/* ================= 首页：用户评价流动 ================= */
.wall { margin-top: 50px; overflow: hidden; }
.wall-head { text-align: center; margin-bottom: 24px; }
.wall-head h2 { font-size: 21px; letter-spacing: 2px; font-family: var(--serif); }
.wall-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.marquee { position: relative; overflow: hidden; padding: 4px 0; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.marquee .strip2 { display: flex; gap: 16px; width: max-content; animation: flow 42s linear infinite; }
.marquee.rev .strip2 { animation-direction: reverse; animation-duration: 54s; }
.marquee:hover .strip2 { animation-play-state: paused; }
@keyframes flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.quote {
  width: 320px; background: #fff; border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.quote .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.quote .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
}
.quote .name { font-size: 13px; }
.quote p { color: var(--ink-2); font-size: 13px; line-height: 1.75; }

/* ---------- 悬停效果 ----------
   抄自 Hover.css（MIT，github.com/IanLunn/Hover），只取用到的几个，
   放在这里避免为了几个效果引整份样式表。 */
.hvr-grow {
  display: inline-block;
  vertical-align: middle;
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  backface-visibility: hidden;
  -moz-osx-font-smoothing: grayscale;
  transition-duration: 0.3s;
  transition-property: transform;
}
.hvr-grow:hover, .hvr-grow:focus, .hvr-grow:active { transform: scale(1.12); }

.hvr-float {
  display: inline-block;
  vertical-align: middle;
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  backface-visibility: hidden;
  transition-duration: 0.3s;
  transition-property: transform;
  transition-timing-function: ease-out;
}
.hvr-float:hover, .hvr-float:focus, .hvr-float:active { transform: translateY(-4px); }

.hvr-underline-from-center {
  display: inline-block;
  vertical-align: middle;
  transform: perspective(1px) translateZ(0);
  position: relative;
  overflow: hidden;
}
.hvr-underline-from-center::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 51%;
  right: 51%;
  bottom: 0;
  background: var(--primary);
  height: 2px;
  transition-property: left, right;
  transition-duration: 0.3s;
  transition-timing-function: ease-out;
}
.hvr-underline-from-center:hover::before,
.hvr-underline-from-center:focus::before,
.hvr-underline-from-center:active::before { left: 0; right: 0; }

/* 按钮上的高光扫过，来自 Hover.css 的 hvr-shine 思路 */
.btn-buy, .btn-cart, .btn, .hvr-shine { position: relative; overflow: hidden; }
.btn-buy::before, .btn-cart::before, .btn::before, .hvr-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn-buy:hover::before, .btn-cart:hover::before, .btn:hover::before, .hvr-shine:hover::before {
  animation: shine-sweep 0.75s;
}
@keyframes shine-sweep { to { left: 125%; } }

/* 顶部一行和分类：悬停时从左往右长出一条主题色下划线 */
.strip nav a { position: relative; }
.strip nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -6px;
  height: 2px;
  background: var(--primary);
  transition: left 0.28s ease-out, right 0.28s ease-out;
}
.strip nav a:hover::after { left: 12px; right: 12px; }

/* 后台行内按钮轻微放大 */
.table .ops button:hover, .table .ops a:hover,
.banner-row .ops button:hover:not(:disabled), .sec-row .ops button:hover, .quote-row .ops button:hover {
  transform: translateY(-1px);
}
.table .ops button, .table .ops a, .banner-row .ops button, .sec-row .ops button, .quote-row .ops button {
  transition: transform 0.15s, border-color 0.15s, color 0.15s;
}

/* 卡片悬停时用主题色描一圈，参考 micro-interactions-library 的 glow card */
.pcard { position: relative; }
.pcard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.22s, box-shadow 0.22s;
  pointer-events: none;
}
.pcard:hover::after {
  border-color: color-mix(in srgb, var(--theme) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 12%, transparent);
}

/* ---------- 顶部通栏里的店铺名 ---------- */
.strip-shop { font-weight: 600; color: var(--theme); font-size: 13px; }

/* ---------- 浏览记录 ---------- */
.pcard.dim .thumb img { filter: grayscale(0.85) opacity(0.72); }
.pcard.dim:hover { transform: none; box-shadow: var(--shadow); }
.shelf-flag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(40, 36, 33, 0.86); color: #fff; font-size: 12px; letter-spacing: 2px;
  padding: 5px 14px; border-radius: 4px; white-space: nowrap;
}
.ship-tag.off { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, #fff); background: color-mix(in srgb, var(--danger) 7%, #fff); }
.pcard .body .stars { font-size: 12px; }

/* 浏览记录：和首页同一套卡片，只是外面包了一层 panel */
.panel.saved-panel { padding: 22px 22px 26px; }
.panel.saved-panel .grid { padding: 0; }

/* ================= 空态 / 骨架 ================= */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); }
.empty .icon { font-size: 46px; opacity: 0.4; }
.empty h3 { color: var(--ink); margin: 12px 0 6px; }
.empty p { margin-bottom: 18px; }
.skeleton { background: #fff; border-radius: var(--radius); height: 260px; overflow: hidden; position: relative; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f4f4f4 25%, #ececec 37%, #f4f4f4 63%);
  background-size: 400% 100%; animation: shine 1.2s ease-in-out infinite;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ================= 页脚 ================= */
.footer { margin-top: 44px; background: #fff; border-top: 1px solid var(--line); padding: 34px 0; font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer b { color: var(--ink); display: block; margin-bottom: 10px; font-size: 14px; }
.footer .muted { line-height: 2; }

/* ================= 提示 / 弹层 ================= */
.toast-host {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  background: rgba(40, 40, 40, 0.94); color: #fff; padding: 11px 24px; border-radius: 8px;
  font-size: 14px; box-shadow: var(--shadow-lg); animation: drop 0.2s ease-out;
}
.toast.ok { background: color-mix(in srgb, var(--ok) 96%, #000); }
.toast.bad { background: rgba(217, 56, 44, 0.96); }
.toast.out { opacity: 0; transition: opacity 0.28s; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
wa-dialog::part(dialog) { border-radius: 12px; font-family: inherit; }
wa-dialog::part(title) { font-size: 17px; font-weight: 600; }
wa-dialog .field input { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; outline: none; width: 100%; }
wa-dialog .field input:focus { border-color: var(--primary); }

/* ================= 卡片上的快速购买小窗 ================= */
.modal { position: fixed; inset: 0; background: rgba(30, 30, 30, 0.45); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal .panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.quick-mask { align-items: center; }
.quick-panel { position: relative; width: min(440px, 100%); padding: 24px; }
.quick-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: var(--line-2); color: var(--ink-2); font-size: 18px; line-height: 1;
}
.quick-close:hover { background: var(--line); color: var(--ink); }
.quick-top { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.quick-top img {
  width: 88px; height: 88px; border-radius: 8px; object-fit: cover; background: #f7f7f7; flex-shrink: 0;
}
.quick-info { min-width: 0; }
.quick-info h3 { font-size: 16px; line-height: 1.4; margin-bottom: 4px; }
.quick-price { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; color: var(--price); }
.quick-price i { font-size: 14px; font-style: normal; }
.quick-price b { font-size: 26px; font-family: var(--serif); }
.quick-panel .sku-list { margin-top: 4px; }
.quick-panel .sku-list button { padding: 8px 16px; font-size: 13px; }
.quick-panel .qty { margin-top: 4px; }
.quick-panel .qty button { width: 34px; height: 34px; }
.quick-panel .qty input { width: 52px; }
.quick-actions { display: flex; gap: 12px; margin-top: 20px; }
.quick-actions button { flex: 1; padding: 13px 0; font-size: 15px; }

/* ================= 商家后台 ================= */
.admin { min-height: 100vh; display: flex; flex-direction: column; background: #eef0f2; }
.admin-top {
  background: #1b2429; color: #dfe6ec; height: 58px; display: flex; align-items: center;
  padding: 0 24px; gap: 20px; position: sticky; top: 0; z-index: 6;
}
.admin-top .logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #fff; }
.admin-top .logo span {
  width: 32px; height: 32px; border-radius: 9px; background: var(--primary); display: grid;
  place-items: center; font-family: var(--serif);
}
.admin-top .env { font-size: 12px; color: #8b98a3; }
.admin-top .spacer { flex: 1; }
.admin-top .user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.admin-top .user button {
  background: none; border: 1px solid #3a4854; color: #dfe6ec; border-radius: 6px; padding: 5px 14px; font-size: 13px;
}
.admin-top .user button:hover { border-color: var(--primary); color: #fff; }
.admin-body { display: grid; grid-template-columns: 200px 1fr; flex: 1; align-items: start; }
.side { background: #fff; min-height: 100%; padding: 14px 0; border-right: 1px solid var(--line); }
.side .side-brand { padding: 0 18px 14px; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.side a, .side button.side-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: var(--ink-2);
  background: none; border: 0; text-align: left; font-size: 14px; width: 100%;
  border-left: 3px solid transparent;
}
.side a:hover, .side button.side-item:hover { background: #fafafa; color: var(--primary); }
.side a.on { background: var(--primary-soft); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.side .spacer { display: none; }
.side .side-user { padding: 14px 18px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.side .side-user button {
  margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; font-size: 13px; color: var(--ink-2); width: 100%;
}
.side .side-user button:hover { border-color: var(--primary); color: var(--primary); }
.main { padding: 22px 26px 60px; min-width: 0; }
.page-title { font-size: 21px; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.panel { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel-title { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--primary); }
.panel-title .more { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.panel-title .more:hover { color: var(--primary); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 30px; font-weight: 700; margin-top: 4px; letter-spacing: -0.5px; font-family: var(--serif); }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat.accent { background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--theme) 65%, #ffb27a)); color: #fff; }
.stat.accent .k, .stat.accent .hint { color: rgba(255, 255, 255, 0.82); }
.stat.alert .v { color: var(--danger); }

/* 后台销量条 */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.bars i {
  display: block; width: 100%; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--theme) 45%, #fff));
}

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th {
  background: #fafafa; color: var(--muted); font-weight: 500; font-size: 13px;
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fcfcfc; }
.table .thumb { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; background: #f7f7f7; }
.table .name { font-size: 14px; }
.table .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.table .ops button, .table .ops a {
  border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 4px 11px;
  font-size: 13px; color: var(--ink-2);
}
.table .ops button:hover, .table .ops a:hover { border-color: var(--primary); color: var(--primary); }
.table .ops .danger:hover { border-color: var(--danger); color: var(--danger); }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.toolbar-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-inline input, .toolbar-inline select {
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; background: #fff; outline: none;
}
.toolbar-inline input:focus, .toolbar-inline select:focus { border-color: var(--primary); }
.toolbar-inline .push { margin-left: auto; }
.stock-input { width: 80px; border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; outline: none; }
.stock-input:focus { border-color: var(--primary); }
.low { color: var(--danger); font-weight: 600; font-size: 12px; }

/* ---------- 首页装修 ---------- */
.banner-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  border-bottom: 1px dashed var(--line-2);
}
.banner-row:last-child { border-bottom: 0; }
.banner-row > img { width: 132px; height: 66px; object-fit: cover; border-radius: 6px; background: #f7f7f7; }
.banner-row .ops, .sec-row .ops, .quote-row .ops {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.banner-row .ops button, .sec-row .ops button, .quote-row .ops button {
  border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 5px 12px;
  font-size: 13px; color: var(--ink-2);
}
.banner-row .ops button:hover:not(:disabled), .sec-row .ops button:hover, .quote-row .ops button:hover {
  border-color: var(--primary); color: var(--primary);
}
.banner-row .ops button:disabled { opacity: 0.4; cursor: not-allowed; }
.banner-row .ops .danger:hover, .sec-row .ops .danger:hover, .quote-row .ops .danger:hover {
  border-color: var(--danger); color: var(--danger);
}
.sec-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.sec-row:last-child { border-bottom: 0; }
.quote-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.quote-row:last-child { border-bottom: 0; }
.pick-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
  max-height: 300px; overflow: auto; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 8px;
}
.pick-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
}
.pick-item:hover { background: var(--line-2); }
.pick-item img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; background: #f7f7f7; }
.mini-list { display: flex; flex-direction: column; }
.mini-list .item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.mini-list .item:last-child { border-bottom: 0; }
.mini-list .item .who { color: var(--ink); }
.mini-list .item .tagx { font-size: 12px; color: var(--muted); }
.pick { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pick:last-child { border-bottom: 0; }
.review-form { display: flex; flex-direction: column; gap: 14px; }
.review-form textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-height: 90px; outline: none;
}
.review-form textarea:focus { border-color: var(--primary); }

/* ================= 响应式 ================= */
@media (max-width: 1280px) {
  /* 窗口变窄时先收信息栏，把地方让给主图 */
  .detail { grid-template-columns: 88px minmax(0, 1fr) 340px; gap: 16px; padding: 20px; }
}
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 80px minmax(0, 1fr) 300px; }
  .stats, .two-col, .promises { grid-template-columns: repeat(2, 1fr); }
  .cat-side { display: flex; overflow-x: auto; overflow-y: hidden; }
  .cat-side h3 { display: none; }
  .cat-side button { width: auto; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .cat-side button.on { border-left: 0; border-bottom-color: var(--primary); }
  .track { grid-auto-columns: calc((100% - 28px) / 3); }
}
@media (max-width: 900px) {
  .detail, .checkout { grid-template-columns: 1fr; }
  /* 窄屏回到「缩略图 + 主图」两栏，信息块整行落下 */
  .detail .gallery { display: flex; gap: 12px; }
  .detail .thumbs { flex-direction: column; }
  .detail .thumbs button { width: 60px; }
  .collection { grid-template-columns: 1fr; }
  .collection-search { width: 100%; }
  .header .wrap { flex-wrap: wrap; gap: 16px; }
  .searchbox { order: 3; width: 100%; max-width: none; }
  .admin-body { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .side-brand, .side .side-user { display: none; }
  .side a, .side button.side-item { width: auto; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .side a.on { border-left: 0; border-bottom-color: var(--primary); }
  .hero { height: 420px; }
  .hero .caption { left: 26px; right: 26px; max-width: none; }
  .hero .caption h1 { font-size: 27px; }
  .hero .dots { left: 26px; }
  .row-sec, .all-sec, .wall, .promises { margin-top: 36px; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats, .two-col, .promises { grid-template-columns: 1fr; }
  .form-grid, .addr-grid { grid-template-columns: 1fr; }
  .navbar .wrap { overflow-x: auto; }
  .navbar .all { display: none; }
  .order-head { grid-template-columns: 1fr 1fr; }
  .cart-head { display: none; }
  .cart-row { grid-template-columns: 24px 72px 1fr; gap: 10px; }
  .cart-row img { width: 72px; height: 72px; }
  .detail { padding: 16px; }
  .detail .gallery { flex-direction: column; }
  .detail .thumbs { flex-direction: row; flex-wrap: wrap; }
  .detail .thumbs button { width: 64px; }
  .detail .shot-nav { width: 34px; height: 34px; font-size: 24px; }
  .chat { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .footer .wrap { flex-direction: column; }
  .hero { height: 300px; }
  .hero .caption h1 { font-size: 22px; letter-spacing: 1px; }
  .hero .caption p { font-size: 13px; }
  .hero .nav { width: 32px; height: 32px; font-size: 22px; }
  .rail-nav { width: 30px; height: 30px; font-size: 21px; }
  .track { grid-auto-columns: calc((100% - 17px) / 2); }
  .row-head h2 { font-size: 22px; }
  .row-head { flex-wrap: wrap; gap: 10px; }
  .all-search { width: 100%; order: 3; }
  .row-sec, .all-sec, .wall, .promises { margin-top: 30px; }
  .quote { width: 260px; }
  /* 购买按钮在窄屏排不下，让它们换行并平分宽度 */
  .actions button { flex: 1 1 46%; }
  .buy-bar .wrap { gap: 10px; }
  .buy-bar .wrap > div:first-of-type { display: none; }
  .buy-bar .btn-big { padding: 12px 18px; font-size: 14px; }
}

/* 轮播切换按钮：扩大点击区域并同步放大箭头。 */
.hero .nav { width: 54px; height: 54px; font-size: 38px; padding: 0 0 4px; }
.agent-products { display: grid; gap: 8px; padding: 8px; }
.agent-product { display: flex; align-items: center; gap: 10px; padding: 8px; background: white; color: inherit; text-decoration: none; border: 1px solid #ddd; border-radius: 8px; }
.agent-product img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; }
.chat header .chat-reset { background: transparent; color: white; border: 1px solid #ffffff80; border-radius: 6px; padding: 5px 8px; cursor: pointer; }

/* A softer search treatment for the storefront home. */
body.storefront .all-search { border: 1px solid #e7d9cf; background: #fffdf9; }
body.storefront .all-search button { background: #f0e4da; color: #805b48; }
body.storefront .all-search button:hover { background: #e9d8ca; }
.chat[hidden] { display: none; }
