/* ===== 全局变量 ===== */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1d1d1d;
  --gold: #c9a961;
  --gold-light: #e8d4a2;
  --gold-dark: #a08342;
  --text: #ffffff;
  --text-soft: #b0b0b0;
  --text-mute: #666666;
  --line: #2a2a2a;
  --shadow-gold: 0 0 30px rgba(201, 169, 97, 0.15);
  --radius: 8px;
  --gradient-gold: linear-gradient(135deg, #c9a961 0%, #e8d4a2 50%, #c9a961 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 80% -10%, rgba(201, 169, 97, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 10% 120%, rgba(201, 169, 97, 0.06) 0%, transparent 30%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; cursor: pointer; font-family: inherit; }

/* ===== 顶部品牌栏 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  padding: 2px;
  background: #fff;
  box-shadow: 0 0 16px rgba(201, 169, 97, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(201, 169, 97, 0.4);
}
.brand-mark {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}
.nav-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-link {
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--gold); }

/* ===== 主页：类目图标网格 ===== */
.home-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.home-hero {
  text-align: center;
  padding: 30px 0 50px;
}
.home-hero h1 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 10px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(201, 169, 97, 0.2);
}
.home-hero .sub {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 300;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.category-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: all 0.35s ease;
  cursor: pointer;
  overflow: hidden;
}
.category-item::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid transparent;
  border-radius: 0;
  transition: all 0.35s ease;
  pointer-events: none;
}
.category-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.12) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
}
.category-item:hover {
  background: var(--bg-card-hover);
  z-index: 1;
}
.category-item:hover::after {
  border-color: rgba(201, 169, 97, 0.35);
  box-shadow: inset 0 0 30px rgba(201, 169, 97, 0.08);
}
.category-item:hover::before { opacity: 1; }
.category-item:hover .cat-icon {
  color: var(--gold);
  transform: scale(1.1);
  filter: drop-shadow(0 0 14px rgba(201, 169, 97, 0.55));
}
.category-item:active .cat-icon {
  transform: scale(1.02);
}
.cat-icon {
  width: 62%;
  max-width: 88px;
  color: var(--text-soft);
  transition: color 0.35s, transform 0.35s, filter 0.35s;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.03));
}

/* ===== 类目页 ===== */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 24px;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--line); }
.category-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 8px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.category-desc {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 36px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: pointer;
  position: relative;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  pointer-events: none;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.product-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
}
.product-card:hover::before {
  border-color: rgba(201, 169, 97, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(201, 169, 97, 0.08);
}
.product-img {
  width: 100%;
  aspect-ratio: 1;
  background: #0a0a0a;
  overflow: hidden;
  position: relative;
}
.product-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.08);
}
.product-card:hover .product-img::after {
  opacity: 0.8;
}
.product-info {
  padding: 14px 16px;
}
.product-name {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-now {
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
}
.price-old {
  color: var(--text-mute);
  font-size: 12px;
  text-decoration: line-through;
}
.product-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 3px;
  letter-spacing: 1px;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-mute);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ===== 商品详情页 ===== */
.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}
.detail-gallery {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  position: relative;
}
.detail-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  pointer-events: none;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.detail-gallery:hover::after {
  border-color: rgba(201, 169, 97, 0.35);
  box-shadow: 0 0 40px rgba(201, 169, 97, 0.1);
}
.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-info h1 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 1px;
  color: var(--gold-light);
}
.detail-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.detail-price .price-now {
  font-size: 28px;
}
.detail-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.spec-list {
  margin-bottom: 24px;
}
.spec-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.spec-name {
  width: 80px;
  color: var(--text-mute);
}
.spec-value { color: var(--text); }
.option-group {
  margin-bottom: 20px;
}
.option-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}
.buy-bar {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.btn {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  letter-spacing: 2px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-primary {
  background: var(--gradient-gold);
  color: #000;
  font-weight: 700;
  border: 1px solid transparent;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 30px rgba(201, 169, 97, 0.35), 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: rgba(201, 169, 97, 0.1);
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.15);
}

/* ===== 底部 ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px;
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  letter-spacing: 1px;
  background: linear-gradient(to bottom, rgba(201, 169, 97, 0.03) 0%, transparent 60%);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 14px 16px; }
  .brand { font-size: 16px; letter-spacing: 1px; }
  .home-hero h1 { font-size: 22px; letter-spacing: 6px; }
  .home-main { padding: 24px 16px 50px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .page-main { padding: 20px 16px 60px; }
  .category-title { font-size: 24px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 10px 12px; }
  .detail-info h1 { font-size: 20px; }
}

/* ===== 加载状态 ===== */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
