/* =========================================================
   宠物猫咪品种大全 — 页面样式
   设计基准：1440px（对应视觉稿 1024×1536 ×1.40625）
   ========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, p { margin: 0; }

/* ------------------------------------------------ hero */
.hero {
  position: relative;
  height: 354px;
  overflow: hidden;
  background: var(--hero-bg);
}
.hero-media {
  position: absolute;
  top: 0;
  right: max(0px, calc((100% - var(--wrap)) / 2));
  width: 74.5%;
  height: 100%;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--hero-bg) 0%, rgba(249, 236, 230, .82) 12%, rgba(249, 236, 230, 0) 38%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-copy { width: 50%; padding-bottom: 10px; }
.hero h1 {
  font-size: 50px;
  line-height: 1.18;
  letter-spacing: -.01em;
  font-weight: 800;
}
.hero-sub {
  margin-top: 10px;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 700;
}
.hero-lead {
  margin-top: 14px;
  max-width: 470px;
  font-size: 15.5px;
  line-height: 1.8;
  color: #57483c;
}
.hero .btn { margin-top: 22px; }

/* ------------------------------------------------ categories */
.categories { padding: 44px 0 12px; }
.categories .section-head { margin-bottom: 18px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

/* ------------------------------------------------ featured + finder */
.featured { padding: 24px 0 26px; }
.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 462px;
  gap: 22px;
  align-items: start;
}
.featured-main .section-head { margin: 8px 0 16px; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.finder-card {
  height: 100%;
  padding: 24px 24px 22px;
  background: var(--surface-soft);
  border: 1px solid rgba(239, 224, 212, .9);
  border-radius: var(--radius-card);
}
.finder-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 800;
}
.finder-list { margin-top: 14px; counter-reset: finder; }
.finder-item {
  counter-increment: finder;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 27px 0;
  border-top: 1px solid rgba(230, 210, 193, .75);
}
.finder-item:first-child { border-top: 0; padding-top: 4px; }
.finder-num::before { content: counter(finder); }
.finder-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.finder-item p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.finder-item strong { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------ care band */
.care { padding: 0 0 16px; }
.care-band {
  display: grid;
  grid-template-columns: 404px minmax(0, 1fr);
  height: 230px;
  background: var(--band);
  border-radius: var(--radius-band);
  overflow: hidden;
}
.care-media { height: 100%; }
.care-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.care-body { padding: 16px 32px 14px 28px; }
.care-body h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
}
.care-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 10px;
}
.care-item { text-align: center; }
.care-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fde3c6;
  color: var(--accent-dark);
}
.care-item h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}
.care-item p {
  margin-top: 4px;
  font-size: 12.8px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ------------------------------------------------ notes + faq */
.notes { padding: 6px 0 19px; }
.notes-grid {
  display: grid;
  grid-template-columns: 1.14fr .76fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.note-card,
.faq-card {
  padding: 23px 24px;
  background: var(--surface);
  border: 1px solid rgba(239, 224, 212, .9);
  border-radius: var(--radius-card);
}
.note-card h2,
.faq-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 800;
}
.note-card p {
  margin-top: 9px;
  font-size: 13.2px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.notes-media {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}
.notes-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faq-accordion { margin-top: 8px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:first-child { border-top: 0; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.2px;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}
.faq-question:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.faq-icon {
  position: relative;
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s ease; }
.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer p {
  padding: 0 24px 8px 0;
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ------------------------------------------------ CTA */
.cta { padding: 2px 0 14px; }
.cta-band {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 9px 26px 9px 9px;
  background: var(--cta-bg);
  border-radius: var(--radius-band);
}
.cta-media { height: 163px; border-radius: 14px; overflow: hidden; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-copy h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 29px;
  line-height: 1.35;
  font-weight: 800;
}
.cta-copy p {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #5c4a3b;
}
.cta-band .btn { min-height: 46px; padding: 0 22px; font-size: 14.5px; }

/* ------------------------------------------------ inner page: page hero */
.page-hero { padding: 10px 0 22px; }
.page-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-top: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: 40px; line-height: 1.25; font-weight: 800; }
.page-hero p {
  margin-top: 8px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.page-hero-count {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--ink-soft);
}
.page-hero-count strong {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  color: var(--accent);
}
.page-hero-count span { font-size: 13px; }

/* ------------------------------------------------ filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 14px 18px;
  margin-bottom: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-label { font-size: 12.5px; font-weight: 700; color: var(--ink-mute); }
.filter-bar > .filter-label { font-size: 13px; color: var(--ink); }
.result-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-soft);
}
.result-count strong { color: var(--accent); }

/* ------------------------------------------------ breed grid (list page) */
.grid-head { margin-bottom: 16px; }
.grid-head h2 { font-size: 24px; }
.grid-head .section-note { margin-left: auto; font-size: 13.5px; color: var(--ink-soft); }
.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.breed-grid .breed-thumb img { aspect-ratio: 4 / 3; }
.breed-grid .breed-body { padding: 16px 18px 18px; }
.breed-grid .breed-name { font-size: 19px; }
.breed-grid .breed-desc { font-size: 13.5px; }

.empty-state {
  padding: 34px 20px;
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ------------------------------------------------ list description */
.list-seo { padding: 34px 0; margin-top: 34px; background: var(--surface-soft); }
.list-seo-inner { max-width: 980px; }
.list-seo h2 { font-size: 24px; line-height: 1.4; font-weight: 800; }
.list-seo p {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* ------------------------------------------------ related categories */
.related-categories { padding: 30px 0 40px; }
.related-categories h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.related-categories .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ------------------------------------------------ detail: article */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
  max-width: 1180px;
  padding-bottom: 30px;
}
.article-aside { position: sticky; top: 100px; }
.article-toc {
  padding: 16px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.article-toc h2 { font-size: 14px; font-weight: 800; color: var(--ink); }
.article-toc ol { margin-top: 8px; counter-reset: toc; }
.article-toc li { counter-increment: toc; border-top: 1px solid rgba(230, 210, 193, .7); }
.article-toc li:first-child { border-top: 0; }
.article-toc a {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 700;
}
.article-toc a:hover { color: var(--accent); }

.article-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
}
.article-head h1 { font-size: 46px; line-height: 1.2; font-weight: 800; }
.article-lead {
  margin-top: 8px;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.article-media { margin-top: 20px; border-radius: var(--radius-card); overflow: hidden; }
.article-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.prose { padding-top: 8px; max-width: 840px; }
.prose h2 {
  margin-top: 32px;
  padding-top: 4px;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 800;
  scroll-margin-top: 96px;
}
.prose p {
  margin-top: 10px;
  font-size: 15.5px;
  line-height: 1.95;
  color: #443a32;
}
.prose-note {
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-soft);
  background: var(--surface-soft);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.related-breeds { padding: 30px 0 44px; border-top: 1px solid var(--line); }
.related-breeds h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.related-breeds .breed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .featured-layout { grid-template-columns: minmax(0, 1fr) 400px; }
  .care-band { grid-template-columns: 340px minmax(0, 1fr); }
  .cta-band { grid-template-columns: 250px minmax(0, 1fr) auto; }
  .hero h1 { font-size: 46px; }
  .hero-sub { font-size: 25px; }
}

@media (max-width: 1100px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-layout { grid-template-columns: 1fr; gap: 16px; }
  .featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .notes-media { display: none; }
  .care-band { grid-template-columns: 300px minmax(0, 1fr); }
  .care-grid { gap: 18px; }
}

@media (max-width: 980px) {
  .hero { height: auto; min-height: 0; }
  .hero-media { position: relative; width: 100%; height: 300px; order: 2; }
  .hero-media::before { background: linear-gradient(180deg, rgba(249, 236, 230, .55) 0%, rgba(249, 236, 230, 0) 30%); }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; }
  .hero-copy { width: 100%; padding: 30px 0 24px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 23px; }
  .categories { padding-top: 30px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-band { grid-template-columns: 1fr; }
  .care-media { min-height: 220px; max-height: 240px; }
  .care-body { padding: 20px 22px 22px; }
  .care-body h2 { font-size: 21px; }
  .care-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .notes-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 200px minmax(0, 1fr); padding: 12px; gap: 18px; }
  .cta-media { height: 150px; }
  .cta-copy h2 { font-size: 22px; }
  .cta-band .btn { grid-column: 1 / -1; justify-self: start; }
  .article-layout { grid-template-columns: 1fr; gap: 20px; }
  .article-aside { position: static; }
  .article-toc ol { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .article-toc li { border-top: 0; }
  .breed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero h1 { font-size: 34px; }
  .page-hero-inner { align-items: flex-start; }
}

@media (max-width: 620px) {
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 20px; }
  .hero-lead { font-size: 15px; }
  .hero-media { height: 230px; }
  .hero .btn { min-height: 48px; font-size: 15px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .breed-name { font-size: 16.5px; }
  .breed-desc { font-size: 12.5px; }
  .care-grid { grid-template-columns: 1fr; gap: 16px; }
  .care-item { text-align: left; display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; }
  .care-icon { grid-row: 1 / 3; }
  .care-item h3 { margin-top: 0; }
  .care-item p { margin-top: 2px; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-media { height: 180px; order: 2; }
  .cta-copy h2 { font-size: 22px; }
  .cta-band .btn { order: 3; }
  .notes-grid { gap: 12px; }
  .note-card, .faq-card { padding: 18px 16px; }
  .faq-question { font-size: 13.5px; padding: 10px 0; }
  .breed-grid { grid-template-columns: 1fr; }
  .related-categories .category-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 30px; }
  .page-hero p { font-size: 14.5px; }
  .page-hero-count { display: none; }
  .filter-bar { gap: 8px 12px; padding: 12px; }
  .result-count { margin-left: 0; width: 100%; }
  .article-head h1 { font-size: 34px; }
  .article-lead { font-size: 15px; }
  .prose h2 { font-size: 21px; }
  .prose p { font-size: 15px; line-height: 1.9; }
  .related-breeds .breed-grid { grid-template-columns: 1fr; }
}
