/* Produktkatalog — rendert die Echtdaten aus /api/v2/f/pim/catalog */

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* Statuszeile (Laden / Fehler / leer) spannt über die volle Breite */
.catalog-state {
  grid-column: 1 / -1;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted, #667085);
  font-weight: 600;
}

.catalog-state.is-error {
  color: #ca3f5f;
}

.catalog-state-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy, #061b3a);
  margin-bottom: 4px;
}

/* Skeleton-Karten während des Ladens */
.catalog-skeleton {
  height: 150px;
  border-radius: 14px;
  background: linear-gradient(100deg, #f0f4f7 30%, #e6edf2 50%, #f0f4f7 70%);
  background-size: 200% 100%;
  animation: catalog-shimmer 1.2s ease-in-out infinite;
}

@keyframes catalog-shimmer {
  to { background-position: -200% 0; }
}

/* --- Produktkarte --- */
.pcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #e8eef3);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.pcard.is-available:hover {
  border-color: #d4e3da;
  box-shadow: 0 10px 28px rgba(15, 35, 66, .08);
}

/* Nicht verfügbare Sparten — kompakte, einzeilige Pill-Leiste über volle Breite */
.catalog-more {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e8eef3);
}

.catalog-more-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted, #667085);
  margin-right: 2px;
}

.sparte-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 6px 12px;
  border: 1px dashed #d9e2ea;
  border-radius: 999px;
  background: #fafbfc;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 700;
}

.sparte-pill-icon {
  font-size: 14px;
  opacity: .7;
}

.pcard-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pcard-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.pcard-sparte {
  flex: 1 1 auto;
  min-width: 0;
}

.pcard-sparte-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted, #667085);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcard-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pcard-status.is-on { color: #009966; }
.pcard-status.is-promo { color: #1c8fe3; }

/* Glasfaser-Promo-Karte (vorhanden, aber noch kein bestellbares Produkt) */
.pcard.is-promo {
  border-color: #bcdcff;
  background: linear-gradient(180deg, #f5f9ff, #ffffff);
}

.pcard.is-promo .pcard-cta {
  margin-top: auto;
  background: #1c8fe3;
}

.pcard.is-promo .pcard-cta:hover {
  background: #1577c4;
}

.pcard-name {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--navy, #061b3a);
  line-height: 1.25;
}

.pcard-desc {
  margin: 0 0 14px;
  color: var(--muted, #667085);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}


/* Preis-Block */
.pcard-price {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line, #e8eef3);
}

.pcard-price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pcard-price-amount {
  font-size: 24px;
  font-weight: 900;
  color: var(--navy, #061b3a);
  letter-spacing: -.02em;
}

.pcard-price-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #667085);
}

.pcard-price-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #667085);
  margin-top: 2px;
}

.pcard-price-none {
  font-size: 15px;
  font-weight: 800;
  color: var(--muted, #667085);
}

/* Aufklappbare Details */
.pcard-details {
  margin-top: 14px;
  border-top: 1px solid var(--line, #e8eef3);
}

.pcard-details > summary {
  list-style: none;
  cursor: pointer;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--green, #008b63);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pcard-details > summary::-webkit-details-marker { display: none; }

.pcard-details > summary::after {
  content: "⌄";
  font-size: 15px;
  transition: transform .15s ease;
}

.pcard-details[open] > summary::after {
  transform: rotate(180deg);
}

.pcard-details-body {
  padding-top: 12px;
}

.pcard-section {
  margin-bottom: 14px;
}

.pcard-section:last-child {
  margin-bottom: 0;
}

.pcard-section h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted, #667085);
}

/* Preis-Aufschlüsselung */
.pcard-price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line, #e8eef3);
}

.pcard-price-row:last-child { border-bottom: 0; }

.pcard-price-row .label {
  color: var(--text, #10213f);
  font-weight: 600;
}

.pcard-price-row .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #667085);
}

.pcard-price-row .value {
  flex: none;
  font-weight: 800;
  color: var(--navy, #061b3a);
  text-align: right;
}

/* Vertragsmerkmale als Chips */
.pcard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pcard-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft, #f6faf8);
  border: 1px solid var(--line, #e8eef3);
  font-size: 12px;
  font-weight: 700;
  color: #43546a;
}

/* Beschreibungstext (aus sanitisiertem description_long) */
.pcard-richtext {
  font-size: 14px;
  color: var(--text, #10213f);
  line-height: 1.5;
}

.pcard-richtext ul,
.pcard-richtext ol {
  margin: 0;
  padding-left: 18px;
}

.pcard-richtext li { margin: 2px 0; }
.pcard-richtext p { margin: 0 0 6px; }

.pcard-footnote {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #98a2b3;
}

/* CTA-Button auf verfügbaren Karten */
.pcard-cta {
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--navy, #061b3a);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer;
  text-align: center;
}

.pcard-cta:hover { background: #0a2750; }

.pcard-cta:focus-visible,
.pcard-details > summary:focus-visible {
  outline: 2px solid var(--green, #008b63);
  outline-offset: 2px;
}
