/* ==========================================================================
   BOBBINCOURT — 版面与元件
   每站独立撰写，不引用任何共用 layout 骨架。
   版面结构照参考站 dollheart.net：顶栏 / 左 logo + 搜寻 / 横向导航 /
   促销条 / 4 栏商品网格 / 商品卡（方图 + 名称含尺寸 + 价格 + 角标）
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Karla, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* height:auto 必要 —— img 的 HTML height 属性会映射成 presentational hint，
   压过下方各处 aspect-ratio，导致商品图高度参差。 */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: "Familjen Grotesk", Karla, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

.wrap { width: min(1240px, calc(100% - 44px)); margin-inline: auto; }

.mono {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.skip-link { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 10px 18px; z-index: 100; }
.skip-link:focus { left: 16px; top: 12px; }

/* --------------------------------------------------------------------------
   顶栏 + 站头 + 导航（照参考站：顶栏细条 / 左 logo / 横向导航）
   -------------------------------------------------------------------------- */

.util-bar {
  background: var(--ink);
  color: rgba(250, 247, 244, .82);
  font-family: "Azeret Mono", monospace;
  font-size: .64rem;
  letter-spacing: .08em;
  padding: 7px 0;
}
.util-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.util-bar .util-right { display: flex; gap: 18px; }
.util-bar a { color: rgba(250, 247, 244, .82); }
.util-bar a:hover { color: #fff; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0 20px;
}

/* Article pages rendered by the publishing pipeline use the bare
   .header-inner container; the site's own .wrap (1240px) wrapper is not
   part of that markup, so the header would otherwise span the full
   viewport. This gives .header-inner the same width on its own, and the
   :not()/child selector keeps every existing page untouched. */
.site-header > .header-inner:not(.shell):not(.wrap) { width: min(1240px, calc(100% - 44px)); margin-inline: auto; }
.header-logo { display: block; color: var(--ink); flex-shrink: 0; }
.header-logo .wordmark {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  letter-spacing: .04em;
  line-height: 1;
  display: block;
}
.header-logo .wordmark em { font-style: normal; color: var(--madder); }
.header-logo .tagline {
  display: block;
  margin-top: 6px;
  font-family: "Azeret Mono", monospace;
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.header-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Azeret Mono", monospace;
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.header-aside .lead-time {
  border: 1px solid var(--rule-firm);
  border-radius: 2px;
  padding: 7px 12px;
  background: var(--paper-warm);
}

.header-nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 34px);
  border-top: 1px solid var(--rule);
  padding: 13px 0;
  flex-wrap: wrap;
}
.nav-link {
  font-family: Karla, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--madder); border-bottom-color: var(--madder); }

/* --------------------------------------------------------------------------
   促销条（照参考站的横幅位置）
   -------------------------------------------------------------------------- */

.notice-bar {
  background: var(--madder-wash);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  padding: 11px 0;
}
.notice-bar p {
  margin: 0;
  font-family: "Azeret Mono", monospace;
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--madder);
}
.notice-bar strong { font-weight: 600; }

/* --------------------------------------------------------------------------
   尺寸相容标记 — 本站签名元件
   -------------------------------------------------------------------------- */

.fit-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.fit-row li {
  font-family: "Azeret Mono", monospace;
  font-size: .54rem;
  letter-spacing: .04em;
  line-height: 1;
  padding: 4px 5px;
  border: 1px solid var(--fit-bd);
  background: var(--fit-bg);
  color: var(--fit-fg);
  border-radius: 2px;
}
.fit-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Azeret Mono", monospace;
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--ink-muted);
}
.fit-legend .sample { display: inline-flex; gap: 3px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  margin: 30px 0 40px;
}
.hero-copy { padding: clamp(28px, 4vw, 52px); align-self: center; }
.hero-copy .eyebrow {
  font-family: "Azeret Mono", monospace;
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--madder);
  margin: 0 0 14px;
}
.hero-copy h1 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); margin-bottom: 16px; }
.hero-copy p { color: var(--ink-soft); margin: 0 0 22px; max-width: 46ch; }
.hero-fig { margin: 0; }
.hero-fig img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--madder);
  color: #fff;
  font-family: "Azeret Mono", monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 2px;
  transition: background .18s;
}
.btn:hover { background: var(--madder-lit); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-firm);
}
.btn-ghost:hover { background: var(--paper-warm); color: var(--ink); border-color: var(--ink); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   区块标题
   -------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { font-size: 1.3rem; }
.section-head .more {
  font-family: "Azeret Mono", monospace;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   分类网格（模板1 核心区块）
   -------------------------------------------------------------------------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0 0 52px;
  padding: 0;
}
.cat-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.cat-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cat-card .cat-body { padding: 15px 18px 17px; }
.cat-card .cat-name {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  display: block;
  margin-bottom: 5px;
}
.cat-card .cat-count {
  font-family: "Azeret Mono", monospace;
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   商品网格（照参考站 4 栏）
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 22px;
  list-style: none;
  margin: 0 0 54px;
  padding: 0;
}
.product-card { display: flex; flex-direction: column; position: relative; }
.product-thumb {
  display: block;
  position: relative;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.product-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.product-card:hover .product-thumb img { transform: scale(1.035); }

.badge {
  position: absolute;
  top: 9px; left: 9px;
  font-family: "Azeret Mono", monospace;
  font-size: .55rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  color: #fff;
  z-index: 2;
}
.badge-new { background: var(--madder); }
.badge-order { background: var(--made-order); }
.badge-out { background: var(--sold-out); }

.product-sku {
  font-family: "Azeret Mono", monospace;
  font-size: .58rem;
  letter-spacing: .08em;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 4px;
}
.product-card h3 { font-size: .97rem; line-height: 1.3; margin-bottom: 8px; font-weight: 700; }
.product-card h3 a { color: inherit; }
.product-card h3 a:hover { color: var(--madder); }
.product-price {
  font-family: "Azeret Mono", monospace;
  font-size: .84rem;
  color: var(--ink);
  margin: 0 0 10px;
}
.product-price .was { color: var(--ink-muted); text-decoration: line-through; margin-left: 7px; font-size: .74rem; }
.product-card .fit-row { margin-top: auto; }

/* --------------------------------------------------------------------------
   购物指南 / 尺寸表（模板1 第三区块）
   -------------------------------------------------------------------------- */

.guide {
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 52px 0;
  margin-bottom: 54px;
}
.guide-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 46px; align-items: start; }
.guide h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 14px; }
.guide p { color: var(--ink-soft); margin: 0 0 14px; }

.size-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule-firm); border-radius: 2px; }
.size-table th, .size-table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--rule); font-size: .86rem; }
.size-table th {
  font-family: "Azeret Mono", monospace;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper);
}
.size-table tr:last-child td { border-bottom: 0; }
.size-table .sz {
  font-family: "Azeret Mono", monospace;
  font-size: .72rem;
  color: var(--madder);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   工作室区块
   -------------------------------------------------------------------------- */

.studio { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: center; margin-bottom: 58px; }
.studio h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 14px; }
.studio p { color: var(--ink-soft); margin: 0 0 14px; }
.studio-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.studio-facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule-firm); border-radius: 2px; background: var(--surface); margin-top: 20px; }
.studio-facts div { padding: 14px 15px; border-right: 1px solid var(--rule); }
.studio-facts div:last-child { border-right: 0; }
.studio-facts .n { display: block; font-family: "Azeret Mono", monospace; font-size: 1.2rem; color: var(--madder); line-height: 1.1; }
.studio-facts .k { display: block; font-size: .72rem; color: var(--ink-muted); margin-top: 4px; line-height: 1.35; }

/* --------------------------------------------------------------------------
   内页
   -------------------------------------------------------------------------- */

.page-head { padding: 40px 0 26px; border-bottom: 1px solid var(--rule); margin-bottom: 30px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 14px; }
.page-standfirst { color: var(--ink-soft); font-size: 1.04rem; margin: 0; max-width: 62ch; }

.page-prose { max-width: 68ch; margin-bottom: 50px; }
.page-prose > p { margin: 0 0 1.3em; }
.page-prose h2 { font-size: 1.36rem; margin: 2em 0 .6em; padding-top: .55em; border-top: 1px solid var(--rule); }
.page-prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page-prose h3 { font-size: 1.06rem; margin: 1.6em 0 .5em; }
.page-prose ul, .page-prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.page-prose li { margin-bottom: .45em; }
.page-prose li::marker { color: var(--madder); }
.page-prose a { border-bottom: 1px solid rgba(140, 58, 90, .4); }
.page-prose .prose-note {
  background: var(--madder-wash);
  border-left: 3px solid var(--madder);
  border-radius: 0 2px 2px 0;
  padding: 17px 20px;
  margin: 1.7em 0;
  font-size: .93rem;
  color: var(--ink-soft);
}
.page-prose .prose-note p { margin: 0 0 .7em; }
.page-prose .prose-note p:last-child { margin-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0 0 46px; padding: 0; }
.contact-card { border: 1px solid var(--rule); border-left: 4px solid var(--madder); border-radius: 2px; background: var(--surface); padding: 20px 22px 22px; }
.contact-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.contact-card p { margin: 0 0 13px; font-size: .9rem; color: var(--ink-soft); }
.contact-card .addr { font-family: "Azeret Mono", monospace; font-size: .78rem; color: var(--madder); border-bottom: 1px solid rgba(140,58,90,.4); word-break: break-word; }
.contact-card .turnaround { display: block; margin-top: 11px; font-family: "Azeret Mono", monospace; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* 文章列表（blog.html） */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; list-style: none; margin: 0 0 52px; padding: 0; }
.article-card { display: flex; flex-direction: column; }
.article-thumb { display: block; overflow: hidden; border: 1px solid var(--rule); border-radius: 2px; margin-bottom: 13px; background: var(--paper-warm); }
.article-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.article-card:hover .article-thumb img { transform: scale(1.03); }
.article-card .article-body { display: flex; flex-direction: column; flex: 1; }
.article-meta { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; font-family: "Azeret Mono", monospace; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.article-cat { color: var(--madder); font-weight: 500; }
.article-date { color: var(--ink-muted); }
.article-card h3 { font-size: 1.06rem; line-height: 1.28; margin-bottom: 8px; }
.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--madder); }
.article-excerpt { color: var(--ink-soft); font-size: .89rem; margin: 0 0 14px; }
.article-link { align-self: flex-start; margin-top: auto; font-family: "Azeret Mono", monospace; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--link); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.article-grid:empty { display: none; }

.journal-note { background: var(--paper-warm); border-left: 3px solid var(--madder); border-radius: 0 2px 2px 0; padding: 26px 28px; margin: 0 0 52px; }
.journal-note h2 { font-size: 1.2rem; margin-bottom: 11px; }
.journal-note p { color: var(--ink-soft); margin: 0 0 11px; max-width: 68ch; font-size: .94rem; }

/* --------------------------------------------------------------------------
   Footer
   —— footer-inner / footer-bottom 这两个 class 名是 backlinks WF 文章页保留字，
      首页的多栏选单一律用 footer-nav-inner / footer-nav-bottom，不可占用。
   -------------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: rgba(250, 247, 244, .78); padding: 50px 0 24px; }

/* WF 文章页专用简单版容器 */
.site-footer .footer-inner { max-width: 900px; margin: 0 auto; padding: 0 24px 22px; text-align: center; }
.site-footer .footer-inner p { color: rgba(250,247,244,.66); font-size: .89rem; margin: 0 auto 10px; max-width: 56ch; }
.site-footer .footer-inner a { color: rgba(250,247,244,.76); }
.site-footer .footer-inner a:hover { color: var(--thistle); }
.site-footer .footer-bottom {
  max-width: 900px; margin: 0 auto; padding: 18px 24px 0;
  border-top: 1px solid rgba(250,247,244,.16);
  text-align: center;
  font-family: "Azeret Mono", monospace; font-size: .62rem; letter-spacing: .07em;
  color: rgba(250,247,244,.5);
}
.site-footer .footer-bottom a { color: rgba(250,247,244,.66); }

/* 首页多栏选单 */
.footer-nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 38px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(250, 247, 244, .16);
}
.footer-nav-inner .f-wordmark { font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; color: #fff; display: block; margin-bottom: 11px; }
.footer-nav-inner p { color: rgba(250, 247, 244, .62); font-size: .86rem; margin: 0 0 8px; max-width: 36ch; }
.footer-nav-inner h3 { color: #fff; font-family: "Azeret Mono", monospace; font-size: .64rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 13px; }
.footer-nav-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-nav-inner li { margin-bottom: 8px; }
.footer-nav-inner li a { color: rgba(250, 247, 244, .72); font-size: .87rem; }
.footer-nav-inner li a:hover { color: var(--thistle); }
.footer-nav-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 20px;
  font-family: "Azeret Mono", monospace; font-size: .62rem; letter-spacing: .07em;
  color: rgba(250, 247, 244, .5);
}
.footer-nav-bottom a { color: rgba(250, 247, 244, .66); }
.footer-nav-bottom a:hover { color: var(--thistle); }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-fig { order: -1; }
  .hero-fig img { min-height: 260px; aspect-ratio: 16/9; }
  .guide-inner { grid-template-columns: 1fr; gap: 28px; }
  .studio { grid-template-columns: 1fr; gap: 26px; }
  .footer-nav-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .site-header > .header-inner:not(.shell):not(.wrap) { width: calc(100% - 32px); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .cat-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-nav-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .header-aside .lead-time { display: none; }
  .studio-facts { grid-template-columns: 1fr; }
  .studio-facts div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .studio-facts div:last-child { border-bottom: 0; }
  .util-bar .wrap { justify-content: center; }
  .util-bar .util-left { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .product-card:hover .product-thumb img, .article-card:hover .article-thumb img { transform: none; }
}
