/* ==========================================================================
   FAMMIE FAMI S.A. — Estilos específicos de páginas de familias de producto
   Requiere: style.css (tokens, reset, header, footer, buttons, etc.)
   ========================================================================== */

/* ========== BREADCRUMB ========== */
.breadcrumb {
  padding: 16px 0;
  font-size: .85rem;
}
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb li + li::before {
  content: '›'; color: var(--steel-500); font-weight: 600;
}
.breadcrumb a {
  color: var(--blue-700); text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--navy-900); text-decoration: underline; }
.breadcrumb [aria-current] {
  color: var(--steel-600); font-weight: 500;
}

/* ========== FAMILIA HEADER ========== */
.familia-header {
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(24px, 4vw, 40px);
}
.familia-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; color: var(--navy-950);
  margin: 0 0 12px;
}
.familia-header .familia-intro {
  font-size: 1.05rem; color: var(--steel-700);
  max-width: 780px; line-height: 1.65;
}

/* ========== ÍNDICE DE SUBFAMILIAS ========== */
.subfamilia-index {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 40px; padding: 0;
  list-style: none;
}
.subfamilia-index a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--steel-200);
  border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  color: var(--navy-900); text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.subfamilia-index a:hover {
  background: var(--surface); border-color: var(--blue-700);
  color: var(--blue-700);
}
.subfamilia-index a svg {
  width: 14px; height: 14px; flex-shrink: 0;
  transition: transform .15s;
}
.subfamilia-index a:hover svg { transform: translateY(2px); }

/* ========== TARJETA DE SUBFAMILIA ========== */
.subfamilia-card {
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  margin-bottom: 32px;
}
.subfamilia-card:hover {
  box-shadow: 0 8px 28px rgba(18,90,163,.12);
  transform: translateY(-2px);
}
.subfamilia-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 768px) {
  .subfamilia-layout {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .subfamilia-layout {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

/* --- Columna información --- */
.subfamilia-info {
  padding: clamp(20px, 4vw, 32px);
  display: flex; flex-direction: column; justify-content: center;
}
.subfamilia-info h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700; color: var(--navy-950);
  margin: 0 0 14px;
}
.subfamilia-info .subfamilia-desc {
  font-size: .95rem; line-height: 1.7; color: var(--steel-700);
  margin: 0 0 20px;
}

/* --- Acordeón características --- */
.specs-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--steel-200);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-family: inherit; font-size: .88rem; font-weight: 600;
  color: var(--navy-900); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.specs-toggle:hover {
  background: var(--surface); border-color: var(--steel-500);
}
.specs-toggle svg {
  width: 16px; height: 16px; transition: transform .2s; flex-shrink: 0;
}
.specs-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.specs-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, margin .35s ease;
  margin-top: 0;
}
.specs-panel.is-open {
  max-height: 600px;
  margin-top: 16px;
}
.specs-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.specs-table th,
.specs-table td {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--steel-200);
}
.specs-table th {
  font-weight: 600; color: var(--navy-900);
  background: var(--surface);
}
.specs-table td { color: var(--steel-700); }

/* --- Columna imagen --- */
.subfamilia-media {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 3vw, 24px);
  background: #f0f3f6;
  border-top: 1px solid var(--steel-200);
}
@media (min-width: 768px) {
  .subfamilia-media {
    border-top: none;
    border-left: 1px solid var(--steel-200);
  }
}
.subfamilia-media img {
  max-width: 100%; max-height: 340px;
  object-fit: contain;
}

/* --- Columna documentación --- */
.subfamilia-docs {
  padding: clamp(20px, 4vw, 32px);
  border-top: 1px solid var(--steel-200);
}
@media (min-width: 1024px) {
  .subfamilia-docs {
    border-top: none;
    border-left: 1px solid var(--steel-200);
  }
}
.subfamilia-docs h3 {
  font-size: .95rem; font-weight: 700; color: var(--navy-950);
  margin: 0 0 16px;
}
.doc-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border: 1px solid var(--steel-200);
  border-radius: var(--radius); margin-bottom: 12px;
  transition: border-color .15s;
}
.doc-item:hover { border-color: var(--blue-700); }
.doc-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(18,90,163,.08); border-radius: var(--radius-sm);
  color: var(--blue-700);
}
.doc-icon svg { width: 20px; height: 20px; }
.doc-content { flex: 1; min-width: 0; }
.doc-name {
  font-size: .88rem; font-weight: 600; color: var(--navy-950);
  margin: 0 0 8px; line-height: 1.3;
}
.doc-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.doc-actions a {
  font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--blue-700); transition: color .15s;
}
.doc-actions a:hover { color: var(--navy-900); text-decoration: underline; }

/* ========== CTA FAMILIA ========== */
.familia-cta {
  text-align: center;
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
  background: var(--navy-900);
  color: #fff;
}
.familia-cta h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; margin: 0 0 16px;
  color: #fff;
}
.familia-cta p {
  font-size: 1.05rem; color: rgba(255,255,255,.75);
  max-width: 560px; margin: 0 auto 28px;
}
.familia-cta .btn {
  background: var(--blue-700); color: #fff; border-color: var(--blue-700);
}
.familia-cta .btn:hover {
  background: var(--blue-500); border-color: var(--blue-500);
}

/* ========== RESPONSIVE ESPECÍFICO ========== */
@media (max-width: 767px) {
  .subfamilia-media { min-height: 220px; }
}
