/* ============================================================
   依凡视觉 · 苹果风格
   白底 + 浅灰分区 + 苹果蓝点缀
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --border: #D2D2D7;
  --accent: #0071E3;
  --accent-dark: #0066CC;
  --accent-light: rgba(0, 113, 227, 0.08);
  --radius-card: 18px;
  --radius-btn: 980px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 16px 44px rgba(0, 0, 0, 0.12);
  --nav-height: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 毛玻璃导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.brand {
  font-size: 18px; font-weight: 600; letter-spacing: 0.5px;
  display: flex; align-items: baseline; gap: 8px;
}
.brand-en {
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: 14px; color: var(--text-secondary);
  padding: 6px 2px; position: relative; transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--accent); transition: right .25s;
}
.nav-link:hover::after { right: 0; }
.nav-actions { display: flex; gap: 16px; align-items: center; }
.nav-icon {
  color: var(--text-secondary); padding: 6px; border-radius: 8px;
  display: flex; align-items: center; position: relative;
  transition: color .2s, background .2s;
}
.nav-icon:hover { color: var(--text); background: rgba(0, 0, 0, 0.05); }
.cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 17px; height: 17px; border-radius: 980px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ---------- 通用容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 40px;
  text-align: center;
  background: var(--bg);
}
.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--text-secondary);
  max-width: 560px; margin: 0 auto;
}
.hero-featured {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  grid-auto-rows: 260px;
}
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius-card); cursor: pointer; }
.hero-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-card:hover img { transform: scale(1.05); }
.hero-card .hc-label {
  position: absolute; left: 16px; bottom: 16px;
  color: #fff; font-size: 15px; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.25); backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 980px;
}
.hc-1 { grid-column: span 6; }
.hc-2 { grid-column: span 3; }
.hc-3 { grid-column: span 3; }

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px;
}
.section-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.01em;
}
.section-more {
  font-size: 14px; color: var(--accent); font-weight: 500;
  display: flex; align-items: center; gap: 4px; transition: gap .2s;
}
.section-more:hover { gap: 8px; }

/* ---------- 作品网格（瀑布流） ---------- */
.work-grid {
  columns: 4; column-gap: 20px;
}
.work-card {
  break-inside: avoid; margin-bottom: 20px;
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--bg-secondary);
  position: relative; cursor: pointer;
  box-shadow: none; transition: box-shadow .35s, transform .35s;
}
.work-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.work-card img {
  width: 100%; height: auto;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-card:hover img { transform: scale(1.03); }
.work-info {
  padding: 14px 16px 16px;
  background: var(--bg);
  position: relative;
}
.work-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-tertiary);
}
.work-price { color: var(--accent); font-weight: 600; font-size: 14px; }
.work-price.free { color: var(--text-secondary); }
.work-hover-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; gap: 8px; opacity: 0; transform: translateY(-6px);
  transition: opacity .25s, transform .25s;
}
.work-card:hover .work-hover-actions { opacity: 1; transform: translateY(0); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform .15s, color .2s;
}
.icon-btn:hover { transform: scale(1.08); color: var(--accent); }
.icon-btn.liked { color: var(--accent); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; padding: 100px 0 120px; color: var(--text-tertiary);
}
.empty-state svg { margin-bottom: 20px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

/* ---------- 栏目页 ---------- */
.category-hero {
  padding-top: calc(var(--nav-height) + 90px);
  padding-bottom: 50px;
}
.category-title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.category-desc { color: var(--text-secondary); font-size: 17px; max-width: 600px; }

/* ---------- 作品详情 ---------- */
.detail-wrap { padding-top: calc(var(--nav-height) + 30px); padding-bottom: 90px; }
.detail-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px; align-items: start;
}
.detail-image {
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--bg-secondary);
  cursor: zoom-in; position: relative;
  box-shadow: var(--shadow-card);
}
.detail-image img { width: 100%; }
.detail-side { position: sticky; top: calc(var(--nav-height) + 24px); }
.detail-cat {
  font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 1px;
  margin-bottom: 12px;
}
.detail-title { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.detail-desc { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-secondary); padding: 4px 12px;
  border-radius: 980px;
}
.detail-price-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.detail-price { font-size: 34px; font-weight: 700; color: var(--accent); }
.detail-price-unit { color: var(--text-tertiary); font-size: 14px; }
.detail-stats { display: flex; gap: 24px; color: var(--text-tertiary); font-size: 13px; margin-bottom: 28px; }
.detail-stats span { display: flex; align-items: center; gap: 5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-btn); font-size: 15px; font-weight: 600;
  padding: 12px 26px; transition: all .2s; user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary { background: var(--bg-secondary); color: var(--text); }
.btn-secondary:hover { background: #E8E8ED; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-row { display: flex; gap: 12px; margin-bottom: 20px; }
.btn-row .btn { flex: 1; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; color: #fff; background: rgba(255,255,255,0.12);
  border-radius: 50%; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 2;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-info {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,0.8); font-size: 14px;
}
.lightbox-hint { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.5); font-size: 12px; letter-spacing: 1px; }

/* ---------- 相关作品 ---------- */
.related { background: var(--bg-secondary); }

/* ---------- Footer ---------- */
.footer {
  border-top: 0.5px solid var(--border);
  background: var(--bg);
  padding: 60px 0 80px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px;
}
.footer-brand { font-size: 16px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-tertiary); grid-column: 1 / -1; margin-top: 30px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .work-grid { columns: 3; }
  .detail-main { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .hero-card .hc-1 { grid-column: span 12; }
  .hc-2, .hc-3 { grid-column: span 6; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .work-grid { columns: 2; column-gap: 12px; }
  .work-card { margin-bottom: 12px; border-radius: 14px; }
  .work-info { padding: 10px 12px 12px; }
  .nav-links { display: none; }
  .nav-inner { padding: 0 16px; }
  .hero { padding-top: calc(var(--nav-height) + 50px); }
  .hero-featured { grid-auto-rows: 180px; margin-top: 40px; }
  .section-title { font-size: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-copy { margin-top: 10px; }
  .detail-wrap { padding-bottom: 60px; }
  .detail-title { font-size: 24px; }
  .detail-price { font-size: 28px; }
  .work-hover-actions { opacity: 1; transform: none; top: 8px; right: 8px; }
  .icon-btn { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
  .work-grid { columns: 2; }
  .work-title { font-size: 13px; }
  .work-meta { font-size: 11px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

/* ---------- 动效 ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: rgba(29, 29, 31, 0.92); color: #fff;
  padding: 10px 22px; border-radius: 980px; font-size: 14px;
  z-index: 2000; opacity: 0; pointer-events: none; transition: all .3s;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(0, 113, 227, 0.95); }