/* ═════════════════════════════════════════════════════════════════════
   VISTA CONJUNTO — B2B densa tipo "lista de precios imprimible"
   Se activa solo cuando body tiene clase "modo-conjunto"
   ═════════════════════════════════════════════════════════════════════ */

/* Ocultar TODO el layout normal del sitio */
body.modo-conjunto .topbar,
body.modo-conjunto .hero-strip,
body.modo-conjunto .breadcrumbs,
body.modo-conjunto .layout,
body.modo-conjunto .filter-toggle,
body.modo-conjunto footer { display: none !important; }

body.modo-conjunto { background: #f5f5f5; }

/* ─── Header propio del modo-conjunto ───────────────────────────────── */
.vc-header {
  background: #1d6b3a;
  color: white;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.vc-header .brand { font-weight: 800; font-size: 1.1rem; letter-spacing: .5px; }
.vc-header .titulo { font-weight: 600; font-size: 1rem; opacity: .95; }
.vc-header .sep { opacity: .4; }
.vc-header .vc-search {
  flex: 1;
  position: relative;
  max-width: 520px;
  margin-left: auto;
}
.vc-header .vc-search input {
  width: 100%;
  padding: 7px 36px 7px 14px;
  border: none;
  border-radius: 999px;
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  background: rgba(255,255,255,.95);
  color: #222;
}
.vc-header .vc-search .bi {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}
.vc-header .vc-actions { display: flex; gap: 8px; }
.vc-btn {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vc-btn:hover { background: rgba(255,255,255,.25); }
.vc-btn-primary { background: white; color: #1d6b3a; border-color: white; font-weight: 600; }
.vc-btn-primary:hover { background: #f0f0f0; }

/* ─── Contador + contenedor ─────────────────────────────────────────── */
.vc-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 10px 40px;
  font-family: inherit;
}
.vc-meta {
  font-size: .78rem;
  color: #666;
  margin-bottom: 10px;
  padding: 0 4px;
}
.vc-meta strong { color: #1d6b3a; }

/* ─── Familia (padre con hijos) ─────────────────────────────────────── */
.vc-familia {
  background: white;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.vc-familia-header {
  background: #1a1a1a;
  color: white;
  padding: 6px 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: .72rem;
  font-weight: 600;
}
.vc-familia-body { display: flex; align-items: stretch; }
.vc-familia-tabla {
  flex: 1;
  min-width: 0;
}
.vc-familia-tabla table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.vc-familia-tabla th {
  background: #f4f4f4;
  padding: 4px 10px;
  font-weight: 600;
  color: #555;
  font-size: .68rem;
  text-transform: uppercase;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
}
.vc-familia-tabla th.nombre-col { text-align: left; }
.vc-familia-tabla td {
  padding: 3px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  line-height: 1.3;
  text-align: center;
}
.vc-familia-tabla tr:last-child td { border-bottom: none; }
.vc-familia-tabla tr:nth-child(even) td { background: #fafafa; }
.vc-familia-tabla td.sku    { font-family: 'Menlo', monospace; color: #333; white-space: nowrap; font-size: .72rem; }
.vc-familia-tabla td.nombre { text-align: left; color: #222; }
.vc-familia-tabla td.precio { color: #1d6b3a; font-weight: 600; white-space: nowrap; }

.vc-familia-imagen {
  flex: 0 0 92px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-left: 1px solid #e8e8e8;
}
.vc-familia-imagen img { max-width: 100%; max-height: 84px; object-fit: contain; }
.vc-familia-imagen .vc-sin-img { color: #cfcfcf; font-size: 1.8rem; }

/* ─── Simple (sin padre) — fila densa estilo tabla única ────────────── */
.vc-simple {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border: 1px solid #e2e2e2;
  border-top: none;
  background: white;
  font-size: .8rem;
  line-height: 1.3;
}
.vc-simple:first-of-type,
.vc-familia + .vc-simple { border-top: 1px solid #e2e2e2; border-radius: 6px 6px 0 0; }
.vc-simple:last-of-type { border-radius: 0 0 6px 6px; }
.vc-simple:nth-child(even) { background: #fafafa; }
.vc-simple .sku {
  font-family: 'Menlo', monospace;
  color: #444;
  font-size: .72rem;
  white-space: nowrap;
}
.vc-simple .nombre { color: #222; }
.vc-simple .marca  { color: #888; font-size: .68rem; text-transform: uppercase; }
.vc-simple .precio { color: #1d6b3a; font-weight: 700; font-size: .92rem; white-space: nowrap; text-align: right; }
.vc-sin-precio { color: #999; font-style: italic; font-size: .78rem; }

/* ─── Estados ────────────────────────────────────────────────────────── */
.vc-empty, .vc-error {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  background: white;
  border-radius: 6px;
  margin-top: 20px;
}
.vc-error { color: #b23b3b; }

/* ═════════════════════════════════════════════════════════════════════
   PRINT A4 — LISTA DE PRECIOS IMPRIMIBLE
   ═════════════════════════════════════════════════════════════════════ */
@media print {
  @page { size: A4 portrait; margin: 10mm 8mm; }
  body { background: white !important; }
  .vc-header, .no-print { display: none !important; }
  .vc-wrap { max-width: none; padding: 0; }
  .vc-meta { display: none; }

  .vc-print-header { display: block !important; margin-bottom: 8px; }
  .vc-print-header h1 { margin: 0; font-size: 16pt; text-align: center; text-transform: uppercase; }
  .vc-print-header .sub { text-align: center; font-size: 9pt; color: #444; margin-top: 2px; border-bottom: 1.5pt solid black; padding-bottom: 4px; }

  .vc-familia, .vc-simple { break-inside: avoid; page-break-inside: avoid; margin-bottom: 4px; }
  .vc-familia-header { background: black !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 8pt; padding: 3px 8px; }
  .vc-familia-tabla td, .vc-familia-tabla th { font-size: 8pt; padding: 2px 6px; }
  .vc-familia-imagen { flex: 0 0 60px; padding: 3px; }
  .vc-familia-imagen img { max-height: 52px; }
  .vc-simple { padding: 2px 6px; font-size: 8pt; }
  .vc-simple .precio { color: black !important; }
  .vc-familia-tabla td.precio { color: black !important; }
}
.vc-print-header { display: none; }
