/* =========================================
   CNC KONFIGURIEREN (cnc-konfigurieren.html)
   =========================================
   Baut auf cnc-router.css und cnc-berater.css auf (Banner, Raster, Auswahlkacheln,
   Knöpfe). Links die Konfiguration mit Nettopreis, rechts vier nummerierte Teile:
   Modell, Standardausstattung, Ausstattung, Anfrage. Logik: js/cnc-konfig.js. */

.ck-teil { padding: 0 0 44px; }
.ck-teil + .ck-teil { padding-top: 44px; border-top: 1px solid var(--cr-line); }
.ck-teil { scroll-margin-top: 96px; }
/* Überschriften wie die Fragen in cnc-berater.css (sonst greift die große h2 aus style.css) */
.ck-teil h2 { margin: 0 0 10px; color: #222; font: 700 clamp(1.5rem, 2.2vw, 2rem)/1.25 var(--font-family-heading); }
.ck-teil h2:focus { outline: none; }

/* ---------- 01 Modell ---------- */
/* Baureihen wie die Karten der CNC-Fräsen-Übersicht (.cr-karte, .cr-band, .cr-bild in cnc-router.css):
   ohne Rahmen, beim Überfahren grauer Grund mit Schatten, Namensband oben rechts, Foto zoomt leicht.
   Die gewählte Baureihe behält dieses Aussehen. */
.ck-reihen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.8%; row-gap: 30px; }
.ck-reihe {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 0 0;
    border: 0;
    background: none;
    color: #333;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 300ms ease, box-shadow 300ms ease;
}
.ck-reihe .cr-bild { width: 100%; }
.ck-reihe-bild { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 300ms ease; }
.ck-ohne-bild {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f7f8f9 0%, #eceef0 100%);
    color: #b7bdc3;
    font: 700 1.6rem/1 var(--font-family-heading);
    letter-spacing: 0.04em;
}
.ck-reihe-text { display: flex; flex-direction: column; width: 100%; padding: 22px 15px 24px; }
.ck-reihe-titel { min-height: 3em; color: #333; font-size: 1rem; line-height: 1.5; }
.ck-reihe-titel strong { font-weight: 700; }
.ck-reihe-preis { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cr-line); color: #111; font: 700 1.2rem/1.2 var(--font-family-heading); }
.ck-reihe-preis span { color: #666; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ck-reihe-info { margin-top: 4px; color: #666; font-size: 0.8rem; }
.ck-reihe:hover,
.ck-reihe:focus-visible,
.ck-reihe[aria-checked="true"] { background: var(--cr-soft); box-shadow: 3px 5px 18px 0 rgba(0, 0, 0, 0.18); }
.ck-reihe:hover .cr-band,
.ck-reihe:focus-visible .cr-band,
.ck-reihe[aria-checked="true"] .cr-band { opacity: 1; transform: none; }
.ck-reihe:hover .ck-reihe-bild { transform: scale(1.05); }
.ck-reihe[aria-checked="true"] .ck-reihe-titel strong { color: var(--cr-accent); }
.ck-reihe:focus-visible, .ck-gr:focus-visible { outline: 2px solid var(--cr-accent); outline-offset: 2px; }

.ck-groesse { margin-top: 8px; }
.ck-groessen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ck-gr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--cr-line);
    background: #fff;
    color: var(--cb-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 200ms ease, background-color 200ms ease;
}
.ck-gr strong { color: #222; font: 700 1rem/1.3 var(--font-family-heading); }
.ck-gr span { color: var(--cb-grau); font-size: 0.8rem; }
.ck-gr b { margin-top: 6px; color: #111; font-size: 1rem; }
.ck-gr:hover { border-color: var(--cr-accent); }
.ck-gr[aria-checked="true"] { border-color: var(--cr-accent); background: var(--cb-blau-hell); box-shadow: inset 0 0 0 1px var(--cr-accent); }
.ck-gr[aria-checked="true"] strong { color: var(--cr-accent); }

/* ---------- 02 Standardausstattung ---------- */
.ck-maschine { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); border: 1px solid var(--cr-line); }
.ck-m-bild { margin: 0; background: linear-gradient(180deg, #ffffff 0%, #f3f4f5 100%); }
.ck-m-img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.ck-m-text { padding: 24px 28px; border-left: 1px solid var(--cr-line); }
.ck-m-text h3 { margin: 0 0 8px; color: #222; font: 700 1.5rem/1.2 var(--font-family-heading); }
.ck-m-text p { margin: 0; color: var(--cb-grau); font-size: 0.92rem; line-height: 1.55; }
.ck-m-text .cb-daten { margin-top: 16px; }
#ck-spec { margin: 16px 0 0; }
.ck-tabelle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px 0 0; border-top: 1px solid var(--cr-line); }
.ck-tabelle > div { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 12px; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--cr-line); }
.ck-tabelle > div:nth-child(even) { padding-left: 14px; }
.ck-tabelle dt { color: #888; font-size: 0.82rem; }
.ck-tabelle dd { margin: 0; color: #222; font-size: 0.88rem; font-weight: 600; line-height: 1.45; }
.ck-tabelle .ck-tabelle-leer { grid-column: 1 / -1; grid-template-columns: 1fr; }
.ck-tabelle .ck-tabelle-leer dd { color: var(--cb-grau); font-weight: 400; }

/* ---------- 03 Ausstattung ---------- */
.ck-pakete { margin: 0 0 26px; }
.ck-pakete .cb-label { margin-top: 0; }
.ck-paket-reihe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ck-paket-reihe button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid var(--cr-line);
    background: #fff;
    color: var(--cb-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 200ms ease, background-color 200ms ease;
}
.ck-paket-reihe strong { color: #222; font: 700 0.98rem/1.3 var(--font-family-heading); }
.ck-paket-reihe span { color: var(--cb-grau); font-size: 0.8rem; }
.ck-paket-reihe b { margin-top: 6px; color: #111; font-size: 0.95rem; }
.ck-paket-reihe button:hover { border-color: var(--cr-accent); }
.ck-paket-reihe button[aria-pressed="true"] { border-color: var(--cr-accent); background: var(--cb-blau-hell); box-shadow: inset 0 0 0 1px var(--cr-accent); }
.ck-paket-reihe button[aria-pressed="true"] strong { color: var(--cr-accent); }

.ck-gruppe { margin: 0; padding: 0; border: 0; min-width: 0; }
.ck-gruppe + .ck-gruppe { margin-top: 24px; }
.ck-gruppe legend { margin: 0 0 10px; padding: 0; color: #222; font: 700 0.85rem/1.3 var(--font-family-heading); letter-spacing: 0.06em; text-transform: uppercase; }
.ck-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ck-opt { min-height: 0; padding: 16px 18px 16px 16px; }
.ck-opt .cb-wahl-text { flex: 1; }
.ck-opt input[type="checkbox"] { border-radius: 2px; }
.ck-opt input[type="checkbox"]:checked { border: 0; background: var(--cr-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E") center / 100% no-repeat; }
.ck-preis { flex: 0 0 auto; align-self: flex-start; padding-top: 1px; color: var(--cb-grau); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.ck-preis.is-plus { color: #111; }
.ck-opt.is-aus { opacity: 0.6; }
.ck-vakuum { margin: 16px 0 0; }
.ck-reset { margin: 18px 0 0; }
.ck-reset button { padding: 0; border: 0; background: none; color: var(--cr-accent); font: 600 0.9rem/1.4 inherit; cursor: pointer; }
.ck-reset button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 04 Anfrage ---------- */
.ck-form { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.ck-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ck-feld { display: flex; flex-direction: column; gap: 8px; color: #222; font-size: 0.85rem; font-weight: 600; }
.ck-feld input,
.ck-feld select,
.ck-feld textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #c9ced3;
    border-radius: 0;
    background: #fff;
    color: #222;
    font: 400 1rem/1.4 inherit;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.ck-feld textarea { resize: vertical; min-height: 110px; }
.ck-feld input:focus,
.ck-feld select:focus,
.ck-feld textarea:focus { outline: none; border-color: var(--cr-accent); box-shadow: inset 0 0 0 1px var(--cr-accent); }
.ck-mit .cb-label { margin: 0 0 8px; }
.ck-mit pre {
    max-height: 240px;
    margin: 0;
    overflow: auto;
    padding: 14px 16px;
    border-left: 3px solid var(--cr-accent);
    background: #f6f7f8;
    color: #444;
    font: 400 0.82rem/1.55 var(--font-family-body, inherit);
    white-space: pre-wrap;
}
.ck-senden { align-self: flex-start; min-width: 240px; margin-left: 0; }
.ck-form .kegema-lead-feedback { margin: 0; }

/* ---------- Konfiguration links ---------- */
.ck-summe { border: 1px solid var(--cr-line); }
.ck-s-kopf { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--cr-line); }
.ck-s-bild { display: block; width: 96px; aspect-ratio: 3 / 2; object-fit: contain; background: #f3f4f5; }
.ck-s-bild.ck-ohne-bild { font-size: 1rem; }
.ck-s-kopf strong { display: block; color: #222; font: 700 1.05rem/1.25 var(--font-family-heading); }
.ck-s-kopf small { color: var(--cb-grau); font-size: 0.8rem; }
.ck-s-zeilen { margin: 0; padding: 4px 14px; }
.ck-s-zeilen > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef0f2; font-size: 0.84rem; }
.ck-s-zeilen > div:last-child { border-bottom: 0; }
.ck-s-zeilen dt { color: #333; line-height: 1.4; }
.ck-s-zeilen dt span { display: block; color: #999; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ck-s-zeilen dd { margin: 0; color: #666; text-align: right; white-space: nowrap; }
.ck-s-zeilen .is-neu dt { color: #111; font-weight: 600; }
.ck-s-zeilen .is-neu dd { color: var(--cr-accent); font-weight: 600; }
.ck-s-total { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-top: 1px solid var(--cr-line); background: var(--cr-soft); }
.ck-s-total span { color: var(--cb-grau); font-size: 0.78rem; }
.ck-s-total strong { color: #111; font: 700 1.6rem/1.2 var(--font-family-heading); }
.ck-s-offen { margin: 0; padding: 10px 14px 0; color: #8a5a00; font-size: 0.8rem; line-height: 1.45; }
.ck-s-knopf { display: flex; width: calc(100% - 28px); min-width: 0; margin: 14px 14px 0; }
.ck-s-notiz { margin: 0; padding: 10px 14px 14px; color: #888; font-size: 0.76rem; line-height: 1.45; }

/* Preisleiste unten (Handy) */
.ck-leiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--cr-line);
    background: #fff;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
}
.ck-leiste strong { display: block; color: #111; font: 700 1rem/1.2 var(--font-family-heading); }
.ck-leiste small { color: var(--cb-grau); font-size: 0.78rem; }
.ck-leiste .cb-knopf { min-width: 0; height: 42px; padding: 0 16px; }
.ck-page .cb-berater [hidden], .ck-leiste[hidden] { display: none !important; }
/* .ck-leiste davor: schlägt a:not(.btn):hover aus style.css */
.ck-leiste .cb-knopf--voll:hover { background: #00468a; border-color: #00468a; color: #fff; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1199px) {
    .ck-reihen { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2%; }
    .ck-groessen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ck-maschine { grid-template-columns: 1fr; }
    .ck-m-text { border-left: 0; border-top: 1px solid var(--cr-line); }
    .ck-opts { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    /* Summe unter den Inhalt; die Preisleiste unten übernimmt */
    .ck .cb-grid { display: flex; flex-direction: column-reverse; }
    .ck-seite { width: 100%; }
    .ck-tabelle { grid-template-columns: 1fr; }
    .ck-tabelle > div:nth-child(even) { padding-left: 0; }
    /* Kontaktleiste der Seite und Preisleiste nicht übereinander */
    .ck-leiste-an .contact-bar { display: none; }
}
@media (max-width: 600px) {
    .ck-reihen { grid-template-columns: 1fr; row-gap: 16px; }
    .ck-reihe { padding-top: 16px; }
    .ck-reihe-text { padding: 18px 12px 20px; }
    .ck-groessen, .ck-paket-reihe, .ck-felder { grid-template-columns: 1fr; }
    .ck-m-text { padding: 18px; }
    .ck-senden { align-self: stretch; }
    .ck-teil { padding-bottom: 34px; }
    .ck-teil + .ck-teil { padding-top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .ck-reihe, .ck-gr, .ck-paket-reihe button { transition: none; }
}
