/* =========================================================
   宠物猫咪品种大全 — 公共组件
   header / nav / buttons / cards / chips / footer / breadcrumb
   ========================================================= */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 1180px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(249, 249, 249, .97);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(239, 224, 212, .75);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-weight: 800;
  flex: none;
}
.brand-mark { display: inline-flex; color: var(--accent); }
.brand-name { font-size: 21px; letter-spacing: .01em; color: var(--ink); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(240, 133, 25, .24);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid rgba(240, 133, 25, .38);
  outline-offset: 3px;
}

/* ------------------------------------------------ section heading */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2 {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 800;
}
.paw {
  flex: none;
  display: inline-flex;
  color: var(--accent);
}

/* ------------------------------------------------ category card */
.cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  background: var(--surface);
  border: 1px solid rgba(239, 224, 212, .9);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
}
.cat-thumb {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
}
.cat-thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  transition: transform .35s ease;
}
.cat-card:hover .cat-thumb img { transform: scale(1.04); }
.cat-body {
  display: block;
  padding: 10px 12px 0;
}
.cat-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.cat-desc {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ------------------------------------------------ breed card */
.breed-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid rgba(239, 224, 212, .9);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.breed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.breed-thumb { display: block; overflow: hidden; background: var(--surface-soft); }
.breed-thumb img {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  height: auto;
  object-fit: cover;
  transition: transform .35s ease;
}
.breed-card:hover .breed-thumb img { transform: scale(1.04); }
.breed-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
}
.breed-name { font-size: 18px; font-weight: 800; line-height: 1.4; }
.breed-name a { color: inherit; }
.breed-name a:hover { color: var(--accent); }
.breed-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.breed-link:focus-visible { outline: none; }
.breed-card:focus-within {
  outline: 3px solid rgba(240, 133, 25, .45);
  outline-offset: 3px;
}
.breed-desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.breed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.breed-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-mute);
  font-size: 11.5px;
  line-height: 1.6;
}

/* ------------------------------------------------ chips */
.chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.chip:hover { border-color: var(--accent-soft); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------ breadcrumb */
.crumb { padding: 18px 0 6px; }
.crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-mute);
}
.crumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line-strong);
}
.crumb a:hover { color: var(--accent); }

/* ------------------------------------------------ footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 56px 0 51px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.05fr .95fr;
  gap: 40px;
  align-items: start;
}
.brand-light { color: var(--footer-ink); }
.brand-light .brand-name { color: var(--footer-ink); }
.brand-light .brand-mark { color: var(--accent-soft); }
.footer-brand p {
  margin-top: 12px;
  max-width: 380px;
  font-size: 15.2px;
  line-height: 2;
  color: rgba(243, 230, 216, .78);
}
.footer-nav h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 14px;
}
.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 16px 26px;
  justify-content: start;
}
.footer-nav a { font-size: 14.5px; color: rgba(243, 230, 216, .88); }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal p {
  font-size: 14.2px;
  line-height: 2;
  color: rgba(243, 230, 216, .74);
}
.footer-legal .copyright { margin-top: 14px; color: rgba(243, 230, 216, .56); }

/* ------------------------------------------------ focus & motion */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------ responsive */
@media (max-width: 1180px) {
  :root { --gutter: 26px; }
  .main-nav ul { gap: 18px; }
  .main-nav a { font-size: 14px; }
  .brand-name { font-size: 19px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    display: none;
    padding: 10px var(--gutter) 18px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(120, 80, 45, .10);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a {
    display: block;
    padding: 12px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .main-nav li:last-child a { border-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-legal { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; --header-h: 68px; }
  .brand-name { font-size: 18px; }
  .section-head h2 { font-size: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav ul { grid-template-columns: repeat(2, auto); }
}

/* ── 数据对接补充（2026-11-13） ─────────────── */
a.chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.breed-thumb a { display: block; }
.breed-thumb a img { width: 100%; height: 100%; object-fit: cover; }
.breed-link { display: block; }
.breed-name {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.breed-desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.cat-desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.prose figure { margin: 22px 0; }
.prose figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.footer-legal a { color: rgba(243, 230, 216, .8); }
.footer-legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* 分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0 8px;
  font-size: 14px;
}
.pager a,
.pager span {
  min-width: 36px;
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  line-height: 1;
}
.pager a:hover { border-color: var(--accent-soft); color: var(--accent); }
.pager .pager-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.pager .pager-dots { border: 0; background: none; color: var(--ink-mute); }
.pager .pager-info {
  border: 0;
  background: none;
  color: var(--ink-mute);
  font-size: 13px;
  padding: 0 4px;
}

/* 上下篇 */
.article-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 18px 0 34px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.article-pager a { color: var(--accent); }
.article-pager a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 620px) {
  .pager { gap: 6px; font-size: 13px; }
  .pager a, .pager span { min-width: 32px; padding: 0 9px; }
  .pager .pager-info { width: 100%; padding: 6px 0 0; }
}
