/* ============================================================
   CentSnap 前台商城样式（store / product / cart / checkout）
   独立文件，避免污染编辑器前台 CSS。凡改动请升版本号 ?v= （全前台现统一 ?v=22）
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  color: #1f2937;
  background: #FFFFFF;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
.cs-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ── 页面顶部 20px 缓冲（独立 class：仅挂在需要该间距的页面 <main> 上）
   - 用途：cart.php / checkout.php 等需要让主体内容离吸顶/管理员预览行稍有空隙
   - 影响范围：只命中挂了这个 class 的元素；site_header（吸顶 + 管理员预览/语言货币行）完全不受影响
   - 新建页面需要同样的缓冲时：在 <main class="cs-wrap cs-pad-top-20"> 上挂 class 即可，未挂则不生效 */
.cs-pad-top-20 { padding-top: 20px; }

/* ── 页头（Lovehoney 三层风格：顶栏 + 主栏 + 导航栏）── */
.cs-site-header {
  background: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ══ ① 顶栏：工具链接 / 登录注册 / 语言货币 ══ */
.cs-hd-topbar {
  background: #fff;
  border-bottom: 1px solid #f0f1f4;
  font-size: 13px; color: #6b7280;
  line-height: 1;
}
.cs-hd-topbar-inner {
  display: flex; align-items: center; justify-content: flex-end;
  height: 36px; gap: 16px;
}
.cs-hd-topbar-right {
  display: flex; align-items: center; gap: 14px;
}
.cs-hd-topbar-right a {
  color: #6b7280; font-size: 13px; font-weight: 500;
  transition: color .15s;
}
.cs-hd-topbar-right a:hover { color: #111827; }
.cs-hd-greet { font-size: 13px; color: #9ca3af; }
.cs-hd-logout { color: #E60012 !important; }
.cs-hd-logout:hover { color: #E60012 !important; }
.cs-hd-register {
  color: #E60012 !important; font-weight: 600;
}
.cs-hd-register:hover { color: #B80000 !important; }
/* 顶栏语言/货币选择器微调 */
.cs-hd-topbar .cs-lang-sel,
.cs-hd-topbar .cs-cur-sel {
  height: 28px; font-size: 12px; border-radius: 6px;
  border-color: #e5e7eb; padding: 0 6px;
}

/* ══ ② 主栏：Logo(左) + 搜索(居中) + 图标按钮组(右) ══ */
.cs-hd-main {
  padding: 16px 0;
  border-bottom: 1px solid #f0f1f4;
}
.cs-hd-main-inner {
  display: flex; align-items: center; gap: 20px;
}
/* Logo */
.cs-hd-logo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 24px; font-weight: 800; letter-spacing: .3px;
  color: #E60012; text-decoration: none; flex: 0 0 auto;
  white-space: nowrap;
}
.cs-hd-logo-icon {
  font-style: normal; font-size: 22px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(230,0,18,.3));
}
.cs-hd-logo-img { max-height: 38px; display: block; }

/* 搜索框（右侧，加长 + 圆形搜索按钮） */
.cs-hd-search {
  position: relative;
  flex: 1 1 auto; display: flex; align-items: center;
  max-width: 560px; margin: 0; margin-left: auto;
}
.cs-hd-search input {
  width: 100%; height: 44px; padding: 0 54px 0 18px;
  border: 2px solid #e5e7eb; border-radius: 24px;
  font-size: 15px; background: #f9fafb; color: #111827; outline: none;
  transition: border-color .2s, background .2s;
}
.cs-hd-search input::placeholder { color: #9ca3af; }
.cs-hd-search input:focus {
  border-color: #E60012; background: #fff;
}
.cs-hd-search button {
  position: absolute; right: 2px; top: 2px;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: #E60012; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.cs-hd-search button:hover { background: #B80000; }
.cs-hd-search button svg { width: 18px; height: 18px; }

/* 右侧图标按钮组 */
.cs-hd-icons {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
}
.cs-hd-icon {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #374151; transition: background .15s, color .15s;
}
.cs-hd-icon svg {
  display: block; flex: none;
  fill: none; stroke: currentColor;
}
/* 心愿单悬停：心形图标由描边变填充 */
.cs-hd-icon[href*="wishlist"] svg { transition: fill .15s, stroke .15s; }
.cs-hd-icon[href*="wishlist"]:hover svg { fill: #E60012; stroke: #E60012; }
.cs-hd-icon:hover { background: #f3f4f6; color: #111827; }
/* 购物车角标：提高特异性以覆盖 blocks.css 等全局 .cs-badge，确保不遮挡图标、数字居中 */
.cs-hd-icon > .cs-hd-cart-badge,
.cs-header-block .cs-hd-icon > .cs-hd-cart-badge,
/* 收藏（心愿单）角标：跟购物车气泡完全一致的尺寸与配色 */
.cs-hd-icon > .cs-wish-badge,
.cs-header-block .cs-hd-icon > .cs-wish-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 14px; height: 14px;
  padding: 0 3px; margin: 0;
  font-size: 10px; font-weight: 700; line-height: 14px;
  color: #fff; background: #E60012;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-feature-settings: 'tnum';   /* 等宽数字：12 / 2 / 99 视觉宽度一致，居中更稳 */
  font-variant-numeric: tabular-nums;
}

/* 汉堡菜单按钮（桌面隐藏） */
.cs-nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: auto;
  border: none; background: transparent; color: #374151;
  border-radius: 8px; cursor: pointer; flex: 0 0 auto;
}
.cs-nav-burger:hover { background: #f3f4f6; }
.cs-nav-burger svg { display: block; }

/* ══ ③ 导航栏：分类链接横排 ══ */
.cs-hd-nav {
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.cs-hd-nav-inner {
  display: flex; align-items: center; gap: 4px;
  height: 46px; overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
.cs-hd-nav-inner::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.cs-hd-nav a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 14px; height: 100%;
  font-size: 14px; font-weight: 600; color: #374151;
  white-space: nowrap; position: relative;
  transition: color .15s;
  border-bottom: 2px solid transparent;
}
.cs-hd-nav a:hover { color: #E60012; }
.cs-hd-nav a.on {
  color: #E60012; border-bottom-color: #E60012;
}
/* Sale / 特殊高亮项（通过 nav label 含 "Sale" 或 "促销" 触发，也可手动加 class） */
.cs-hd-nav a[class*="sale"],
.cs-hd-nav a[data-highlight="sale"] { color: #E60012; font-weight: 700; }
.cs-hd-nav a[class*="sale"]:hover,
.cs-hd-nav a[data-highlight="sale"]:hover { color: #B80000; }

/* ── 通用按钮 ── */
.cs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.cs-btn-primary { background: #E60012; color: #fff; }
.cs-btn-primary:hover { background: #B80000; }
.cs-btn-primary:disabled { background: #f5c6cb; cursor: not-allowed; }
.cs-btn-ghost { background: #fff; color: #E60012; border-color: #fadbd9; }
.cs-btn-ghost:hover { background: #fff0ef; }
.cs-btn-block { width: 100%; }
.cs-btn-lg { padding: 13px 20px; font-size: 16px; }
.cs-btn-sm { padding: 6px 12px; font-size: 13px; }

/* ── Hero（渐变 banner，消除大段空白）── */
.cs-hero {
  text-align: center; padding: 48px 24px; margin-bottom: 26px;
  background: linear-gradient(135deg, #E60012 0%, #B80000 55%, #d6204f 100%);
  color: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(230,0,18,.18);
}
.cs-hero h1 { font-size: 30px; margin: 0 0 8px; color: #fff; }
.cs-hero p { margin: 0 0 20px; color: rgba(255,255,255,.92); }
.cs-search { display: flex; max-width: 520px; margin: 0 auto; }
.cs-search input {
  flex: 1; padding: 12px 16px; border: 1px solid #fff; border-right: none;
  border-radius: 10px 0 0 10px; font-size: 15px; outline: none; background: rgba(255,255,255,.96); color: #1f2937;
}
.cs-search input:focus { border-color: #fff; }
.cs-search button {
  padding: 0 24px; border: none; background: #111827; color: #fff;
  border-radius: 0 10px 10px 0; font-weight: 600; cursor: pointer; font-size: 15px;
}
.cs-search button:hover { background: #000; }

/* ── 商城可视化横幅（store_hero 区块）── */
.cs-hero-banner { display: flex; flex-direction: column; }
.cs-hero-inner {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 760px; margin: 0 auto; align-items: inherit;
}
.cs-hero-inner > * { margin: 0; }
.cs-hero-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.cs-hero-title { margin: 0; line-height: 1.2; word-break: break-word; }
.cs-hero-sub { margin: 0; opacity: .92; }
.cs-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cs-hero-cta .cs-btn { margin: 0; }
/* 对齐：section 已内联 align-items，这里让内部容器与搜索框跟随对齐 */
.cs-hero-align-left   .cs-hero-inner { align-items: flex-start; }
.cs-hero-align-center .cs-hero-inner { align-items: center; }
.cs-hero-align-right  .cs-hero-inner { align-items: flex-end; }
.cs-hero-align-left   .cs-search { margin: 0 auto 0 0; }
.cs-hero-align-center .cs-search { margin: 0 auto; }
.cs-hero-align-right  .cs-search { margin: 0 0 0 auto; }

/* ── 布局：侧栏 + 网格 ── */
.cs-layout { display: flex; gap: 26px; align-items: flex-start; padding-bottom: 50px; }
.cs-side { width: 210px; flex: none; background: #fff; border: 1px solid #eaecef; border-radius: 12px; padding: 16px; align-self: flex-start; position: sticky; top: 76px; }
.cs-side h3 { margin: 0 0 12px; font-size: 14px; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; }
.cs-filter-block { margin-bottom: 22px; }
.cs-filter-block:last-child { margin-bottom: 0; }
.cs-cats { list-style: none; margin: 0; padding: 0; }
.cs-cats li { margin: 2px 0; }
.cs-cats a { display: block; padding: 8px 10px; border-radius: 8px; color: #4b5563; font-weight: 500; }
.cs-cats a:hover { background: #fff0ef; color: #E60012; }
.cs-cats a.on { background: #E60012; color: #fff; }

/* 价格筛选 */
.cs-price-inputs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cs-price-inputs input { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #d8dde6; border-radius: 8px; font-size: 13px; outline: none; }
.cs-price-inputs input:focus { border-color: #E60012; }
.cs-price-inputs span { color: #9ca3af; }
.cs-price-clear { display: inline-block; margin-top: 8px; font-size: 12px; color: #9ca3af; }
.cs-price-clear:hover { color: #E60012; }

.cs-main { flex: 1; min-width: 0; }

/* 工具栏 */
.cs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cs-result { font-size: 14px; color: #4b5563; }
.cs-result b { color: #111827; }
.cs-toolbar-right { display: flex; align-items: center; gap: 12px; }
.cs-sort { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 6px; }
.cs-sort select { padding: 7px 10px; border: 1px solid #d8dde6; border-radius: 8px; font-size: 13px; background: #fff; cursor: pointer; outline: none; }
.cs-sort select:focus { border-color: #E60012; }
.cs-view-toggle { display: inline-flex; border: 1px solid #d8dde6; border-radius: 8px; overflow: hidden; }
.cs-view-btn { width: 38px; height: 34px; display: flex; align-items: center; justify-content: center; background: #fff; color: #6b7280; font-size: 16px; text-decoration: none; }
.cs-view-btn:hover { background: #fff0ef; color: #E60012; }
.cs-view-btn.on { background: #E60012; color: #fff; }

/* 已选筛选 */
.cs-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cs-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: #fce8e6; color: #E60012; border-radius: 999px; font-size: 12px; font-weight: 500; text-decoration: none; }
.cs-chip:hover { background: #e0e8ff; }
.cs-chip-clear { background: #f3f4f6; color: #6b7280; }
.cs-chip-clear:hover { background: #e5e7eb; color: #374151; }

/* 分类描述（面包屑下方，参考 Lovehoney 风格：标题 + 段落描述） */
.cs-cat-description {
  margin-bottom: 24px; padding: 20px 24px;
  background: #f9fafb; border-radius: 10px;
  border-left: 4px solid #E60012;
}
.cs-cat-desc-title {
  font-size: 22px; font-weight: 700; margin: 0 0 8px;
  color: #111827;
}
.cs-cat-desc-text {
  font-size: 14px; line-height: 1.7; margin: 0;
  color: #4b5563;
}

/* 网格 + 列表视图 */
.cs-grid {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.cs-card-desc { font-size: 12.5px; color: #9ca3af; line-height: 1.5; margin-top: -2px; }

/* 列表视图：左图右文横向卡片（一行一个商品）
   ★ 关键：必须从 grid 切到 flex，否则 .cs-card 作为 grid 子项
   的 flex-direction:row 不生效（flex 属性不作用于 grid item） */
.cs-grid.cs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-grid.cs-list .cs-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 200px;
}
.cs-grid.cs-list .cs-card-img {
  width: 220px; flex: none;
  aspect-ratio: 1 / 1;
  border-radius: 12px 0 0 12px;
}
.cs-grid.cs-list .cs-card-body {
  flex: 1; padding: 16px 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cs-grid.cs-list .cs-card-title { font-size: 17px; }
.cs-grid.cs-list .cs-card-summary {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal; padding-top: 4px;
}
.cs-grid.cs-list .cs-card-actions { padding-top: 12px; max-width: 360px; }

/* 分页 */
.cs-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.cs-pagination a, .cs-pagination .cs-page-dots { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.cs-pagination a { background: #fff; border: 1px solid #e5e7eb; color: #4b5563; font-weight: 500; }
.cs-pagination a:hover { border-color: #E60012; color: #E60012; }
.cs-pagination a.on { background: #E60012; border-color: #E60012; color: #fff; }
.cs-pagination .cs-page-dots { color: #9ca3af; }
.cs-page-prev, .cs-page-next { font-weight: 600 !important; }

/* ── Load-More 加载更多（点击式 / 无限滚动共用区块）── */
.cs-loadmore { text-align: center; margin-top: 36px; padding-bottom: 8px; }
.cs-loadmore-counter { font-size: 13px; color: #6b7280; margin-bottom: 14px; letter-spacing: .2px; }
.cs-loadmore-counter b { color: #111827; font-weight: 700; }
.cs-loadmore-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 220px; height: 46px; padding: 0 32px;
  border: 1px solid #E60012; border-radius: 8px;
  background: #fff; color: #E60012;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.cs-loadmore-btn:hover { background: #E60012; color: #fff; }
.cs-loadmore-btn:disabled { opacity: .65; cursor: not-allowed; background: #fff; color: #E60012; }
.cs-loadmore-end {
  font-size: 14px; color: #9ca3af; letter-spacing: .3px;
  padding: 16px 0 4px;
}
.cs-loadmore-end::before { content: '— '; }
.cs-loadmore-end::after  { content: ' —'; }

/* ── 商品卡片（统一结构：图片/分类/评分/标题/摘要/价格/颜色/footer）──
   间距统一用 padding，禁止 margin，避免评分/摘要/折扣缺失时卡片高度塌陷，
   保证网格三端（桌面/平板/手机）整齐对齐。 */
.cs-card { position:relative; background:#fff; border:1px solid #eaecef; border-radius:12px; overflow:hidden; display:flex; flex-direction:column; transition:.18s; }
.cs-card:hover { box-shadow:0 8px 24px rgba(31,41,55,.10); transform:translateY(-2px); }
.cs-card-img { display:block; aspect-ratio:1/1; position:relative; overflow:hidden; }
.cs-card-img .cs-ph { width:100%; height:100%; }

/* body：flex 列，flex:1 撑满；模块间距靠模块自身 padding，禁止 margin */
.cs-card-body { padding:12px 14px 14px; display:flex; flex-direction:column; flex:1; gap:0; }

/* 图片角标 / 收藏（绝对定位，不占文档流，所有卡片样式通用） */
.cs-card-offer {
  position:absolute; top:10px; left:10px; z-index:3;
  background:#E60012; color:#fff; font-size:11px; font-weight:800;
  letter-spacing:.03em; padding:4px 9px; border-radius:4px;
  box-shadow:0 2px 6px rgba(220,38,38,.35);
}
.cs-card-badge {
  position:absolute; top:10px; left:10px; z-index:3;
  color:#fff; font-size:11px; font-weight:700;
  padding:4px 10px; border-radius:4px; box-shadow:0 2px 6px rgba(0,0,0,.18);
}
.cs-card-wish {
  position:absolute; top:8px; right:8px; z-index:5;       /* z-index 高于 <a> 的图片，避免被吞 */
  width:auto; height:auto; border:none; padding:4px;
  cursor:pointer; background:transparent; color:#161615;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:0; box-shadow:none;
  transition:color .15s, transform .15s; transform:scale(1);
}
.cs-card-wish svg { display:block; width:24px; height:24px; pointer-events:none; }
.cs-card-wish:hover { transform:scale(1.15); color:var(--cs-brand, #E60012); }
/* v14：点心形加入心愿单（localStorage 收藏 + 阻止冒泡跳详情）——不再跟随 <a> 跳详情 */
.cs-card-wish.is-active { color:var(--cs-brand, #E60012); transform:scale(1.1); }
.cs-card-oos {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:5; color:#fff; font-size:13px; font-weight:800; letter-spacing:.04em;
  padding:8px 16px; border-radius:8px; background:rgba(107,114,128,.92);
  box-shadow:0 4px 14px rgba(0,0,0,.25); text-align:center; line-height:1.3;
  max-width:82%; pointer-events:none;
}

/* 各模块统一 padding 间距，禁止 margin（空模块也保留 padding 占位，避免高度塌陷） */
.cs-card-cat, .cs-card-stars, .cs-card-title, .cs-card-summary,
.cs-card-price, .cs-card-colors { padding-top:2px; padding-bottom:2px; }

.cs-card-cat {
  font-size:12px; color:#9ca3af;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;   /* 单行溢出省略，常驻 DOM */
}
.cs-card-stars {
  color:var(--cs-secondary, #f59e0b);   /* 读取全局次要色 */
  font-size:13px; letter-spacing:2px; min-height:18px;           /* 无评价保留占位高度 */
}
.cs-card-stars-cnt { color:#9ca3af; font-size:11px; letter-spacing:0; }
.cs-card-title {
  font-weight:700; font-size:15px; color:#111827; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;   /* 最多 2 行截断，常驻 DOM */
}
.cs-card-title:hover { color:#E60012; }
.cs-card-summary {
  font-size:12.5px; color:#6b7280; line-height:1.5; min-height:20px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;   /* 强制 1 行截断；无摘要保留占位 */
}
.cs-card-price { font-size:17px; font-weight:800; color:#E60012; display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.cs-price-now { color:#E60012; font-weight:800; }
.cs-price-was { color:#9ca3af; font-weight:600; text-decoration:line-through; font-size:13px; }
.cs-price-disc { color:#E60012; font-weight:700; font-size:11px; border:1px solid #E60012; border-radius:4px; padding:1px 5px; }
.cs-price-save { color:#E60012; font-weight:700; font-size:12px; }
.cs-card-colors { display:flex; gap:6px; flex-wrap:wrap; min-height:18px; }   /* 无颜色保留占位 */
.cs-color-dot {
  width:15px; height:15px; border-radius:50%;
  border:1px solid rgba(0,0,0,.12); box-shadow:inset 0 0 0 2px #fff;
}

/* footer：flex-shrink:0，不写死高度，padding 响应式（见底部媒体查询） */
.cs-card-actions {
  display:flex; align-items:center; gap:8px; flex-shrink:0;
  padding-top:10px; padding-bottom:12px;
}
.cs-card-actions:empty { padding-top:6px; padding-bottom:6px; }   /* 零售/访客空 footer 仅保留轻占位 */
.cs-card-actions .cs-btn { flex:1; padding:9px 10px; font-size:13px; border-radius:8px; cursor:pointer; }
.cs-card-moq { font-size:11.5px; color:#6b7280; white-space:nowrap; }
.cs-out { color:#9ca3af; font-size:13px; align-self:center; }
.cs-btn-basket {
  width:100%; display:block; text-align:center;
  background:#E60012; color:#fff; border:1px solid #E60012;
  border-radius:8px; padding:10px 12px; font-size:13.5px; font-weight:700;
  cursor:pointer; transition:background .15s;
}
.cs-btn-basket:not(:disabled):hover { background:#990000; }   /* 禁用按钮不接受 hover 反馈（防缺货按钮变红） */
.cs-btn-basket:disabled,
.cs-btn-basket.is-oos { background:#cbd5e1; border-color:#cbd5e1; color:#fff; cursor:not-allowed; }
.cs-btn-basket.is-oos:hover { background:#cbd5e1; }            /* B2B 缺货按钮：hover 仍是灰色 */

/* ── 管理员预览切换栏（admin-only，普通用户不可见）── */
.cs-admin-preview-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 16px; margin:0 auto 12px; max-width:1280px;
  background:#1e293b; border-radius:8px; font-size:13px; color:#cbd5e1;
}
.cs-ap-label { font-weight:700; color:#f8fafc; }
.cs-ap-btn {
  display:inline-block; padding:4px 12px; border-radius:6px;
  background:#334155; color:#e2e8f0; text-decoration:none; font-size:12.5px;
  transition:background .15s;
}
.cs-ap-btn:hover { background:#475569; }
.cs-ap-btn.is-active { background:var(--cs-primary,#E60012); color:#fff; }
.cs-ap-hint { margin-left:auto; font-size:11.5px; color:#94a3b8; }

/* ── 管理员调试信息块（admin-only，每张卡片底部）── */
.cs-card-debug {
  display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center;
  padding:4px 0; margin-top:2px;
  font-size:10.5px; color:#94a3b8; border-top:1px dashed #e2e8f0;
}
.cs-debug-tag {
  display:inline-block; padding:1px 6px; border-radius:3px;
  background:#fbbf24; color:#78350f; font-weight:700; font-size:9px;
  letter-spacing:.05em;
}

/* ── 产品卡片样式变体（仅容器级主题，模块结构统一）── */
/* 默认简洁 = 基础 .cs-card 样式 */
/* 现代卡片 */
.cs-card--modern { border:1px solid #ececec; border-radius:14px; box-shadow:0 2px 10px rgba(31,41,55,.06); }
.cs-card--modern:hover { box-shadow:0 14px 34px rgba(31,41,55,.14); transform:translateY(-4px); }
.cs-card--modern .cs-card-body { padding:10px 16px 12px; }
.cs-card--modern .cs-card-cat { font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:#9aa0ab; font-weight:600; }
.cs-card--modern .cs-card-title { font-size:15.5px; letter-spacing:-.01em; }
.cs-card--modern .cs-card-price { font-size:19px; }
/* 经典卡片 */
.cs-card--classic { border-radius:8px; border:1px solid #d1d5db; box-shadow:none; }
.cs-card--classic:hover { box-shadow:0 4px 16px rgba(31,41,55,.10); transform:translateY(-2px); }
.cs-card--classic .cs-card-img { border-radius:8px 8px 0 0; }
.cs-card--classic .cs-card-body { padding:10px 16px 12px; }
.cs-card--classic .cs-card-title { font-size:15px; font-weight:700; color:#1f2937; }
.cs-card--classic .cs-card-title:hover { color:#E60012; }
.cs-card--classic .cs-card-price {
  font-size:18px; color:#E60012;
  background:linear-gradient(135deg,#fef2f2,#fff); padding:6px 10px; border-radius:6px;
}
.cs-card--classic .cs-card-actions { border-top:1px solid #f3f4f6; }

/* 三端响应式：字号/行高 + footer padding */
@media (max-width:1024px) {
  .cs-card-body { padding:11px 13px 13px; }
  .cs-card-title { font-size:14.5px; }
  .cs-card-summary { font-size:12px; }
  .cs-card-price { font-size:16px; }
  .cs-card-actions { padding-top:9px; padding-bottom:11px; }
}
@media (max-width:640px) {
  .cs-card-body { padding:10px 11px 12px; }
  .cs-card-cat { font-size:11px; }
  .cs-card-title { font-size:14px; line-height:1.3; }
  .cs-card-summary { font-size:11.5px; }
  .cs-card-price { font-size:15px; }
  .cs-card-actions { padding-top:8px; padding-bottom:10px; }
  .cs-card-actions .cs-btn { padding:8px 8px; font-size:12.5px; }
}

.cs-empty { grid-column: 1/-1; text-align: center; padding: 60px 0; color: #9ca3af; }
.cs-empty a { color: #E60012; font-weight: 600; }

/* 占位图 */
.cs-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #fff; }
.cs-ph span { font-size: 2.4rem; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* ── 商品详情 ── */
.cs-pd { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0 60px; }
.cs-pd-img { aspect-ratio: 1/1; border-radius: 14px; overflow: hidden; border: 1px solid #eaecef; }
.cs-pd-img .cs-ph { width: 100%; height: 100%; }
.cs-pd-cat { color: #9ca3af; font-size: 13px; }
.cs-pd-title { font-size: 26px; margin: 4px 0 10px; }
.cs-pd-price { font-size: 28px; font-weight: 800; color: #E60012; margin: 8px 0; }
.cs-pd-price small { font-size: 14px; color: #9ca3af; font-weight: 500; }
.cs-pd-stock { font-size: 14px; color: #16a34a; margin-bottom: 8px; }
.cs-pd-stock.cs-oos { color: #E60012; }
.cs-pd-desc { color: #4b5563; margin: 14px 0; }

/* 阶梯价提示条（P0②） */
.cs-pd-tier { font-size: 13px; color: #7c3aed; margin: 2px 0 8px; }
.cs-pd-tier.show { font-weight: 600; }
.cs-pd-tier:empty { display: none; }

/* 阶梯批发价一览表 */
.cs-pd-tierlist { margin: 14px 0 4px; border: 1px solid #ede9fe; border-radius: 10px; overflow: hidden; background: #faf8ff; }
.cs-tierlist-h { font-size: 13px; font-weight: 700; color: #6d28d9; padding: 9px 12px; background: #f3edff; }
.cs-tier-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-tier-tbl th { text-align: left; padding: 7px 12px; color: #6b7280; font-weight: 600; background: #fff; border-bottom: 1px solid #eee; }
.cs-tier-tbl td { padding: 7px 12px; border-bottom: 1px solid #f1eefb; }
.cs-tier-tbl tr:last-child td { border-bottom: none; }
.cs-tier-tbl tr.on td { background: #ede9fe; color: #6d28d9; font-weight: 700; }

.cs-opt-group { margin: 16px 0; }
.cs-opt-label { font-size: 13px; color: #6b7280; margin-bottom: 8px; font-weight: 600; }
.cs-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #e5e7eb; cursor: pointer; position: relative;
}
.cs-swatch.on { border-color: #E60012; box-shadow: 0 0 0 2px #fadbd9; }
.cs-sizes { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-size {
  min-width: 46px; padding: 9px 12px; border: 1px solid #d8dde6; border-radius: 8px;
  background: #fff; cursor: pointer; font-weight: 600; text-align: center;
}
.cs-size.on { border-color: #E60012; background: #E60012; color: #fff; }
.cs-size:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
/* #SKU矩阵改造：动态 N 组下拉选择器 + 售罄色块禁用 */
.cs-attr-select { padding: 9px 12px; border: 1px solid #d8dde6; border-radius: 8px; background: #fff; font-size: 14px; min-width: 150px; cursor: pointer; color: #1f2937; }
.cs-attr-select:focus { outline: none; border-color: #E60012; }
.cs-swatch.disabled { opacity: .35; cursor: not-allowed; }
.cs-swatch.disabled::after { content: ''; position: absolute; inset: 0; }
.cs-attr-groups { margin: 4px 0; }
/* #SKU矩阵改造：小屏适配——选择器占满宽度，色块/尺寸略缩，保证触控目标 */
@media (max-width: 480px) {
  .cs-swatch { width: 30px; height: 30px; }
  .cs-size { padding: 8px 10px; min-width: 42px; }
  .cs-attr-select { min-width: 0; width: 100%; }
  .cs-opt-group { margin: 12px 0; }
}

.cs-qty { display: inline-flex; align-items: center; border: 1px solid #d8dde6; border-radius: 8px; overflow: hidden; }
.cs-qty button { width: 38px; height: 38px; border: none; background: #f3f4f6; font-size: 18px; cursor: pointer; }
.cs-qty input { width: 56px; height: 38px; border: none; text-align: center; font-size: 15px; outline: none; }

/* ── 购物车 / 结算 通用卡片 ── */
.cs-box { background: #fff; border: 1px solid #eaecef; border-radius: 12px; padding: 22px; }
.cs-section-title { font-size: 20px; margin: 0 0 16px; }

.cs-cart-row {
  display: grid; grid-template-columns: 84px 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid #f0f1f4;
}
.cs-cart-img { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; }
.cs-cart-img .cs-ph { width: 100%; height: 100%; }
.cs-cart-title { font-weight: 700; color: #111827; }
.cs-cart-title:hover { color: #E60012; }
.cs-cart-meta { font-size: 13px; color: #9ca3af; margin-top: 2px; }
.cs-cart-price { font-weight: 700; }
.cs-cart-qty { display: inline-flex; align-items: center; border: 1px solid #d8dde6; border-radius: 8px; overflow: hidden; }
.cs-cart-qty .cs-step { width: 30px; height: 32px; border: none; background: #f3f4f6; cursor: pointer; font-size: 16px; }
.cs-cart-qty input { width: 44px; height: 32px; border: none; text-align: center; outline: none; }
.cs-cart-sub { font-weight: 800; min-width: 80px; text-align: right; }
.cs-cart-del { border: none; background: none; color: #9ca3af; cursor: pointer; font-size: 16px; }
.cs-cart-del:hover { color: #E60012; }

.cs-cart-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.cs-cart-total { font-size: 18px; }
.cs-cart-total b { font-size: 24px; color: #E60012; }

/* 结算表单 */
.cs-checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; padding: 28px 0 60px; align-items: start; }
.cs-field { margin-bottom: 14px; }
.cs-field label { display: block; font-size: 13px; font-weight: 600; color: #4b5563; margin-bottom: 6px; }
.cs-field input, .cs-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d8dde6; border-radius: 8px; font-size: 15px; outline: none;
  font-family: inherit;
}
.cs-field input:focus, .cs-field textarea:focus { border-color: #E60012; }
.cs-field textarea { resize: vertical; min-height: 70px; }
.cs-pay-opts { display: flex; flex-direction: column; gap: 10px; }
.cs-pay {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #d8dde6; border-radius: 10px; cursor: pointer;
}
.cs-pay.on { border-color: #E60012; background: #fff0ef; }
.cs-pay input { margin: 0; }
.cs-pay .cs-pay-name { font-weight: 600; }
.cs-pay-hint { color: #9ca3af; font-weight: 400; font-size: 12px; margin-left: 4px; }
.cs-summary-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f1f4; }
.cs-summary-row:last-child { border-bottom: none; }
.cs-summary-total { font-size: 18px; font-weight: 700; margin-top: 8px; }
.cs-summary-total b { color: #E60012; font-size: 22px; }

/* 成功页 */
.cs-done { max-width: 560px; margin: 60px auto; text-align: center; }
.cs-done .cs-check {
  width: 64px; height: 64px; border-radius: 50%; background: #16a34a; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 18px;
}
.cs-done .cs-check.cs-check-warn { background: #f59e0b; }
.cs-done h1 { margin: 0 0 8px; }
.cs-done .cs-order-no { font-size: 18px; font-weight: 700; color: #E60012; }
.cs-order-txn {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef2ff; color: #4338ca; padding: 2px 10px; border-radius: 6px;
  font-size: 14px;
}
.cs-done p { color: #6b7280; }
.cs-done .cs-actions { margin-top: 22px; display: flex; gap: 12px; justify-content: center; }

/* 支付状态徽标 */
.cs-badge {
  display: inline-block; margin: 6px 0 14px; padding: 4px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.cs-badge-paid { background: #e7f7ee; color: #16a34a; }
.cs-badge-pending { background: #fff4e5; color: #d97706; }

/* 支付提示 */
.cs-pay-tip {
  margin: 8px auto 4px; max-width: 460px; padding: 12px 14px; border: 1px solid #f0d9b5;
  background: #fffaf0; border-radius: 10px; color: #92400e; font-size: 14px; text-align: left;
}
.cs-bank-info {
  margin: 10px 0 0; padding: 10px 12px; background: #fff; border: 1px dashed #e3c9a3;
  border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  white-space: pre-wrap; word-break: break-all; color: #6b4f2a;
}

/* 离线支付说明 + 付款凭证上传 */
.cs-pay-inst-box { margin-top: 4px; }
.cs-pay-offline { margin: 8px 0 4px; text-align: center; }
.cs-pay-offline-head { font-weight: 600; margin-bottom: 8px; text-align: left; }
.cs-pay-qr { margin: 8px 0; }
.cs-pay-qr img { max-width: 180px; max-height: 180px; border: 1px solid #eee; border-radius: 8px; background: #fff; }
.cs-pay-account { font-size: 14px; margin: 6px 0; }
.cs-pay-note { font-size: 13px; line-height: 1.6; white-space: pre-wrap; text-align: left; }
.cs-pay-proof {
  margin: 14px auto 4px; max-width: 460px; padding: 14px; border: 1px solid #e3e8f0;
  border-radius: 10px; background: #fff; text-align: left;
}
.cs-pay-proof-title { font-weight: 700; margin-bottom: 4px; }
.cs-pay-proof-hint { color: #9ca3af; font-size: 12px; margin: 0 0 10px; }
.cs-pay-proof .cs-field { margin-bottom: 10px; }
.cs-pay-proof-mini {
  max-width: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px; margin-top: 10px;
}
.cs-pay-proof-mini .cs-pay-proof-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.cs-pay-proof-mini input[type=file] { font-size: 12px; max-width: 220px; }

.cs-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 200;
}
.cs-toast.show { opacity: 1; }

/* ── 产品列表布局控制（店铺装修设置） ── */
/* 每行商品数 */
.cs-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.cs-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.cs-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.cs-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.cs-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

/* 分类导航位置 */
.cs-layout--cat-left  { flex-direction: row; }
.cs-layout--cat-left .cs-side { order: 0; }
.cs-layout--cat-right { flex-direction: row-reverse; }
.cs-layout--cat-top  { flex-direction: column; }
.cs-layout--cat-top .cs-side {
  width: 100%; position: static; flex-direction: row; gap: 12px;
  overflow-x: auto; padding: 12px 16px; border-radius: 10px;
}
.cs-layout--cat-top .cs-filter-block {
  flex: none; min-width: fit-content;
}
.cs-layout--cat-top .cs-cats {
  display: flex; gap: 6px; flex-wrap: nowrap;
}
.cs-layout--cat-top .cs-cats li { display: inline-block; }
.cs-layout--cat-top .cs-cats a {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; white-space: nowrap;
}

/* ── 可折叠分类导航条 ── */
.cs-layout--cat-collapsible { display: block; }
.cs-cat-bar {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 10px 16px; margin-bottom: 16px;
}
.cs-cat-bar-toggle {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #374151;
  padding: 4px 0;
}
.cs-cat-bar-icon { font-size: 12px; transition: transform .2s; }
.cs-cat-bar-body {
  display: none; margin-top: 10px;
  flex-wrap: wrap; gap: 6px;
}
.cs-cat-bar-body--open { display: flex; }
.cs-cat-pill {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  font-size: 13px; color: #4b5563; background: #f3f4f6;
  text-decoration: none; transition: all .15s;
}
.cs-cat-pill:hover { background: #e5e7eb; color: #1f2937; }
.cs-cat-pill--on {
  background: #E60012; color: #fff; font-weight: 600;
}

/* ── store.php 面包屑（位于分类描述上方）── */
.cs-store-breadcrumb { font-size: 13px; color: #9ca3af; padding: 16px 0 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-store-breadcrumb a { color: #6b7280; }
.cs-store-breadcrumb a:hover { color: #E60012; }
.cs-store-breadcrumb .sep { color: #cbd5e1; }
.cs-store-breadcrumb .cur { color: #374151; font-weight: 600; }

/* ── 隐藏分类导航：网格占满 ── */
.cs-layout--no-cat { display: block; }
.cs-layout--no-cat .cs-main { max-width: 100%; }

/* 响应式 */
@media (max-width: 860px) {
  .cs-layout { flex-direction: column; }
  .cs-side { width: 100%; position: static; }
  .cs-grid.cs-list .cs-card { flex-direction: column; min-height: 0; }
  .cs-grid.cs-list .cs-card-img { width: 100%; aspect-ratio: 1 / 1; border-radius: 12px 12px 0 0; }
  .cs-pd, .cs-checkout { grid-template-columns: 1fr; gap: 24px; }
  .cs-thumb { width: 58px; height: 58px; }
  .cs-cart-row { grid-template-columns: 64px 1fr; row-gap: 8px; }
  .cs-cart-img { width: 64px; height: 64px; }
  .cs-cart-qty, .cs-cart-sub, .cs-cart-del { grid-column: 2; justify-self: start; }
}

/* 手机端（≤767px）：分类/品牌侧栏隐藏，分类已移入汉堡抽屉（cs-mo-cat-panel）
   （v5 布局对齐：平板区间 768-1199px 归入平板视图，侧栏保留；断点 768→767）*/
@media (max-width: 767px) {
  .cs-layout .cs-side { display: none; }
}

/* ── 面包屑 ── */
.cs-breadcrumb { font-size: 13px; color: #9ca3af; padding: 18px 0 4px; }
.cs-breadcrumb a { color: #6b7280; }
.cs-breadcrumb a:hover { color: #E60012; }
.cs-breadcrumb .cs-sep { margin: 0 8px; color: #d1d5db; }
.cs-breadcrumb .cs-cur { color: #374151; }

/* ── 商品画廊（多图 + 放大）── */
.cs-pd-gallery { display: flex; flex-direction: column; gap: 12px; position: relative; }
.cs-pd-main {
  position: relative; aspect-ratio: 1/1; border-radius: 14px; overflow: hidden;
  border: 1px solid #eaecef; background: #fafbfc; cursor: zoom-in;
}
.cs-pd-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #374151; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: background .15s, opacity .15s; opacity: .9;
}
.cs-pd-arrow:hover { background: #fff; opacity: 1; }
.cs-pd-arrow--prev { left: 12px; }
.cs-pd-arrow--next { right: 12px; }
.cs-gz { display: none; width: 100%; height: 100%; }
.cs-gz.on { display: block; }
.cs-gz.cs-zoomed { transform: scale(2); transform-origin: center; cursor: zoom-out; }
.cs-gz-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-pd-main .cs-ph { width: 100%; height: 100%; }
.cs-pd-badge {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

/* 角标居中位置（图片正中） */
.cs-badge-pos-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; }
.cs-card-img .cs-badge-pos-center { z-index: 5; }
.cs-pd-gallery .cs-badge-pos-center { z-index: 6; }
/* 缺货角标（Out of Stock）：商品主图正中央，自动关联库存 */
.cs-pd-oos {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 6; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .04em;
  padding: 10px 22px; border-radius: 10px; background: rgba(107,114,128,.92);
  box-shadow: 0 4px 16px rgba(0,0,0,.3); text-align: center; line-height: 1.3;
  pointer-events: none;
}
.cs-pd-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-thumb {
  width: 68px; height: 68px; border-radius: 10px; overflow: hidden; padding: 0;
  border: 2px solid #e5e7eb; background: #fff; cursor: pointer; flex: none;
}
.cs-thumb.on { border-color: #E60012; box-shadow: 0 0 0 2px #fadbd9; }
.cs-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-thumb-ph { width: 100%; height: 100%; }
.cs-thumb-ph span { font-size: 1.4rem; }

/* 已选规格标签 */
.cs-pd-chosen { font-size: 13px; color: #4b5563; min-height: 18px; margin: 4px 0 2px; font-weight: 500; }
.cs-pd-chosen:empty { display: none; }

/* ── 分享按钮 + 菜单 ── */
.cs-pd-share { position: relative; display: inline-block; margin: 6px 0 4px; }
.cs-share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid #d8dde6; border-radius: 8px; background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #4b5563;
}
.cs-share-btn:hover { border-color: #E60012; color: #E60012; }
.cs-share-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; min-width: 168px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31,41,55,.12); padding: 6px; display: flex; flex-direction: column;
}
.cs-share-menu[hidden] { display: none; }
.cs-share-item { padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #374151; text-decoration: none; }
.cs-share-item:hover { background: #fff0ef; color: #E60012; }

/* 相关推荐 */
.cs-rel-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.cs-rel-grid .cs-card-title { font-size: 14px; }

/* ── 优惠券框 / 评价区 ── */
.cs-pd-section { margin-top: 36px; }
.cs-coupon-box { display: flex; gap: 8px; margin: 10px 0 4px; max-width: 360px; }
.cs-coupon-box input {
  flex: 1; padding: 9px 12px; border: 1px solid #d8dee9; border-radius: 8px; font-size: 14px;
}
.cs-coupon-msg { font-size: 13px; min-height: 18px; margin: 2px 0 6px; }
.cs-coupon-msg.ok { color: #16a34a; }
.cs-coupon-msg.err { color: #E60012; }
.cs-coupon-applied { font-size: 13px; color: #374151; margin: 6px 0; }
.cs-coupon-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cs-coupon-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px dashed #f0a429; border-radius: 8px; background: #fffaf0; font-size: 13px;
}
.cs-coupon-code { font-weight: 700; color: #d97706; letter-spacing: .5px; }
.cs-coupon-desc { color: #6b7280; }

.cs-rating-summary { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.cs-stars { color: #f5a623; letter-spacing: 2px; font-size: 18px; }
.cs-rating-num { color: #6b7280; font-size: 14px; }
.cs-review-list { display: flex; flex-direction: column; gap: 14px; }
.cs-review {
  border: 1px solid #eef0f4; border-radius: 10px; padding: 14px 16px; background: #fff;
}
.cs-review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-review-name { font-weight: 600; color: #111827; }
.cs-review-date { color: #9ca3af; font-size: 12px; }
.cs-review-title { font-weight: 600; margin: 6px 0 2px; color: #1f2937; }
.cs-review-body { color: #4b5563; line-height: 1.7; font-size: 14px; }
.cs-review-reply {
  margin-top: 8px; padding: 8px 12px; background: #f6f8fb; border-radius: 8px;
  color: #374151; font-size: 13px; line-height: 1.6;
}

/* ── 促销价（营销引擎）── */
.cs-price-now { color: #e11d48; font-weight: 700; }
.cs-price-now small { color: #9ca3af; font-weight: 400; font-size: 12px; }
.cs-price-orig {
  color: #9ca3af; font-weight: 400; font-size: 13px;
  text-decoration: line-through; margin-left: 4px;
}
.cs-tag-sale {
  display: inline-block; margin-left: 6px; padding: 2px 7px;
  background: #e11d48; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 600; vertical-align: 1px;
}
.cs-card-price .cs-price-now { font-size: 17px; }

/* ── 购物车/结算优惠明细与合计（营销引擎）── */
.cs-red { color: #e11d48; }
.cs-strike { text-decoration: line-through; color: #9ca3af; font-weight: 400; }
.cs-discount-list {
  margin: 10px 0 4px; padding: 10px 12px;
  background: #fff7f5; border: 1px solid #fde3dd; border-radius: 8px;
}
.cs-discount-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: #374151; padding: 2px 0;
}
.cs-total-details { margin: 8px 0 4px; }
.cs-total-line {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: #6b7280; padding: 1px 0;
}
.cs-cart-total { margin-top: 10px; }
.cs-summary-total { margin-top: 12px; }

/* ── 写评价表单（P2-D）── */
.cs-btn-outline {
  background: #fff; color: #E60012;
  border: 1px solid #c6d7f7; border-radius: 6px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cs-btn-outline:hover { background: #fce8e6; border-color: #E60012; }
.cs-review-form-wrap { margin-top: 18px; }
.cs-review-form {
  margin-top: 12px; padding: 16px 18px;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
}
.cs-rf-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.cs-rf-row > label {
  flex: 0 0 88px; padding-top: 7px;
  font-size: 13px; color: #374151; font-weight: 600; text-align: right;
}
.cs-rf-row input[type=text],
.cs-rf-row input[type=email],
.cs-rf-row textarea {
  flex: 1; min-width: 0; padding: 7px 10px;
  border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; color: #111827; background: #fff;
}
.cs-rf-row textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.cs-rf-row input:focus, .cs-rf-row textarea:focus {
  outline: none; border-color: #E60012; box-shadow: 0 0 0 2px rgba(230,0,18,.15);
}
.cs-req { color: #e11d48; }
.cs-star-input { display: flex; align-items: center; gap: 4px; padding-top: 3px; flex-wrap: wrap; }
.cs-star-input .cs-star {
  font-size: 22px; color: #d1d5db; cursor: pointer;
  transition: color .12s, transform .12s; line-height: 1; user-select: none;
}
.cs-star-input .cs-star:hover { transform: scale(1.12); }
.cs-star-input .cs-star.on { color: #f59e0b; }
.cs-star-hint { margin-left: 8px; font-size: 12px; color: #6b7280; }
.cs-rf-actions { display: flex; align-items: center; gap: 12px; margin: 4px 0 0 100px; flex-wrap: wrap; }
.cs-rf-note { font-size: 12px; color: #9ca3af; }
.cs-rf-login { margin: 0 0 12px 100px; padding: 8px 12px; background: #fce8e6; border-radius: 6px; color: #E60012; }
.cs-rf-msg { margin: 10px 0 0 100px; padding: 9px 12px; border-radius: 6px; font-size: 13px; }
.cs-rf-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cs-rf-err { background: #fef2f2; color: #B80000; border: 1px solid #fecaca; }
.cs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 640px) {
  .cs-rf-row { flex-direction: column; gap: 5px; }
  .cs-rf-row > label { flex: none; width: 100%; text-align: left; padding-top: 0; }
  .cs-rf-actions, .cs-rf-msg, .cs-rf-login { margin-left: 0; }
}

/* ── 管理员前台编辑入口（浮动按钮）── */
.cs-admin-edit {
  position: fixed; right: 18px; bottom: 70px; z-index: 9990;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  background: #111827; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(17,24,39,.35);
  transition: transform .15s, box-shadow .15s;
}
.cs-admin-edit:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(17,24,39,.45); color: #fff; }
.cs-admin-edit svg { flex: none; }
@media (max-width: 640px) {
  .cs-admin-edit { right: 10px; bottom: 60px; padding: 8px 12px; font-size: 12px; }
}

/* Currency symbol rendering safety net — ensures ₩￥€£¥ etc. always display correctly */
.cs-cart-price, .cs-cart-sub, .cs-cart-total, #csCartTotal,
.cs-red, .cs-price-orig, [id*="csTotal"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Roboto, sans-serif;
}

/* ═══════════════════════════════════════════
   产品角标：位置 + 圆角样式（店铺装修可配置）
   ═══════════════════════════════════════════ */

/* ── 角标位置（默认右上，可选左上）── */
/* 右侧位置（默认）- 已是现有 left/top 定位，无需额外规则 */

/* 左侧位置：与图片左边缘齐平 */
.cs-badge-pos-left { left: 0 !important; right: auto !important; }
.cs-card--modern .cs-card-badge.cs-badge-pos-left,
.cs-card--modern .cs-card-offer.cs-badge-pos-left { left: 0; }
.cs-pd-badge.cs-badge-pos-left { left: 0; }

/* ── 圆角样式变体 ── */
/* 全圆角/药丸（默认）- border-radius 已设为 4px/6px，pill 覆盖为 999px */
.cs-badge-style-pill { border-radius: 999px !important; }

/* 左直右圆（标签风格）*/
.cs-badge-style-label-left { border-radius: 0 6px 6px 0 !important; }

/* 左圆右直（右侧标签风格）*/
.cs-badge-style-label-right { border-radius: 6px 0 0 6px !important; }

/* 直角方形 */
.cs-badge-style-square { border-radius: 0 !important; }


/* ==========================================================================
   全局页头区块（site_header）/ 全局页脚区块（global_footer）
   —— 由 pages.slug=header / footer 的区块渲染，后台「页面构建器」可视化编辑。
   Lovehoney 三层风格后，site_header 区块内部使用 cs-hd-* 类（与 legacy 共用），
   此处仅保留 .cs-header-block 容器样式。
   ========================================================================== */

/* ── 页头区块容器（三层结构由 cs-hd-* 驱动）── */
.cs-header-block { width: 100%; box-sizing: border-box; }
.cs-header-block .cs-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
/* 汉堡（窄屏） */
.cs-hd-burger {
  display: none; margin-left: auto; background: none; border: 0; color: inherit;
  cursor: pointer; padding: 6px; border-radius: 8px;
}
.cs-hd-burger:hover { background: rgba(0, 0, 0, .06); }
/* 对齐模式 */
.cs-header-align-center .cs-header-nav { justify-content: center; }
.cs-header-align-right  .cs-header-nav { justify-content: flex-end; }
@media (max-width: 900px) {
  .cs-hd-burger { display: inline-flex; }
  .cs-header-menu {
    display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start;
    gap: 12px; padding: 6px 0 14px;
  }
  .cs-header-menu.cs-header-menu-open { display: flex; }
  .cs-header-nav { flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; }
  .cs-header-util { margin-left: 0; flex-wrap: wrap; gap: 12px; }
  .cs-header-search input { width: 100%; flex: 1 1 auto; }
  .cs-header-search { width: 100%; }
}

/* ── 页脚 ── */
.cs-gfoot { width: 100%; box-sizing: border-box; padding: 46px 0 0; }
.cs-gfoot .cs-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.cs-gfoot-inner { display: flex; flex-wrap: wrap; gap: 34px; padding-bottom: 32px; }
.cs-gfoot-brandcol { flex: 1 1 240px; min-width: 200px; }
.cs-gfoot-brand { font-size: 19px; font-weight: 800; color: var(--cs-ft-title, #fff); display: block; }
.cs-gfoot-logo { max-height: 32px; display: block; }
.cs-gfoot-tagline { margin: 12px 0 0; font-size: 13px; line-height: 1.75; opacity: .85; }
.cs-gfoot-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin: 14px 8px 0 0; border-radius: 8px;
  background: rgba(255, 255, 255, .08); color: var(--cs-ft-link, #94a3b8);
  text-decoration: none; font-size: 13px; font-weight: 700; transition: all .15s;
}
.cs-gfoot-social:hover { background: rgba(255, 255, 255, .18); color: var(--cs-ft-hover, #fff); }
.cs-gfoot-col {
  flex: 1 1 calc(100% / (var(--cs-ft-cols, 3) + 1.4) - 34px); min-width: 140px;
}
.cs-gfoot-col h4, .cs-gfoot-news h4 {
  margin: 0 0 13px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--cs-ft-title, #fff);
}
.cs-gfoot-col a {
  display: block; margin-bottom: 9px; font-size: 13.5px; text-decoration: none;
  color: var(--cs-ft-link, #94a3b8); transition: color .15s;
}
.cs-gfoot-col a:hover { color: var(--cs-ft-hover, #fff); }
.cs-gfoot-news { flex: 1 1 260px; min-width: 220px; }
.cs-gfoot-news p { margin: 0; font-size: 12.5px; line-height: 1.7; opacity: .8; }
.cs-gfoot-sub { display: flex; gap: 8px; margin-top: 12px; }
.cs-gfoot-sub input {
  flex: 1 1 auto; height: 36px; box-sizing: border-box; padding: 0 11px; font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px;
  background: rgba(255, 255, 255, .07); color: inherit; outline: none;
}
.cs-gfoot-sub input::placeholder { color: currentColor; opacity: .5; }
.cs-gfoot-sub input:focus { border-color: rgba(255, 255, 255, .4); }
.cs-gfoot-sub button {
  height: 36px; padding: 0 15px; border: 0; border-radius: 8px; cursor: pointer;
  background: #E60012; color: #fff; font-size: 13px; font-weight: 600;
}
.cs-gfoot-sub button:hover { filter: brightness(1.08); }
.cs-gfoot-copy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 16px 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px;
}
.cs-gfoot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-left: auto; }
.cs-gfoot-meta a { color: var(--cs-ft-link, #94a3b8); text-decoration: none; }
.cs-gfoot-meta a:hover { color: var(--cs-ft-hover, #fff); }
.cs-gfoot-powered { opacity: .6; }
@media (max-width: 720px) {
  .cs-gfoot { padding-top: 34px; }
  .cs-gfoot-inner { gap: 26px; }
  .cs-gfoot-col { flex: 1 1 45%; }
  .cs-gfoot-meta { margin-left: 0; }
}

/* ════════════ 商品详情页增强（Tabs / 品牌 / 标签 / 规格 / 评价分布 / 配送 / 收藏 / MOQ） ════════════ */

/* 品牌 / 评分 / 标签 行 */
.cs-pd-metarow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 4px; }
.cs-brand-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
  border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; color: #374151; transition: border-color .15s, color .15s;
}
.cs-brand-chip:hover { border-color: #E60012; color: #E60012; }
.cs-brand-chip img { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }
.cs-pd-ratinglink {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 13px; color: #6b7280; transition: color .15s;
}
.cs-pd-ratinglink:hover { color: #E60012; }
.cs-pd-ratinglink .cs-stars { font-size: 14px; color: #f5a623; letter-spacing: 1px; }
.cs-tag-chip {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  background: #fce8e6; color: #E60012; font-size: 12.5px; font-weight: 600; text-decoration: none;
  transition: background .15s, color .15s;
}
.cs-tag-chip:hover, .cs-tag-chip.static { background: #e3e9ff; }
.cs-tag-chip.static { cursor: default; }

/* 短描述 */
.cs-pd-short { color: #4b5563; font-size: 15px; line-height: 1.65; margin: 4px 0 14px; }

/* 操作区：加购 + 收藏 */
.cs-pd-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 18px; }
.cs-pd-actions .cs-btn-block { width: auto; flex: 1; }

/* 成组商品子商品列表 */
.cs-grouped-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cs-grouped-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
}
.cs-grouped-title { font-weight: 600; color: #1f2937; flex: 1; min-width: 120px; text-decoration: none; }
.cs-grouped-title:hover { color: #E60012; }
.cs-grouped-price { font-size: 16px; font-weight: 700; color: #E60012; white-space: nowrap; }
.cs-grouped-oos { font-size: 13px; color: #9ca3af; white-space: nowrap; }
.cs-btn-ghost {
  background: #fff; border: 1px solid #d8dde6; color: #374151; font-weight: 600; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.cs-btn-ghost:hover { border-color: #E60012; color: #E60012; }
.cs-btn-ghost.on { border-color: #E60012; color: #E60012; background: #fff5f5; }

/* MOQ 快捷数量 */
.cs-moq-row { margin-top: 4px; }
.cs-moq-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-moq-btn {
  padding: 7px 13px; border: 1px solid #d8dde6; border-radius: 8px; background: #fff;
  font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; transition: all .15s;
}
.cs-moq-btn:hover { border-color: #E60012; color: #E60012; background: #fff0ef; }

/* Tabs */
.cs-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #eaecef; margin-bottom: 20px; }
.cs-tab {
  appearance: none; border: none; background: none; cursor: pointer;
  padding: 12px 18px; font-size: 15px; font-weight: 600; color: #6b7280;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.cs-tab:hover { color: #E60012; }
.cs-tab.on { color: #E60012; border-bottom-color: #E60012; }
.cs-tab small { font-weight: 400; color: #9ca3af; }
.cs-tab-panel { display: none; }
.cs-tab-panel.on { display: block; animation: csFadeIn .2s ease; }
@keyframes csFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 规格参数表 */
.cs-spec-tbl { width: 100%; border-collapse: collapse; border: 1px solid #eaecef; border-radius: 12px; overflow: hidden; }
.cs-spec-tbl th, .cs-spec-tbl td { text-align: left; padding: 11px 16px; border-bottom: 1px solid #f0f1f4; font-size: 14px; vertical-align: top; }
.cs-spec-tbl th { width: 150px; background: #f7f8fa; color: #4b5563; font-weight: 600; }
.cs-spec-tbl td { color: #374151; }
.cs-spec-tbl tr:last-child th, .cs-spec-tbl tr:last-child td { border-bottom: none; }

/* 评价星级分布条 */
.cs-rating-bars { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; padding: 16px 18px; margin-bottom: 18px; background: #fff; border: 1px solid #eaecef; border-radius: 12px; }
.cs-rating-bars-overall { display: flex; align-items: center; gap: 12px; }
.cs-rating-big { font-size: 42px; font-weight: 800; color: #111827; line-height: 1; }
.cs-rating-bars-meta .cs-stars { font-size: 16px; color: #f5a623; letter-spacing: 1px; }
.cs-rating-sub { font-size: 13px; color: #9ca3af; margin-top: 3px; }
.cs-rating-bars-list { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.cs-rbar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #6b7280; }
.cs-rbar-label { width: 38px; flex: none; }
.cs-rbar-track { flex: 1; height: 8px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.cs-rbar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f5a623, #f7c948); }
.cs-rbar-pct { width: 38px; text-align: right; flex: none; color: #9ca3af; }

/* 配送与售后 */
.cs-ship-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cs-ship-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #fff; border: 1px solid #eaecef; border-radius: 12px; }
.cs-ship-ico { font-size: 20px; line-height: 1.3; flex: none; }
.cs-ship-label { font-size: 13px; color: #6b7280; margin-bottom: 2px; }
.cs-ship-val { font-size: 14px; color: #374151; font-weight: 600; }

/* 详情富文本 + 视频 + 标签云 */
.cs-pd-rich { color: #374151; font-size: 15px; line-height: 1.8; }
.cs-pd-video { margin-top: 18px; position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.cs-pd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-pd-tagcloud { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-pd-tagcloud-h { font-size: 13px; color: #9ca3af; }

@media (max-width: 720px) {
  .cs-ship-grid { grid-template-columns: 1fr; }
  .cs-pd-actions { flex-direction: column; }
  .cs-pd-actions .cs-btn-block { width: 100%; }
  .cs-spec-tbl th { width: 110px; }
  .cs-rating-bars { flex-direction: column; align-items: stretch; gap: 16px; }
}

/* ════════════════════════════════════════════════════════════════
   移动端 / 平板端 响应式补齐（cs- 设计系统）
   Lovehoney 三层页头响应式：顶栏隐藏/折叠、主栏紧凑、导航变抽屉
   ════════════════════════════════════════════════════════════════ */

/* 1. 页头汉堡按钮：桌面隐藏，移动端显示 */
.cs-nav-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: auto;
  border: none; background: transparent; color: #374151;
  border-radius: 8px; cursor: pointer; flex: 0 0 auto;
}
.cs-nav-burger:hover { background: #f3f4f6; }
.cs-nav-burger svg { display: block; }

/* 2. 商品网格：移动端强制 2 列、平板回落 3 列，覆盖店铺装修 cols-N 强制多列碎片 */
@media (max-width: 860px) {
  .cs-grid.cs-grid--cols-4,
  .cs-grid.cs-grid--cols-5,
  .cs-grid.cs-grid--cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .cs-grid.cs-grid--cols-2,
  .cs-grid.cs-grid--cols-3,
  .cs-grid.cs-grid--cols-4,
  .cs-grid.cs-grid--cols-5,
  .cs-grid.cs-grid--cols-6 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cs-rel-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 2b. 平板每行商品数（后台可配，默认 3 列）：
     服务端在网格上输出 cs-grid--tab-N（N=平板列数）。
     平板区间 641-860px 内覆盖上面的强制回落；手机端 ≤640px 仍由上方规则强制 2 列。 */
@media (min-width: 641px) and (max-width: 860px) {
  .cs-grid.cs-grid--tab-2 { grid-template-columns: repeat(2, 1fr); }
  .cs-grid.cs-grid--tab-4 { grid-template-columns: repeat(4, 1fr); }
}

/* 3. Cookie 同意横幅：手机端直接按视口堆叠（不依赖 JS 加 .cs-mobile 类，避免撑破空白）*/
@media (max-width: 600px) {
  #csCookieBanner {
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 14px 16px;
  }
  #csCookieBanner .cs-cookie-text { flex: 1 1 auto; }
  #csCookieBanner .cs-cookie-actions { flex-direction: column; width: 100%; }
  #csCookieBanner .cs-cookie-btn { width: 100%; text-align: center; }
}

/* 4. ≤900px：三层页头响应式 —— 顶栏紧凑、搜索缩小、导航变抽屉 */
@media (max-width: 900px) {
  .cs-hd-topbar-inner { height: 32px; gap: 10px; font-size: 12px; }
  .cs-hd-topbar-right { gap: 10px; }
  .cs-hd-topbar-right a { font-size: 12px; }
  .cs-hd-main { padding: 12px 0; }
  .cs-hd-logo { font-size: 19px; }
  .cs-hd-logo-icon { font-size: 18px; }
  .cs-hd-logo-img { max-height: 30px; }
  .cs-hd-search { max-width: 100%; }
  .cs-hd-search input { height: 38px; font-size: 14px; padding: 0 48px 0 14px; }
  .cs-hd-search button { right: 2px; top: 2px; width: 34px; height: 34px; border-radius: 50%; }
  .cs-hd-search button svg { width: 16px; height: 16px; }
  .cs-hd-icon { width: 36px; height: 36px; }
  .cs-hd-icon svg { width: 20px; height: 20px; }
  .cs-hd-nav a { padding: 0 10px; font-size: 13px; }
}

/* 5. ≤860px：导航栏变为汉堡抽屉 */
@media (max-width: 860px) {
  .cs-nav-burger { display: inline-flex; }

  /* 主栏在窄屏换行：Logo + 图标 + 汉堡占第一行，搜索独占整行，
     同时给搜索框 min-width:0 允许收缩，彻底消除页头横向溢出
     （页头含全屏轮播时，溢出会让轮播 width:100% 变超宽、箭头出界） */
  .cs-hd-main-inner { flex-wrap: wrap; gap: 10px; }
  .cs-hd-search { flex: 1 1 100%; order: 5; margin: 8px 0 0; max-width: 100%; }
  .cs-hd-search input { min-width: 0; }

  /* 导航栏折叠为下拉面板 */
  .cs-hd-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(31,41,55,.14);
    z-index: 60;
  }
  .cs-hd-nav.cs-hd-nav-open { display: block; }
  .cs-hd-nav-inner {
    flex-direction: column; align-items: stretch; gap: 0;
    height: auto; overflow: visible; padding: 6px 16px 14px;
  }
  .cs-hd-nav a {
    padding: 13px 4px; font-size: 15px; border-bottom: 1px solid #f0f1f4;
    border-bottom-color: #f0f1f4 !important; /* 覆盖 active 态 */
    border-radius: 0;
  }
  .cs-hd-nav a.on { color: #E60012; background: #fff5f5; }
  .cs-hd-nav a.on::after { display: none; }

  /* 搜索框全宽 */
  .cs-hd-search { max-width: 100%; }
  .cs-hd-icons { gap: 2px; }
}

/* ═════════════════════════════════════════════════════
   移动端 Lovehoney 风格页头（≤767px 激活）
   单行：Logo + 🔍搜索 + 👤账户 + ❤️心愿单 + 🛒购物车 + ☰分类菜单
   ─────────────────────────────────────────────────── */
.cs-mo-header { display: none; background: var(--cs-mo-bg, #fff); }

@media (max-width: 767px) {
  /* 隐藏桌面端页头主栏和导航（保留顶栏），改用移动端单行 */
  .cs-hd-main   { display: none !important; }
  .cs-hd-nav    { display: none !important; }
  .cs-nav-burger{ display: none !important; }

  .cs-mo-header {
    display: block;
    background: var(--cs-mo-bg, #fff);
    border-bottom: 1px solid #f0f1f4;
    position: relative;
    z-index: 50;
  }

  /* 单行：汉堡菜单(最左) + Logo + 图标组(最右)。强制 nowrap 防止横屏空间不足时分行 */
  .cs-mo-header-inner {
    display: flex; align-items: center; flex-wrap: nowrap;
    padding: 10px 12px; gap: 8px;
  }

  /* 汉堡菜单按钮：固定在最左侧第一位 */
  .cs-mo-menu-btn {
    flex: 0 0 auto;
    margin-right: 2px;
  }

  /* Logo 紧跟汉堡右侧，可伸缩占满中间 */
  .cs-mo-header .cs-hd-logo { font-size: 18px; flex: 1 1 auto; min-width: 0; }
  .cs-mo-header .cs-hd-logo-icon { font-size: 17px; }
  .cs-mo-header .cs-hd-logo-img { max-height: 26px; }

  /* 图标按钮组：固定在最右侧，禁止换行（横屏窄高场景必须单行） */
  .cs-mo-icons {
    display: flex; align-items: center; gap: 4px; flex: 0 0 auto; flex-wrap: nowrap;
  }

  .cs-mo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: none; background: transparent;
    color: var(--cs-mo-icon, #374151); border-radius: 50%; cursor: pointer;
    text-decoration: none; position: relative; flex-shrink: 0;
    transition: background .15s, color .15s;
  }
  .cs-mo-icon:hover,
  .cs-mo-icon[aria-expanded="true"] { background: #f3f4f6; color: var(--cs-brand, #E60012); }

  .cs-mo-cart-badge {
    position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
    padding: 0 3px; font-size: 10px; line-height: 15px;
    background: var(--cs-brand, #E60012); color: #fff; border-radius: 7px;
  }

  /* 展开式搜索栏（默认隐藏） */
  .cs-mo-search-bar {
    display: none; padding: 0 16px 12px; background: #fff;
  }
  .cs-mo-search-bar.open { display: block; animation: csMoSlideDown .2s ease-out; }
  @keyframes csMoSlideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

  .cs-mo-search-bar form {
    display: flex; align-items: center; gap: 0;
    background: #f3f4f6; border-radius: 24px; padding: 4px 4px 4px 18px;
  }
  .cs-mo-search-bar input {
    flex: 1; min-width: 0; border: none; background: transparent;
    height: 38px; font-size: 14px; outline: none; color: #111827;
  }
  .cs-mo-search-bar input::placeholder { color: #9ca3af; }
  .cs-mo-search-bar button {
    width: 36px; height: 36px; border: none; border-radius: 50%;
    background: var(--cs-brand, #E60012); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }

  /* 遮罩层 */
  .cs-mo-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 160;
    transition: opacity .25s;
  }
  .cs-mo-overlay.show { display: block; animation: csMoFadeIn .2s ease-out; }
  @keyframes csMoFadeIn { from{opacity:0} to{opacity:1} }

  /* 右侧滑出面板通用样式 */
  .cs-mo-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
    background: #fff; z-index: 170;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
  }
  .cs-mo-panel.open { transform: translateX(0); }

  /* 分类面板：从左侧滑入（汉堡菜单触发） */
  .cs-mo-cat-panel {
    right: auto; left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
  }
  .cs-mo-cat-panel.open { transform: translateX(0); }

  /* 面板头部 */
  .cs-mo-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid #f0f1f4;
    flex-shrink: 0;
  }
  .cs-mo-panel-title { font-size: 16px; font-weight: 700; color: #111827; }
  .cs-mo-panel-back {
    background: none; border: none; font-size: 15px; color: #374151;
    cursor: pointer; padding: 4px 8px; margin-left: -8px;
  }
  .cs-mo-panel-close {
    background: none; border: none; font-size: 26px; color: #9ca3af;
    cursor: pointer; padding: 0 4px; line-height: 1;
  }
  .cs-mo-panel-close:hover { color: #374151; }

  /* 面板内容区（可滚动） */
  .cs-mo-panel-body {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0;
  }

  /* 分类面板特有样式 */
  .cs-mo-panel-user-link {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 16px; border-bottom: 1px solid #f0f1f4;
    color: #374151; text-decoration: none; font-size: 14px; font-weight: 600;
  }
  .cs-mo-panel-user-link svg { flex-shrink: 0; opacity: .6; }
  .cs-mo-panel-user-link span:last-child { margin-left: auto; opacity: .4; }

  .cs-mo-cat-list { list-style: none; margin: 0; padding: 0; }
  .cs-mo-cat-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; border-bottom: 1px solid #f5f6f8;
    color: #1f2937; text-decoration: none;
    transition: background .12s;
  }
  .cs-mo-cat-item:active { background: #f9fafb; }

  .cs-mo-cat-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; overflow: hidden;
  }
  .cs-mo-cat-icon--dot {
    background: linear-gradient(135deg, var(--cs-brand,#E60012), #ff6b81);
  }
  .cs-mo-cat-name { flex: 1; font-size: 15px; font-weight: 500; }
  .cs-mo-cat-arrow { color: #c7cdd4; font-size: 18px; }

  /* 子分类：缩进 + 小图标 */
  .cs-mo-cat-sub { padding-left: 44px; }
  .cs-mo-cat-sub .cs-mo-cat-icon { width: 24px; height: 24px; font-size: 13px; }
  .cs-mo-cat-sub .cs-mo-cat-name { font-size: 14px; font-weight: 400; color: #4b5563; }

  /* 用户面板特有样式 */
  .cs-mo-user-tabs {
    display: flex; gap: 0; border-bottom: 2px solid #f0f1f4;
    padding: 0 16px; flex-shrink: 0;
  }
  .cs-mo-user-tab {
    flex: 1; padding: 13px 0; border: none; background: none;
    font-size: 15px; font-weight: 600; color: #6b7280; cursor: pointer;
    position: relative; transition: color .15s;
  }
  .cs-mo-user-tab.active { color: var(--cs-brand, #E60012); }
  .cs-mo-user-tab.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--cs-brand, #E60012); border-radius: 1px;
  }

  .cs-mo-user-content { padding: 20px 16px; }
  .cs-mo-user-content.hidden { display: none; }

  .cs-mo-login-form { display: flex; flex-direction: column; gap: 12px; }
  .cs-mo-label { font-size: 13px; font-weight: 600; color: #374151; }
  .cs-mo-login-form input {
    height: 44px; border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 0 14px; font-size: 15px; outline: none; transition: border-color .15s;
  }
  .cs-mo-login-form input:focus { border-color: var(--cs-brand, #E60012); }
  .cs-mo-forgot {
    font-size: 13px; color: var(--cs-brand, #E60012); text-decoration: underline;
    align-self: flex-start;
  }
  .cs-mo-btn-primary {
    height: 46px; border: none; border-radius: 24px;
    background: var(--cs-brand, #E60012); color: #fff;
    font-size: 16px; font-weight: 700; cursor: pointer;
    margin-top: 4px; transition: opacity .15s;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; text-align: center;
  }
  .cs-mo-btn-primary:hover { opacity: .9; }

  .cs-mo-benefits { margin-top: 20px; }
  .cs-mo-benefits p { font-size: 14px; font-weight: 600; color: #111827; margin: 0 0 10px; }
  .cs-mo-benefits ul { margin: 0; padding: 0 0 0 18px; }
  .cs-mo-benefits li { font-size: 13px; color: #4b5563; line-height: 1.8; }

  /* 已登录态 */
  .cs-mo-greeting { font-size: 16px; font-weight: 700; color: #111827; padding: 20px 16px 12px; margin: 0; }
  .cs-mo-user-links { display: flex; flex-direction: column; padding: 0 16px; }
  .cs-mo-user-link-item {
    display: flex; align-items: center; padding: 14px 0;
    border-bottom: 1px solid #f5f6f8; color: #374151;
    text-decoration: none; font-size: 15px; font-weight: 500;
  }
  .cs-mo-logout-item { color: #E60012; }

  /* 禁止背景滚动 */
  body.cs-mo-no-scroll { overflow: hidden; }
}

/* 5. ≤640px：购物车行卡片化、结算区堆叠、Hero 搜索全宽、间距收拢 */
@media (max-width: 640px) {
  /* 页头超小屏适配 */
  .cs-hd-topbar { display: none; } /* 顶栏手机端隐藏，省空间 */
  .cs-hd-main { padding: 10px 0; }
  .cs-hd-logo { font-size: 17px; gap: 4px; }
  .cs-hd-logo-icon { font-size: 16px; }
  .cs-hd-logo-img { max-height: 26px; }
  .cs-hd-search input { height: 36px; font-size: 14px; padding: 0 12px; }
  .cs-hd-search button { width: 38px; height: 36px; border-radius: 0 18px 18px 0; }
  .cs-hd-search button svg { width: 15px; height: 15px; }
  .cs-hd-icon { width: 32px; height: 32px; }
  .cs-hd-icon svg { width: 18px; height: 18px; }

  .cs-cart-row {
    grid-template-columns: 72px 1fr; gap: 10px 12px;
    padding: 14px 0;
  }
  .cs-cart-row .cs-cart-img { width: 72px; height: 72px; }
  .cs-cart-row .cs-cart-title { font-size: 14px; }
  .cs-cart-qty, .cs-cart-sub, .cs-cart-del { grid-column: 2; justify-self: start; }
  .cs-cart-sub { text-align: left; min-width: 0; }
  .cs-cart-del { justify-self: end; }
  .cs-cart-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .cs-cart-total { text-align: right; }
  .cs-cart-foot .cs-btn { width: 100%; }
  .cs-pd-tierlist { overflow-x: auto; }
  .cs-hero { padding: 36px 18px; }
  .cs-search { flex-direction: column; gap: 8px; }
  .cs-search input { width: 100%; border: 1px solid #fff; border-radius: 10px; }
  .cs-search button { width: 100%; border-radius: 10px; padding: 12px; }
  .cs-toolbar { gap: 10px; }
  .cs-pagination { gap: 5px; }
  .cs-pagination a, .cs-pagination .cs-page-dots { min-width: 34px; height: 34px; }
  .cs-loadmore { margin-top: 28px; }
  .cs-loadmore-btn { min-width: 0; width: 100%; max-width: 320px; height: 44px; font-size: 14px; }
  .cs-loadmore-counter { font-size: 12px; }
}

/* ═════════════════════════════════════════════════════
   横屏窄高设备（手机/iPad mini 横屏等）：与竖屏保持一致的移动端页头体验
   触发：orientation=landscape 且 视口高度 ≤ 500px
   ───────────────────────────────────────────────────
   ★ 为什么用 max-height 而不是 max-width：
     iPhone 横屏 viewport（如 13=844×390、14=812×375、Pro Max=932×430）width 全部 > 767px，
     如果只用 max-width:767px 会完全不匹配 → 横屏时桌面端页头挤在一堆 + 主体内容被挤出视口。
     唯一能稳定捕获"横屏手机"的是窗口高度（横屏时高度约 375~430，远低于 500）。
     这是检测"窄高形态"，不与"宽度断点划分设备大类"的原则冲突。
   ─────────────────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) {
  /* 隐藏桌面端页头主栏/导航，强制切换到移动端页头（与竖屏 mobile header 一致） */
  .cs-hd-main    { display: none !important; }
  .cs-hd-nav     { display: none !important; }
  .cs-nav-burger { display: none !important; }

  .cs-mo-header {
    display: block !important;
    background: var(--cs-mo-bg, #fff);
    border-bottom: 1px solid #f0f1f4;
    position: relative;
    z-index: 50;
  }

  /* 横屏高度紧凑：单行减小 padding 与按钮；强制 nowrap 防止横屏窄高时拆成多行
     左：汉堡 + Logo    右：4 菜单（搜索/账户/心愿单/购物车） */
  .cs-mo-header-inner { padding: 4px 12px; gap: 6px; flex-wrap: nowrap; }
  .cs-mo-icons        { flex-wrap: nowrap; gap: 2px; }
  .cs-mo-icon {
    width: 32px; height: 32px;
  }
  .cs-mo-header .cs-hd-logo { font-size: 13px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cs-mo-header .cs-hd-logo-icon { font-size: 12px; }
  .cs-mo-header .cs-hd-logo-img { max-height: 20px; }

  /* 横屏抽屉宽度收窄，避免遮住整个屏幕 */
  .cs-mo-panel { width: min(280px, 80vw); }
  .cs-mo-cat-panel { width: min(280px, 80vw); }

  /* 抽屉在横屏占满剩余高度（含 100dvh 处理地址栏） */
  .cs-mo-panel { height: 100vh; height: 100dvh; }
}


/* ───────────────────────────────────────────────────────────
   全局默认：mobile_header 区块的抽屉 / 遮罩必须在任何视口下都默认隐藏
   （不依赖具体 media query 是否匹配）
   · desktop 下 .cs-mo-header{display:none} 已经单行隐藏，
     但 .cs-mo-panel / .cs-mo-overlay 是 fixed 定位脱离父级，
     必须自身 transform/display 控制在屏幕外。
   · 全局兜底确保任何 media query 激活 .cs-mo-header{display:block}
     时，drawer 默认仍保持 translateX 屏幕外，避免内容平铺。
   ─────────────────────────────────────────────────────────── */
.cs-mo-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 160;
  transition: opacity .25s;
}
.cs-mo-overlay.show { display: block; animation: csMoFadeIn .2s ease-out; }
@keyframes csMoFadeIn { from{opacity:0} to{opacity:1} }

.cs-mo-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: #fff; z-index: 170;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
}
.cs-mo-panel.open { transform: translateX(0); }

.cs-mo-cat-panel {
  right: auto; left: 0;
  transform: translateX(-100%);
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.cs-mo-cat-panel.open { transform: translateX(0); }
.cs-mo-search-bar {
  display: none; padding: 0 16px 12px; background: #fff;
}
.cs-mo-search-bar.open { display: block; animation: csMoSlideDown .2s ease-out; }
@keyframes csMoSlideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
