/* ==========================================================================
   内页视觉 · 泥金（2026-11-26）
   方向来源：客户在「册页 / 泥金 / 长卷」中选泥金；数值按审设计复核意见修正：
   - 按钮去渐变去内阴影，纯色 + 1px 下沿，圆角 2px
   - 印章边框 2.5px、边缘留缺口、rotate 2.5deg、opacity .88、multiply
   - 不出现金色渐隐线
   - 纸底噪声只留一层 .28
   - 楷体只出现在工序序号与结尾文案；朱砂只出现在印章与 CTA
   - 列表页卡片撕边幅度减半、不倾斜、不盖章；404 只留标题 + 一个按钮 + 一枚 56px 印章
   只在非首页加载，依赖 ryj-pages.css。
   ========================================================================== */

body:not(.wow-home) {
  --nj-paper: #f3efe4;
  --nj-paper-2: #fbf8f1;
  --nj-ink: #191713;
  --nj-ink-60: rgba(25, 23, 19, 0.6);
  --nj-ink-45: rgba(25, 23, 19, 0.45);
  --nj-line: rgba(25, 23, 19, 0.14);
  --nj-seal: #a12f1c;
  --nj-serif: "Songti SC", "SimSun", "Noto Serif SC", serif;
  --nj-kai: "KaiTi", "STKaiti", serif;
}

/* 纸底：一道渐变 + 一层粗纤维，去掉细颗粒 */
body:not(.wow-home) {
  background-color: var(--nj-paper);
  background-image: radial-gradient(1100px 700px at 12% -8%, #fdfbf5 0%, transparent 62%);
  background-attachment: scroll;
}
body:not(.wow-home)::after {
  opacity: 0.28 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16 0 0 0 0 .14 0 0 0 0 .11 0 0 0 .55 0'/></filter><rect width='240' height='240' filter='url(%23f)'/></svg>") !important;
}

/* ---------------------------------------------------------------- 详情页：两栏各半 */
@media (min-width: 881px) {
  body:not(.wow-home).single-product div.product {
    column-gap: 64px;
  }
  body:not(.wow-home).single-product div.product div.images,
  body:not(.wow-home).single-product div.product .woocommerce-product-gallery {
    flex: 0 0 calc(50% - 32px) !important;
    width: calc(50% - 32px) !important;
    max-width: calc(50% - 32px) !important;
  }
}

/* ---------------------------------------------------------------- 详情页：撕边宣纸主图 */
body:not(.wow-home).single-product div.images {
  position: relative;
}

body:not(.wow-home).single-product .woocommerce-product-gallery {
  background: var(--nj-paper-2);
  padding: 26px;
  transform: rotate(-0.6deg);
  box-shadow: 0 34px 60px -34px rgba(25, 23, 19, 0.42), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  clip-path: polygon(
    1% 2%, 18% 0, 42% 1.6%, 66% 0, 88% 1.4%, 99% 0,
    100% 14%, 98.6% 38%, 100% 62%, 98.8% 86%, 100% 99%,
    82% 100%, 58% 98.4%, 34% 100%, 12% 98.6%, 0 100%,
    1.2% 76%, 0 52%, 1.4% 26%
  );
}

body:not(.wow-home).single-product .woocommerce-product-gallery__image {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body:not(.wow-home).single-product .woocommerce-product-gallery__image img {
  filter: saturate(0.96) contrast(1.02);
}

/* 缩略图：贴着卡片下沿，露出一行 */
body:not(.wow-home).single-product .flex-control-thumbs {
  margin-top: 18px;
  padding-left: 4px;
}
body:not(.wow-home).single-product .flex-control-thumbs li {
  width: 68px !important;
  border: 1px solid var(--nj-line);
  background: var(--nj-paper-2);
  opacity: 0.82;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
body:not(.wow-home).single-product .flex-control-thumbs li:hover {
  opacity: 1;
  transform: translateY(-2px);
}
body:not(.wow-home).single-product .flex-control-thumbs img.flex-active {
  border-color: var(--nj-ink);
}

/* 尺度行：卡片下方 12px */
.ryj-nijin-scale {
  margin: 12px 0 0;
  font-family: var(--nj-serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--nj-ink-45);
}

/* 印章：压在卡片右下角 */
.ryj-nijin-seal {
  position: absolute;
  right: 6px;
  bottom: 104px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 3px solid var(--nj-seal);
  color: var(--nj-seal);
  font-family: var(--nj-kai);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  writing-mode: vertical-rl;
  transform: rotate(2.5deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
  background: rgba(161, 47, 28, 0.05);
  clip-path: polygon(
    0 4%, 8% 0, 31% 2%, 56% 0, 79% 1.6%, 96% 0, 100% 6%,
    98% 28%, 100% 52%, 98.4% 74%, 100% 92%, 94% 100%,
    72% 98%, 48% 100%, 26% 98.4%, 6% 100%, 0 94%,
    2% 72%, 0 48%, 1.6% 26%
  );
}

/* ---------------------------------------------------------------- 详情页：右栏排版 */
body:not(.wow-home).single-product div.summary .product_title {
  font-family: var(--nj-serif);
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* 作品说明（复用商品简短描述）：一行英文也成立，但保持一行的克制 */
body:not(.wow-home).single-product div.summary .woocommerce-product-details__short-description {
  font-family: var(--nj-serif);
  font-size: 15px;
  line-height: 1.9;
  color: var(--nj-ink-60);
  max-width: 26em;
  margin: 14px 0 0;
  letter-spacing: 0.02em;
}

/* 材质表（nijin 自己渲染的 dl，老的 ryj-specs 隐藏） */
body:not(.wow-home).single-product div.summary dl.ryj-specs {
  display: none !important;
}

body:not(.wow-home).single-product div.summary dl.ryj-mats {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px 20px;
  font-family: var(--nj-serif);
}
body:not(.wow-home).single-product div.summary dl.ryj-mats dt {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--nj-ink-45);
  font-weight: 400;
}
body:not(.wow-home).single-product div.summary dl.ryj-mats dd {
  margin: 0;
  font-size: 14px;
  color: var(--nj-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

/* 标签：不再用朱砂，胶囊描边 */
body:not(.wow-home).single-product .ryj-tag,
body:not(.wow-home).single-product .ryj-tags a,
body:not(.wow-home).single-product .ryj-tags span {
  border: 1px solid var(--nj-line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--nj-ink-60);
  background: rgba(255, 255, 255, 0.35);
}

/* 问价 CTA：纯色印泥，2px 圆角，按下位移 1px */
body:not(.wow-home).single-product details.ryj-ask > summary.button,
body:not(.wow-home).single-product details.ryj-ask > summary.button.alt,
body:not(.wow-home).single-product form.ryj-ask-form button[type="submit"],
body:not(.wow-home).single-product form.ryj-ask-form .button,
body:not(.wow-home).single-product a.button.ruyuji-ask,
body:not(.wow-home).single-product .ruyuji-inquiry-note + p a {
  background: #8f2417 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 2px !important;
  color: #f7efe2 !important;
  font-family: var(--nj-serif) !important;
  font-size: 16px !important;
  letter-spacing: 0.28em !important;
  padding: 16px 30px !important;
  box-shadow: 0 1px 0 #6e1a10 !important;
  text-shadow: none !important;
  transition: transform 0.14s ease, opacity 0.14s ease !important;
}
body:not(.wow-home).single-product details.ryj-ask > summary.button:hover,
body:not(.wow-home).single-product form.ryj-ask-form button[type="submit"]:hover,
body:not(.wow-home).single-product a.button.ruyuji-ask:hover {
  background: #8f2417 !important;
  transform: translateY(1px);
  opacity: 0.92;
}

/* 工序表：只有木器品类输出这一段 */
.ryj-nijin-steps {
  margin: 44px 0 0;
  border-top: 1px solid var(--nj-line);
  font-family: var(--nj-serif);
}
.ryj-nijin-steps h2 {
  margin: 0;
  padding: 18px 0 10px;
  font-family: var(--nj-kai);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--nj-ink-45);
}
.ryj-nijin-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ryj-nijin-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid rgba(25, 23, 19, 0.08);
  font-size: 14px;
  color: var(--nj-ink-60);
}
.ryj-nijin-steps li i {
  font-family: var(--nj-kai);
  font-style: normal;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--nj-ink-60);
}

/* 结尾文案：只在这里用楷体 */
.ryj-nijin-end {
  margin: 44px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--nj-line);
  font-family: var(--nj-kai);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--nj-ink-60);
  max-width: 30em;
}

/* ---------------------------------------------------------------- 列表页 / 归档 */
body:not(.wow-home) .ru-concept-product {
  position: relative;
  background: var(--nj-paper-2);
  padding: 14px 14px 16px !important;
  transform: none !important;
  box-shadow: 0 18px 32px -20px rgba(25, 23, 19, 0.5) !important;
  border: 0 !important;
  clip-path: polygon(
    0.6% 1.2%, 22% 0, 48% 0.9%, 74% 0, 99.4% 1%, 100% 12%,
    99.2% 42%, 100% 72%, 99.4% 98.6%, 70% 100%, 44% 99.2%,
    18% 100%, 0.6% 99%, 1% 74%, 0 46%, 0.8% 22%
  );
  transition: transform 0.24s ease, box-shadow 0.24s ease !important;
}
body:not(.wow-home) .ru-concept-product:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 26px 40px -22px rgba(25, 23, 19, 0.55) !important;
}
body:not(.wow-home) .ru-concept-product img.ru-concept-thumbnail {
  border-radius: 0 !important;
  filter: saturate(0.96) contrast(1.02);
}
body:not(.wow-home) .ru-concept-product h2.woocommerce-loop-product__title {
  font-family: var(--nj-serif);
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--nj-ink);
  padding: 12px 2px 0 !important;
}
body:not(.wow-home) .ru-concept-product .ru-concept-badge {
  background: transparent !important;
  border: 1px solid var(--nj-line);
  border-radius: 999px;
  color: var(--nj-ink-60) !important;
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 4px 10px !important;
}
body:not(.wow-home) .ru-concept-product > a.button.ruyuji-ask {
  background: #8f2417 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 2px !important;
  color: #f7efe2 !important;
  font-family: var(--nj-serif) !important;
  letter-spacing: 0.24em !important;
  box-shadow: 0 1px 0 #6e1a10 !important;
  transition: transform 0.14s ease, opacity 0.14s ease !important;
}
body:not(.wow-home) .ru-concept-product > a.button.ruyuji-ask:hover {
  transform: translateY(1px);
  opacity: 0.92;
}

/* 归档页头：不用大色块，靠留白 */
body:not(.wow-home).post-type-archive-product .woocommerce-products-header,
body:not(.wow-home).tax-product_cat .woocommerce-products-header {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--nj-line);
  margin-bottom: 40px;
}
body:not(.wow-home).post-type-archive-product .woocommerce-products-header__title.page-title,
body:not(.wow-home).tax-product_cat .woocommerce-products-header__title.page-title {
  font-family: var(--nj-serif);
  font-size: 34px;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* ---------------------------------------------------------------- 404 */
body:not(.wow-home).error404 #primary {
  padding: 96px 0 64px;
}
body:not(.wow-home).error404 .error-404 {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
body:not(.wow-home).error404 .page-title {
  font-family: var(--nj-serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0 0 34px;
}
body:not(.wow-home).error404 .ryj-404-actions .button {
  background: #8f2417 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 2px !important;
  color: #f7efe2 !important;
  font-family: var(--nj-serif) !important;
  letter-spacing: 0.28em !important;
  padding: 15px 30px !important;
  box-shadow: 0 1px 0 #6e1a10 !important;
}
.ryj-nijin-seal--404 {
  width: 56px;
  height: 56px;
  margin: 40px auto 0;
  border: 2.5px solid var(--nj-seal);
  color: var(--nj-seal);
  font-family: var(--nj-kai);
  font-size: 15px;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  letter-spacing: 0.08em;
  transform: rotate(2.5deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
  background: rgba(161, 47, 28, 0.05);
  clip-path: polygon(
    0 6%, 10% 0, 34% 2%, 62% 0, 88% 2%, 100% 8%,
    98% 34%, 100% 64%, 98% 92%, 90% 100%, 62% 98%,
    34% 100%, 8% 98%, 0 92%, 2% 60%, 0 32%
  );
}
body:not(.wow-home).error404 .ryj-404-search,
body:not(.wow-home).error404 .ryj-404-related {
  display: none !important;
}

/* 减弱动效 */
@media (prefers-reduced-motion: reduce) {
  body:not(.wow-home) .ru-concept-product,
  body:not(.wow-home) .ru-concept-product:hover,
  body:not(.wow-home) .ru-concept-product > a.button.ruyuji-ask,
  body:not(.wow-home) .single-product details.ryj-ask > summary.button {
    transition: none !important;
    transform: none !important;
  }
}

/* 手机：不倾斜、卡片内距收小 */
@media (max-width: 880px) {
  body:not(.wow-home).single-product .woocommerce-product-gallery {
    transform: none;
    padding: 16px;
  }
  .ryj-nijin-seal {
    width: 62px;
    height: 62px;
    font-size: 16px;
    right: 4px;
    bottom: 96px;
  }
  body:not(.wow-home) .ru-concept-product {
    padding: 10px 10px 12px !important;
  }
}