/* =========================================================
   cms.css — Styling für CMS-gerenderte Inhalte
   (Marketplace-Listings, Detail-Seiten)
   Im CI-Stil: Fraunces + Inter, ruhig, viel Whitespace.
   ========================================================= */

/* ===== Marketplace Grid ===== */
.cms-mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.cms-mp-card {
  display: block;
  background: var(--paper, #f6f1e6);
  border: 1px solid var(--hairline, rgba(14,42,58,0.12));
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cms-mp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 42, 58, 0.08);
  border-color: rgba(14, 42, 58, 0.25);
}

.cms-mp-figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(14, 42, 58, 0.04);
}
.cms-mp-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.cms-mp-card:hover .cms-mp-figure img { transform: scale(1.03); }

.cms-mp-body {
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem;
}

.cms-mp-pinned {
  position: absolute;
  top: -.6rem;
  right: 1rem;
  background: var(--accent, #b88a4a);
  color: #fff;
  font-size: .75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cms-mp-loc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent, #b88a4a);
  margin: 0 0 .65rem;
}

.cms-mp-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--ink, #0e2a3a);
}

.cms-mp-short {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
  line-height: 1.55;
  color: rgba(14, 42, 58, 0.7);
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cms-mp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline, rgba(14,42,58,0.12));
}
.cms-mp-spec {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  color: rgba(14, 42, 58, 0.6);
}
.cms-mp-price {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink, #0e2a3a);
}

.cms-mp-arrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink, #0e2a3a);
  font-weight: 500;
}

/* ===== Section-Wrapper für Live-Listings ===== */
.cms-mp-section {
  padding: 4rem 0;
  background: var(--paper, #f6f1e6);
  border-top: 1px solid var(--hairline, rgba(14,42,58,0.12));
}
.cms-mp-section-head {
  margin-bottom: 2.5rem;
}
.cms-mp-section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent, #b88a4a);
  margin: 0 0 .9rem;
}
.cms-mp-section-head .eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent, #b88a4a);
}
.cms-mp-section-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  color: var(--ink, #0e2a3a);
  margin: 0 0 .75rem;
  max-width: 22ch;
}
.cms-mp-section-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent, #b88a4a);
}
.cms-mp-section-head p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(14, 42, 58, 0.7);
  max-width: 58ch;
  margin: 0;
}

/* ===== Detail-Page ===== */
.cms-detail-hero {
  padding: 6rem 0 2.5rem;
  background: var(--paper, #f6f1e6);
}
.cms-detail-hero .eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent, #b88a4a);
  margin: 0 0 1rem;
}
.cms-detail-hero h1.h-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  color: var(--ink, #0e2a3a);
  max-width: 22ch;
}
.cms-detail-hero .lede {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(14, 42, 58, 0.75);
  max-width: 60ch;
  margin: 0;
}
.cms-detail-price {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink, #0e2a3a);
  margin: 1.5rem 0 0;
}

.cms-detail-hero-img {
  margin: 0;
  max-height: 60vh;
  overflow: hidden;
  background: rgba(14, 42, 58, 0.04);
}
.cms-detail-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-detail-body {
  padding: 4rem 0;
  background: #fff;
}
.cms-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 880px) {
  .cms-detail-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.cms-detail-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(14, 42, 58, 0.85);
}
.cms-detail-text h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  color: var(--ink, #0e2a3a);
}
.cms-detail-text p { margin: 0 0 1.25rem; }
.cms-detail-text blockquote {
  border-left: 2px solid var(--accent, #b88a4a);
  padding-left: 1.5rem;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink, #0e2a3a);
  margin: 2rem 0;
}
.cms-detail-text figure {
  margin: 2rem -1rem;
}
.cms-detail-text figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.cms-detail-text hr {
  border: none;
  border-top: 1px solid var(--hairline, rgba(14,42,58,0.12));
  margin: 2.5rem 0;
}

.cms-detail-specs {
  background: var(--paper, #f6f1e6);
  border: 1px solid var(--hairline, rgba(14,42,58,0.12));
  padding: 1.75rem;
  border-radius: 4px;
  position: sticky;
  top: 6rem;
}
.cms-detail-specs h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent, #b88a4a);
  margin: 0 0 1.25rem;
  font-weight: 600;
}
.cms-detail-specs dl {
  margin: 0 0 1.5rem;
  display: grid;
  gap: .75rem;
}
.cms-detail-specs dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--hairline, rgba(14,42,58,0.12));
}
.cms-detail-specs dl > div:last-child { border-bottom: none; padding-bottom: 0; }
.cms-detail-specs dt {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .85rem;
  color: rgba(14, 42, 58, 0.6);
}
.cms-detail-specs dd {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink, #0e2a3a);
  margin: 0;
}

.cms-detail-gallery {
  padding: 2rem 0 4rem;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}
.cms-detail-gallery figure {
  margin: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
}
.cms-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Journal-Index dynamic (überschreibt nichts, nutzt .jix-* aus styles.css) ===== */
[data-cms="journal-index"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .cms-mp-section { padding: 3rem 0; }
  .cms-mp-section-head { margin-bottom: 1.75rem; }
  .cms-mp-grid { grid-template-columns: 1fr; gap: 1.25rem; padding: 1rem 0; }
  .cms-detail-hero { padding: 4rem 0 2rem; }
  .cms-detail-body { padding: 2.5rem 0; }
  .cms-detail-specs { position: static; }
}

/* ============ Marketplace Detail Page Wrapper ============ */
.page-marketplace-detail .mp-detail-wrap {
  background: #F6F3EC;
  min-height: 70vh;
  padding-top: 2rem;
}
.mp-detail-section {
  padding: 1.5rem 0 4rem;
}
.mp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  font-family: Inter, sans-serif;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6E7B83;
  margin-bottom: 1.75rem;
}
.mp-breadcrumb a {
  color: #2C4452;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.mp-breadcrumb a:hover {
  border-bottom-color: currentColor;
}
.mp-breadcrumb-current {
  color: #0E2A3A;
  text-transform: capitalize;
}
.mp-detail-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(14, 42, 58, 0.08);
}
.mp-detail-back .mp-cta-line {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: Inter, sans-serif;
  font-size: .9rem;
  color: #0E2A3A;
  text-decoration: none;
  padding: .65rem 1.1rem;
  border: 1px solid rgba(14, 42, 58, 0.18);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}
.mp-detail-back .mp-cta-line:hover {
  background: #fff;
  border-color: rgba(14, 42, 58, 0.4);
}
.cms-detail-loading {
  padding: 4rem 0;
  text-align: center;
  color: #2C4452;
}
.cms-detail-loading .mp-eyebrow {
  justify-content: center;
}
