/* ==========================================================
   SiteForge / Chic Theme v4 — 双端全响应式大厂 UI 重构
   ========================================================== */

/* ---------- 1. 全局变量 ---------- */
:root {
  --color-bg-site:    #F4F6F9;
  --color-primary:    #0F172A;
  --color-text-dark:  #1E293B;
  --color-accent:     #FF5A1F;
  --color-surface:    #ffffff;
  --radius-card:      12px;
  --radius-control:   8px;
  --shadow-card:      0 1px 3px rgba(0,0,0,0.02), 0 8px 24px rgba(149,157,165,0.05);
  --shadow-hover:     0 20px 40px rgba(0,0,0,0.08);
  --transition-fast:  all 0.2s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --container-max:    1280px;
  --header-height:    64px;

  /* Gray scale — 8 tiers (Tailwind-inspired) */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;

  /* Spacing scale — nonlinear */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   12px;
  --space-lg:   16px;
  --space-xl:   24px;
  --space-2xl:  32px;
  --space-3xl:  48px;
  --space-4xl:  64px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: var(--color-bg-site);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
main { display: block; width: 100%; min-height: 50vh; }
body { overflow-x: hidden; width: 100%; min-width: 320px; }

/* ---------- 2. 全局安全容器 ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 4px;
}
/* Desktop hover */
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* Mobile press */
@media (max-width: 1023px) {
  .product-card:hover { transform: none; box-shadow: none; }
  .product-card:active { transform: scale(0.97); transition: transform 0.15s ease; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

/* ---------- 3. 双端字体系统 ---------- */
.hero-content h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle {
  font-size: clamp(14px, 1.5vw, 16px);
  color: rgba(255,255,255,0.7);
  margin-bottom: clamp(16px, 2vw, 24px);
  line-height: 1.5;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 4. 顶栏 — 64px 毛玻璃 ---------- */
/* ===== 顶栏 — 标准实体装（全局默认） ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  width: 100%;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
nav.nav-shadow {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}
nav .logo {
  color: #0F172A;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
  transition: color 0.3s ease;
}
nav .logo span { color: #0F172A !important; transition: color 0.3s ease; }

/* ===== 首页初始态：透明悬浮模式 ===== */
nav.nav-hero {
  position: absolute;
  width: 100%;
  left: 0;
  right: 0;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
nav.nav-hero .logo,
nav.nav-hero .logo span { color: #fff !important; }
nav.nav-hero .nav-desktop-links a { color: #fff !important; }
nav.nav-hero .nav-desktop-links a:hover { color: #FF5A1F !important; }
nav.nav-hero .nav-desktop-links a::after { background: #FF5A1F !important; }
nav.nav-hero .nav-desktop-right .nav-text-link { color: #fff !important; }
nav.nav-hero .nav-desktop-right .nav-text-link:hover { color: #FF5A1F !important; }
nav.nav-hero .nav-desktop-right .btn-nav { background: #0F172A; color: #fff !important; }
nav.nav-hero .nav-desktop-right .btn-nav { background: #C5A880; color: #fff !important; }
nav.nav-hero .nav-desktop-right .locale-dd .locale-toggle {
  color: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,255,255,0.25) !important;
}
nav.nav-hero .nav-desktop-right .locale-dd .locale-toggle:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,0.5) !important;
}
nav.nav-hero .nav-top-mobile .locale-dd .locale-toggle {
  color: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,255,255,0.25) !important;
}
nav.nav-hero .nav-top-mobile .locale-dd .locale-toggle:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,0.5) !important;
}
nav.nav-hero .hamburger-btn span { background: #fff !important; }
nav.nav-hero .mobile-cart-icon { color: #fff !important; }

/* 桌面：右侧菜单+工具栏 */
.nav-desktop-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.nav-desktop-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-desktop-links a {
  color: #0F172A;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color 0.3s ease, background 0.3s ease;
}
.nav-desktop-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #0F172A;
  transition: var(--transition-smooth);
}
.nav-desktop-links a:hover { color: #FF5A1F; }
.nav-desktop-links a:hover::after { width: 100%; }

.nav-desktop-right .nav-text-link {
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  transition: var(--transition-smooth);
}
.nav-desktop-right .nav-text-link:hover { color: #FF5A1F; }
.nav-desktop-right .btn-nav {
  background: #0F172A;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition-smooth);
}
.nav-desktop-right .btn-nav:hover { background: #e04e1a; }

/* Locale Dropdown */
.nav-desktop-right .locale-dd .locale-toggle {
  color: #64748B;
  border-color: rgba(0,0,0,0.08);
}
.nav-desktop-right .locale-dd .locale-toggle:hover {
  color: #1E293B;
  border-color: #FF5A1F;
}
.nav-desktop-right .locale-dd .locale-menu {
  top: calc(100% + 8px);
  right: 0;
}

/* 子导航 */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item .sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  min-width: 160px;
  z-index: 200;
  padding: 4px 0;
}
.nav-item .sub-nav a {
  display: block !important;
  padding: 8px 16px !important;
  color: #0F172A !important;
  white-space: nowrap;
  font-size: 13px !important;
}
nav.nav-hero .nav-item .sub-nav a { color: #0F172A !important; }
.nav-item .sub-nav a:hover {
  background: #F1F5F9 !important;
  color: #FF5A1F !important;
}
.nav-item:hover .sub-nav, .nav-item.open .sub-nav { display: block; }
.nav-item .arrow { font-size: 10px; margin-left: 2px; }

/* 移动端顶栏：语言/币种切换 */
.nav-top-mobile {
  display: none;
  margin-left: auto;
  align-items: center;
}

/* ---------- 5. 移动端底部 Tab Bar ---------- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
.bar-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  min-width: 56px;
}
.bar-tab span:last-child {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}
.bar-tab:hover { color: #0F172A; }
.bar-tab.active { color: #0F172A; }
.bar-tab.active span:last-child { font-weight: 600; }

.bar-cart-wrap { position: relative; display: inline-flex; }
.bar-cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: #0F172A;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(255,90,31,0.4);
}

/* ---------- 6. Locale Dropdown（通用） ---------- */
.locale-dd { position: relative; display: flex; align-items: center; }
.locale-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  transition: var(--transition-smooth);
  font-family: inherit;
}
.locale-toggle:hover { border-color: #FF5A1F; color: #1E293B; }
.locale-toggle .dd-arrow { transition: transform 0.2s ease; }
.locale-dd.open .locale-toggle .dd-arrow { transform: rotate(180deg); }
.locale-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  min-width: 180px;
  padding: 8px;
  z-index: 300;
}
.locale-dd.open .locale-menu { display: block; animation: fadeIn 0.15s ease; }
.locale-group { padding: 4px 0; }
.locale-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  padding: 4px 10px 6px;
}
.locale-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  color: #1E293B;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: var(--transition-smooth);
  text-decoration: none;
}
.locale-opt:hover { background: #F1F5F9; color: #FF5A1F; }
.locale-opt.active { color: #FF5A1F; }
.locale-divider { height: 1px; background: #f1f5f9; margin: 4px 0; }

/* ---------- 7. 首屏搜索舱 ---------- */
.hero {
  position: relative;
  height: 50vh;
  max-height: 460px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px 40px;
  overflow: hidden;
  margin-top: 0;
}
.hero-has-bg {
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.15) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  width: 100%;
  padding: 0 20px;
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  height: 48px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transition: var(--transition-smooth);
  padding: 0 4px 0 16px;
}
.hero-search:focus-within { box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.hero-search .search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 20px;
  flex-shrink: 0;
  color: #94a3b8;
}
.hero-search input {
  flex: 1;
  height: 100%;
  padding: 0 16px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #1E293B;
  outline: none;
}
.hero-search input::placeholder { color: #94a3b8; }
.hero-search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 24px;
  margin-right: 6px;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 21px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255,90,31,0.25);
}
.hero-search-btn:hover { background: #e04e1a; }
.hero-search-btn:active { transform: scale(0.96); }

/* ---------- 8. 分类工具栏 ---------- */
.category-tabs {
  background: transparent;
  margin: 0 auto;
  padding: 20px 4px 0;
  max-width: var(--container-max);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  text-decoration: none;
  background: transparent;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.tab-item:hover { background: #F1F5F9; color: #1E293B; }
.tab-item.active { background: #0F172A; color: #ffffff; font-weight: 600; }

/* ---------- 9. 商品网格 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 4px 40px;
  max-width: var(--container-max);
  margin: 0 auto;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 4px 48px; }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 32px 4px 60px; }
}

/* ---------- 10. 商品卡片 ---------- */
.product-card {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 3px solid transparent;
}
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
/* hover handled below */
.product-card .image-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.product-card:hover .image-container img { transform: scale(1.04); }
.product-card .image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
}
.product-card .card-body {
  padding: clamp(12px, 1.5vw, 16px);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
}
.product-card .product-title {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 700;
  color: #1E293B;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.product-card .product-desc {
  font-size: 0.8rem;
  color: #64748B;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  margin-bottom: auto;
}
.product-card .product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0;
  gap: 8px;
  margin-top: auto;
}
.product-card .product-price {
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}
.product-card .product-price .currency-symbol {
  font-size: 12px;
  font-weight: 600;
  vertical-align: super;
  margin-right: 1px;
}
.product-card .btn-add-cart {
  width: 38px;
  height: 38px;
  padding: 0;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  font-size: 0;
  line-height: 0;
  box-shadow: 0 2px 8px rgba(197,168,128,0.25);
}
.product-card .btn-add-cart:hover { background: #B09770; }
.product-card .btn-add-cart:active { transform: scale(0.92); }
.product-card .btn-add-cart svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 11. 商品详情页 ---------- */
.pd-page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px 24px;
}
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  text-decoration: none;
  margin-bottom: 28px;
  transition: all 0.3s ease;
}
.pd-back:hover {
  color: #0F172A;
  transform: translateX(-3px);
}
.pd-back svg { transition: transform 0.3s ease; }
.pd-back:hover svg { transform: translateX(-2px); }

.pd-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: start;
}

/* 左侧媒体舱 */
.pd-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.03);
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd-main-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.pd-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.5;
}
.pd-thumbs img:hover { opacity: 0.8; }
.pd-thumbs img.active {
  opacity: 1;
  border-color: #0F172A;
}

/* 右侧排版 */
.pd-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: #0F172A;
  margin-bottom: 12px;
}
.pd-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* 价格 */
.pd-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pd-price {
  font-size: 32px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}
.pd-price .currency-symbol { font-size: 18px; font-weight: 600; vertical-align: super; margin-right: 2px; }
.pd-price-orig {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
}
.pd-badge {
  background: #FEF2F2;
  color: #DC2626;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 元信息 */
.pd-meta {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pd-dot { color: #CBD5E1; font-size: 14px; }
.pd-cat-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* 数量选择器 — 胶囊 */
.pd-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.pd-label {
  font-size: 13px;
  color: #64748B;
  min-width: 28px;
}
.pd-qty-ctrl {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: 20px;
  height: 40px;
  overflow: hidden;
}
.pd-qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-qty-btn:hover { background: #E2E8F0; }
.pd-qty-val {
  width: 48px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: #0F172A;
}

/* 支付 */
.pd-pay {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.pd-pay-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pd-pay-icons img {
  height: 20px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(0.5);
  transition: opacity 0.2s ease;
  border-radius: 2px;
}
.pd-pay-icons img:hover { opacity: 0.9; }

/* CTA 双按钮 */
.pd-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.pd-btn {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}
.pd-btn:active { transform: scale(0.97); }

.pd-btn-ghost {
  background: transparent;
  border: 1px solid #C5A880;
  color: #C5A880;
}
.pd-btn-ghost:hover {
  background: rgba(197,168,128,0.08);
}

.pd-btn-solid {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
}
.pd-btn-solid:hover {
  background: #1E293B;
}

/* 详情内容 */
.pd-content {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid #E2E8F0;
}
.pd-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 20px;
}
.pd-content-body {
  font-size: 15px;
  color: #64748B;
  line-height: 1.8;
}
.pd-content-body img { max-width: 100%; border-radius: 8px; }

/* Desktop hover */
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* Mobile press */
@media (max-width: 1023px) {
  .product-card:hover { transform: none; box-shadow: none; }
  .product-card:active { transform: scale(0.97); transition: transform 0.15s ease; }
}

@media (max-width: 768px) {
  .pd-grid { grid-template-columns: 1fr; gap: 24px; }
  .pd-page { padding: 24px 16px; }
  .pd-title { font-size: 22px; }
  .pd-price { font-size: 26px; }
  .pd-thumbs img { width: 56px; height: 56px; min-width: 56px; }
  .pd-actions { position: sticky; bottom: 56px; background: #fff; padding: 12px 0; gap: 8px; z-index: 99; }
  .pd-btn { font-size: 14px; }
  .pd-content { margin-top: 32px; }
}

/* ---------- 12. Footer ---------- */
footer, .site-footer { background: #0F172A !important; }

/* ---------- 12. 动画 ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease; }

@keyframes badgePulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.badge-bounce { animation: badgePulse .4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ---------- 13. 响应式 ---------- */
/* Desktop hover */
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* Mobile press */
@media (max-width: 1023px) {
  .product-card:hover { transform: none; box-shadow: none; }
  .product-card:active { transform: scale(0.97); transition: transform 0.15s ease; }
}

@media (max-width: 768px) {
  /* 全局防溢出 */
  body { overflow-x: hidden; width: 100%; }
  html { overflow-x: hidden; width: 100%; }
  .page-content, .ac-page { max-width: 100% !important; overflow-x: hidden; }
  /* 登录/注册卡片居中 */
  .form-box { margin: 40px 16px; width: auto; }

  /* 桌面元素隐藏 / 移动元素显示 */
  .nav-desktop-right { display: none; }
  .nav-top-mobile { display: flex; }
  nav { padding: 0 16px; width: 100%; }

  /* 底部 Tab Bar 显示 */
  .mobile-bottom-bar { display: flex; }
  main { padding-bottom: 64px; }

  /* Hero 移动端 */
  .hero { height: 60vh; min-height: 360px; max-height: 460px; padding: 60px 16px 40px; }
  .hero-search { max-width: 280px; height: 42px; border-radius: 21px; padding: 0 4px 0 12px; }
  .hero-search .search-icon { padding-left: 0; }
  .hero-search .search-icon svg { width: 14px; height: 14px; }
  .hero-search input { font-size: 13px; padding: 0 8px; min-width: 0; }
  .hero-search-btn { width: 32px; height: 32px; }
  .hero-search-btn svg { width: 14px; height: 14px; }

  /* 分类标签 — 丝滑横向滚动 */
  .category-tabs { padding: 16px 16px 0; gap: 6px; }
  .tab-item { padding: 6px 14px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
  .product-grid { padding: 16px 16px 32px; gap: 12px; }
}

@media (min-width: 769px) {
  .mobile-bottom-bar { display: none !important; }
  .nav-top-mobile { display: none !important; }
}

/* ==========================================================
   SiteForge / 动效系统 — View Transitions + 微交互
   ==========================================================

/* ---------- View Transitions API（跨页面平滑过渡） ---------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.25s ease-out both vt-fade-out;
}
::view-transition-new(root) {
  animation: 0.25s ease-in both vt-fade-in;
}

@keyframes vt-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes vt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 动效 Token（CSS 变量） ---------- */
:root {
  --motion-instant:  0.1s ease;
  --motion-quick:    0.2s ease;
  --motion-normal:   0.3s ease;
  --motion-bounce:   0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-spring:   0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --color-processing: #f59e0b;
  --color-success:    #10b981;
  --color-error:      #ef4444;
}

/* ---------- 按钮加载 Spinner ---------- */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.btn-with-spinner {
  position: relative;
  transition: transform var(--motion-quick), background var(--motion-normal);
}
.btn-with-spinner:active {
  transform: scale(0.92);
}

/* ---------- 购物车图标弹跳 ---------- */
@keyframes cart-bounce {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-3px); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}
.cart-bounce {
  animation: cart-bounce 0.4s ease;
}

/* ---------- Badge 数字弹出 ---------- */
@keyframes badge-pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.badge-pop {
  animation: badge-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 页面滚动流入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Toast 加强 ---------- */
.toast {
  animation: slideInRight 0.3s ease, fadeOut 2.5s ease 2.5s forwards;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); pointer-events: none; }
}
