/* ==========================================================================
   动漫周边 · style.css — 首页与内页布局
   设计基准宽 1440（视觉稿 1024×1536，按 ×1.40625 归一）
   ========================================================================== */



* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font-family: inherit; }

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  height: 456px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 38px;
}
.hero-label {
  display: block;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .13em;
  color: var(--brand);
}
.hero h1 {
  margin: 25px 0 0;
  font-size: 73px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink);
}
.hero-sub {
  max-width: 700px;
  margin-top: 26px;
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 46px;
  margin-top: 62px;
  font-size: 17.5px;
  color: var(--ink-soft);
}
.hero-stats li { display: inline-flex; align-items: center; gap: 10px; }
.hero-stats svg { width: 38px; height: 38px; color: var(--brand); flex: none; }

.hero-art {
  position: absolute;
  top: 0;
  right: max(0px, calc((100% - 1440px) / 2));
  width: 674px;
  height: 456px;
  object-fit: cover;
  object-position: left center;
  z-index: 1;
  pointer-events: none;
}
.hero-art::after { content: ""; }
.hero-fade {
  position: absolute;
  top: 0; right: max(0px, calc((100% - 1440px) / 2));
  width: 674px; height: 456px;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(253,250,247,.55) 12%, rgba(253,250,247,0) 34%);
  z-index: 1;
  pointer-events: none;
}

/* -------------------------------------------------------------- categories */
.cat-section {
  height: auto;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.cat-section .wrap { padding-top: 23px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 15px;
  margin-top: 17px;
}

/* 分类内容模块：每个主分类 = 标题行 + 该分类最新 4 篇 */
.cat-block { margin-top: 26px; }
.cat-block:first-of-type { margin-top: 4px; }
.cat-block + .cat-block {
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.cat-block .sec-head {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.cat-block-title { font-size: 25px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.cat-block-title a { color: inherit; }
.cat-block-title a:hover { color: var(--brand); }
.cat-block-desc {
  flex: 1 1 260px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.cat-block-more {
  flex: none;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.cat-block-more:hover { text-decoration: underline; }
.cat-block .product-grid { margin-top: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-block .product-card { height: auto; }
.cat-block .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* --------------------------------------------------------------- featured */
.featured {
  height: auto;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.featured .wrap { padding-top: 25px; }
.featured .sec-head { flex-wrap: wrap; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 17px;
}
.featured .product-card { height: auto; min-height: 378px; }
.featured .product-grid { margin-top: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; justify-content: start; }
.featured .product-spec { flex: 1; }
.featured .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ------------------------------------------------------------------- band */
.band {
  height: auto;
  padding-bottom: 30px;
  background: var(--bg);
}
.band .wrap {
  padding-top: 22px;
  display: grid;
  grid-template-columns: 391fr 419fr 484fr;
  gap: 14px;
  align-items: stretch;
}
.band-panel { display: flex; flex-direction: column; height: auto; padding-top: 0; }
.band-panel .sec-head { height: 58px; align-items: flex-start; }
.band-panel .sec-head h2 { font-size: 25px; margin-top: 2px; }
.band-panel .sec-sub {
  display: block;
  width: 100%;
  margin: 3px 0 0 32px;
  font-size: 14px;
  line-height: 1.5;
}
.band-panel .sec-head { flex-wrap: wrap; }
.band-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel);
}

.price-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.price-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}
.price-icon svg { width: 19px; height: 19px; }
.price-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.price-name b {
  margin-left: 8px;
  color: var(--brand);
  font-size: 18px;
}
.price-desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.price-note {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
}

.craft-card { padding: 0; overflow: hidden; }
.craft-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.55;
  table-layout: fixed;
}
.craft-table th {
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  text-align: left;
}
.craft-table th,
.craft-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  vertical-align: middle;
}
.craft-table tr > *:last-child { border-right: 0; }
.craft-table tr:last-child > * { border-bottom: 0; }
.craft-table td:first-child { color: var(--ink); font-weight: 600; }
.craft-table td { color: var(--muted); }
.craft-table th:nth-child(1) { width: 27%; }
.craft-table th:nth-child(2) { width: 38%; }

.path-step {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 11px 0 11px;
}
.path-step::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 52px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}
.path-step:last-child::before { display: none; }
.path-num {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px; height: 39px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}
.path-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.path-desc { margin-top: 3px; font-size: 13.2px; line-height: 1.65; color: var(--muted); }

/* -------------------------------------------------------------------- faq */
.faq {
  height: auto;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.faq .wrap { padding-top: 14px; }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.faq .faq-card { height: auto; min-height: 142px; }

/* ------------------------------------------------------------ list page */
.list-main { background: var(--bg); }
.list-section { padding: 8px 0 46px; }
.product-grid-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.product-grid-list .product-card { min-height: 0; }
.product-grid-list .product-media { aspect-ratio: 4 / 5; }
.product-grid-list .product-spec { flex: 1; }
.list-desc {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 44px;
  padding: 40px 0 44px;
  border-top: 1px solid var(--line);
}
.list-desc h2 {
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
}
.list-desc .article { max-width: none; }
.list-desc .article p { font-size: 15.5px; line-height: 1.9; }

.related-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.related-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--ink);
  transition: border-color .16s ease, transform .16s ease;
}
.related-cat:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.related-cat strong { display: block; font-size: 18px; font-weight: 700; }
.related-cat span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.related-cat svg { flex: none; width: 22px; height: 22px; color: var(--brand); }
.related-block { padding: 30px 0 52px; border-top: 1px solid var(--line); }
.related-block h2 { font-size: 25px; font-weight: 800; color: var(--ink); }

/* 列表页分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.pager__link:hover { border-color: var(--brand); color: var(--brand); }
.pager__link[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pager__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 40px;
  color: var(--dim);
  font-size: 14.5px;
}

/* ---------------------------------------------------------- detail page */
.detail-head {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 56px;
  align-items: stretch;
  margin-top: 20px;
}
.detail-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f3ea;
}
.detail-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: multiply;
}
.detail-info { padding-top: 6px; display: flex; flex-direction: column; }
.detail-info .toc { margin-top: auto; }
.detail-info h1 {
  margin-top: 12px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.22;
  color: var(--ink);
}
.detail-lead {
  margin-top: 14px;
  max-width: 620px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.detail-price {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}
.detail-price strong {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: .01em;
}
.detail-price span { display: block; margin-top: 2px; font-size: 13px; color: var(--dim); }
.detail-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.toc a { color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.toc a:hover, .toc a.is-current { color: var(--brand); border-bottom-color: var(--brand); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.gallery figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  mix-blend-mode: multiply;
  background: #f8f3ea;
}
.gallery figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}
.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  padding: 38px 0 20px;
  align-items: start;
}
.detail-aside { position: sticky; top: 24px; }
.aside-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}
.aside-card h2 { font-size: 18px; font-weight: 700; color: var(--ink); }
.aside-card p { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.aside-card .btn { width: 100%; margin-top: 14px; height: 40px; font-size: 14.5px; }
.aside-list { margin-top: 12px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.aside-list li { display: flex; gap: 8px; }
.aside-list li::before { content: "·"; color: var(--gold); font-weight: 800; }

.detail-related { padding: 8px 0 52px; }
.detail-related h2 { font-size: 25px; font-weight: 800; color: var(--ink); margin-bottom: 16px; }
.related-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  transition: border-color .16s ease, transform .16s ease;
}
.related-product:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.related-product img {
  width: 84px; height: 84px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8f3ea;
  mix-blend-mode: multiply;
}
.related-product strong { display: block; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.related-product span { display: block; margin-top: 5px; font-size: 15px; font-weight: 700; color: var(--brand); }
.related-product svg { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--line-strong); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  :root { --wrap: 1180px; }
  .featured .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main-nav { gap: 22px; font-size: 15px; }
  .hero-art, .hero-fade { width: 560px; }
  .hero h1 { font-size: 64px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-section { height: auto; padding-bottom: 26px; }
  .featured { height: auto; padding-bottom: 30px; }
  .featured .product-card { height: auto; min-height: 350px; }
  .band { height: auto; padding-bottom: 30px; }
  .band .wrap { grid-template-columns: 1fr; }
  .band-panel { height: auto; }
  .band-card { min-height: 0; }
  .faq { height: auto; padding-bottom: 24px; }
  .faq-grid { grid-template-columns: 1fr 1fr; }
  .faq .faq-card { height: auto; }
  .detail-grid { grid-template-columns: 420px 1fr; gap: 36px; }
  .detail-body { grid-template-columns: 1fr 280px; gap: 36px; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-btn { display: block; }
  .brand { margin-right: auto; }
  .header-inner { gap: 12px; }
  .hero { height: auto; padding: 30px 0 34px; }
  .hero-art { width: 100%; height: 320px; opacity: .22; right: 0; }
  .hero-fade { display: none; }
  .hero-inner { padding-top: 0; }
  .hero h1 { font-size: 52px; }
  .hero-sub { font-size: 17px; max-width: 100%; }
  .hero-stats { flex-wrap: wrap; gap: 14px 24px; margin-top: 26px; font-size: 15px; }
  .hero-stats li + li { padding-left: 24px; }
  .hero-actions { margin-top: 20px; }
  .btn { height: 50px; padding: 0 26px; font-size: 17.5px; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .featured .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .cat-block .product-grid { grid-template-columns: 1fr 1fr; }
  .featured .product-card { min-height: 0; }
  .product-grid-list { grid-template-columns: 1fr 1fr; }

  .list-desc { grid-template-columns: 1fr; gap: 18px; }
  .related-cats { grid-template-columns: 1fr; }

  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-media { max-width: 560px; margin-inline: auto; }
  .detail-info { max-width: 620px; margin-inline: auto; width: 100%; }
  .detail-media img { aspect-ratio: 4 / 5; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .related-products { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px 30px;
    height: auto;
    padding-bottom: 58px;
  }
  .footer-copy { right: 24px; bottom: 20px; }
}

@media (max-width: 600px) {
  .wrap { padding-inline: 18px; }
  .hero { padding-top: 24px; }
  .hero-art { height: 240px; }
  .hero h1 { font-size: 42px; }
  .hero-label { font-size: 14px; letter-spacing: .12em; }
  .hero-sub { font-size: 15.5px; }
  .hero-stats svg { width: 24px; height: 24px; }
  .hero-stats li + li { border-left: 0; padding-left: 0; }
  .sec-head h2, .band-panel .sec-head h2 { font-size: 21px; }
  .sec-sub { margin-left: 0; width: 100%; font-size: 13px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-card { padding: 14px 10px; }
  .category-icon { width: 44px; height: 44px; }
  .category-name { font-size: 16px; }
  .category-desc { font-size: 12.5px; }
  .product-grid, .product-grid-list, .featured .product-grid, .cat-block .product-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .band .wrap { padding-top: 14px; }
  .price-row { padding: 10px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, auto); }
  .footer-name { font-size: 26px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero .lede { font-size: 16px; }
  .detail-info h1 { font-size: 30px; }
  .detail-price strong { font-size: 28px; }
  .gallery { grid-template-columns: 1fr; }
  .related-product img { width: 70px; height: 70px; }
  .sort-wrap { margin-left: 0; width: 100%; }
  .sort-wrap select { flex: 1; }
}

/* 品牌名在桌面端由导航首项承载，移动端显示在星标旁 */
.brand-name-mobile { display: none; font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .02em; }
@media (max-width: 900px) {
  .brand { gap: 10px; }
  .brand-name-mobile { display: inline; }
}

/* 内页：平滑滚动（尊重 reduced-motion） */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
