/* แมวของเรา (/cats/) — page styles. Shared styles are in /assets/css/lazycat.css.
   --g = the cat's group colour (from the API). */

.cats-hero, .cat-hero{padding-bottom:3rem}
.cat-hero{background:radial-gradient(1000px 480px at 90% -10%,color-mix(in srgb,var(--g) 18%,transparent) 0%,transparent 62%)}

/* placeholder cat face for cats without photos */
.cat-ph{
  display:grid;place-items:center;width:100%;height:100%;
  color:color-mix(in srgb,var(--g,#D9788F) 55%,#fff);
  background:color-mix(in srgb,var(--g,#D9788F) 12%,#fff);
}
.cat-ph svg{width:52%;height:auto}

/* toolbar: group chips + search */
.cats-toolbar{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between}
.cats-toolbar .filters{flex:1 1 520px}
.filter-btn .dot,.cat-group .dot,.cat-group-tag .dot{
  display:inline-block;width:.6rem;height:.6rem;border-radius:50%;
  background:var(--g,var(--rose));margin-right:.4rem;vertical-align:.05em;
}
.filter-btn .n{opacity:.6;font-size:.82em;margin-left:.15rem}
.filter-btn[aria-pressed="true"] .dot{box-shadow:0 0 0 2px #fff}
.cats-search{
  position:relative;flex:0 1 260px;margin:0;
}
.cats-search i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:var(--plum-soft);font-size:.9rem}
.cats-search input{
  width:100%;border:none;border-radius:999px;background:#fff;color:var(--plum);
  padding:.5rem 1rem .5rem 2.4rem;font-size:.94rem;
  box-shadow:inset 0 0 0 1px rgba(217,120,143,.3);
}
.cats-search input:focus{outline:none;box-shadow:inset 0 0 0 2px var(--rose)}

/* cat cards */
.cat-card{
  display:block;height:100%;background:#fff;border-radius:20px;overflow:hidden;
  box-shadow:var(--shadow);color:var(--plum);text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease;
}
.cat-card:hover,.cat-card:focus-visible{transform:translateY(-4px);color:var(--plum);box-shadow:0 18px 38px rgba(148,106,118,.2)}
.cat-photo{position:relative;aspect-ratio:1/1;overflow:hidden}
.cat-photo img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease}
.cat-card:hover .cat-photo img{transform:scale(1.04)}
.cat-badge{
  position:absolute;right:.6rem;bottom:.6rem;background:rgba(92,64,72,.72);color:#fff;
  font-size:.78rem;border-radius:999px;padding:.1rem .6rem;backdrop-filter:blur(4px);
}
.cat-body{padding:.8rem 1rem 1rem;border-top:4px solid var(--g)}
.cat-name{font-size:1.1rem;margin:0 0 .3rem;line-height:1.35}
.cat-name i,.fam-name i{font-size:.85em;color:var(--rose)}
.cat-name .bi-gender-male,.fam-name .bi-gender-male,.cat-facts .bi-gender-male{color:#4A8FC7}
i.mem{color:var(--plum-soft) !important}
.cat-meta{display:flex;flex-wrap:wrap;gap:.25rem .8rem;font-size:.82rem;color:var(--plum-soft);line-height:1.5}
.cat-has-story i{color:var(--rose)}
.cats-memory .cat-photo img{filter:saturate(.75)}

.cat-empty{color:var(--plum-soft);font-size:.95rem}
.cat-count{font-family:'Prompt',sans-serif;font-weight:300;font-size:.6em;color:var(--plum-soft)}

/* ---------- one cat ---------- */
.cat-crumbs{font-size:.88rem}
.cat-crumbs a{color:var(--plum-soft);text-decoration:none}
.cat-crumbs a:hover{color:var(--rose-deep)}
.cat-crumbs .active{color:var(--plum)}

.cat-main-photo{border-radius:28px;overflow:hidden;box-shadow:var(--shadow);aspect-ratio:4/5;background:#fff}
.cat-main-photo img{width:100%;height:100%;object-fit:cover;display:block}
.cat-main-photo.cat-ph{flex-direction:column;gap:.5rem;font-size:.9rem;color:var(--plum-soft);display:flex;align-items:center;justify-content:center}
.cat-main-photo.cat-ph svg{width:45%;color:color-mix(in srgb,var(--g,#D9788F) 55%,#fff)}
.cat-group-tag{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--g) 45%,transparent)}
.cat-aliases{color:var(--plum-soft);font-size:.92rem}
.cat-lead{font-size:1.05rem}

.cat-facts li{display:flex;gap:.7rem;align-items:flex-start;font-size:.95rem;color:var(--plum-soft);margin-bottom:.45rem}
.cat-facts i{color:var(--rose);font-size:1.05rem;line-height:1.75;flex:0 0 auto}

.cat-story p{max-width:72ch;font-size:1rem}
.cat-story p:last-child{margin-bottom:0}

.fam-title{font-size:1.15rem;margin-bottom:1rem}
.fam-title i{color:var(--rose);margin-right:.35rem}
.fam-sublabel{font-size:.82rem;color:var(--plum-soft);margin-bottom:.5rem;letter-spacing:.2px}
.fam-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.5rem}
.fam-member{
  display:flex;align-items:center;gap:.7rem;padding:.45rem .6rem;border-radius:16px;
  background:var(--cream);color:var(--plum);text-decoration:none;
  transition:background .15s ease;
}
a.fam-member:hover{background:var(--blush);color:var(--plum)}
.fam-avatar{
  flex:0 0 46px;width:46px;height:46px;border-radius:50%;overflow:hidden;
  box-shadow:0 0 0 2px #fff,0 0 0 4px color-mix(in srgb,var(--g) 55%,transparent);
}
.fam-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.fam-avatar.cat-ph svg{width:70%}
.fam-text{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.fam-role{font-size:.74rem;color:var(--plum-soft)}
.fam-name{font-family:'Mali',cursive;font-weight:500;font-size:.98rem}
.fam-sub{font-size:.76rem;color:var(--plum-soft)}

.cat-pager-band{padding:2.5rem 0 4.5rem}
.cat-main-empty{aspect-ratio:1/1;max-width:340px;margin-inline:auto}
.cat-pager{display:flex;justify-content:space-between;align-items:center;gap:.6rem;flex-wrap:wrap}
.cat-404{width:140px;height:140px;border-radius:50%}

@media (max-width:575.98px){
  .cat-body{padding:.6rem .75rem .8rem}
  .cat-name{font-size:1rem}
  .cats-search{flex-basis:100%}
  .cat-pager{justify-content:center}
}
