/* ==========================================================
 * 家居展示 H5 · 全局样式
 * 移动端优先，微信内置浏览器（X5/QQ 浏览器内核）兼容
 * ========================================================== */

:root {
  --bg: #f6f6f7;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --accent: #b4835a;
  --accent-soft: #f6efe7;
  --border: #ececef;
  --tabbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* 微信内浏览器禁止横向滚动溢出 */
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  outline: none;
}

/* 桌面浏览器下居中收窄，模拟手机宽度 */
.app {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.page {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
}

/* 美图分享形态：没有底部导航，去掉为它预留的空隙 */
body.no-tabbar .page {
  padding-bottom: calc(var(--safe-b) + 8px);
}

/* 商品详情视频：与图集同高（正方形视口） */
.gallery-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  background: #000;
}

/* ---------------- 顶栏 ---------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar .nav-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar .nav-back {
  width: 56px;
  font-size: 15px;
  color: var(--text-2);
  text-align: left;
}

.navbar .nav-side {
  width: 56px;
  text-align: right;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------------- 通用 ---------------- */

.container { padding: 0 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 12px 10px;
}

.section-title { font-size: 17px; font-weight: 600; }
.section-sub { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.section-more { font-size: 12px; color: var(--text-3); }

.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); font-size: 12px; }

.price { color: var(--accent); font-weight: 600; }
.price .sym { font-size: 12px; }
.price .num { font-size: 17px; }
.price-price-ask { color: var(--text-2); font-size: 14px; font-weight: 500; }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  margin-right: 5px;
}

.tag-plain { color: var(--text-2); background: #f2f3f5; }

/* ---------------- 空态 / 加载 ---------------- */

.empty {
  padding: 60px 30px;
  text-align: center;
}

.empty .icon { font-size: 36px; opacity: 0.3; line-height: 1; }
.empty .txt { margin-top: 10px; color: var(--text-3); font-size: 13px; line-height: 1.7; }

.loading {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 24px 0;
}

.skeleton {
  background: #ececee;
  border-radius: 12px;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------------- 商品卡片（网格） ---------------- */

.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px;
}

.goods-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.goods-cover {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f0f0f2;
}

.goods-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-flag {
  position: absolute;
  left: 0;
  top: 8px;
  padding: 2px 7px;
  background: rgba(31, 35, 41, 0.82);
  color: #fff;
  font-size: 10px;
  border-radius: 0 6px 6px 0;
}

.goods-info { padding: 9px 10px 11px; }

.goods-title {
  font-size: 13px;
  line-height: 1.45;
  min-height: 38px;
  font-weight: 500;
}

.goods-meta {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.goods-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ---------------- 商品卡片（横向） ---------------- */

.goods-row {
  display: flex;
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.goods-row .row-cover {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  background: #f0f0f2;
  flex-shrink: 0;
  object-fit: cover;
}

.goods-row .row-body {
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
}

.goods-row .row-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.goods-row .row-foot {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.goods-row .row-link { font-size: 12px; color: var(--accent); }

/* ---------------- 底部 tabBar ---------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
  padding-bottom: var(--safe-b);
}

.tabbar-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  height: var(--tabbar-h);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #8a8f99;
}

.tabbar-item .dot {
  width: 0;
  height: 3px;
  border-radius: 3px;
  margin-top: 4px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.tabbar-item.active { color: var(--text); font-weight: 600; }
.tabbar-item.active .dot { width: 16px; }

/* ---------------- 底部固定操作栏 ---------------- */

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
  padding-bottom: var(--safe-b);
}

.actionbar-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 12px;
}

.action-icon {
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: var(--text-3);
}

.action-icon .glyph { font-size: 18px; line-height: 1; color: var(--text-2); }
.action-icon.faved .glyph, .action-icon.faved { color: var(--accent); }

.action-main {
  flex: 1;
  margin-left: 8px;
  height: 42px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.action-main .t1 { font-size: 14px; line-height: 1.1; }
.action-main .t2 { font-size: 10px; opacity: 0.72; }

/* ---------------- 提示 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(31, 35, 41, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 999;
  max-width: 80vw;
  text-align: center;
}

/* ---------------- 首页 ---------------- */

.hero {
  padding: 16px 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f7 100%);
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.hero p {
  margin: 4px 0 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

.hero .hero-intro {
  margin: -6px 0 14px;
  line-height: 1.6;
}

.search-entry {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
  font-size: 13px;
  color: var(--text-3);
}

.banner { padding: 0 12px; }

.banner-swiper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.banner-swiper::-webkit-scrollbar { display: none; }

.banner-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  padding-top: 50%;
  background: #f0f0f2;
}

.banner-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.banner-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d5d7db;
  transition: width 0.2s;
}

.banner-dots i.on { width: 16px; border-radius: 4px; background: var(--accent); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 12px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px 12px;
}

.cat-pic {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: #f0f0f2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cat-pic span { font-size: 13px; color: #b9bec7; font-weight: 500; }

.cat-name { margin-top: 7px; font-size: 12.5px; }
.cat-count { font-size: 10.5px; color: var(--text-3); }

.footer {
  padding: 30px 0 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* 备案号：紧跟在页脚下方，比页脚视觉更弱一档 */
.icp-bar {
  padding: 0 0 18px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
}
.icp-link {
  color: var(--text-3);
  text-decoration: none;
}
.icp-link:active { opacity: .6; }

/* ---------------- 分类页 ---------------- */

.cat-page {
  display: flex;
  height: calc(100vh - 46px - var(--tabbar-h) - var(--safe-b));
  overflow: hidden;
}

.rail {
  width: 88px;
  flex-shrink: 0;
  background: #f0f0f2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rail-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 8px 8px 12px;
  font-size: 13px;
  color: var(--text-2);
}

.rail-item.active { background: #fff; color: var(--text); font-weight: 600; }

.rail-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-head { padding: 12px 10px 4px; }
.panel-title { font-size: 15px; font-weight: 600; }
.panel-desc { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.panel-list { padding: 8px 10px 0; }

/* ---------------- 详情页 ---------------- */

.gallery { position: relative; background: #f0f0f2; }

.gallery-swiper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-swiper::-webkit-scrollbar { display: none; }

.gallery-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  padding-top: 100%;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 11.5px;
}

.thumbs {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar { display: none; }

.thumbs img {
  width: 56px;
  height: 56px;
  border-radius: 7px;
  object-fit: cover;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumbs img.on { border-color: var(--accent); }

.block {
  background: #fff;
  padding: 14px 12px;
  margin-top: 8px;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.block-title { font-size: 15px; font-weight: 600; }
.block-extra { font-size: 11.5px; color: var(--text-3); }

.d-title { margin-top: 8px; font-size: 18px; font-weight: 600; line-height: 1.4; }
.d-summary { margin-top: 7px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.d-tags { margin-top: 9px; }
.d-code { font-size: 11.5px; color: var(--text-3); }

.color-list { display: flex; flex-wrap: wrap; gap: 8px; }

.color-item {
  display: flex;
  align-items: center;
  padding: 6px 11px 6px 7px;
  border-radius: 999px;
  background: #f5f6f7;
  border: 1px solid transparent;
  font-size: 12.5px;
  color: var(--text-2);
}

.color-item .sw {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.color-item.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 500; }

.size-list { display: flex; flex-direction: column; gap: 7px; }

.size-item {
  padding: 11px 12px;
  border-radius: 9px;
  background: #f7f8f9;
  border: 1px solid transparent;
}

.size-item.on { border-color: var(--accent); background: var(--accent-soft); }
.size-name { font-size: 14px; font-weight: 500; }
.size-dims { margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
.size-note { margin-top: 2px; font-size: 11.5px; color: var(--text-3); }

.size-summary {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f5f6f7;
  font-size: 12.5px;
  color: var(--text-2);
}

.mat-list { display: flex; flex-direction: column; gap: 7px; }

.mat-item { display: flex; align-items: center; font-size: 13px; color: var(--text-2); }
.mat-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  flex-shrink: 0;
}

.param-row {
  display: flex;
  padding: 9px 0;
  border-bottom: 1px solid #f2f3f5;
  font-size: 13px;
}

.param-row:last-child { border-bottom: 0; padding-bottom: 0; }
.param-k { width: 84px; color: var(--text-3); flex-shrink: 0; }
.param-v { flex: 1; color: var(--text-2); }

.detail-images img { width: 100%; }

/* ---------------- 搜索页 ---------------- */

.search-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: #f3f4f6;
  border-radius: 999px;
}

.search-input-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  height: 36px;
}

.search-input-wrap input::placeholder { color: #b9bec7; }
.search-clear { font-size: 12px; color: var(--text-3); padding: 4px 0 4px 8px; }
.search-btn { font-size: 14px; color: var(--text); font-weight: 500; flex-shrink: 0; }

.history-list { display: flex; flex-wrap: wrap; gap: 8px; }

.history-item {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 12px;
  background: #f5f6f7;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
}

.history-item .del { font-size: 11px; color: #c2c6cc; padding-left: 7px; }
.result-count { padding: 14px 12px 8px; font-size: 12px; color: var(--text-3); }

/* ---------------- 我的 ---------------- */

.brand-card {
  margin: 12px;
  padding: 22px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2a2f36 0%, #454d57 100%);
  color: #fff;
}

.brand-card .n { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.brand-card .s { margin-top: 5px; font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.brand-card .i { margin-top: 12px; font-size: 12px; line-height: 1.75; color: rgba(255, 255, 255, 0.78); }

.fav-item {
  position: relative;
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  margin: 0 12px 10px;
}

.fav-item .c {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f2;
  flex-shrink: 0;
}

.fav-item .b { flex: 1; min-width: 0; padding: 0 24px 0 10px; }
.fav-item .t { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.fav-item .del {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 11px;
  color: #c2c6cc;
  padding: 6px 8px;
}

.contact-card { margin: 0 12px; padding: 0 12px; }

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #f2f3f5;
  cursor: pointer;
}

.contact-row:last-child { border-bottom: 0; }
.contact-row .l { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-row .k { font-size: 11.5px; color: var(--text-3); }
.contact-row .v { margin-top: 3px; font-size: 14px; }
.contact-row .a { font-size: 12px; color: var(--accent); padding-left: 10px; flex-shrink: 0; }

.about-card { margin: 0 12px; padding: 14px 12px; font-size: 12.5px; line-height: 1.8; color: var(--text-2); }
.about-card p { margin: 0; }
.about-card p + p { margin-top: 8px; }

/* ==========================================================
 * 选品车（询价清单）
 * ========================================================== */

.tabbar-item { position: relative; }

.tabbar-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

.cart-list { margin: 0 12px; }

.cart-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px;
  padding-right: 34px;
  margin-bottom: 10px;
  background: var(--card);
  border-radius: 12px;
}

.cart-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f4;
  flex: none;
}

.cart-body { flex: 1; min-width: 0; }
.cart-title { font-size: 14px; line-height: 1.4; color: var(--text); }
.cart-spec { margin-top: 4px; font-size: 12px; color: var(--text-2); }

.cart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 15px;
  color: var(--text-2);
  background: #fafafa;
}

.qty-num {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
}

.cart-note-input {
  width: 100%;
  margin-top: 8px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  color: var(--text);
}

.cart-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
}

.cart-form { margin: 0 12px; padding: 14px 14px 2px; }

.cart-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.cart-form input,
.cart-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  outline: none;
}

.cart-form input:focus,
.cart-form textarea:focus { border-color: var(--accent); }

.cart-actions {
  display: flex;
  gap: 10px;
  margin: 16px 12px 0;
}

.btn-copy,
.btn-submit {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 23px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
}

.btn-copy { background: var(--accent-soft); color: var(--accent); }
.btn-submit { background: var(--accent); color: #fff; }
.btn-copy:disabled, .btn-submit:disabled { opacity: 0.55; }

.cart-tip {
  margin: 10px 16px 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
  text-align: center;
}

/* 详情页「电话」次要按钮 */
.action-call {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 44px;
  margin-right: 8px;
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================
 * 选品车（询价清单）
 * ========================================================== */

.tabbar-item { position: relative; }

.tabbar-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

.cart-list { margin: 0 12px; }

.cart-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px;
  padding-right: 34px;
  margin-bottom: 10px;
  background: var(--card);
  border-radius: 12px;
}

.cart-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f4;
  flex: none;
}

.cart-body { flex: 1; min-width: 0; }
.cart-title { font-size: 14px; line-height: 1.4; color: var(--text); }
.cart-spec { margin-top: 4px; font-size: 12px; color: var(--text-2); }

.cart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 15px;
  color: var(--text-2);
  background: #fafafa;
}

.qty-num {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
}

.cart-note-input {
  width: 100%;
  margin-top: 8px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  color: var(--text);
}

.cart-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
}

.cart-form { margin: 0 12px; padding: 14px 14px 2px; }

.cart-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.cart-form input,
.cart-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  outline: none;
}

.cart-form input:focus,
.cart-form textarea:focus { border-color: var(--accent); }

.cart-actions {
  display: flex;
  gap: 10px;
  margin: 16px 12px 0;
}

.btn-copy,
.btn-submit {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 23px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
}

.btn-copy { background: var(--accent-soft); color: var(--accent); }
.btn-submit { background: var(--accent); color: #fff; }
.btn-copy:disabled, .btn-submit:disabled { opacity: 0.55; }

.cart-tip {
  margin: 10px 16px 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
  text-align: center;
}

/* 详情页「电话」次要按钮 */
.action-call {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 44px;
  margin-right: 8px;
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================
 * 规格选择面板（颜色 / 尺寸 / 材料，可反复添加）
 * ========================================================== */

.sku-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sku-mask.on { opacity: 1; pointer-events: auto; }

.sku-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 91;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding-bottom: calc(12px + var(--safe-b));
  transform: translateY(102%);
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.sku-sheet.on { transform: translateY(0); }

.sku-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.sku-title { font-size: 16px; font-weight: 600; color: var(--text); }
.sku-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 15px; }

.sku-body {
  padding: 6px 16px 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.sku-group { margin-top: 14px; }

.sku-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }

.sku-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sku-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fafafa;
  color: var(--text);
  font-size: 13px;
}

.sku-chip.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sku-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-block;
}

.sku-summary {
  margin-top: 16px;
  padding: 10px 12px;
  background: #faf9f7;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.sku-summary b { color: var(--accent); }

.sku-added { margin-top: 14px; }

.sku-added-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent);
}

.sku-added-del { font-style: normal; color: var(--text-3); padding: 0 4px; }

.sku-added-tip {
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.sku-empty { padding: 20px 0; text-align: center; color: var(--text-3); font-size: 13px; }

.sku-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px 4px;
  border-top: 1px solid var(--border);
  flex: none;
}

.btn-sku-add,
.btn-sku-done {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 23px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
}

.btn-sku-add { background: var(--accent); color: #fff; flex: 1.4; }
.btn-sku-done { background: var(--accent-soft); color: var(--accent); }

/* ==========================================================
 * 商品规格组（后台可配置：颜色 / 材料 / 大小 / 是否带床头柜 …）
 * ========================================================== */

/* 文字型规格（材料、是否带床头柜等）复用 color-list 的排布 */
.opt-item {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-2);
  background: #fafafa;
}

.opt-item.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}

/* 详情页顶部的“当前选择”提示 */
.d-spec-line {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
