/* ETSPIL · 单图案页（PDP）共用样式
   由 _tools/14_build_pattern_pages.py 生成，勿手改。 */

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 6px 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.crumb a:hover { color: var(--gold-deep); }
.crumb span.sep { opacity: 0.45; }

.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  /* 两栏等高：图纸多高，右边的文案卡就多高 */
  align-items: stretch;
  padding-top: 20px;
}

.pdp-figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.pdp-figure img {
  border-radius: 20px;
  border: 1px solid var(--line);
  max-height: min(56vh, 560px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}
.pdp-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
}
.pdp-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--brand-taupe);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pdp-tag.free {
  background: var(--plum);
  border-color: var(--plum);
  color: #fff;
}

.pdp-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 38px 38px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(250, 241, 225, 0.98), rgba(242, 228, 202, 0.96));
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}
.pdp-copy h1 {
  margin: 10px 0 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #5d4438;
}
.pdp-lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
  max-width: 56ch;
}

.pdp-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.pdp-specs li {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--brand-taupe);
  font-size: 0.8rem;
  font-weight: 600;
}

.pdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.pdp-actions .button { min-height: 56px; }
.pdp-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---- 视频 + 针法表 ---- */
.pdp-stitch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 30px;
  align-items: start;
  margin-top: 28px;
}
.pdp-stitch-layout h3 {
  margin: 22px 0 0;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pdp-stitch-layout h3:first-child { margin-top: 0; }

.pdp-video {
  position: relative;
  display: block;
  width: 100%;
  /* 16:9 由容器锁定；img 的 height 属性会让图片变形，必须显式覆盖 */
  aspect-ratio: 16 / 9;
  margin: 10px 0 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: #2b211c;
  box-shadow: var(--shadow);
}
.pdp-video img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pdp-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.pdp-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: background 200ms ease;
}
.pdp-video-play::before {
  content: "";
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.pdp-video-play::after {
  content: "";
  position: absolute;
  margin-left: 6px;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--plum);
}
.pdp-video:hover .pdp-video-play { background: rgba(0, 0, 0, 0.12); }
.pdp-video-meta {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(43, 33, 28, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.pdp-video-title {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.pdp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.pdp-chips li {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--brand-taupe);
  font-size: 0.78rem;
  font-weight: 600;
}

.stitch-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.stitch-table th,
.stitch-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.stitch-table th {
  color: var(--plum);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stitch-table td:first-child { width: 92px; }
.stitch-table a {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--brand-taupe);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.stitch-table a:hover { background: var(--gold); color: #fff; }
.stitch-table tr:last-child td { border-bottom: none; }

/* ---- 文件里有什么 ---- */
.inside-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.inside-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(248, 234, 205, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}
.inside-card h3 { margin: 0 0 8px; font-size: 1.02rem; color: #6a5346; }
.inside-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

/* ---- 下一步 ---- */
.pdp-next {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 34px 38px;
  margin-top: 8px;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, rgba(131, 85, 126, 0.1), rgba(221, 179, 93, 0.16));
  border: 1px solid var(--line);
}
.pdp-next h2 {
  margin: 0 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  color: #5d4438;
}
.pdp-next p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.pdp-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.site-footer {
  margin-top: 56px;
  padding: 30px 6px 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.site-footer a:hover { color: var(--gold-deep); }

@media (max-width: 980px) {
  .pdp-hero { grid-template-columns: 1fr; }
  /* 手机首屏不能让图纸占满整屏，否则下载按钮掉到折叠线以下 */
  .pdp-figure img { max-height: 40vh; }
  .pdp-copy { padding: 26px 22px 30px; }
  /* 手机上先给动作，再给解释 */
  .pdp-copy .eyebrow { order: 1; }
  .pdp-copy h1 { order: 2; }
  .pdp-actions { order: 3; margin-top: 20px; }
  .pdp-lead { order: 4; }
  .pdp-specs { order: 5; }
  .pdp-hint { order: 6; }
  .pdp-stitch-layout { grid-template-columns: 1fr; gap: 26px; }
  .inside-grid { grid-template-columns: 1fr; }
  .pdp-next { grid-template-columns: 1fr; padding: 26px 22px; }
  .pdp-next-actions { justify-content: flex-start; }
}

/* ---- 成品照版 hero（有视频的图案才有成品照） ---- */
.pdp-figure--finish img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
  object-fit: cover;
  margin: 0;
}

/* ---- 线稿区块（成品大图之后，线稿小图） ---- */
.pdp-sheet {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.pdp-sheet-media {
  margin: 0;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.pdp-sheet-media img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.pdp-sheet-copy h2 {
  margin: 6px 0 14px;
}
.pdp-sheet-copy p {
  margin: 0 0 10px;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.72;
}
.pdp-sheet-copy .pdp-specs {
  margin-top: 16px;
}
.pdp-sheet-copy .pdp-actions {
  margin-top: 20px;
}

@media (max-width: 780px) {
  .pdp-sheet {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pdp-sheet-media {
    max-width: 250px;
    margin: 0 auto;
  }
}

/* ---- About / tips ---- */
.pdp-about-body {
  max-width: 76ch;
}
.pdp-about-body .pdp-lead {
  margin-top: 0;
}
.pdp-level {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 6px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}
.pdp-level strong {
  color: var(--plum);
  font-size: 0.92rem;
}
.pdp-level span {
  color: var(--muted);
  font-size: 0.9rem;
}
.pdp-about-body h3 {
  margin: 26px 0 10px;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pdp-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.pdp-tips li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.96rem;
}
.pdp-tips li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---- FAQ ---- */
.pdp-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.pdp-faq-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(248, 234, 205, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}
.pdp-faq-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.35;
  color: #6a5346;
}
.pdp-faq-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.68;
}

@media (max-width: 980px) {
  .pdp-faq-grid { grid-template-columns: 1fr; }
}

/* --- keyword images + zoom --- */
.pdp-figcap { margin: 10px 2px 0; font-size: .82rem; color: var(--muted); letter-spacing: .02em; }
.pdp-zoom { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 15px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #6a5346;
  font-size: .88rem; text-decoration: none; cursor: zoom-in; }
.pdp-zoom:hover { border-color: var(--gold); color: #4a3529; }
.lb { position: fixed; inset: 0; z-index: 300; background: rgba(24,16,12,.93); display: none;
  align-items: center; justify-content: center; padding: 28px; }
.lb.is-open { display: flex; }
.lb img { max-width: min(94vw,1100px); max-height: 84vh; object-fit: contain; width: auto; height: auto; border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border: 0;
  border-radius: 999px; background: #fff; color: #4a3529; font-size: 20px; cursor: pointer; }
.lb-cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center;
  color: #f6e9d8; font-size: .88rem; letter-spacing: .02em; }
@media (max-width: 980px) { .pdp-zoom { flex: 1 0 100%; justify-content: center; } }

/* ===== 详情页改版：横幅 / 关键词 / 下载预览 / 线稿用法 ===== */
.pdp-banner {
  position: relative; margin-top: 18px; border-radius: var(--radius-xl); overflow: hidden;
  min-height: 380px; display: flex; align-items: flex-end;
  border: 1px solid var(--line);
}
.pdp-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pdp-banner-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(48,32,24,.82) 0%, rgba(48,32,24,.55) 45%, rgba(48,32,24,.12) 100%);
}
.pdp-banner-copy { position: relative; padding: 34px 38px 32px; max-width: 640px; color: #fff; }
.pdp-banner-copy .eyebrow { color: #f3d9a4; }
.pdp-banner-copy h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.08; margin: 6px 0 10px; }
.pdp-banner-sub { color: rgba(255,255,255,.86); font-size: .95rem; margin: 0 0 18px; }
.pdp-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.kw-row {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0;
}
.kw-row li {
  font-size: .8rem; color: #7a6353; background: #fffaf0; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px;
}

.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dl-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .2s ease, transform .2s ease;
}
.dl-card:hover { box-shadow: 0 14px 40px rgba(90,60,40,.12); transform: translateY(-2px); }
.dl-card img { width: 100%; height: 340px; object-fit: cover; display: block; background: #f7efe0; }
.dl-meta { padding: 14px 18px 6px; display: flex; flex-direction: column; gap: 4px; }
.dl-meta strong { font-size: 1rem; color: #4a3529; }
.dl-meta span { font-size: .82rem; color: var(--muted); }
.dl-cta { padding: 10px 18px 16px; font-size: .86rem; color: var(--gold-deep); font-weight: 600; }

.how-steps { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; margin: 0; }
.how-steps li {
  counter-increment: how; position: relative; background: #fffaf0; border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 20px 20px;
}
.how-steps li::before {
  content: "0" counter(how); position: absolute; top: -12px; left: 18px;
  background: var(--gold); color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; padding: 4px 10px; border-radius: 999px;
}
.how-steps strong { display: block; margin: 8px 0 6px; font-size: 1rem; color: #4a3529; }
.how-steps p { margin: 0; font-size: .88rem; line-height: 1.6; color: var(--muted); }

@media (max-width: 980px) {
  .pdp-banner { min-height: 300px; }
  .pdp-banner-copy { padding: 22px 20px; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-card img { height: 240px; }
  .how-steps { grid-template-columns: 1fr; }
}

/* 线稿预览要完整显示，不裁切 */
.dl-card--sheet img { object-fit: contain; background: #fff; padding: 10px; height: 380px; }
.dl-grid { margin-top: 30px; }
.how-steps { margin-top: 38px; }

/* 品牌：文字标与标语分开 */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none; }
.brand-wordmark { height: 26px; width: auto; display: block; }
.brand-tagline {
  font-size: 7.5px; line-height: 1; letter-spacing: .10em; text-transform: lowercase;
  color: #8a6a3f; opacity: .85; white-space: nowrap;
}
@media (max-width: 980px) {
  .brand-wordmark { height: 22px; }
  .brand-tagline { font-size: 7px; letter-spacing: .12em; }
}

/* 手机上隐藏标语，只留文字标 */
@media (max-width: 720px) { .brand-tagline { display: none; } }
