
/* ==============================
   臻选商城 · 前端模板
   设计理念：简约 · 质感 · 呼吸感
   ============================== */

/* ---- 设计变量 ---- */
:root {
  --p: #0F2D6B;           /* 主色-深蓝 */
  --pd: #0A1F4D;          /* 主色-深 */
  --pl: #1E40AF;          /* 主色-浅 */
  --p-rgb: 15,45,107;

  --c: #00B894;           /* 成功-青绿 */
  --w: #FECA57;           /* 警告-金黄 */
  --d: #FF4757;           /* 价格-红 */
  --d-rgb: 255,71,87;
  --o: #FF6B6B;           /* 强调-珊瑚 */
  --i: #0984E3;           /* 信息-蓝 */

  --bg: #f6f6f6;          /* 页面背景 */
  --card: #FFFFFF;        /* 卡片背景 */
  --tx: #1E293B;          /* 主文字 */
  --tl: #64748B;          /* 次要文字 */
  --txl: #94A3B8;         /* 浅文字 */
  --bdr: #E9ECF2;         /* 边框 */
  --bdr-s: #F1F3F8;       /* 浅边框 */

  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;

  --sh-xs: 0 1px 2px rgba(15,23,42,.04);
  --sh-sm: 0 2px 8px rgba(15,23,42,.06);
  --sh: 0 4px 20px rgba(15,23,42,.08);
  --sh-lg: 0 12px 40px rgba(15,23,42,.12);
  --sh-p: 0 8px 24px rgba(108,92,231,.25);

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.22,1,.36,1);

  --maxw: 1280px;
}

/* ---- Reset ---- */
/* Reset scoped to template */
html { scroll-behavior:smooth; }
body {
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
/* ul reset removed for Bootstrap compat */
button { border:none; background:none; cursor:pointer; font-family:inherit; }
input { font-family:inherit; outline:none; }

.container { max-width:var(--maxw); margin:0 auto; padding:0 20px; }

/* ---- 顶部工具条 TOP ---- */
.top-bar {
  background: #F5F6F8;
  color: #64748B;
  font-size: .78rem;
  padding: 7px 0;
  border-bottom: 1px solid #E9ECF2;
}
.top-bar .container { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.top-bar-left { display:flex; align-items:center; gap:20px; min-width:0; flex:1; }
.top-bar-fav {
  display:inline-flex; align-items:center; gap:5px;
  color:#64748B; white-space:nowrap; flex-shrink:0;
  transition:color .2s;
}
.top-bar-fav:hover { color:var(--p); }
.top-bar-fav i { font-size:.85rem; }
.top-bar-announce { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; }
.top-bar-announce i { color:var(--p); flex-shrink:0; }
.top-bar-announce span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#64748B; }
.top-bar-links { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.top-bar-links a { color:#64748B; transition:color .2s; white-space:nowrap; }
.top-bar-links a:hover { color:var(--p); }
.top-bar-links .sep { opacity:.45; color:#CBD5E1; user-select:none; }
.top-bar-cart {
  display:inline-flex; align-items:center; gap:5px;
  padding:4px 12px;
  background:#EBEDF0;
  border-radius:4px;
  color:#475569 !important;
  font-weight:500;
  margin-left:4px;
  transition:all .2s;
}
.top-bar-cart:hover { background:#E2E5EA; color:var(--p) !important; }
@media(max-width:991.98px){
  .top-bar-announce { display:none !important; }
  .top-bar-links .sep { display:none; }
  .top-bar-links { gap:10px; }
}
@media(max-width:640px){
  .top-bar-fav span { display:none; }
  .top-bar-links a:not(.top-bar-cart) { font-size:.72rem; }
}

/* ---- 主头部 ---- */
.header {
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 100%);
  border-bottom: 1px solid #E9ECF2;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow .3s var(--ease);
}
.header.scrolled {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  box-shadow: 0 2px 16px rgba(15,23,42,.08);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  height: 120px;
}
.logo { justify-self: start; display:flex; align-items:center; gap:10px; flex-shrink:0; }
.header-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; justify-self: end; }
.logo-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--p), var(--pl));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
  box-shadow: var(--sh-p);
}
.logo-text { font-size: 1.35rem; font-weight: 800; letter-spacing:-.02em; color: var(--tx); }
.logo-text span { color: var(--p); }

/* 搜索框 */
.search-box-icon { display: none; }
.search-box {
  width: min(560px, 100%);
  max-width: 560px;
  position: relative;
  justify-self: center;
  grid-column: 2;
}
.search-box input {
  width: 100%;
  height: 44px;
  border: 2px solid var(--bdr);
  border-radius: 22px;
  padding: 0 50px 0 20px;
  font-size: .9rem;
  background: #fff;
  transition: all .25s var(--ease);
}
.search-box input:focus {
  border-color: var(--p);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--p-rgb),.1);
}
.search-box button {
  position: absolute;
  right: 5px; top: 5px;
  width: 36px; height: 34px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform .2s var(--ease);
}
.search-box button:hover { transform: scale(1.05); }
.search-hot {
  position: absolute;
  top: 48px; left: 20px;
  display: flex; gap: 12px;
  font-size: .75rem; color: var(--tl);
}
.search-hot a { color: var(--tx); }
.search-hot a:hover { color: var(--p); }

/* 头部操作 */
.h-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  color: var(--tl);
  font-size: .72rem;
  transition: all .2s var(--ease);
  position: relative;
}
.h-action i { font-size: 1.3rem; color: var(--tx); transition: color .2s; }
.h-action:hover { background: var(--bg); color: var(--p); }
.h-action:hover i { color: var(--p); }
.h-action .badge {
  position: absolute;
  top: 4px; right: 8px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  background: var(--d);
  color: #fff;
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* ---- 分类导航 ---- */
.cat-nav {
  background: #fff;
  border-bottom: 1px solid var(--bdr);
}
.cat-nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display:none; }
.cat-nav-all {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #1E40AF, #3B6FD4);
  color: #fff;
  font-size: .85rem; font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.cat-nav-all:hover { box-shadow: 0 4px 16px rgba(30,64,175,.35); transform: translateY(-1px); }
.cat-nav-links { display:flex; gap:2px; }
.cat-nav-links a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  color: var(--tl);
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.cat-nav-links a:hover { color: var(--p); background: rgba(var(--p-rgb),.06); }
.cat-nav-links a.active { color: var(--p); font-weight: 600; background: rgba(var(--p-rgb),.06); }

/* ---- Hero 区域 ---- */
.hero-section { padding: 20px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 16px;
  height: 400px;
}

/* 侧边分类菜单 */
.hero-cats {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 8px;
  overflow-y: auto;
  box-shadow: var(--sh-xs);
}
.hero-cats-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.hero-cats-item:hover { background: rgba(var(--p-rgb),.06); }
.hero-cats-item .ci-left { display:flex; align-items:center; gap:8px; }
.hero-cats-item i { font-size:1rem; color: var(--p); width:20px; text-align:center; }
.hero-cats-item span { font-size:.82rem; color:var(--tx); }
.hero-cats-item .bi-chevron-right { font-size:.65rem; color: var(--txl); }

/* 主轮播 */
.hero-banner {
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--sh-sm);
  cursor: pointer;
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 48px;
  opacity: 0;
  transition: opacity .6s var(--ease-out);
}
.hero-slide.active { opacity: 1; }
.hero-slide::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-slide-1::before { background: linear-gradient(120deg, #0F2D6B, #1E40AF, #3B6FD4); }
.hero-slide-2::before { background: linear-gradient(120deg, #FF6B6B, #FF9F43, #FECA57); }
.hero-slide-3::before { background: linear-gradient(120deg, #0A1F4D, #0F2D6B, #1E3A8A); }
.hero-slide-content { position: relative; z-index: 1; color: #fff; max-width: 400px; }
.hero-slide-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-slide-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hero-slide-content p { font-size: 1rem; opacity: .9; margin-bottom: 20px; }
.hero-slide-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px;
  border-radius: 24px;
  background: #fff;
  color: var(--p);
  font-size: .88rem;
  font-weight: 700;
  transition: all .25s var(--ease);
}
.hero-slide-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.hero-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
}
.hero-dot {
  width: 24px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.hero-dot.active { background: #fff; width: 32px; }

/* 右侧促销卡片 */
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side-card {
  flex: 1;
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-out);
}
.hero-side-card:hover { transform: translateY(-3px); }
.hero-side-card-1 { background: linear-gradient(135deg, #FF6B6B, #EE5A24); color: #fff; }
.hero-side-card-2 { background: linear-gradient(135deg, #00B894, #00CEC9); color: #fff; }
.hero-side-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.hero-side-card p { font-size: .78rem; opacity: .85; }
.hero-side-card .hsc-icon {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 4rem; opacity: .2;
}

@media(max-width:1024px){
  .hero-grid { grid-template-columns: 1fr 300px; }
  .hero-cats { display:none; }
}
@media(max-width:768px){
  .hero-grid { grid-template-columns: 1fr; height: auto; }
  .hero-banner { height: 260px; }
  .hero-side { flex-direction: row; }
  .hero-slide-content h2 { font-size: 1.5rem; }
}

/* ---- 服务保障条 ---- */
.service-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
}
.service-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
  transition: all .25s var(--ease);
}
.service-item:hover { box-shadow: var(--sh-sm); transform: translateY(-2px); }
.service-item .si-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.service-item:nth-child(1) .si-icon { background: rgba(108,92,231,.1); color: var(--p); }
.service-item:nth-child(2) .si-icon { background: rgba(0,184,148,.1); color: var(--c); }
.service-item:nth-child(3) .si-icon { background: rgba(255,107,107,.1); color: var(--o); }
.service-item:nth-child(4) .si-icon { background: rgba(9,132,227,.1); color: var(--i); }
.service-item h4 { font-size: .9rem; font-weight: 700; }
.service-item p { font-size: .75rem; color: var(--tl); }
@media(max-width:768px){ .service-bar{ grid-template-columns:repeat(2,1fr); } }

/* ---- 区块标题 ---- */
.section { padding: 12px 0 40px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { display:flex; align-items:center; gap:10px; }
.section-title h2 { font-size: 1.5rem; font-weight: 800; letter-spacing:-.01em; }
.section-title .st-bar {
  width: 4px; height: 24px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--p), var(--pl));
}
.section-title .st-sub { font-size: .82rem; color: var(--tl); }
.section-more {
  display: flex; align-items: center; gap: 4px;
  font-size: .85rem; color: var(--tl);
  transition: color .2s;
}
.section-more:hover { color: var(--p); }

/* ---- 限时秒杀 ---- */
.flash-sale {
  background: linear-gradient(135deg, #1A1A2E, #2D2B55);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 40px;
}
.flash-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.flash-title { display:flex; align-items:center; gap:12px; }
.flash-title h3 { color: #fff; font-size: 1.4rem; font-weight: 800; }
.flash-title .flash-icon {
  font-size: 1.5rem;
  color: var(--w);
  animation: flashPulse 1.5s ease-in-out infinite;
}
@keyframes flashPulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }
.flash-countdown { display:flex; align-items:center; gap:6px; }
.flash-countdown span { color: rgba(255,255,255,.7); font-size:.82rem; }
.flash-cd-box {
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 4px 8px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 32px; text-align:center;
}
.flash-products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media(max-width:1024px){ .flash-products{ grid-template-columns:repeat(3,1fr);} }
@media(max-width:640px){ .flash-products{ grid-template-columns:repeat(2,1fr);} }

/* ---- 商品卡片 ---- */
.product-card {
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: all .3s var(--ease);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.pc-img {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.pc-img-gradient {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,.5);
  transition: transform .4s var(--ease-out);
}
.product-card:hover .pc-img-gradient { transform: scale(1.08); }
.pc-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  z-index: 1;
}
.pc-badge-hot { background: var(--d); }
.pc-badge-new { background: var(--c); }
.pc-badge-sale { background: var(--o); }
.pc-fav {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--tl);
  font-size: .9rem;
  z-index: 1;
  transition: all .2s var(--ease);
  opacity: 0;
}
.product-card:hover .pc-fav { opacity: 1; }
.pc-fav:hover { background: var(--d); color: #fff; transform: scale(1.1); }
.pc-body { padding: 12px 14px 14px; }
.pc-name {
  font-size: .85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  height: 2.4em;
}
.pc-tags { display:flex; gap:4px; margin-bottom:8px; }
.pc-tag {
  font-size: .62rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--p-rgb),.08);
  color: var(--p);
}
.pc-tag-ship { background: rgba(0,184,148,.1); color: var(--c); }
.pc-bottom { display:flex; align-items:flex-end; justify-content:space-between; }
.pc-price { display:flex; align-items:baseline; gap:6px; }
.pc-price .now { font-size: 1.15rem; font-weight: 800; color: var(--d); }
.pc-price .old { font-size: .75rem; color: var(--txl); text-decoration: line-through; }
.pc-sold { font-size: .72rem; color: var(--txl); }
.pc-cart-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: all .2s var(--ease);
}
.pc-cart-btn:hover { transform: scale(1.1); box-shadow: var(--sh-p); }

/* 限时秒杀卡片特殊样式 */
.flash-products .product-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.flash-products .pc-name { color: rgba(255,255,255,.9); }
.flash-products .pc-price .old { color: rgba(255,255,255,.4); }
.flash-products .pc-sold { color: rgba(255,255,255,.5); }
.flash-products .pc-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.15);
  overflow: hidden;
  margin-top: 6px;
}
.flash-products .pc-progress-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--o), var(--w));
}

/* ---- 商品网格 ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media(max-width:1024px){ .product-grid{ grid-template-columns:repeat(4,1fr);} }
@media(max-width:768px){ .product-grid{ grid-template-columns:repeat(3,1fr); gap:12px;} }
@media(max-width:480px){ .product-grid{ grid-template-columns:repeat(2,1fr);} }

/* ---- 分类图标网格 ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.cat-icon-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .25s var(--ease);
  box-shadow: var(--sh-xs);
}
.cat-icon-card:hover { transform: translateY(-3px); box-shadow: var(--sh-sm); }
.cat-icon-card .cic-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  transition: transform .3s var(--ease-out);
}
.cat-icon-card:hover .cic-icon { transform: scale(1.08) rotate(-5deg); }
.cat-icon-card .cic-name { font-size: .8rem; font-weight: 600; }
@media(max-width:1024px){ .cat-grid{ grid-template-columns:repeat(5,1fr);} }
@media(max-width:640px){ .cat-grid{ grid-template-columns:repeat(4,1fr);} }

/* ---- 促销横幅 ---- */
.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
.promo-card {
  border-radius: var(--r-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-out);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.promo-card:hover { transform: translateY(-3px); }
.promo-card-1 { background: linear-gradient(135deg, #0F2D6B, #1E40AF); color: #fff; }
.promo-card-2 { background: linear-gradient(135deg, #FF6B6B, #FF9F43); color: #fff; }
.promo-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.promo-card p { font-size: .88rem; opacity: .85; }
.promo-card .pc-icon {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 4.5rem; opacity: .15;
}

/* ---- 商品筛选标签 ---- */
.filter-tabs {
  display: flex; gap: 8px;
  margin-bottom: 20px;
}
.filter-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: .85rem;
  color: var(--tl);
  background: var(--card);
  border: 1px solid var(--bdr);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter-tab:hover { border-color: var(--p); color: var(--p); }
.filter-tab.active {
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

/* ---- 页脚 ---- */
.footer {
  background: #1A1A2E;
  color: rgba(255,255,255,.7);
  padding: 48px 0 0;
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand h3 { color:#fff; font-size:1.3rem; font-weight:800; margin-bottom:12px; }
.footer-brand p { font-size:.82rem; line-height:1.7; margin-bottom:16px; }
.footer-social { display:flex; gap:10px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: all .2s var(--ease);
}
.footer-social a:hover { background: var(--p); color:#fff; transform: translateY(-2px); }
.footer-col h4 { color:#fff; font-size:.95rem; font-weight:700; margin-bottom:14px; }
.footer-col ul li { margin-bottom:10px; }
.footer-col ul li a { font-size:.82rem; transition:color .2s; }
.footer-col ul li a:hover { color:#fff; }
.footer-qr { text-align:center; }
.footer-qr-box {
  width: 100px; height: 100px;
  border-radius: 12px;
  background: #fff;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--p);
}
.footer-qr p { font-size:.75rem; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  font-size: .78rem;
}
.footer-pay { display:flex; gap:8px; }
.footer-pay span {
  width: 40px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  color: rgba(255,255,255,.6);
}
@media(max-width:768px){
  .footer-top{ grid-template-columns:1fr 1fr; gap:24px; }
  .footer-bottom{ flex-direction:column; gap:12px; }
}

/* ---- 回到顶部 ---- */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--sh);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--p);
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s var(--ease);
}
.back-top.show { opacity: 1; transform: translateY(0); }
.back-top:hover { background: var(--p); color: #fff; }

/* ---- 动画 ---- */
.fade-up { opacity: 0; transform: translateY(20px); transition: all .5s var(--ease-out); }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ---- 移动端导航 ---- */
.mobile-menu-btn { display:none; font-size:1.5rem; color:var(--tx); }
@media(max-width:768px){
  .header-inner{
    display:flex;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:12px;
    height:60px;
  }
  .mobile-menu-btn{ display:block; }
  .header-inner .search-box.d-none.d-md-flex{ display:none !important; }
  .header > .container > .search-box.d-md-none{
    width:100%;
    max-width:560px;
    margin:0 auto 0.5rem;
  }
  .logo-text{ font-size:1.1rem; }
  .header-actions{ margin-left:auto; justify-self:auto; }
  .h-action span{ display:none; }
}



/* :root vars already defined */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--tx);line-height:1.6;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
ul,ol{list-style:none;}
button{border:none;background:none;cursor:pointer;font-family:inherit;}
input{font-family:inherit;outline:none;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px;}

/* 顶部公告 */
.top-bar{background:#F5F6F8;color:#64748B;font-size:.78rem;padding:7px 0;border-bottom:1px solid #E9ECF2;}
.top-bar .container{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.top-bar-left{display:flex;align-items:center;gap:20px;min-width:0;flex:1;}
.top-bar-fav{display:inline-flex;align-items:center;gap:5px;color:#64748B;white-space:nowrap;flex-shrink:0;transition:color .2s;}
.top-bar-fav:hover{color:var(--p);}
.top-bar-announce{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;}
.top-bar-announce i{color:var(--p);flex-shrink:0;}
.top-bar-links{display:flex;align-items:center;gap:14px;flex-shrink:0;}
.top-bar-links a{color:#64748B;transition:color .2s;white-space:nowrap;}
.top-bar-links a:hover{color:var(--p);}
.top-bar-links .sep{opacity:.45;color:#CBD5E1;}
.top-bar-cart{display:inline-flex;align-items:center;gap:5px;padding:4px 12px;background:#EBEDF0;border-radius:4px;color:#475569!important;font-weight:500;margin-left:4px;transition:all .2s;}
.top-bar-cart:hover{background:#E2E5EA;color:var(--p)!important;}

/* 头部 */
.header{background:linear-gradient(180deg,#FFFFFF 0%,#F5F7FA 100%);border-bottom:1px solid #E9ECF2;position:sticky;top:0;z-index:100;}
.header-inner{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:28px;height:120px;}
.logo{display:flex;align-items:center;gap:10px;flex-shrink:0;justify-self:start;}
.logo-icon{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,var(--p),var(--pl));display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.4rem;box-shadow:var(--sh-p);}
.logo-text{font-size:1.35rem;font-weight:800;letter-spacing:-.02em;color:var(--tx);}
.logo-text span{color:var(--p);}
.search-box{width:min(560px,100%);max-width:560px;position:relative;justify-self:center;grid-column:2;}
.search-box input{width:100%;height:44px;border:2px solid var(--bdr);border-radius:22px;padding:0 50px 0 20px;font-size:.9rem;background:#fff;transition:all .25s var(--ease);}
.search-box input:focus{border-color:var(--p);background:#fff;box-shadow:0 0 0 4px rgba(var(--p-rgb),.1);}
.search-box button{position:absolute;right:5px;top:5px;width:36px;height:34px;border-radius:18px;background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;display:flex;align-items:center;justify-content:center;font-size:1rem;transition:transform .2s;}
.search-box button:hover{transform:scale(1.05);}
.header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;justify-self:end;}
.h-action{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 14px;border-radius:var(--r-sm);color:var(--tl);font-size:.72rem;transition:all .2s;position:relative;}
.h-action i{font-size:1.3rem;color:var(--tx);transition:color .2s;}
.h-action:hover{background:var(--bg);color:var(--p);}
.h-action:hover i{color:var(--p);}
.h-action .badge{position:absolute;top:4px;right:8px;min-width:18px;height:18px;border-radius:9px;background:var(--d);color:#fff;font-size:.65rem;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px;}
.cat-nav{background:#fff;border-bottom:1px solid var(--bdr);}
.cat-nav-inner{display:flex;align-items:center;gap:4px;height:48px;overflow-x:auto;scrollbar-width:none;}
.cat-nav-inner::-webkit-scrollbar{display:none;}
.cat-nav-all{display:flex;align-items:center;gap:6px;padding:8px 16px;border-radius:var(--r-sm);background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;font-size:.85rem;font-weight:600;flex-shrink:0;cursor:pointer;}
.cat-nav-links{display:flex;gap:2px;}
.cat-nav-links a{padding:8px 14px;border-radius:var(--r-sm);font-size:.85rem;color:var(--tl);white-space:nowrap;transition:all .2s;}
.cat-nav-links a:hover{color:var(--p);background:rgba(var(--p-rgb),.06);}
.cat-nav-links a.active{color:var(--p);font-weight:600;background:rgba(var(--p-rgb),.06);}

/* 面包屑 */
.breadcrumb{display:flex;align-items:center;gap:8px;padding:16px 0;font-size:.82rem;color:var(--tl);}
.breadcrumb a:hover{color:var(--p);}
.breadcrumb .sep{color:var(--txl);font-size:.7rem;}
.breadcrumb .current{color:var(--tx);font-weight:600;}

/* 页面布局 */
.pl-page{display:grid;grid-template-columns:240px 1fr;gap:20px;padding-bottom:40px;}

/* 筛选侧边栏 */
.pl-sidebar{position:sticky;top:140px;align-self:start;}
.filter-card{background:var(--card);border-radius:var(--r-md);padding:20px;margin-bottom:16px;box-shadow:var(--sh-xs);}
.filter-card h3{font-size:.95rem;font-weight:700;margin-bottom:14px;display:flex;align-items:center;gap:8px;}
.filter-card h3 i{color:var(--p);font-size:1rem;}
.filter-list li{margin-bottom:6px;}
.filter-list label{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--r-sm);cursor:pointer;transition:background .2s;font-size:.85rem;}
.filter-list label:hover{background:var(--bg);}
.filter-list input[type="checkbox"]{accent-color:var(--p);width:16px;height:16px;}
.filter-list input[type="checkbox"]:checked + span{color:var(--p);font-weight:600;}
.filter-price{display:flex;align-items:center;gap:8px;margin-top:8px;}
.filter-price input{width:80px;height:34px;border:1px solid var(--bdr);border-radius:var(--r-sm);padding:0 10px;font-size:.82rem;text-align:center;}
.filter-price button{padding:0 12px;height:34px;border-radius:var(--r-sm);background:var(--p);color:#fff;font-size:.82rem;font-weight:600;}
.filter-tags{display:flex;flex-wrap:wrap;gap:6px;}
.filter-tag{padding:4px 10px;border-radius:6px;font-size:.75rem;background:var(--bg);color:var(--tl);cursor:pointer;transition:all .2s;}
.filter-tag:hover,.filter-tag.active{background:rgba(var(--p-rgb),.1);color:var(--p);}

/* 商品区域 */
.pl-main{min-width:0;}
.pl-toolbar{display:flex;align-items:center;justify-content:space-between;background:var(--card);border-radius:var(--r-md);padding:12px 20px;margin-bottom:16px;box-shadow:var(--sh-xs);}
.pl-sort{display:flex;align-items:center;gap:4px;}
.pl-sort-btn{padding:6px 14px;border-radius:8px;font-size:.82rem;color:var(--tl);transition:all .2s;display:flex;align-items:center;gap:4px;}
.pl-sort-btn:hover{background:var(--bg);color:var(--p);}
.pl-sort-btn.active{background:rgba(var(--p-rgb),.08);color:var(--p);font-weight:600;}
.pl-view{display:flex;align-items:center;gap:8px;font-size:.82rem;color:var(--tl);}
.pl-view-btn{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:1rem;color:var(--tl);transition:all .2s;}
.pl-view-btn.active{background:var(--p);color:#fff;}
.pl-count{font-size:.82rem;color:var(--tl);}
.pl-count strong{color:var(--p);}

/* 商品网格 */
.pl-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.product-card{background:var(--card);border-radius:var(--r);overflow:hidden;cursor:pointer;transition:all .3s var(--ease);position:relative;}
.product-card:hover{transform:translateY(-4px);box-shadow:var(--sh-lg);}
.pc-img{width:100%;aspect-ratio:1;position:relative;overflow:hidden;}
.pc-img-gradient{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:3.5rem;color:rgba(255,255,255,.5);transition:transform .4s var(--ease);}
.product-card:hover .pc-img-gradient{transform:scale(1.08);}
.pc-badge{position:absolute;top:10px;left:10px;padding:3px 10px;border-radius:6px;font-size:.68rem;font-weight:700;color:#fff;z-index:1;}
.pc-badge-hot{background:var(--d);}
.pc-badge-new{background:var(--c);}
.pc-badge-sale{background:var(--o);}
.pc-fav{position:absolute;top:10px;right:10px;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.9);display:flex;align-items:center;justify-content:center;color:var(--tl);font-size:.9rem;z-index:1;transition:all .2s;opacity:0;}
.product-card:hover .pc-fav{opacity:1;}
.pc-fav:hover{background:var(--d);color:#fff;transform:scale(1.1);}
.pc-body{padding:12px 14px 14px;}
.pc-name{font-size:.85rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px;height:2.4em;}
.pc-tags{display:flex;gap:4px;margin-bottom:8px;}
.pc-tag{font-size:.62rem;padding:2px 6px;border-radius:4px;background:rgba(var(--p-rgb),.08);color:var(--p);}
.pc-tag-ship{background:rgba(0,184,148,.1);color:var(--c);}
.pc-bottom{display:flex;align-items:flex-end;justify-content:space-between;}
.pc-price{display:flex;align-items:baseline;gap:6px;}
.pc-price .now{font-size:1.15rem;font-weight:800;color:var(--d);}
.pc-price .old{font-size:.75rem;color:var(--txl);text-decoration:line-through;}
.pc-sold{font-size:.72rem;color:var(--txl);}
.pc-cart-btn{width:30px;height:30px;border-radius:8px;background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;display:flex;align-items:center;justify-content:center;font-size:.9rem;transition:all .2s;}
.pc-cart-btn:hover{transform:scale(1.1);box-shadow:var(--sh-p);}

/* 列表视图 */
.pl-grid.list-view{grid-template-columns:1fr;}
.pl-grid.list-view .product-card{display:grid;grid-template-columns:160px 1fr;gap:0;}
.pl-grid.list-view .pc-img{width:160px;height:160px;aspect-ratio:auto;}
.pl-grid.list-view .pc-img-gradient{font-size:2.5rem;}
.pl-grid.list-view .pc-body{padding:16px 20px;display:flex;flex-direction:column;justify-content:center;}
.pl-grid.list-view .pc-name{font-size:.95rem;height:auto;-webkit-line-clamp:1;margin-bottom:8px;}
.pl-grid.list-view .pc-bottom{margin-top:auto;}

/* 分页 */
.pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:32px;}
.page-btn{min-width:38px;height:38px;border-radius:10px;background:var(--card);display:flex;align-items:center;justify-content:center;font-size:.88rem;color:var(--tl);transition:all .2s;box-shadow:var(--sh-xs);padding:0 12px;}
.page-btn:hover{color:var(--p);border-color:var(--p);}
.page-btn.active{background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;font-weight:600;}
.page-btn.disabled{opacity:.4;cursor:not-allowed;}

/* 页脚 */
.footer{background:#1A1A2E;color:rgba(255,255,255,.7);padding:32px 0;margin-top:40px;}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;font-size:.78rem;}

/* 响应式 */
@media(max-width:1024px){
  .pl-grid{grid-template-columns:repeat(3,1fr);}
  .pl-sidebar{display:none;}
  .pl-page{grid-template-columns:1fr;}
}
@media(max-width:768px){
  .header-inner{display:flex;justify-content:space-between;flex-wrap:nowrap;gap:12px;height:60px;}
  .header-inner .search-box.d-none.d-md-flex{display:none !important;}
  .header > .container > .search-box.d-md-none{width:100%;max-width:560px;margin:0 auto 0.5rem;}
  .logo-text{font-size:1.1rem;}
  .header-actions{margin-left:auto;justify-self:auto;}
  .h-action span{display:none;}
  .pl-grid{grid-template-columns:repeat(2,1fr);gap:12px;}
  .pl-toolbar{flex-wrap:wrap;gap:8px;}
}



/* :root vars already defined */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;}
body{font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--tx);line-height:1.6;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
ul,ol{list-style:none;}
button{border:none;background:none;cursor:pointer;font-family:inherit;}
input{font-family:inherit;outline:none;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px;}

/* 顶部+导航 复用 */
.top-bar{background:#F5F6F8;color:#64748B;font-size:.78rem;padding:7px 0;border-bottom:1px solid #E9ECF2;}
.top-bar .container{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.top-bar-left{display:flex;align-items:center;gap:20px;min-width:0;flex:1;}
.top-bar-fav{display:inline-flex;align-items:center;gap:5px;color:#64748B;white-space:nowrap;flex-shrink:0;transition:color .2s;}
.top-bar-fav:hover{color:var(--p);}
.top-bar-links{display:flex;align-items:center;gap:14px;flex-shrink:0;}
.top-bar-links a{color:#64748B;transition:color .2s;white-space:nowrap;}
.top-bar-links a:hover{color:var(--p);}
.top-bar-links .sep{opacity:.45;color:#CBD5E1;}
.top-bar-cart{display:inline-flex;align-items:center;gap:5px;padding:4px 12px;background:#EBEDF0;border-radius:4px;color:#475569!important;font-weight:500;margin-left:4px;transition:all .2s;}
.top-bar-cart:hover{background:#E2E5EA;color:var(--p)!important;}
.header{background:linear-gradient(180deg,#FFFFFF 0%,#F5F7FA 100%);border-bottom:1px solid #E9ECF2;position:sticky;top:0;z-index:100;}
.header-inner{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:28px;height:120px;}
.logo{display:flex;align-items:center;gap:10px;flex-shrink:0;justify-self:start;}
.logo-icon{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,var(--p),var(--pl));display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.4rem;box-shadow:var(--sh-p);}
.logo-text{font-size:1.35rem;font-weight:800;letter-spacing:-.02em;color:var(--tx);}
.logo-text span{color:var(--p);}
.search-box{width:min(560px,100%);max-width:560px;position:relative;justify-self:center;grid-column:2;}
.search-box input{width:100%;height:44px;border:2px solid var(--bdr);border-radius:22px;padding:0 50px 0 20px;font-size:.9rem;background:#fff;transition:all .25s;}
.search-box input:focus{border-color:var(--p);background:#fff;box-shadow:0 0 0 4px rgba(var(--p-rgb),.1);}
.search-box button{position:absolute;right:5px;top:5px;width:36px;height:34px;border-radius:18px;background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;display:flex;align-items:center;justify-content:center;font-size:1rem;}
.header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;justify-self:end;}
.h-action{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 14px;border-radius:var(--r-sm);color:var(--tl);font-size:.72rem;position:relative;}
.h-action i{font-size:1.3rem;color:var(--tx);}
.h-action:hover{background:var(--bg);color:var(--p);}
.h-action:hover i{color:var(--p);}
.h-action .badge{position:absolute;top:4px;right:8px;min-width:18px;height:18px;border-radius:9px;background:var(--d);color:#fff;font-size:.65rem;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px;}
.cat-nav{background:#fff;border-bottom:1px solid var(--bdr);}
.cat-nav-inner{display:flex;align-items:center;gap:4px;height:48px;overflow-x:auto;scrollbar-width:none;}
.cat-nav-inner::-webkit-scrollbar{display:none;}
.cat-nav-all{display:flex;align-items:center;gap:6px;padding:8px 16px;border-radius:var(--r-sm);background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;font-size:.85rem;font-weight:600;flex-shrink:0;cursor:pointer;}
.cat-nav-links{display:flex;gap:2px;}
.cat-nav-links a{padding:8px 14px;border-radius:var(--r-sm);font-size:.85rem;color:var(--tl);white-space:nowrap;transition:all .2s;}
.cat-nav-links a:hover{color:var(--p);background:rgba(var(--p-rgb),.06);}
.cat-nav-links a.active{color:var(--p);font-weight:600;background:rgba(var(--p-rgb),.06);}

/* 面包屑 */
.breadcrumb{display:flex;align-items:center;gap:8px;padding:16px 0;font-size:.82rem;color:var(--tl);}
.breadcrumb a:hover{color:var(--p);}
.breadcrumb .sep{color:var(--txl);font-size:.7rem;}
.breadcrumb .current{color:var(--tx);font-weight:600;}

/* 商品主体 */
.pd-main{display:grid;grid-template-columns:480px 1fr;gap:32px;padding-bottom:24px;}

/* 图库 */
.gallery{position:relative;}
.gallery-main{
  width:100%;aspect-ratio:1;border-radius:var(--r-lg);overflow:hidden;position:relative;
  box-shadow:var(--sh-sm);cursor:zoom-in;
}
.gallery-main-bg{
  position:absolute;inset:0;
  background:linear-gradient(135deg,#667eea,#764ba2);
  display:flex;align-items:center;justify-content:center;
  font-size:8rem;color:rgba(255,255,255,.5);
  transition:transform .3s var(--ease);
}
.gallery-main:hover .gallery-main-bg{transform:scale(1.05);}
.gallery-main-badge{
  position:absolute;top:16px;left:16px;
  display:flex;flex-direction:column;gap:6px;z-index:1;
}
.gallery-main-badge .gmb{
  padding:4px 12px;border-radius:6px;font-size:.72rem;font-weight:700;color:#fff;
}
.gallery-thumbs{
  display:flex;gap:10px;margin-top:12px;
}
.gallery-thumb{
  width:72px;height:72px;border-radius:var(--r-sm);overflow:hidden;cursor:pointer;
  border:2px solid var(--bdr);transition:border-color .2s;position:relative;
}
.gallery-thumb.active{border-color:var(--p);}
.gallery-thumb-bg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:1.5rem;color:rgba(255,255,255,.5);}

/* 商品信息 */
.pd-info{min-width:0;}
.pd-info-name{font-size:1.5rem;font-weight:800;line-height:1.4;margin-bottom:10px;}
.pd-info-sub{font-size:.88rem;color:var(--tl);margin-bottom:16px;display:flex;align-items:center;gap:12px;}
.pd-info-sub .rating{color:var(--w);}
.pd-info-sub .rating i{font-size:.85rem;}
.pd-info-sub .sep{color:var(--txl);}

/* 价格卡片 */
.pd-price-box{
  background:linear-gradient(135deg,#fafaff,#f3f0ff);
  border-radius:var(--r-md);padding:20px 24px;margin-bottom:20px;
}
.pd-price-row{display:flex;align-items:baseline;gap:12px;margin-bottom:8px;}
.pd-price-now{font-size:2rem;font-weight:800;color:var(--d);}
.pd-price-now small{font-size:1rem;}
.pd-price-old{font-size:1rem;color:var(--txl);text-decoration:line-through;}
.pd-price-tag{display:inline-block;padding:3px 10px;border-radius:6px;background:var(--d);color:#fff;font-size:.72rem;font-weight:600;}
.pd-price-meta{display:flex;gap:20px;font-size:.78rem;color:var(--tl);}
.pd-price-meta strong{color:var(--d);}

/* 促销标签 */
.pd-promo{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px;}
.pd-promo-tag{
  padding:3px 8px;border-radius:4px;font-size:.72rem;
  background:rgba(var(--d-rgb),.08);color:var(--d);
}
.pd-promo-tag.coupon{background:rgba(var(--p-rgb),.08);color:var(--p);}

/* 规格选择 */
.pd-spec{margin-bottom:20px;}
.pd-spec-label{font-size:.85rem;color:var(--tl);margin-bottom:8px;}
.pd-spec-options{display:flex;flex-wrap:wrap;gap:8px;}
.pd-spec-opt{
  padding:8px 16px;border:2px solid var(--bdr);border-radius:var(--r-sm);
  font-size:.85rem;cursor:pointer;transition:all .2s;
}
.pd-spec-opt:hover{border-color:var(--pl);}
.pd-spec-opt.active{border-color:var(--p);background:rgba(var(--p-rgb),.05);color:var(--p);font-weight:600;}

/* 数量 */
.pd-qty{display:flex;align-items:center;gap:16px;margin-bottom:24px;}
.pd-qty-label{font-size:.85rem;color:var(--tl);}
.pd-qty-control{display:flex;align-items:center;border:2px solid var(--bdr);border-radius:var(--r-sm);overflow:hidden;}
.pd-qty-control button{width:36px;height:38px;font-size:1.1rem;color:var(--tl);transition:all .2s;}
.pd-qty-control button:hover{background:var(--bg);color:var(--p);}
.pd-qty-control input{width:56px;height:38px;border:none;text-align:center;font-size:.95rem;font-weight:600;}
.pd-qty-stock{font-size:.78rem;color:var(--tl);}
.pd-qty-stock strong{color:var(--c);}

/* 按钮 */
.pd-actions{display:flex;gap:12px;margin-bottom:20px;}
.pd-btn{
  flex:1;height:52px;border-radius:var(--r);font-size:1rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:8px;transition:all .25s var(--ease);
}
.pd-btn-cart{background:#fff;border:2px solid var(--p);color:var(--p);}
.pd-btn-cart:hover{background:rgba(var(--p-rgb),.05);transform:translateY(-2px);}
.pd-btn-buy{background:linear-gradient(135deg,var(--p),var(--pd));color:#fff;box-shadow:var(--sh-p);}
.pd-btn-buy:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(108,92,231,.35);}
.pd-btn-fav{width:52px;flex:0 0 auto;border:2px solid var(--bdr);color:var(--tl);font-size:1.3rem;}
.pd-btn-fav:hover{border-color:var(--o);color:var(--o);}

/* 服务保障 */
.pd-services{display:flex;flex-wrap:wrap;gap:16px;padding-top:16px;border-top:1px solid var(--bdr-s);font-size:.78rem;color:var(--tl);}
.pd-services span{display:flex;align-items:center;gap:4px;}
.pd-services i{color:var(--c);font-size:.9rem;}

/* 详情标签页 */
.pd-tabs{background:var(--card);border-radius:var(--r-lg);overflow:hidden;margin-bottom:24px;box-shadow:var(--sh-xs);}
.pd-tabs-nav{display:flex;border-bottom:1px solid var(--bdr);overflow-x:auto;scrollbar-width:none;}
.pd-tabs-nav::-webkit-scrollbar{display:none;}
.pd-tab-btn{padding:16px 24px;font-size:.95rem;color:var(--tl);border-bottom:2px solid transparent;transition:all .2s;white-space:nowrap;font-weight:500;}
.pd-tab-btn:hover{color:var(--p);}
.pd-tab-btn.active{color:var(--p);border-bottom-color:var(--p);font-weight:700;}
.pd-tab-content{padding:28px 32px;}
.pd-tab-pane{display:none;}
.pd-tab-pane.active{display:block;animation:fadeIn .3s ease;}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}

/* 商品描述 */
.desc-section{margin-bottom:24px;}
.desc-section h3{font-size:1.1rem;font-weight:700;margin-bottom:12px;color:var(--tx);}
.desc-section p{font-size:.9rem;color:var(--tl);line-height:1.8;margin-bottom:10px;}
.desc-features{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0;}
.desc-feature{text-align:center;padding:20px;background:var(--bg);border-radius:var(--r);}
.desc-feature i{font-size:2rem;color:var(--p);margin-bottom:8px;display:block;}
.desc-feature h4{font-size:.9rem;font-weight:700;margin-bottom:4px;}
.desc-feature p{font-size:.78rem;color:var(--tl);}

/* 规格表 */
.spec-table{width:100%;border-collapse:collapse;}
.spec-table th,.spec-table td{padding:12px 16px;border-bottom:1px solid var(--bdr-s);font-size:.85rem;text-align:left;}
.spec-table th{width:140px;color:var(--tl);font-weight:600;background:var(--bg);}
.spec-table td{color:var(--tx);}

/* 评价 */
.review-summary{display:flex;gap:32px;padding:20px;background:var(--bg);border-radius:var(--r-md);margin-bottom:20px;}
.review-score{text-align:center;}
.review-score-num{font-size:2.5rem;font-weight:800;color:var(--w);}
.review-score-stars{color:var(--w);font-size:.9rem;margin:4px 0;}
.review-score-text{font-size:.78rem;color:var(--tl);}
.review-tags{display:flex;flex-wrap:wrap;gap:8px;align-content:center;}
.review-tag{padding:4px 12px;border-radius:16px;background:var(--card);font-size:.78rem;color:var(--tl);border:1px solid var(--bdr);}
.review-tag:hover{border-color:var(--p);color:var(--p);}

.review-item{padding:16px 0;border-bottom:1px solid var(--bdr-s);}
.review-item-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.review-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,var(--p),var(--pl));display:flex;align-items:center;justify-content:center;color:#fff;font-size:.85rem;font-weight:600;}
.review-name{font-size:.85rem;font-weight:600;}
.review-stars{color:var(--w);font-size:.8rem;}
.review-date{margin-left:auto;font-size:.75rem;color:var(--txl);}
.review-text{font-size:.85rem;color:var(--tl);line-height:1.7;}
.review-imgs{display:flex;gap:8px;margin-top:8px;}
.review-img{width:60px;height:60px;border-radius:8px;background:linear-gradient(135deg,#f093fb,#f5576c);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.4);font-size:1.2rem;}

/* 相关商品 */
.related{margin-bottom:40px;}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;}
.section-title{display:flex;align-items:center;gap:10px;}
.section-title h2{font-size:1.3rem;font-weight:800;}
.section-title .st-bar{width:4px;height:22px;border-radius:2px;background:linear-gradient(180deg,var(--p),var(--pl));}
.section-more{font-size:.85rem;color:var(--tl);}
.section-more:hover{color:var(--p);}
.rel-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;}
.product-card{background:var(--card);border-radius:var(--r);overflow:hidden;cursor:pointer;transition:all .3s var(--ease);position:relative;}
.product-card:hover{transform:translateY(-4px);box-shadow:var(--sh-lg);}
.pc-img{width:100%;aspect-ratio:1;position:relative;overflow:hidden;}
.pc-img-gradient{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:3rem;color:rgba(255,255,255,.5);transition:transform .4s;}
.product-card:hover .pc-img-gradient{transform:scale(1.08);}
.pc-body{padding:10px 12px 12px;}
.pc-name{font-size:.82rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:6px;height:2.3em;}
.pc-price{display:flex;align-items:baseline;gap:6px;}
.pc-price .now{font-size:1.05rem;font-weight:800;color:var(--d);}
.pc-price .old{font-size:.72rem;color:var(--txl);text-decoration:line-through;}

/* 页脚 */
.footer{background:#1A1A2E;color:rgba(255,255,255,.7);padding:32px 0;margin-top:40px;}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;font-size:.78rem;}

/* 移动端购买栏 */
.mobile-buy-bar{display:none;}

@media(max-width:1024px){
  .pd-main{grid-template-columns:1fr;}
  .gallery-main{max-width:480px;}
  .rel-grid{grid-template-columns:repeat(4,1fr);}
}
@media(max-width:768px){
  .header-inner{display:flex;justify-content:space-between;flex-wrap:nowrap;gap:12px;height:60px;}
  .header-inner .search-box.d-none.d-md-flex{display:none !important;}
  .header > .container > .search-box.d-md-none{width:100%;max-width:560px;margin:0 auto 0.5rem;}
  .logo-text{font-size:1.1rem;}
  .header-actions{margin-left:auto;justify-self:auto;}
  .h-action span{display:none;}
  .pd-info-name{font-size:1.2rem;}
  .gallery-main{max-width:100%;}
  .desc-features{grid-template-columns:1fr;}
  .rel-grid{grid-template-columns:repeat(2,1fr);}
  .pd-actions{margin-bottom:16px;}
  .mobile-buy-bar{display:flex;position:fixed;bottom:0;left:0;right:0;background:var(--card);padding:8px 16px;gap:8px;box-shadow:0 -4px 20px rgba(0,0,0,.08);z-index:100;}
  .mobile-buy-bar .pd-btn{height:44px;font-size:.9rem;}
  .mobile-buy-bar .pd-btn-fav{display:none;}
  .pd-tab-content{padding:16px;}
  body{padding-bottom:60px;}
}



/* ==============================
   覆盖现有系统样式
   ============================== */

/* 覆盖 theme-tech 深色背景，使用模板浅色主题 */
body.theme-tech {
  --brand-primary: var(--p);
  --brand-gradient: linear-gradient(135deg, var(--p) 0%, var(--pl) 100%);
  --shop-bg: var(--bg);
  --shop-surface: var(--card);
  --shop-text: var(--tx);
  --shop-text-light: var(--tl);
  --shop-radius: var(--r);
  --shop-radius-lg: var(--r-lg);
  --shop-shadow: var(--sh);
  --glass-bg: rgba(255,255,255,.95);
  --tx-accent: var(--p);
  background: var(--bg) !important;
  color: var(--tx) !important;
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* 隐藏旧的 header 和 subnav */
.shop-header.modern-header,
.shop-subnav-modern,
.header-notice-bar { display: none !important; }

.shop-main { background: transparent; }
.shop-page { padding: 0; }

/* 商品卡片新设计 */
.product-card-modern {
  background: var(--card) !important;
  border-radius: var(--r) !important;
  border: 1px solid var(--bdr) !important;
  box-shadow: var(--sh-xs) !important;
  transition: all .3s var(--ease) !important;
  overflow: hidden;
}
.product-card-modern:hover {
  box-shadow: var(--sh-lg) !important;
  border-color: rgba(var(--p-rgb),.3) !important;
  transform: translateY(-4px) !important;
}
.product-card-img-wrap-modern {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7ff, #ede9fe) !important;
}
.product-card-img-wrap-modern img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.product-card-modern:hover .product-card-img-wrap-modern img {
  transform: scale(1.08);
}
.product-card-body-modern { padding: 12px 14px !important; }
.product-card-title-modern {
  font-size: .85rem !important;
  font-weight: 600 !important;
  color: var(--tx) !important;
  margin-bottom: 8px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4 !important;
}
.product-price-modern { display: flex; align-items: baseline; gap: 2px; }
.product-price-modern .price-symbol { font-size: .8rem !important; color: var(--d) !important; font-weight: 700 !important; }
.product-price-modern .price-value { font-size: 1.15rem !important; color: var(--d) !important; font-weight: 800 !important; }

.product-badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; font-size: .68rem; font-weight: 700; color: #fff; z-index: 2; }
.badge-soldout-modern { background: rgba(0,0,0,.6); }
.badge-recommend-modern { background: linear-gradient(135deg, var(--p), var(--pd)); }
.badge-low-stock { background: var(--o); top: auto; bottom: 10px; left: 10px; }

.stock-dot-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .72rem; }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-green { background: var(--c); }
.dot-orange { background: var(--w); }
.stock-dot-text { color: var(--tl); }

.product-quick-view { display: none !important; }

/* 筛选面板 */
.filter-panel { background: var(--card); border-radius: var(--r); border: 1px solid var(--bdr); box-shadow: var(--sh-xs); }
.filter-panel-body { padding: 0 16px; }
.filter-sidebar { background: var(--card); border-radius: var(--r); border: 1px solid var(--bdr); box-shadow: var(--sh-xs); overflow: hidden; }
.filter-sidebar .shop-panel-head { padding: 12px 16px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--bdr-s); background: var(--bg); }
.filter-sidebar .list-group-item { border: none; padding: 10px 16px; font-size: .85rem; color: var(--tl); transition: all .2s var(--ease); }
.filter-sidebar .list-group-item:hover { background: var(--bg); color: var(--p); padding-left: 20px; }
.filter-sidebar .list-group-item.active { background: rgba(var(--p-rgb),.08); color: var(--p); font-weight: 600; }

.section-head { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; }
.section-head h2 { font-size: 1.25rem; font-weight: 800; color: var(--tx); }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--txl); margin-bottom: 16px; }
.empty-state p { color: var(--tl); margin-bottom: 16px; }

.pagination .page-link { border-radius: var(--r-sm) !important; margin: 0 2px; border: 1px solid var(--bdr); color: var(--tl); }
.pagination .page-item.active .page-link { background: var(--p); border-color: var(--p); color: #fff; }

.pd-page .breadcrumb { padding: 16px 0; margin-bottom: 0; }
.pd-page .breadcrumb a { color: var(--tl); }
.pd-page .breadcrumb a:hover { color: var(--p); }
.pd-page .breadcrumb-item.active { color: var(--tx); }
.pd-page { padding-bottom: 40px; }
.pd-page-bg { display: none; }

.shop-flash { border-radius: var(--r); margin-bottom: 16px; }

.form-control, .form-select { border-radius: var(--r-sm) !important; border-color: var(--bdr) !important; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--p) !important; box-shadow: 0 0 0 4px rgba(var(--p-rgb),.1) !important; }
.btn-dark { background: linear-gradient(135deg, var(--p), var(--pd)) !important; border: none !important; border-radius: var(--r-sm) !important; }
.btn-dark:hover { background: linear-gradient(135deg, var(--pd), var(--p)) !important; }

.shop-mobile-nav { background: var(--card); border-top: 1px solid var(--bdr); box-shadow: 0 -2px 12px rgba(0,0,0,.06); }

.back-to-top { position: fixed; right: 24px; bottom: 80px; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 1px solid var(--bdr); box-shadow: var(--sh); color: var(--p); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; opacity: 0; transform: translateY(20px); transition: all .3s var(--ease); z-index: 999; }
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--p); color: #fff; border-color: var(--p); }

.customer-service-float { bottom: 140px !important; }

/* ==============================
   页脚样式
   ============================== */
.fn-footer {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: rgba(255,255,255,.7);
  margin-top: 60px;
}
.fn-footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 56px 0 40px;
}
@media (max-width: 991px) {
  .fn-footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 575px) {
  .fn-footer-main { grid-template-columns: 1fr; gap: 28px; }
}
.fn-footer-brand { grid-column: span 1; }
@media (max-width: 991px) { .fn-footer-brand { grid-column: span 2; } }
@media (max-width: 575px) { .fn-footer-brand { grid-column: span 1; } }

.fn-footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fn-footer-logo-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--p), var(--pl));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
}
.fn-footer-logo-text { font-size: 1.2rem; font-weight: 800; color: #fff; }
.fn-footer-desc { font-size: .85rem; line-height: 1.7; margin-bottom: 20px; max-width: 360px; }
.fn-footer-service-tags { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 20px; }
.fn-footer-service-tags span { font-size: .78rem; display: flex; align-items: center; gap: 4px; }
.fn-footer-service-tags i { color: var(--pl); }
.fn-footer-social { display: flex; gap: 10px; }
.fn-footer-social-item {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: rgba(255,255,255,.6);
  transition: all .25s var(--ease);
}
.fn-footer-social-item:hover { background: var(--p); color: #fff; transform: translateY(-2px); }

.fn-footer-col h4, .fn-footer-contact h4 {
  font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 16px;
}
.fn-footer-col ul, .fn-footer-contact ul { list-style: none; padding: 0; }
.fn-footer-col li { margin-bottom: 10px; }
.fn-footer-col a {
  font-size: .83rem; color: rgba(255,255,255,.6);
  transition: all .2s var(--ease);
  display: inline-flex; align-items: center; gap: 4px;
}
.fn-footer-col a:hover { color: #fff; padding-left: 4px; }
.fn-footer-more { color: var(--pl) !important; }

.fn-footer-contact li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .83rem; margin-bottom: 12px;
}
.fn-footer-contact i { color: var(--pl); margin-top: 3px; flex-shrink: 0; }
.fn-footer-contact a { color: rgba(255,255,255,.6); }
.fn-footer-contact a:hover { color: #fff; }

.fn-footer-bar {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
}
.fn-footer-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.fn-footer-bar-left, .fn-footer-bar-center, .fn-footer-bar-right {
  font-size: .78rem; color: rgba(255,255,255,.5);
}
.fn-footer-bar a { color: rgba(255,255,255,.5); transition: color .2s; }
.fn-footer-bar a:hover { color: rgba(255,255,255,.8); }
.fn-footer-bar-sep { margin: 0 8px; opacity: .4; }
@media (max-width: 575px) {
  .fn-footer-bar-inner { justify-content: center; text-align: center; }
}

/* ==============================
   移动端侧滑菜单
   ============================== */
.fn-mobile-nav .offcanvas-title { font-weight: 700; }
.fn-mobile-nav .list-group-item {
  border: none; padding: 12px 16px; font-size: .9rem;
  border-radius: var(--r-sm) !important;
  transition: all .2s var(--ease);
}
.fn-mobile-nav .list-group-item:hover { background: var(--bg); color: var(--p); }
.fn-mobile-nav .list-group-item.active { background: rgba(var(--p-rgb),.1); color: var(--p); font-weight: 600; }

/* ==============================
   offcanvas 适配
   ============================== */
.offcanvas { border: none !important; box-shadow: var(--sh-lg); }
.offcanvas-header { border-bottom: 1px solid var(--bdr); }

/* ==============================
   首页样式
   ============================== */
.fn-home { padding-bottom: 20px; }

.fn-announce {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, rgba(var(--p-rgb),.06), rgba(var(--p-rgb),.02));
  border: 1px solid rgba(var(--p-rgb),.12);
  border-radius: var(--r);
  padding: 10px 16px;
  font-size: .85rem; color: var(--tl);
}
.fn-announce i { color: var(--p); }

/* Hero 区域 */
.fn-hero-section { padding: 16px 0; }
.fn-hero-layout {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1199px) {
  .fn-hero-layout { grid-template-columns: 1fr 200px; }
}
@media (max-width: 991px) {
  .fn-hero-layout { grid-template-columns: 1fr; }
}

/* 侧边分类菜单 */
.fn-hero-cats {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.fn-hero-cats-head {
  padding: 12px 16px;
  font-weight: 700; font-size: .9rem;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  display: flex; align-items: center; gap: 6px;
}
.fn-hero-cats-list { list-style: none; padding: 4px; margin: 0; }
.fn-hero-cats-list li a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: .83rem; color: var(--tl);
  transition: all .2s var(--ease);
}
.fn-hero-cats-list li a:hover { background: var(--bg); color: var(--p); }
.fn-hero-cats-list li a i:first-child { font-size: 1rem; width: 18px; text-align: center; }

/* 分类浮层（PC 右侧弹出，二/三级横滑，纯文字、无圆角） */
.db-cat-flyout {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 360px;
  max-width: min(640px, 58vw);
  background: var(--card);
  border-radius: 0;
  border: 1px solid var(--bdr);
  border-left: 3px solid var(--p);
  box-shadow: 10px 8px 28px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
  z-index: 40;
}

.db-cat-flyout-title {
  padding: .6rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--p);
  background: var(--bg);
  border-bottom: 1px solid var(--bdr);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-cat-flyout-body {
  max-height: min(360px, 70vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.db-cat-flyout-row + .db-cat-flyout-row {
  border-top: 1px solid var(--bdr-s);
}

.db-cat-flyout-scroll {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.db-cat-flyout-scroll::-webkit-scrollbar { height: 3px; }
.db-cat-flyout-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 0; }

.db-cat-flyout-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: .6rem .9rem;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--bdr);
  text-decoration: none;
  font-size: .84rem;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--tl);
  transition: color .15s ease, background .15s ease;
}

.db-cat-flyout-link:last-child { border-right: none; }

.db-cat-flyout-link--l2 {
  font-weight: 700;
  color: var(--tx);
  background: var(--bg);
}

.db-cat-flyout-link--l3 {
  font-weight: 400;
  color: var(--tl);
}

.db-cat-flyout-sep {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  background: var(--bdr);
}

.db-cat-flyout-link:hover {
  color: var(--p);
  background: rgba(var(--p-rgb), .06);
}

.db-cat-item-has-sub:hover > a,
.db-cat-item-has-sub:focus-within > a {
  background: var(--bg);
  color: var(--p);
}

.db-cat-item-has-sub:hover .db-cat-flyout,
.db-cat-item-has-sub:focus-within .db-cat-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fn-hero-cat-arrow { margin-left: auto; font-size: .7rem; opacity: .35; transition: opacity .2s, transform .2s; }
.fn-hero-cats-list li a:hover .fn-hero-cat-arrow,
.fn-cat-item-has-sub:hover > a .fn-hero-cat-arrow,
.fn-cat-item-has-sub:focus-within > a .fn-hero-cat-arrow { opacity: 1; }

/* 侧边分类 — 右侧浮层（二/三级横滑，纯文字、无圆角） */
.fn-hero-cats--flyout {
  overflow: visible;
  position: relative;
  z-index: 25;
}

.fn-hero-cats--flyout .fn-hero-cats-list {
  position: relative;
}

.fn-cat-item-has-sub,
.fn-hero-cats--flyout .db-cat-item-has-sub {
  position: relative;
}

.fn-hero-cats--flyout .db-cat-flyout {
  border-left-color: var(--p);
}

.fn-hero-cats--flyout .db-cat-flyout-title {
  color: var(--p);
}

.fn-hero-cats--flyout .db-cat-item-has-sub:hover .fn-hero-cat-arrow,
.fn-hero-cats--flyout .db-cat-item-has-sub:focus-within .fn-hero-cat-arrow {
  opacity: 1;
  color: var(--p);
  transform: translateX(2px);
}

/* 移动端二/三级横滑 */
.fn-sublevel-wrap {
  margin-top: 12px;
  margin-bottom: 4px;
}

.fn-sublevel-wrap .category-sublevel-bar {
  margin-bottom: 0;
  border-radius: 0;
  border-color: var(--bdr);
  background: var(--card);
}

.fn-sublevel-wrap .category-sublevel-link {
  border-radius: 0;
  font-size: .82rem;
}

.fn-sublevel-wrap .category-sublevel-link--l2 {
  color: var(--tx);
  background: var(--bg);
}

.fn-sublevel-wrap .category-sublevel-link--l3 {
  color: var(--tl);
}

.fn-sublevel-wrap .category-sublevel-link:hover {
  color: var(--p);
  background: rgba(var(--p-rgb), .06);
}

/* 轮播图 */
.fn-hero-carousel {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--sh);
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease);
  text-decoration: none;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide-content { z-index: 2; max-width: 60%; }
.hero-slide-tag {
  display: inline-block;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem; font-weight: 600;
  margin-bottom: 12px;
}
.hero-slide-content h2 { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.hero-slide-content p { font-size: .95rem; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.hero-slide-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff;
  color: var(--tx);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: .85rem; font-weight: 600;
  transition: all .2s var(--ease);
}
.hero-slide:hover .hero-slide-btn { transform: translateX(4px); }
.hero-slide-img { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); max-height: 80%; max-width: 35%; border-radius: var(--r); }
.hero-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer; transition: all .3s var(--ease);
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* 右侧促销卡片 */
.fn-hero-promo { flex-direction: column; gap: 12px; }
.fn-hero-promo-card {
  flex: 1;
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  transition: all .3s var(--ease);
  box-shadow: var(--sh-sm);
}
.fn-hero-promo-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.fn-hero-promo-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.fn-hero-promo-card strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.fn-hero-promo-card span { font-size: .75rem; opacity: .85; }

/* Section */
.fn-section { padding: 28px 0; }
.fn-announce-wrap { margin-top: 12px; }
.fn-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.fn-section-head h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--tx);
  display: flex; align-items: center; gap: 8px;
}
.fn-section-head h2 i { color: var(--p); }
.fn-section-more {
  font-size: .82rem; color: var(--tl);
  display: flex; align-items: center; gap: 4px;
  transition: all .2s var(--ease);
}
.fn-section-more:hover { color: var(--p); gap: 8px; }

/* 限时秒杀 */
.fn-flash-head { justify-content: space-between; }
.fn-flash-title { display: flex; align-items: center; gap: 8px; }
.fn-flash-title i { color: var(--o); font-size: 1.4rem; }
.fn-flash-title h2 { margin: 0; }
.fn-flash-countdown { display: flex; align-items: center; gap: 4px; }
.fn-flash-cd-label { font-size: .78rem; color: var(--tl); margin-right: 4px; }
.fn-flash-cd-num {
  background: var(--tx); color: #fff;
  padding: 4px 8px; border-radius: 6px;
  font-size: .85rem; font-weight: 700; font-family: monospace;
  min-width: 30px; text-align: center;
}
.fn-flash-cd-sep { color: var(--tx); font-weight: 700; }
.fn-flash-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 991px) { .fn-flash-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .fn-flash-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* 分类图标网格 */
.fn-cat-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
@media (max-width: 991px) { .fn-cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 575px) { .fn-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }

/* 首页分类专区 */
.fn-home-cat-zones { margin: 4px 0 0; }
.fn-home-cat-zone { padding-top: 8px; padding-bottom: 32px; }
.fn-home-cat-zone + .fn-home-cat-zone { border-top: 1px solid var(--bdr-s); }
.fn-home-cat-zone--alt { background: var(--card); }
.fn-home-cat-icons { padding-bottom: 12px; }
.fn-home-cat-zone-head {
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.fn-home-cat-zone-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fn-home-cat-zone-mark {
  position: relative;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--zone-accent, var(--p)), color-mix(in srgb, var(--zone-accent, var(--p)) 70%, #fff));
  color: #fff; font-size: 1.2rem;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--zone-accent, var(--p)) 35%, transparent);
}
.fn-home-cat-zone-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 55%);
  pointer-events: none;
}
.fn-home-cat-zone-titletxt { min-width: 0; }
.fn-home-cat-zone-title h2 {
  margin: 0; font-size: 1.2rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  line-height: 1.25;
}
.fn-home-cat-zone-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--p);
  background: color-mix(in srgb, var(--p) 10%, transparent);
  border-radius: 6px;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.fn-home-cat-zone-title p {
  margin: 4px 0 0; font-size: .78rem; color: var(--tl);
  line-height: 1.4;
}
.fn-section-more--chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--bdr);
  font-size: .8rem;
  color: var(--tx);
  font-weight: 600;
  box-shadow: var(--sh-sm, 0 1px 2px rgba(0,0,0,.04));
}
.fn-section-more--chip:hover {
  color: var(--p);
  background: color-mix(in srgb, var(--p) 6%, var(--card));
  border-color: color-mix(in srgb, var(--p) 35%, var(--bdr));
  gap: 8px;
}

/* 分类 Tab —— 现代化分段胶囊 + 滑动指示条 */
.fn-home-cat-tabs { position: relative; margin-bottom: 18px; }
.fn-home-cat-tablist {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  background: var(--bdr-s, #eef0f4);
  border-radius: 999px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fn-home-cat-tablist::-webkit-scrollbar { display: none; }
.fn-home-cat-tab {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--tl);
  cursor: pointer;
  border-radius: 999px;
  transition: color .25s var(--ease, ease), transform .25s var(--ease, ease);
}
.fn-home-cat-tab i { font-size: .92em; }
.fn-home-cat-tab--all,
.fn-home-cat-tab--l2 { font-weight: 700; color: var(--tx); }
.fn-home-cat-tab--l3 { color: var(--tl); }
.fn-home-cat-tab:hover { color: var(--p); transform: translateY(-1px); }
.fn-home-cat-tab:active { transform: translateY(0); }
.fn-home-cat-tab:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }
.fn-home-cat-tab.active { color: #fff; background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 62%, #b3a8f5)); }
.fn-home-cat-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  background: var(--bdr-s, #e6e8ee);
  color: var(--tl);
  font-variant-numeric: tabular-nums;
  transition: background .25s var(--ease, ease), color .25s var(--ease, ease);
}
.fn-home-cat-tab:hover .fn-home-cat-tab-count {
  background: color-mix(in srgb, var(--p) 14%, var(--bdr-s, #e6e8ee));
  color: var(--p);
}
.fn-home-cat-tab.active .fn-home-cat-tab-count {
  background: rgba(255, 255, 255, .28);
  color: #fff;
}
.fn-home-cat-tab-indicator {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 62%, #b3a8f5));
  box-shadow: 0 6px 16px rgba(var(--p-rgb), .4);
  transform: translateX(0);
  transition: transform .3s var(--ease, ease), width .3s var(--ease, ease);
  pointer-events: none;
}
/* 边缘渐隐：多 Tab 横向滚动时的视觉提示 */
.fn-home-cat-tabs::before,
.fn-home-cat-tabs::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none;
}
.fn-home-cat-tabs::before { left: 0; background: linear-gradient(90deg, var(--card), transparent); border-radius: 999px 0 0 999px; }
.fn-home-cat-tabs::after { right: 0; background: linear-gradient(270deg, var(--card), transparent); border-radius: 0 999px 999px 0; }

.fn-home-cat-panels { position: relative; min-height: 120px; }
.fn-home-cat-panel { animation: fnCatTabIn .26s var(--ease, ease) both; }
.fn-home-cat-panel[hidden] { display: none !important; }
.fn-home-cat-panel-foot { margin-top: 14px; text-align: center; }
.fn-home-cat-panel-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 18px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--p);
  background: rgba(var(--p-rgb), .08);
  border-radius: 999px;
  transition: background .2s var(--ease, ease), gap .2s var(--ease, ease);
}
.fn-home-cat-panel-foot a:hover { background: rgba(var(--p-rgb), .16); gap: 8px; }
@keyframes fnCatTabIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 兼容旧 subnav 类名（如有引用） */
.fn-home-cat-subnav {
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; margin-bottom: 14px;
  border: 1px solid var(--bdr); background: var(--card);
  scrollbar-width: thin;
}
.fn-home-cat-subnav::-webkit-scrollbar { height: 3px; }
.fn-home-cat-sub {
  flex: 0 0 auto; padding: 8px 12px;
  border-right: 1px solid var(--bdr-s);
  font-size: .78rem; line-height: 1.35; white-space: nowrap;
  color: var(--tl); text-decoration: none; border-radius: 0;
  transition: color .15s, background .15s;
}
.fn-home-cat-sub:last-child { border-right: none; }
.fn-home-cat-sub--all, .fn-home-cat-sub--l2 { font-weight: 700; color: var(--tx); background: var(--bg); }
.fn-home-cat-sub--l3 { font-weight: 400; color: var(--tl); }
.fn-home-cat-sub:hover { color: var(--p); background: rgba(var(--p-rgb), .06); }
.fn-home-cat-sub--all.active { color: var(--p); box-shadow: inset 0 -2px 0 var(--p); }
.fn-home-cat-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199px) { .fn-home-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
  .fn-home-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fn-home-cat-zone-head { gap: 10px; margin-bottom: 14px; }
  .fn-home-cat-zone-mark { width: 42px; height: 42px; font-size: 1.05rem; border-radius: 12px; }
  .fn-home-cat-zone-title { gap: 10px; }
  .fn-home-cat-zone-title h2 { font-size: 1rem; }
  .fn-home-cat-zone-tag { font-size: .62rem; padding: 2px 6px; }
  .fn-section-more--chip { padding: 6px 12px; font-size: .75rem; }
  .fn-home-cat-tab { padding: 7px 13px; font-size: .78rem; }
  .fn-home-cat-tab-count { min-width: 20px; height: 18px; font-size: .68rem; padding: 0 6px; }
}

.cat-icon-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  border-radius: var(--r);
  transition: all .25s var(--ease);
  text-decoration: none;
}
.cat-icon-card:hover { background: var(--bg); transform: translateY(-2px); }
.cic-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
  box-shadow: var(--sh-sm);
  transition: transform .25s var(--ease);
}
.cat-icon-card:hover .cic-icon { transform: scale(1.1) rotate(-5deg); }
.cic-name { font-size: .78rem; color: var(--tl); text-align: center; }
.cat-icon-card:hover .cic-name { color: var(--p); }

/* 促销横幅 */
.fn-promo-banner {
  border-radius: var(--r-lg);
  padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
  box-shadow: var(--sh);
}
.fn-promo-banner-content h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.fn-promo-banner-content p { font-size: .9rem; opacity: .9; }
.fn-promo-banner-btn {
  background: #fff;
  color: var(--p);
  padding: 10px 24px;
  border-radius: 22px;
  font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; gap: 4px;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.fn-promo-banner-btn:hover { transform: translateX(4px); }
@media (max-width: 575px) {
  .fn-promo-banner { flex-direction: column; gap: 16px; text-align: center; padding: 24px 20px; }
}

/* 商品网格 */
.fn-product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1199px) { .fn-product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767px) { .fn-product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 575px) { .fn-product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ==============================
   商品列表页样式
   ============================== */
.fn-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  padding: 16px 0;
  font-size: .82rem;
}
.fn-breadcrumb a { color: var(--tl); transition: color .2s; }
.fn-breadcrumb a:hover { color: var(--p); }
.fn-breadcrumb .active { color: var(--tx); font-weight: 600; }
.fn-breadcrumb i { font-size: .7rem; color: var(--txl); }

/* 商品列表页 */
.fn-products-page {
  padding: 16px 0 40px;
}

.fn-products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 20px;
  flex-wrap: wrap;
}

.fn-products-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -.02em;
}

.fn-products-subtitle {
  margin: 6px 0 0;
  font-size: .85rem;
  color: var(--tl);
}

.fn-products-search-box,
.fn-products-search-box--mobile {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: min(360px, 100%);
  background: var(--card);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.fn-products-search-box i,
.fn-products-search-box--mobile i {
  padding-left: 14px;
  color: var(--txl);
  flex-shrink: 0;
}

.fn-products-search-box input,
.fn-products-search-box--mobile input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: .875rem;
  color: var(--tx);
}

.fn-products-search-box button,
.fn-products-search-box--mobile button {
  border: none;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  padding: 10px 18px;
  font-size: .82rem;
  font-weight: 600;
  flex-shrink: 0;
}

.fn-products-search-box input:focus,
.fn-products-search-box--mobile input:focus {
  outline: none;
}

.fn-products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding-bottom: 40px;
}
@media (max-width: 991px) { .fn-products-layout { grid-template-columns: 1fr; } }

.fn-products-sidebar { display: flex; flex-direction: column; gap: 16px; }
.fn-filter-card {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.fn-filter-card-head {
  padding: 12px 16px;
  font-weight: 700; font-size: .88rem;
  border-bottom: 1px solid var(--bdr-s);
  background: var(--bg);
  display: flex; align-items: center; gap: 6px;
}
.fn-filter-card-head i { color: var(--p); }
.fn-filter-list { padding: 6px; }
.fn-filter-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: .83rem; color: var(--tl);
  transition: all .2s var(--ease);
}
.fn-filter-item:hover { background: var(--bg); color: var(--p); padding-left: 16px; }
.fn-filter-item.active { background: rgba(var(--p-rgb),.08); color: var(--p); font-weight: 600; }

/* 分类树：一级 / 二级 / 三级 */
.fn-filter-list--tree { padding: 8px; }

.fn-cat-tree-all { margin-bottom: 4px; }

.fn-cat-tree-block {
  border-top: 1px solid var(--bdr-s);
  padding-top: 4px;
  margin-top: 4px;
}

.fn-cat-tree-block.is-open {
  background: rgba(var(--p-rgb), .03);
}

.fn-cat-tree-l1 {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--tx);
}

.fn-cat-tree-arrow {
  font-size: .68rem;
  color: var(--txl);
  transition: transform .2s;
}

.fn-cat-tree-block.is-open .fn-cat-tree-arrow {
  transform: rotate(90deg);
  color: var(--p);
}

.fn-cat-tree-l2-wrap {
  padding: 0 0 6px 10px;
  border-left: 2px solid var(--bdr-s);
  margin: 2px 0 0 8px;
}

.fn-cat-tree-l2-block + .fn-cat-tree-l2-block {
  margin-top: 2px;
}

.fn-cat-tree-l2 {
  font-size: .8rem !important;
  padding: 6px 10px !important;
  color: var(--tl) !important;
}

.fn-cat-tree-l2.active {
  color: var(--p) !important;
  font-weight: 600;
}

.fn-cat-tree-l3-scroll {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 4px;
  border: 1px solid var(--bdr-s);
  background: var(--bg);
  scrollbar-width: thin;
}

.fn-cat-tree-l3-scroll::-webkit-scrollbar { height: 3px; }
.fn-cat-tree-l3-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 0; }

.fn-cat-tree-l3 {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-right: 1px solid var(--bdr-s);
  font-size: .78rem;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--tl);
  text-decoration: none;
  border-radius: 0;
  transition: color .15s, background .15s;
}

.fn-cat-tree-l3:last-child { border-right: none; }

.fn-cat-tree-l3:hover {
  color: var(--p);
  background: rgba(var(--p-rgb), .06);
}

.fn-cat-tree-l3.active {
  color: var(--p);
  font-weight: 600;
  background: rgba(var(--p-rgb), .08);
}

/* 列表区二/三级快捷导航 */
.fn-cat-subnav {
  margin-bottom: 16px;
  border: 1px solid var(--bdr);
  background: var(--card);
  box-shadow: var(--sh-xs);
}

.fn-cat-subnav-row + .fn-cat-subnav-row {
  border-top: 1px solid var(--bdr-s);
}

.fn-cat-subnav-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: stretch;
  min-height: 38px;
}

.fn-cat-subnav-l2 {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--tx);
  text-decoration: none;
  background: var(--bg);
  border-right: 1px solid var(--bdr-s);
  border-radius: 0;
}

.fn-cat-subnav-l2:hover,
.fn-cat-subnav-l2.active {
  color: var(--p);
  background: rgba(var(--p-rgb), .06);
}

.fn-cat-subnav-l3-scroll {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: thin;
}

.fn-cat-subnav-l3-scroll::-webkit-scrollbar { height: 3px; }

.fn-cat-subnav-l3 {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--bdr-s);
  font-size: .78rem;
  color: var(--tl);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
}

.fn-cat-subnav-l3:last-child { border-right: none; }

.fn-cat-subnav-l3:hover {
  color: var(--p);
  background: rgba(var(--p-rgb), .05);
}

.fn-cat-subnav-l3.active {
  color: var(--p);
  font-weight: 600;
  background: rgba(var(--p-rgb), .08);
}

@media (max-width: 767px) {
  .fn-cat-subnav-row {
    grid-template-columns: 72px 1fr;
  }
}

.fn-active-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px; align-items: center;
}
.fn-active-label { font-size: .8rem; color: var(--tl); }
.fn-active-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--bdr);
  font-size: .78rem; color: var(--tx);
  transition: all .2s var(--ease);
}
.fn-active-tag:hover { border-color: var(--p); color: var(--p); }
.fn-active-tag i { font-size: .7rem; }

.fn-active-clear {
  font-size: .78rem;
  color: var(--tl);
  padding: 4px 8px;
  transition: color .2s;
}

.fn-active-clear:hover { color: var(--p); }

.fn-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  margin-bottom: 16px;
}
.fn-toolbar-count { font-size: .85rem; color: var(--tl); }
.fn-toolbar-count strong { color: var(--p); font-weight: 700; }

.fn-sort-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.fn-sort-tab {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: .82rem;
  color: var(--tl);
  transition: all .2s var(--ease);
}

.fn-sort-tab:hover {
  color: var(--p);
  background: var(--bg);
}

.fn-sort-tab.active {
  color: var(--p);
  font-weight: 600;
  background: rgba(var(--p-rgb), .08);
  border-color: rgba(var(--p-rgb), .15);
}

.fn-mobile-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.fn-mobile-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--bdr);
  background: var(--card);
  color: var(--tx);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--sh-xs);
  transition: border-color .2s, color .2s;
}

.fn-mobile-filter-btn:hover {
  border-color: rgba(var(--p-rgb), .35);
  color: var(--p);
}

.fn-mobile-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--p);
  color: #fff;
  font-style: normal;
  font-size: .68rem;
  font-weight: 700;
}

.fn-filter-offcanvas .offcanvas-header {
  border-bottom: 1px solid var(--bdr);
}

.fn-filter-offcanvas .products-filter-chip span {
  border-radius: 0;
}

.fn-mobile-search { margin-bottom: 12px; }

.fn-sort-select {
  border: 1px solid var(--bdr);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: .83rem; color: var(--tx);
  background: var(--card);
  cursor: pointer;
  outline: none;
}
.fn-sort-select:focus { border-color: var(--p); }

.fn-mobile-search-form .input-group { box-shadow: var(--sh-xs); border-radius: var(--r); overflow: hidden; }
.fn-mobile-search-form .form-control { border: 1px solid var(--bdr); }
.fn-mobile-search-form .btn { border-radius: 0 !important; }

.fn-products-sidebar {
  position: sticky;
  top: 132px;
  align-self: start;
}

.fn-products-main { min-width: 0; }

.fn-empty {
  text-align: center;
  padding: 80px 20px;
}
.fn-empty i { font-size: 3.5rem; color: var(--txl); margin-bottom: 20px; }
.fn-empty p { font-size: .95rem; color: var(--tl); margin-bottom: 20px; }
.fn-empty-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  font-size: .85rem; font-weight: 600;
  transition: all .2s var(--ease);
}
.fn-empty-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-p); }

/* ==============================
   商品卡片样式（模板通用）
   ============================== */
.product-card {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  transition: all .3s var(--ease);
  overflow: hidden;
  text-decoration: none;
  display: block;
}
.product-card:hover {
  box-shadow: var(--sh-lg);
  border-color: rgba(var(--p-rgb),.3);
  transform: translateY(-4px);
}
.pc-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}
.pc-img-gradient {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 3rem;
}
.pc-img-gradient img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.product-card:hover .pc-img-gradient img { transform: scale(1.08); }
.pc-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .68rem; font-weight: 700;
  color: #fff; z-index: 2;
}
.pc-badge-hot { background: linear-gradient(135deg, #FF4757, #FF6B6B); }
.pc-badge-new { background: linear-gradient(135deg, #00B894, #0DCD82); }
.pc-badge-sale { background: linear-gradient(135deg, #FECA57, #FF9F43); color: #333; }
.pc-badge-soldout { background: rgba(0,0,0,.6); }
.pc-badge-low { background: var(--o); top: auto; bottom: 10px; left: 10px; }
.pc-fav {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--tl);
  opacity: 0; transform: scale(.8);
  transition: all .25s var(--ease);
  z-index: 2;
}
.product-card:hover .pc-fav { opacity: 1; transform: scale(1); }
.pc-fav:hover { color: var(--d); }
.pc-body { padding: 12px 14px; }
.pc-name {
  font-size: .83rem; font-weight: 600;
  color: var(--tx);
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4;
  min-height: 2.3em;
}
.pc-tags { display: flex; gap: 4px; margin-bottom: 8px; }
.pc-tag {
  font-size: .65rem; padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg); color: var(--tl);
}
.pc-tag-ship { background: rgba(var(--p-rgb),.08); color: var(--p); }
.pc-bottom { display: flex; align-items: center; justify-content: space-between; }
.pc-price { display: flex; align-items: baseline; gap: 4px; }
.pc-price .now { font-size: 1.1rem; font-weight: 800; color: var(--d); }
.pc-price .old { font-size: .75rem; color: var(--txl); text-decoration: line-through; }
.pc-cart-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  border: none; cursor: pointer;
  transition: all .2s var(--ease);
  flex-shrink: 0;
}
.pc-cart-btn:hover { transform: scale(1.1); }
.pc-sold { font-size: .72rem; color: var(--txl); margin-top: 6px; }
.pc-progress { height: 4px; background: var(--bdr-s); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pc-progress-bar { height: 100%; background: linear-gradient(90deg, var(--o), #FF9F43); border-radius: 2px; }

/* 列表视图 */
.fn-product-grid.list-view { grid-template-columns: 1fr; }
.fn-product-grid.list-view .product-card {
  display: flex; flex-direction: row;
}
.fn-product-grid.list-view .pc-img { width: 160px; flex-shrink: 0; aspect-ratio: auto; }
.fn-product-grid.list-view .pc-body { flex: 1; }
.fn-product-grid.list-view .pc-name { font-size: .95rem; -webkit-line-clamp: 1; }

/* ==============================
   商品详情页样式覆盖
   ============================== */
.pd-page { padding: 0 0 40px; }
.pd-page-bg { display: none !important; }

.pd-hero-card {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: var(--card) !important;
  border-radius: var(--r-lg) !important;
  border: 1px solid var(--bdr) !important;
  box-shadow: var(--sh-xs) !important;
  padding: 24px !important;
}
@media (max-width: 767px) {
  .pd-hero-card { grid-template-columns: 1fr; gap: 16px; padding: 16px !important; }
}

/* 画廊 */
.pd-gallery-wrap { position: relative; }
.pd-gallery-layout { display: flex; gap: 12px; }
.pd-gallery-thumbs { display: flex; flex-direction: column; gap: 8px; width: 64px; flex-shrink: 0; }
.pd-gallery-thumb {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--bg);
  transition: border-color .2s var(--ease);
}
.pd-gallery-thumb.active { border-color: var(--p); }
.pd-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery {
  flex: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7ff, #ede9fe);
  aspect-ratio: 1;
  position: relative;
}
.pd-gallery-stage { width: 100%; height: 100%; position: relative; }
.pd-gallery-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.pd-gallery-img.is-active { opacity: 1; }
.pd-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: .72rem; font-weight: 700;
  color: #fff;
  z-index: 2;
}
.pd-badge-recommend { background: linear-gradient(135deg, var(--p), var(--pd)); }
.pd-badge-sale { background: linear-gradient(135deg, var(--o), #FF9F43); }
.pd-soldout-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.pd-soldout-inner { text-align: center; color: var(--tl); }
.pd-soldout-inner i { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.pd-soldout-inner span { font-size: 1.2rem; font-weight: 800; color: var(--tx); display: block; }
.pd-soldout-inner small { font-size: .8rem; color: var(--tl); }

/* 信息面板 */
.pd-info { display: flex; flex-direction: column; gap: 16px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-cat-tag, .pd-type-tag, .pd-brand-tag, .pd-rating {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: .75rem;
  text-decoration: none;
  transition: all .2s var(--ease);
}
.pd-cat-tag { background: rgba(var(--p-rgb),.08); color: var(--p); }
.pd-cat-tag:hover { background: rgba(var(--p-rgb),.15); }
.pd-type-tag { background: var(--bg); color: var(--tl); }
.pd-brand-tag { background: var(--bg); color: var(--tl); }
.pd-brand-tag:hover { color: var(--p); }
.pd-rating { background: rgba(255,71,87,.08); color: var(--d); cursor: pointer; }
.pd-rating i { color: #FECA57; }
.pd-brand-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; }

.pd-title {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: var(--tx) !important;
  line-height: 1.4;
  margin: 0;
}
@media (max-width: 575px) { .pd-title { font-size: 1.2rem !important; } }

/* 价格面板 */
.pd-price-panel {
  background: linear-gradient(135deg, rgba(var(--p-rgb),.04), rgba(var(--p-rgb),.01));
  border: 1px solid rgba(var(--p-rgb),.1);
  border-radius: var(--r) !important;
  padding: 16px !important;
}
.pd-member-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pd-member-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  color: #fff;
  font-size: .75rem; font-weight: 600;
}
.pd-member-badge em { font-style: normal; opacity: .8; }
.pd-member-save { font-size: .75rem; color: var(--d); font-weight: 600; }
.pd-price-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pd-price-symbol { font-size: 1rem; color: var(--d); font-weight: 700; }
.pd-price-value { font-size: 2rem; color: var(--d); font-weight: 800; }
.pd-price-original { font-size: .9rem; color: var(--txl); text-decoration: line-through; }
.pd-discount-tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(var(--d-rgb),.1);
  color: var(--d);
  font-size: .72rem; font-weight: 600;
}
.pd-price-mask { display: flex; align-items: baseline; gap: 2px; }
.pd-price-placeholder { font-size: 2rem; color: var(--txl); font-weight: 800; }
.pd-stock-line {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-size: .82rem;
}
.pd-stock-line i { color: var(--c); }
.pd-stock-line.stock-low i { color: var(--w); }
.pd-stock-line.stock-out i { color: var(--d); }
.pd-stock-num { color: var(--tl); }
.pd-stock-bar { height: 4px; background: var(--bdr-s); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pd-stock-bar-fill { height: 100%; background: linear-gradient(90deg, var(--w), var(--o)); border-radius: 2px; }

/* 规格 */
.pd-specs-section { display: flex; flex-direction: column; gap: 12px; }
.pd-spec-row { display: flex; flex-direction: column; gap: 6px; }
.pd-spec-label { font-size: .82rem; font-weight: 600; color: var(--tl); }
.pd-spec-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-spec-btn {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 2px solid var(--bdr);
  background: var(--card);
  font-size: .83rem; color: var(--tx);
  cursor: pointer;
  transition: all .2s var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.pd-spec-btn:hover { border-color: rgba(var(--p-rgb),.3); }
.pd-spec-btn.active { border-color: var(--p); background: rgba(var(--p-rgb),.05); color: var(--p); font-weight: 600; }
.pd-spec-btn img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }

/* 数量 */
.pd-qty-row { display: flex; align-items: center; gap: 16px; }
.pd-qty-label { font-size: .82rem; color: var(--tl); font-weight: 600; }
.pd-qty-control { display: flex; align-items: center; border: 2px solid var(--bdr); border-radius: var(--r-sm); overflow: hidden; }
.pd-qty-btn {
  width: 36px; height: 36px;
  border: none; background: var(--bg);
  font-size: 1.1rem; color: var(--tx);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.pd-qty-btn:hover { background: rgba(var(--p-rgb),.08); color: var(--p); }
.pd-qty-control input {
  width: 56px; height: 36px;
  border: none; text-align: center;
  font-size: .9rem; font-weight: 600;
  background: var(--card);
  outline: none;
}

/* 按钮 */
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.pd-btn-primary { background: linear-gradient(135deg, var(--p), var(--pd)); color: #fff; }
.pd-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-p); }
.pd-btn-secondary { background: var(--bg); color: var(--p); border: 2px solid var(--p); }
.pd-btn-secondary:hover { background: rgba(var(--p-rgb),.05); }
.pd-btn-soldout { background: var(--bg); color: var(--txl); cursor: not-allowed; }
.pd-btn-outline-sm, .pd-btn-primary-sm {
  padding: 8px 16px; font-size: .82rem; min-width: auto; flex: none;
}
.pd-btn-outline-sm { border: 1px solid var(--bdr); color: var(--tl); }
.pd-btn-primary-sm { background: linear-gradient(135deg, var(--p), var(--pd)); color: #fff; }

/* 信任标签 */
.pd-trust { display: flex; flex-wrap: wrap; gap: 12px 20px; padding-top: 12px; border-top: 1px solid var(--bdr-s); }
.pd-trust-item { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--tl); }
.pd-trust-item i { color: var(--c); }

/* 标签页 */
.pd-tabs-wrap { margin-top: 32px; }
.pd-tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--bdr);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-tabs::-webkit-scrollbar { display: none; }
.pd-tab-btn {
  padding: 10px 20px;
  font-size: .88rem; font-weight: 600;
  color: var(--tl);
  border: none; background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.pd-tab-btn:hover { color: var(--p); }
.pd-tab-btn.active { color: var(--p); border-bottom-color: var(--p); }
.pd-tab-pane { display: none; }
.pd-tab-pane.active { display: block; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 相关推荐 */
.pd-related { margin-top: 32px; }
.pd-related-head { font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }

/* 移动端底部购买栏 */
.pd-mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--bdr);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  padding: 8px 16px;
  display: flex; gap: 8px; align-items: center;
  z-index: 1000;
}
.pd-mobile-bar .pd-btn { flex: 1; min-width: auto; padding: 10px 16px; font-size: .85rem; }
@media (min-width: 768px) { .pd-mobile-bar { display: none !important; } }
body { padding-bottom: env(safe-area-inset-bottom); }

/* 优惠券面板 */
.pd-coupon-panel {
  background: rgba(255,71,87,.04);
  border: 1px dashed rgba(255,71,87,.2);
  border-radius: var(--r-sm);
  padding: 12px;
}
.pd-coupon-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-coupon-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(255,71,87,.15);
  font-size: .75rem;
  color: var(--d);
}

/* 拼团面板 */
.pd-group-panel {
  background: rgba(0,184,148,.04);
  border: 1px solid rgba(0,184,148,.15);
  border-radius: var(--r-sm);
  padding: 12px;
}

/* 面包屑 */
.pd-page .breadcrumb {
  padding: 16px 0;
  margin: 0;
  background: transparent;
}
.pd-page .breadcrumb-item a { color: var(--tl); }
.pd-page .breadcrumb-item a:hover { color: var(--p); }
.pd-page .breadcrumb-item.active { color: var(--tx); }

/* lightbox */
.pd-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  display: none;
  align-items: center; justify-content: center;
  cursor: zoom-out;
}
.pd-lightbox.show { display: flex; }
.pd-lightbox img { max-width: 90%; max-height: 90%; border-radius: var(--r-lg); }

/* 商品详情标签页 */
.pd-content {
  margin-top: 32px;
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xs);
  padding: 0;
  overflow: hidden;
}
.pd-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bdr);
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0 8px;
  background: var(--card);
}
.pd-tabs::-webkit-scrollbar { height: 3px; }
.pd-tabs .pd-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--tl);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
  flex: 0 0 auto;
}
.pd-tabs .pd-tab i { font-size: .95rem; opacity: .85; }
.pd-tabs .pd-tab:hover { color: var(--p); }
.pd-tabs .pd-tab.active { color: var(--p); border-bottom-color: var(--p); }
.pd-tab-count {
  display: inline-block;
  background: var(--bg);
  color: var(--tl);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: .68rem;
  font-weight: 700;
  margin-left: 2px;
}
.pd-tabs .pd-tab.active .pd-tab-count {
  background: rgba(var(--p-rgb), .1);
  color: var(--p);
}
.pd-tab-panel {
  display: none;
  padding: 24px 28px;
}
.pd-tab-panel.active { display: block; animation: fadeIn .3s var(--ease); }
.pd-tab-panel[hidden] { display: none !important; }

/* 空状态 */
.pd-empty { text-align: center; padding: 48px 20px; color: var(--tl); }
.pd-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: .6; }
.pd-empty p { margin: 0; font-size: .9rem; }
.pd-empty-hint { display: block; margin-top: 8px; font-size: .78rem; color: var(--txl); }
.pd-empty-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--p);
  font-size: .85rem;
  font-weight: 600;
}

/* 属性表 */
.pd-attributes { display: flex; flex-direction: column; gap: 24px; }
.pd-attr-group-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--tx);
  padding-left: 10px;
  border-left: 3px solid var(--p);
}
.pd-attr-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--bdr-s);
}
.pd-attr-table td { padding: 12px 16px; border-bottom: 1px solid var(--bdr-s); font-size: .85rem; }
.pd-attr-table tr:last-child td { border-bottom: none; }
.pd-attr-name { color: var(--tl); width: 32%; background: var(--bg); font-weight: 600; }
.pd-attr-value { color: var(--tx); }

/* 规格展示 Tab */
.pd-specs-display { display: flex; flex-direction: column; gap: 24px; }
.pd-spec-display-group { display: flex; flex-direction: column; gap: 12px; }
.pd-spec-display-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--tx);
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--p);
}
.pd-spec-display-options { display: flex; flex-wrap: wrap; gap: 12px; }
.pd-spec-display-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 88px;
  padding: 12px;
  border: 1px solid var(--bdr);
  background: var(--card);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.pd-spec-display-item:hover { border-color: var(--p); }
.pd-spec-display-item.active {
  border-color: var(--p);
  box-shadow: inset 0 0 0 1px var(--p);
  background: rgba(var(--p-rgb), .04);
}
.pd-spec-display-img {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}
.pd-spec-display-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-spec-display-fallback { color: var(--tl); font-size: 1.4rem; }
.pd-spec-display-name { font-size: .82rem; font-weight: 600; color: var(--tx); text-align: center; }
.pd-spec-display-price { font-size: .72rem; color: var(--o); }
.pd-spec-display-out { font-size: .68rem; color: #e74c3c; }
.pd-spec-display-stock { font-size: .68rem; color: var(--o); }
.pd-spec-display-sku { font-size: .65rem; color: var(--txl); }
.pd-spec-display-summary {
  margin-top: 8px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--bdr-s);
}
.pd-spec-display-summary h4 {
  margin: 0 0 10px;
  font-size: .88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pd-spec-summary-item { font-size: .82rem; color: var(--tl); margin-bottom: 4px; }
.pd-spec-summary-label { color: var(--txl); }
.pd-spec-summary-value { color: var(--tx); font-weight: 600; }
.pd-spec-summary-total { margin-top: 10px; font-size: .85rem; color: var(--tl); }
.pd-spec-summary-price { color: var(--p); font-weight: 800; font-size: 1rem; }

/* 商品描述 */
.pd-description { font-size: .9rem; line-height: 1.8; color: var(--tx); }
.pd-description img { max-width: 100%; border-radius: var(--r-sm); margin: 12px 0; }
.pd-description p { margin-bottom: 12px; }
.pd-description h2, .pd-description h3 { font-weight: 700; margin: 20px 0 10px; }

@media (max-width: 767px) {
  .pd-tab-panel { padding: 16px; }
  .pd-tabs .pd-tab { padding: 12px 14px; font-size: .82rem; }
  .pd-spec-display-item { min-width: 76px; padding: 10px 8px; }
}

/* 面包屑 */
.pd-breadcrumb { display: flex; align-items: center; gap: 6px; padding: 16px 0; font-size: .82rem; }
.pd-breadcrumb a { color: var(--tl); transition: color .2s; }
.pd-breadcrumb a:hover { color: var(--p); }
.pd-bc-sep { color: var(--txl); }
.pd-bc-current { color: var(--tx); font-weight: 600; }

/* 画廊导航 */
.pd-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--tx);
  border: none; cursor: pointer;
  z-index: 3;
  transition: all .2s var(--ease);
}
.pd-gallery-prev { left: 12px; }
.pd-gallery-next { right: 12px; }
.pd-gallery-nav:hover { background: #fff; box-shadow: var(--sh-sm); }
.pd-gallery-counter {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .72rem;
}
.pd-zoom-hint {
  position: absolute; bottom: 12px; left: 12px;
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  display: flex; align-items: center; gap: 4px;
}

/* 拼团面板 */
.pd-group-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pd-group-panel-tag { background: linear-gradient(135deg, #00B894, #0DCD82); color: #fff; padding: 3px 10px; border-radius: 16px; font-size: .72rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.pd-group-panel-price { display: flex; align-items: baseline; gap: 8px; }
.pd-group-panel-save { font-size: .75rem; color: var(--d); font-weight: 600; }
.pd-price-masked { font-size: 1.5rem; color: var(--txl); }
.pd-group-panel-meta { font-size: .78rem; color: var(--tl); }
.pd-group-teams { margin-top: 12px; }
.pd-group-teams-title { font-size: .82rem; font-weight: 600; margin-bottom: 8px; color: var(--tx); }

/* 相关推荐 */
.pd-related-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 991px) { .pd-related-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767px) { .pd-related-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .pd-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }