/* ============================================================
   Product Detail — macwk-style layout
   Hero: Left(icon+name+buttons+tags) | Right(big mockup)
   Below: horizontal info bar
   ============================================================ */

/* ---- Container ---- */
.pd-container {
  max-width: 1140px; margin: 0 auto; padding: 36px 32px 72px;
}

/* ---- Breadcrumb ---- */
.pd-breadcrumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.pd-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--accent); }
.pd-breadcrumb .sep { margin: 0 10px; color: var(--rule-2); }
.pd-breadcrumb .here { color: var(--accent); }

/* ====== SHARED CARD ====== */
.pd-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 36px;
  margin-bottom: 20px;
}

/* Hero 区域：无边框，直接铺在页面背景上（macwk 风格） */
.pd-hero.pd-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 48px 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

/* ====== 背景装饰动画 · snow-dot 脉冲点阵（macwk 风格）====== */
.pd-bg-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.pd-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  transform-origin: center center;
}
/* 7 个不同大小、位置、动画节奏的点 */
.pd-dot:nth-child(1) {
  width: 10px; height: 10px;
  left: 6%; top: 15%;
  animation: pd-pulse 3s ease-in-out .0s infinite alternate;
}
.pd-dot:nth-child(2) {
  width: 6px; height: 6px;
  left: 28%; top: 8%;
  animation: pd-pulse 2.5s ease-in-out .3s infinite alternate;
}
.pd-dot:nth-child(3) {
  width: 8px; height: 8px;
  left: 52%; top: 20px;
  animation: pd-pulse 3.2s ease-in-out .6s infinite alternate;
}
.pd-dot:nth-child(4) {
  width: 14px; height: 14px;
  left: 72%; top: 12%;
  animation: pd-pulse 2.8s ease-in-out .2s infinite alternate;
}
.pd-dot:nth-child(5) {
  width: 7px; height: 7px;
  left: 88%; top: 35%;
  animation: pd-pulse 3.5s ease-in-out .8s infinite alternate;
}
.pd-dot:nth-child(6) {
  width: 9px; height: 9px;
  left: 15%; bottom: 20%;
  animation: pd-pulse 2.6s ease-in-out .5s infinite alternate;
}
.pd-dot:nth-child(7) {
  width: 11px; height: 11px;
  left: 45%; bottom: 10%;
  animation: pd-pulse 3s ease-in-out .4s infinite alternate;
}

@keyframes pd-pulse {
  0% { transform: scale(1); opacity: .12; }
  50% { transform: scale(1.8); opacity: .28; }
  100% { transform: scale(1); opacity: .12; }
}

/* 暗色模式下点阵更亮 */
[data-theme="dark"] .pd-dot {
  opacity: .22;
}

/* ====== 几何装饰元素（macwk 风格：三角、线条、方框）====== */
.pd-shape {
  position: absolute;
  pointer-events: none;
}
/* ---- 三角形（旋转的边框方块）---- */
.pd-shape.tri-1 {
  width: 36px; height: 36px;
  left: 2%; bottom: 25%;
  border-left: 2px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-bottom: 2px solid color-mix(in oklab, var(--accent) 30%, transparent);
  transform: rotate(-12deg);
  animation: pd-float 4s ease-in-out infinite alternate;
}
.pd-shape.tri-2 {
  width: 28px; height: 28px;
  right: 4%; top: 18%;
  border-right: 1.5px solid color-mix(in oklab, var(--accent) 22%, transparent);
  border-top: 1.5px solid color-mix(in oklab, var(--accent) 22%, transparent);
  transform: rotate(20deg);
  animation: pd-float 3.5s ease-in-out .8s infinite alternate;
}
/* ---- 线条 ---- */
.pd-shape.line-1 {
  width: 40px; height: 1.5px;
  left: 10%; top: 55%;
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 18%, transparent), transparent);
  transform: rotate(35deg);
  animation: pd-fade-line 5s ease-in-out infinite alternate;
}
.pd-shape.line-2 {
  width: 32px; height: 1.5px;
  left: 22%; bottom: 15%;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 16%, transparent));
  transform: rotate(-25deg);
  animation: pd-fade-line 4s ease-in-out 1s infinite alternate;
}
/* ---- 方框轮廓 ---- */
.pd-shape.box-1 {
  right: 6%; bottom: 28%;
  width: 48px; height: 48px;
  border: 1.5px solid color-mix(in oklab, var(--accent) 14%, transparent);
  border-radius: 4px;
  transform: rotate(5deg);
  animation: pd-spin-slow 8s linear infinite;
}

/* ---- 几何动画 keyframes ---- */
@keyframes pd-float {
  0% { opacity: .4; transform: translateY(0) rotate(var(--pd-rot, -12deg)); }
  100% { opacity: .7; transform: translateY(-10px) rotate(calc(var(--pd-rot, -12deg) + 4deg)); }
}
.pd-shape.tri-1 { --pd-rot: -12deg; }
.pd-shape.tri-2 { --pd-rot: 20deg; }

@keyframes pd-fade-line {
  0% { opacity: .15; transform: translateX(0) scale(1); }
  100% { opacity: .45; transform: translateX(4px) scale(1.05); }
}

@keyframes pd-spin-slow {
  0% { transform: rotate(5deg) scale(1); opacity: .25; }
  50% { transform: rotate(9deg) scale(1.03); opacity: .4; }
  100% { transform: rotate(5deg) scale(1); opacity: .25; }
}

/* ---- 右侧大装饰渐变块（macwk 右侧大三角区域）---- */
.pd-bg-blob {
  position: absolute;
  right: -40px;
  top: -10%;
  width: 380px;
  height: 420px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      ellipse at 30% 30%,
      color-mix(in oklab, var(--accent) 10%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(
      135deg,
      transparent 35%,
      color-mix(in oklab, var(--accent) 6%, transparent) 45%,
      transparent 55%
    );
  clip-path: polygon(0 20%, 70% 0, 100% 25%, 85% 100%, 15% 95%);
  animation: pd-blob-breathe 7s ease-in-out infinite alternate;
}

@keyframes pd-blob-breathe {
  0% { opacity: .4; transform: translateX(0) scale(1); }
  100% { opacity: .65; transform: translateX(-12px) scale(1.04); }
}

/* ============================================================
   HERO — 核心区域 (macwk 风格)
   左侧：App 图标 + 名称 + 副标题 + 按钮 + 标签
   右侧：大尺寸截图/mockup
   ============================================================ */
.pd-hero {
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

/* 左侧信息区 */
.pd-hero-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* App 图标 (macwk: 圆角方形，带品牌色) */
.pd-app-icon {
  width: 76px; height: 76px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  flex-shrink: 0;
  font-variation-settings: 'opsz' 144;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent);
  overflow: hidden;
}
/* 图片模式 */
.pd-app-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* 产品名称 */
.pd-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", var(--sans);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 4px 0 0;
  color: var(--ink);
}

/* 副标题 / 描述 */
.pd-subtitle {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

/* 操作按钮行 (macwk: 主按钮+次要按钮) */
.pd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  font-family: inherit;
  border: none;
  position: relative;
  overflow: hidden;
}
.pd-btn-label {
  position: relative;
  z-index: 1;
}
.pd-btn-arrow {
  display: inline-flex;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  font-size: 16px;
  line-height: 1;
}
/* 悬停：箭头右移 */
.pd-btn:hover .pd-btn-arrow {
  transform: translateX(3px);
}
.pd-btn.primary {
  background: var(--accent);
  color: #fff;
}
.pd-btn.primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.pd-btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-2);
}
.pd-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-soft);
}

/* 标签行 */
.pd-meta-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pd-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 5px;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
}

/* ============================================================
   MACBOOK MOCKUP — 纯 CSS 笔记本框架 (macwk 风格)
   结构：外框 .pd-mockup > 屏幕区 .pd-mockup-screen > 底座 .pd-base
   ============================================================ */
.pd-hero-right {
  width: 480px;
  flex-shrink: 0;
  perspective: 1000px;
  position: relative;
  z-index: 1;
}
.pd-mockup {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* ---- 屏幕（上盖）---- */
.pd-mockup-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
  border-radius: 12px 12px 0 0;
  padding: 7px;
  /* 单层边框，确保和底座精确等宽对齐 */
  border: 4px solid var(--pd-frame-color, #c5c5c5);
  box-shadow: 0 20px 50px -8px rgba(0,0,0,.35);
  overflow: hidden;
}
/* 屏幕内内容区 */
.pd-mockup-screen::after {
  content: '';
  position: absolute; inset: 8px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, color-mix(in oklab, var(--accent) calc(var(--mockup-mix, 18) * 1%), transparent), transparent 70%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px),
    var(--bg-2);
  border-radius: 3px;
}
.pd-mockup-screen .glyph {
  position: absolute;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 80px;
  color: var(--accent);
  opacity: .3;
  font-variation-settings: 'opsz' 144;
  z-index: 1;
}
/* 摄像头孔 */
.pd-mockup-screen .cam {
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #333;
  z-index: 2;
}
/* Notch (现代 MBP 风格) */
.pd-mockup-screen .notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 18px;
  background: #1a1a1a;
  border-radius: 0 0 10px 10px;
  z-index: 2;
}
/* ---- 底座（键盘区）---- */
.pd-base {
  position: relative;
  width: 100%;
  height: 14px;
  background: var(--pd-base-bg, linear-gradient(180deg, #d4d4d4, #bcbcbc));
  /* 和屏幕边框同宽，确保左右对齐 */
  border: 4px solid var(--pd-frame-color, #c5c5c5);
  border-top: none;  /* 上沿紧贴屏幕，不需要上边框 */
  border-radius: 0 0 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* 键盘纹理 */
.pd-base::before {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 24px;
  right: 24px;
  background: #e0e0e0;
  border-radius: 1px;
  opacity: .5;
}
/* 触控板 */
.pd-base::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 7px;
  background: linear-gradient(180deg, #ccc, #bbb);
  border-radius: 3px;
}
/* 底部品牌文字 */
.pd-base .brand {
  position: relative;
  font-family: var(--mono), -apple-system, sans-serif;
  font-size: 6.5px;
  letter-spacing: .08em;
  color: #999;
  z-index: 1;
}

/* ---- 暗色模式底座适配 ---- */
[data-theme="dark"] .pd-base {
  --pd-base-bg: linear-gradient(180deg, #383838, #282828);
}
[data-theme="dark"] .pd-base::before {
  background: #444;
  opacity: .3;
}
[data-theme="dark"] .pd-base::after {
  background: linear-gradient(180deg, #383838, #333);
}
[data-theme="dark"] .pd-base .brand {
  color: #666;
}

/* ---- 暗色模式：笔记本整体适配 ---- */
[data-theme="dark"] .pd-mockup-screen {
  --pd-frame-color: #3a3a3a;
  box-shadow: 0 20px 50px -8px rgba(0,0,0,.5);
}
[data-theme="dark"] .pd-mockup-screen .cam { background: #555; }
[data-theme="dark"] .pd-mockup-screen .notch { background: #1a1a1a; }
/* 屏幕内内容暗色 */
[data-theme="dark"] .pd-mockup-screen::after {
  opacity: .7;
}

/* ============================================================
   INFO BAR — 横向多列 (macwk 风格)
   大小 · 下载 · 语言 · 兼容性 · 类别 · 更新日期
   ============================================================ */
.pd-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  overflow: hidden;
  min-height: 151px;
  align-items: center;
}
.pd-info-bar.pd-card {
  border-radius: 10px;
  padding: 36px;
}
.pd-info-col {
  padding: 18px 16px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pd-info-col:last-child { border-right: 0; }
.pd-info-col .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pd-info-col .val {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.pd-info-col .sub {
  font-size: 12px;
  color: var(--muted);
}
.pd-info-col a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}
.pd-info-col a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .pd-info-bar { grid-template-columns: repeat(2, 1fr); }
  .pd-info-col:nth-child(odd) { border-right: 1px solid var(--rule); }
  .pd-info-col:nth-child(even) { border-right: 0; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.pd-sec-title {
  font-family: -apple-system, "SF Pro Display", var(--sans);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  color: var(--ink);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.pd-section-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}
.pd-section-body strong { color: var(--ink); font-weight: 600; }

.pd-overview {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-2);
  margin: 0;
}

/* ====== FEATURES ====== */
.pd-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pd-feature {
  background: var(--bg);
  border-radius: 8px;
  padding: 22px 18px;
  border: 1px solid var(--rule);
}
.pd-feature .num {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 10px;
  font-variation-settings: 'opsz' 144;
  opacity: .7;
}
.pd-feature .name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  margin: 0 0 6px;
}
.pd-feature .desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 700px) { .pd-features { grid-template-columns: 1fr; } }

/* ====== GALLERY ====== */
.pd-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pd-gi {
  background: var(--bg-2);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/10;
  position: relative;
  border: 1px solid var(--rule);
}
.pd-gi::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 40%, color-mix(in oklab, var(--accent) calc(var(--gi-mix, 15) * 1%), transparent), transparent 70%),
    repeating-linear-gradient(45deg, transparent 0 14px, var(--rule) 14px 15px);
}
.pd-gi .glyph {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 56px; color: var(--accent); opacity: .45;
  font-variation-settings: 'opsz' 144;
}
.pd-gi .cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px; font-size: 12px; color: var(--ink-2);
  background: linear-gradient(to top, color-mix(in oklab, var(--bg) 92%, transparent), transparent);
  display: flex; justify-content: space-between;
}
@media (max-width: 500px) { .pd-gallery { grid-template-columns: 1fr; } }

/* ====== METRICS ROW ====== */
.pd-metrics-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px; background: var(--rule); border-radius: 8px; overflow: hidden;
  margin-bottom: 20px;
}
.pd-metric {
  background: var(--bg);
  padding: 20px 16px; text-align: center;
}
.pd-metric .v {
  font-family: var(--display);
  font-size: 28px; font-weight: 400;
  color: var(--accent); line-height: 1;
  font-variation-settings: 'opsz' 144;
}
.pd-metric .unit {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-left: 4px;
}
.pd-metric .k {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-top: 8px;
}
@media (max-width: 600px) {
  .pd-metrics-row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
}

/* ====== CHANGELOG ====== */
.pd-changelog { position: relative; padding-left: 24px; }
.pd-changelog::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 1px; background: var(--rule);
}
.pd-ch { padding: 14px 0; position: relative; }
.pd-ch:first-child { padding-top: 0; }
.pd-ch::before {
  content: ''; position: absolute; left: -21px; top: 20px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.pd-ch-date {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  color: var(--accent); margin-bottom: 4px;
}
.pd-ch-text { font-size: 14px; color: var(--ink); line-height: 1.55; }

/* ====== TESTIMONIAL ====== */
.pd-testimonial {
  padding: 18px 22px; background: var(--bg); border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.pd-testimonial blockquote {
  font-size: 15px; color: var(--ink); line-height: 1.65; margin: 0;
}
.pd-testimonial cite {
  display: block; margin-top: 10px; font-size: 12px; color: var(--muted);
  font-style: normal; font-family: var(--mono); letter-spacing: .04em;
}

/* ====== TECH CHIPS ====== */
.pd-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tech .chip {
  font-family: var(--mono); font-size: 12px;
  padding: 5px 14px; border-radius: 5px;
  background: var(--bg-2); color: var(--ink-2);
  border: 1px solid var(--rule);
}

/* ====== RELATED ====== */
.pd-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.pd-rel-item {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; padding: 20px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s;
}
.pd-rel-item:hover { border-color: var(--accent); }
.pd-rel-item .name {
  font-family: -apple-system, "SF Pro Display", var(--sans);
  font-weight: 600; font-size: 17px;
  letter-spacing: -.01em; color: var(--accent);
}
.pd-rel-item .sub {
  font-size: 13px; color: var(--ink-2); line-height: 1.5; flex: 1;
}
.pd-rel-item .meta {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: .04em; display: flex; justify-content: space-between;
  padding-top: 10px; border-top: 1px dashed var(--rule);
}

/* ====== NOT FOUND ====== */
.pd-notfound { text-align: center; padding: 80px 32px; }
.pd-notfound h2 {
  font-family: var(--display); font-style: italic; font-size: 72px;
  color: var(--accent); margin: 0 0 8px; font-variation-settings: 'opsz' 144;
}
.pd-notfound p { color: var(--ink-2); margin-bottom: 20px; }
.pd-notfound a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 3px;
}

/* ====== RESPONSIVE HERO ====== */
@media (max-width: 800px) {
  .pd-hero {
    flex-direction: column;
    gap: 28px;
    padding: 24px 0;
  }
  .pd-hero.pd-card { padding: 32px 0 16px; }
  .pd-hero-right {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .pd-container { padding: 24px 16px 60px; }
  .pd-card { padding: 24px; border-radius: 8px; }
  .pd-app-icon { width: 64px; height: 64px; font-size: 30px; border-radius: 14px; }
  .pd-title { font-size: 22px; }
  .pd-actions { flex-direction: column; }
  .pd-btn { justify-content: center; }
  .pd-hero-right { max-width: 100%; }
}
