/* /produkte/vergleich — Angebot Block 2.2 Side-by-side Compare-Tabelle.
   Pattern folgt index_product.css (dense Spec-Layout, Hairline-Borders) und
   index_parts_list.css (Karten-Grid). Mobile: bei <760 px schaltet das Grid
   auf horizontal-scroll, damit auch 4-Spalten lesbar bleiben. */

.compare-page .page-narrow-hero { margin-bottom: 2rem; }

.compare-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-grid {
  display: grid;
  grid-template-columns: minmax(140px, 200px) repeat(var(--cols, 4), minmax(180px, 1fr));
  border: 1px solid var(--c-border, #e5e5e5);
  border-radius: 6px;
  background: #fff;
  min-width: 720px;
}
.compare-grid[data-cols="1"] { --cols: 1; }
.compare-grid[data-cols="2"] { --cols: 2; }
.compare-grid[data-cols="3"] { --cols: 3; }
.compare-grid[data-cols="4"] { --cols: 4; }

.compare-row { display: contents; }

.compare-cell {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--c-border-light, #f0f0f0);
  font-size: 0.92rem;
  line-height: 1.35;
  background: #fff;
}
.compare-row--head .compare-cell { border-bottom: 1px solid var(--c-border, #e5e5e5); padding: 1rem; }
.compare-row--section .compare-cell {
  grid-column: 1 / -1;
  background: #fafafa;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--c-border, #e5e5e5);
}
.compare-cell--label {
  font-weight: 500;
  color: #555;
  background: #fafafa;
  border-right: 1px solid var(--c-border-light, #f0f0f0);
}
.compare-cell--empty {
  grid-column: 2 / -1;
  color: var(--rok-text-muted-accessible);
  font-style: italic;
}
.compare-cell--rating {
  font-family: var(--ff-mono, ui-monospace, monospace);
  text-align: center;
  color: #c98b00;
}

.compare-hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #f7f7f7;
}
.compare-title {
  margin: 0.55rem 0 0.35rem;
  font-size: 1rem;
  line-height: 1.2;
}
.compare-title a { color: inherit; text-decoration: none; }
.compare-title a:hover { text-decoration: underline; }

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}
.compare-action {
  background: transparent;
  border: 1px solid var(--c-border, #e5e5e5);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}
.compare-action:hover { border-color: #999; }
.compare-action--remove { color: var(--rok-text-muted-accessible); }

.compare-empty {
  margin: 2rem 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--c-border, #e5e5e5);
  border-radius: 8px;
}
.compare-empty h2 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.compare-empty p { margin: 0 0 1.2rem; color: #666; }

/* PDP-CTA — kompakt unter den anderen Action-Buttons (Print/Datasheet etc.) */
.compare-cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0;
}
.compare-cta-toggle,
.compare-cta-open {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--c-border, #e5e5e5);
  background: #fff;
  cursor: pointer;
  color: #333;
}
.compare-cta-toggle.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.compare-cta-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.compare-cta-open {
  background: #f7f7f7;
}
.compare-cta-open:hover { background: #ececec; }

@media (max-width: 760px) {
  .compare-grid { min-width: 640px; }
  .compare-cell { font-size: 0.85rem; }
  .compare-hero { aspect-ratio: 1 / 1; }
}
