/* === Reset / 盒模型基线 === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; border: none; outline: none; }
select { font: inherit; }

/* === 排版基线 === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === 语义变量 :root === */
:root {
  --canvas: #ebeae6;
  --surface: rgba(255,255,255,0.7);
  --surface-solid: #f8f7f5;
  --surface-elevated: #ffffff;
  --surface-hover: rgba(106,127,120,0.06);
  --brand: #6a7f78;
  --brand-soft: rgba(106,127,120,0.12);
  --brand-light: rgba(106,127,120,0.06);
  --accent: #6a7f78;
  --text-primary: #262422;
  --text-secondary: #7a7672;
  --text-tertiary: #a8a49e;
  --border: rgba(0,0,0,0.05);
  --max: 1200px;
  --gutter: 24px;
  --nav-height: 60px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.08);
  --transition: 240ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* === 自定义滚动条 === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.14); }
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.08) transparent; }

/* === 导航 === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  background: rgba(235,234,230,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  display: flex; align-items: center;
  width: 100%; max-width: var(--max); margin: 0 auto;
  gap: 32px;
}
.nav-logo {
  font-size: 17px; font-weight: 600;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary);
}
.nav-logo-icon {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
}
.nav-links {
  display: flex; gap: 28px;
}
.nav-link {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--brand); border-radius: 1px;
}
.nav-search {
  margin-left: auto;
  position: relative;
}
.nav-search-input {
  width: 200px; height: 36px;
  padding: 0 12px 0 36px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  transition: background var(--transition), box-shadow var(--transition);
}
.nav-search-input::placeholder { color: var(--text-tertiary); }
.nav-search-input:focus { background: rgba(0,0,0,0.06); box-shadow: 0 0 0 1px var(--brand); }
.nav-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); pointer-events: none;
}
.nav-search-dropdown {
  position: absolute; top: 44px; left: 0; right: 0;
  background: var(--surface-elevated);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0; transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.nav-search-dropdown.open {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--surface-hover); }
.search-result-img {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-price { font-size: 12px; color: var(--brand); font-weight: 600; }
.nav-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: 16px;
}
.nav-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}
.nav-icon-btn:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.nav-icon-btn svg { width: 20px; height: 20px; }
.cart-badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px;
  background: var(--brand); color: #fff;
  border-radius: 50%;
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  transform: translate(4px, -4px);
  transition: transform var(--transition);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--text-primary); }
  .nav-icon-btn:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
  .search-result-item:hover { background: var(--surface-hover); }
}

/* === 主体布局 === */
.main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

/* === Hero / 首要区域 === */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px var(--gutter) 48px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-left: auto;
  margin-right: auto;
  min-height: 380px;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  object-fit: cover; width: 100%; height: 100%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(38,36,34,0.7) 0%, rgba(38,36,34,0.2) 70%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding: 48px 40px;
  max-width: 520px;
}
.hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}
.hero-title {
  font-size: 20px; font-weight: 700;
  line-height: 1.25; margin-bottom: 10px;
  color: #fff;
  letter-spacing: -0.3px;
}
.hero-desc {
  font-size: 14px; color: rgba(255,255,255,0.7);
  line-height: 1.6; margin-bottom: 24px;
}
.hero-actions { display: flex; gap: 12px; }
.hero .btn-primary { background: #fff; color: var(--text-primary); }
.hero .btn-primary:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.hero .btn-secondary { background: rgba(255,255,255,0.12); color: #fff; }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

@media (hover: hover) and (pointer: fine) {
  .hero .btn-primary:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  .hero .btn-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
}

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 24px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover {
  background: #5a726a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(106,127,120,0.25);
}
.btn-secondary {
  background: rgba(0,0,0,0.04); color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.btn-sm {
  height: 32px; padding: 0 16px; font-size: 12px;
}
.btn-outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  color: var(--text-primary);
}
.btn-outline:hover {
  box-shadow: inset 0 0 0 1px var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.btn-text {
  height: auto; padding: 0;
  background: none; color: var(--text-secondary);
  font-weight: 500;
}
.btn-text:hover { color: var(--brand); }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #5a726a; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(106,127,120,0.25); }
  .btn-secondary:hover { background: rgba(0,0,0,0.08); transform: translateY(-1px); }
  .btn-outline:hover { box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); transform: translateY(-1px); }
  .btn-text:hover { color: var(--brand); }
}

/* === 区段 === */
.section {
  margin-bottom: 56px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}
.section-link {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition);
}
.section-link:hover { color: var(--brand); }

@media (hover: hover) and (pointer: fine) {
  .section-link:hover { color: var(--brand); }
}

/* === 分类网格 === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.category-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all var(--transition);
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.category-card:hover img { transform: scale(1.05); }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(38,36,34,0.5) 0%, transparent 60%);
}
.category-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
  color: #fff;
}
.category-card-name {
  font-size: 14px; font-weight: 600;
  margin-bottom: 2px;
}
.category-card-count {
  font-size: 11px; opacity: 0.7;
}

@media (hover: hover) and (pointer: fine) {
  .category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .category-card:hover img { transform: scale(1.05); }
}

/* === 产品卡片 === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-card-img-wrap {
  position: relative;
  padding-top: 120%;
  overflow: hidden;
  background: var(--surface-solid);
}
.product-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.product-card:hover .product-card-img { transform: scale(1.04); }
.product-card-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 600;
  background: var(--brand);
  color: #fff;
  letter-spacing: 0.3px;
}
.product-card-actions {
  position: absolute; bottom: 10px; right: 10px;
  opacity: 0; transform: translateY(6px);
  transition: all var(--transition);
}
.product-card:hover .product-card-actions {
  opacity: 1; transform: translateY(0);
}
.product-card-add {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.product-card-add:hover { background: var(--brand); color: #fff; }
.product-card-add svg { width: 18px; height: 18px; }
.product-card-body {
  padding: 14px;
}
.product-card-category {
  font-size: 10px; font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.product-card-name {
  font-size: 14px; font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card-price-row {
  display: flex; align-items: center; gap: 8px;
}
.product-card-price {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
}
.product-card-price-original {
  font-size: 12px; color: var(--text-tertiary);
  text-decoration: line-through;
}
.product-card-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-secondary);
  margin-top: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .product-card:hover .product-card-img { transform: scale(1.04); }
  .product-card:hover .product-card-actions { opacity: 1; transform: translateY(0); }
  .product-card-add:hover { background: var(--brand); color: #fff; }
}

/* === 横向滚动 === */
.h-scroll {
  display: flex; gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.h-scroll::-webkit-scrollbar { height: 3px; }
.h-scroll > * {
  flex-shrink: 0;
  scroll-snap-align: start;
}
.h-scroll .product-card { width: 240px; }

/* === 特色区（用背景色差分区） === */
.section-featured {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 56px;
}
.section-featured .product-grid { grid-template-columns: repeat(3, 1fr); }

/* === 页脚 === */
.footer {
  border-top: none;
  padding: 48px var(--gutter) 32px;
  margin-top: 48px;
  background: var(--surface);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-name {
  font-size: 16px; font-weight: 600;
  margin-bottom: 8px;
}
.footer-brand-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; max-width: 280px;
}
.footer-col-title {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link {
  font-size: 13px; color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: var(--max);
  margin: 32px auto 0;
  padding-top: 20px;
  text-align: center;
  font-size: 12px; color: var(--text-tertiary);
}

@media (hover: hover) and (pointer: fine) {
  .footer-link:hover { color: var(--text-primary); }
}

/* === 商品列表页 === */
.page-header {
  padding: 32px 0 24px;
}
.page-header h1 {
  font-size: 20px; font-weight: 700;
  margin-bottom: 4px;
}
.page-header p {
  font-size: 14px; color: var(--text-secondary);
}
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-tag {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  background: rgba(0,0,0,0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tag:hover { background: var(--brand-soft); color: var(--brand); }
.filter-tag.active { background: var(--brand); color: #fff; }
.filter-tag.active:hover { background: #5a726a; }
.filter-sort {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.filter-sort label { font-size: 12px; color: var(--text-secondary); }
.filter-sort select {
  height: 32px; padding: 0 32px 0 12px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-sort select:focus { box-shadow: 0 0 0 1px var(--brand); }

/* === 商品详情页 === */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-top: 32px;
}
.product-detail-gallery {
  position: relative;
}
.product-detail-main-img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-solid);
}
.product-detail-thumbs {
  display: flex; gap: 8px; margin-top: 12px;
}
.product-detail-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.5;
}
.product-detail-thumb:hover { opacity: 0.8; }
.product-detail-thumb.active { opacity: 1; box-shadow: 0 0 0 2px var(--brand); }
.product-detail-info { padding-top: 8px; }
.product-detail-category {
  font-size: 10px; font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.product-detail-name {
  font-size: 20px; font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.product-detail-rating {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
  font-size: 13px; color: var(--text-secondary);
}
.product-detail-price-row {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 24px;
}
.product-detail-price {
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
}
.product-detail-price-original {
  font-size: 14px; color: var(--text-tertiary);
  text-decoration: line-through;
}
.product-detail-desc {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 480px;
}
.product-detail-specs {
  margin-bottom: 28px;
}
.spec-row {
  display: flex; padding: 8px 0;
  border-bottom: none;
  font-size: 13px;
}
.spec-label {
  width: 80px; color: var(--text-tertiary);
  flex-shrink: 0;
}
.spec-value { color: var(--text-primary); }
.product-detail-qty {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.qty-label { font-size: 13px; color: var(--text-secondary); }
.qty-controls {
  display: flex; align-items: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
  font-size: 16px;
  transition: background var(--transition);
}
.qty-btn:hover { background: rgba(0,0,0,0.08); }
.qty-value {
  width: 48px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  background: rgba(0,0,0,0.02);
}
.product-detail-actions {
  display: flex; gap: 12px;
}
.product-detail-actions .btn { height: 44px; padding: 0 32px; }

/* === 购物车页 === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding-top: 32px;
}
.cart-items { }
.cart-item {
  display: flex; gap: 16px;
  padding: 20px 0;
}
.cart-item + .cart-item { border-top: none; }
.cart-item-img {
  width: 100px; height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-solid);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 15px; font-weight: 500;
  margin-bottom: 4px;
}
.cart-item-spec {
  font-size: 12px; color: var(--text-tertiary);
  margin-bottom: 12px;
}
.cart-item-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.cart-item-qty {
  display: flex; align-items: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cart-item-qty .qty-btn { width: 30px; height: 30px; font-size: 14px; }
.cart-item-qty .qty-value { width: 36px; height: 30px; font-size: 13px; }
.cart-item-price {
  font-size: 15px; font-weight: 600;
}
.cart-item-remove {
  font-size: 12px; color: var(--text-tertiary);
  cursor: pointer; transition: color var(--transition);
}
.cart-item-remove:hover { color: #c0392b; }
.cart-sidebar {
  position: sticky; top: calc(var(--nav-height) + 24px);
  align-self: start;
}
.cart-summary {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
}
.cart-summary-title {
  font-size: 16px; font-weight: 600;
  margin-bottom: 20px;
}
.cart-summary-row {
  display: flex; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}
.cart-summary-row.total {
  font-size: 16px; font-weight: 700;
  margin-top: 16px; padding-top: 16px;
  border-top: none;
}
.cart-summary-row .label { color: var(--text-secondary); }
.cart-summary-row .value { color: var(--text-primary); }
.cart-summary-row.total .value { color: var(--text-primary); }
.checkout-btn {
  width: 100%; height: 44px;
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center;
}
.cart-empty {
  text-align: center;
  padding: 80px 0;
}
.cart-empty svg {
  width: 56px; height: 56px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.cart-empty h2 {
  font-size: 18px; font-weight: 600;
  margin-bottom: 8px;
}
.cart-empty p {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 24px;
}

/* === 订单结算页 === */
.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding-top: 32px;
}
.order-section {
  margin-bottom: 32px;
}
.order-section-title {
  font-size: 16px; font-weight: 600;
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group.half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-label {
  display: block;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%; height: 42px;
  padding: 0 14px;
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  transition: background var(--transition), box-shadow var(--transition);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-input:focus { background: rgba(0,0,0,0.05); box-shadow: 0 0 0 1px var(--brand); }
.form-textarea {
  width: 100%; height: 80px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px; resize: vertical;
  transition: background var(--transition), box-shadow var(--transition);
}
.form-textarea::placeholder { color: var(--text-tertiary); }
.form-textarea:focus { background: rgba(0,0,0,0.05); box-shadow: 0 0 0 1px var(--brand); }
.payment-options {
  display: flex; flex-direction: column; gap: 10px;
}
.payment-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.payment-option:hover { background: var(--brand-light); }
.payment-option input[type="radio"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--text-tertiary);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition);
  position: relative;
}
.payment-option input[type="radio"]:checked {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 4px #fff;
}
.payment-option-name { font-size: 14px; font-weight: 500; }
.payment-option-desc { font-size: 12px; color: var(--text-secondary); }
.order-summary-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky; top: calc(var(--nav-height) + 24px);
}
.order-summary-card .order-section-title { margin-bottom: 16px; }
.order-summary-item {
  display: flex; gap: 12px;
  padding: 10px 0;
}
.order-summary-item + .order-summary-item { border-top: none; }
.order-summary-item-img {
  width: 56px; height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-solid);
}
.order-summary-item-info { flex: 1; min-width: 0; }
.order-summary-item-name {
  font-size: 13px; font-weight: 500;
  margin-bottom: 2px;
}
.order-summary-item-meta {
  font-size: 11px; color: var(--text-tertiary);
}
.order-summary-item-price {
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
}
.order-total-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}
.order-total-row .label { color: var(--text-secondary); }
.order-total-row.grand-total {
  font-size: 16px; font-weight: 700;
  padding-top: 16px;
  margin-top: 8px;
  border-top: none;
}
.place-order-btn {
  width: 100%; height: 44px;
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center;
}

/* === Toast === */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  opacity: 0; transform: translateX(-50%) translateY(12px);
  pointer-events: none;
  transition: all var(--transition);
  white-space: nowrap;
  z-index: 300;
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* === 缺省状态 === */
.skeleton {
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm);
  animation: pulse 1.5s ease-in-out infinite;
}
.skeleton-card {
  width: 100%; aspect-ratio: 0.83;
  border-radius: var(--radius-md);
}
.skeleton-line {
  height: 12px; margin-bottom: 8px;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* === Modal === */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%; max-width: 480px;
  max-height: 80vh; overflow-y: auto;
  opacity: 0; transform: scale(0.96) translateY(8px);
  transition: all var(--transition);
}
.modal-overlay.open .modal {
  opacity: 1; transform: scale(1) translateY(0);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.modal-body { padding: 0 24px 24px; }
.modal-success {
  text-align: center;
  padding: 32px 0;
}
.modal-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--brand);
}
.modal-success-icon svg { width: 28px; height: 28px; }
.modal-success h3 {
  font-size: 18px; font-weight: 600;
  margin-bottom: 6px;
}
.modal-success p {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 24px;
}

@media (hover: hover) and (pointer: fine) {
  .modal-close:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
}

/* === 响应式 === */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .section-featured .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-sidebar { position: static; }
  .order-layout { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }

  .nav-links { display: none; }
  .nav-search-input { width: 140px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section-featured .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .h-scroll .product-card { width: 200px; }

  .hero { min-height: 280px; border-radius: var(--radius-md); margin: 16px var(--gutter) 32px; }
  .hero-content { padding: 32px 24px; max-width: 100%; }
  .hero-overlay { background: linear-gradient(to top, rgba(38,36,34,0.7) 0%, transparent 80%); }
  .hero-title { font-size: 18px; }

  .product-detail { grid-template-columns: 1fr; gap: 24px; }

  .filter-bar { gap: 6px; }
  .filter-sort { margin-left: 0; width: 100%; margin-top: 8px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }

  .section-title { font-size: 16px; }
  .section-featured { padding: 20px; }
  .page-header { padding: 24px 0 16px; }
  .page-header h1 { font-size: 18px; }

  .product-detail-thumb { width: 56px; height: 56px; }
  .order-layout { gap: 24px; }
  .form-group.half { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nav-search-input { width: 100px; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-content { padding: 24px 20px; }
  .product-card-body { padding: 10px; }
  .product-card-name { font-size: 13px; }
  .product-card-price { font-size: 14px; }
}

/* === 动效降级 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
