/* ========================================================================
   Shapes Library — Family index
   ======================================================================== */

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  color: #e0e0e0;
}

.breadcrumb { font-size: 0.78rem; color: #777; margin-bottom: 0.5rem; }
.breadcrumb a { color: #9aa; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { margin: 0 0.4rem; color: #444; }

.page-hero {
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid #1e1e1e;
  margin-bottom: 1.5rem;
}
.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}
.page-hero .subtitle {
  margin: 0 0 0.8rem;
  max-width: 800px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #999;
}
.library-stats {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

/* ---- Family grid ---- */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.85rem;
}

.family-card {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid #222;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.family-card:hover {
  border-color: #3a7bd5;
  background: #131b24;
  transform: translateY(-1px);
}

.family-thumb {
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}
.family-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumb-empty {
  color: #333;
  font-size: 1.5rem;
}

.family-body {
  padding: 0.6rem 0.8rem 0.75rem;
}
.family-name {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e8e8e8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.family-meta {
  display: flex;
  gap: 0.6rem;
  font-size: 0.62rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.meta-count { color: #3a7bd5; font-weight: 600; }
.meta-dims  { color: #888; }
.meta-n     { color: #555; }

/* ---- Variant strip (expanded family) ---- */
.variant-strip {
  margin-top: 2rem;
  padding: 1.25rem 1.25rem 1.5rem;
  background: #101418;
  border: 1px solid #1e2a3a;
  border-radius: 6px;
}
.variant-strip[hidden] { display: none; }

.variant-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.variant-strip-head h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #fff;
}
.close-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.close-btn:hover { border-color: #666; color: #fff; }

.variant-strip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.72rem;
  color: #888;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #1e2a3a;
  margin-bottom: 0.9rem;
}
.meta-item em {
  font-style: normal;
  color: #556;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
  margin-right: 0.25rem;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.variant-card {
  display: flex;
  flex-direction: column;
  background: #0c0f13;
  border: 1px solid #1e2a3a;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.variant-card:hover {
  border-color: #3a7bd5;
  background: #131b24;
}

.variant-thumb {
  aspect-ratio: 1 / 1;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.variant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.variant-label {
  padding: 0.4rem 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-top: 1px solid #141820;
}
.v-name {
  font-size: 0.74rem;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-sub {
  font-size: 0.58rem;
  color: #556;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
