/* ============================================================================
 * textur-konfigurator.css
 * Oberflaeche der Textur-Vorschau. Farbwelt 1:1 aus der bestehenden Seite
 * uebernommen (Amber #ffc107, helle Flaechen, Font Awesome als Icon-Satz).
 *
 * Aufbau: vier Schritte, gefuehrt ueber die Pfeilkette oben. Je Schritt ist
 * genau eine Tafel sichtbar - das haelt die Bedienung auch auf dem Handy
 * uebersichtlich, wo alles untereinander steht.
 *
 * Developed by Toni Sciacca - mail@tonisciacca.com
 * ========================================================================== */

.tk-section {
    padding: 46px 0 80px;
    background: #fff;
    /* Die Seite hat eine feste Navigationsleiste. Ohne diesen Abstand
     * verschwindet die Pfeilkette darunter, sobald zum Schritt gerollt wird. */
    scroll-margin-top: 110px;
}

/* ── Schutz gegen das Seitenthema ─────────────────────────────────────────────
 * expresspolsterei.de und expresspolsterei-mathan-ritter.de laufen auf einer
 * anderen Vorlage als sofaneubeziehen.de. Deren css/main.css gibt JEDEM
 * button line-height 5.6rem, Grossbuchstaben, Fettschrift und 1.6rem Abstand
 * nach unten, jedem Eingabefeld 5.5rem feste Hoehe und 3.2rem Abstand, und
 * faerbt Knoepfe bei :hover und :focus dunkelgruen. Gemessen am 21.09.2026:
 * Filterzeilen 80 statt 42 px hoch, Schrittpfeile 82 statt 48 px, und nach
 * einem Klick blieb ein Knopf gruen.
 *
 * Deshalb steht vor jeder Regel dieser Datei ".tk-section": so schlagen die
 * eigenen Regeln (zwei Klassen) die des Themas (button:hover = eine Klasse
 * und ein Element), und ihre Reihenfolge untereinander bleibt, wie sie war.
 * Was das Thema setzt und der Konfigurator selbst nicht, stellen die Regeln
 * hier zurueck - auf die Werte, die sofaneubeziehen.de ohnehin zeigt.
 * Die Seitenebene (.floating-buttons, Seitenkopf) steht bewusst ohne Praefix.
 * Developed by Toni Sciacca - mail@tonisciacca.com
 */
/* Grundschrift wie auf sofaneubeziehen.de - das Thema der beiden Express-
   Seiten setzt am body 20 px, Zeilenhoehe 1.8 und Schwarz. */
.tk-section { font-size: 16px; line-height: 1.4; color: #666; }

.tk-section button {
    height: auto;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
}

.tk-section input:where(:not([type="range"], [type="file"], [type="checkbox"], [type="radio"])),
.tk-section select,
.tk-section textarea {
    height: auto;
    line-height: 1.4;
    margin: 0;
}

/* form und label bekommen vom Thema 3.2rem Abstand bzw. eigene Schrift,
   Zeilenhoehe und Schwarz. */
.tk-section form { margin: 0; }
.tk-section label {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Untertitel im Seitenkopf. Das Thema auf expresspolsterei.de und
   expresspolsterei-mathan-ritter.de faerbt dort nur die h1 weiss - der
   Untertitel stand schwarz auf dem dunklen Titelbild. */
.page-header__content .lead { color: #fff; }

/* ── Rahmen ──────────────────────────────────────────────────────────────────
 * Bewusst ein eigener Name. ".container" gibt es nicht in jeder Vorlage:
 * auf expresspolsterei.de existiert die Klasse gar nicht, dort lief die
 * Sektion ueber die ganze Fensterbreite. So haengt der Konfigurator an
 * keiner fremden Klasse mehr.
 */
.tk-section .tk-container {
    width: 89%;
    max-width: 1340px;
    margin: 0 auto;
}

/* ── Pfeilkette ───────────────────────────────────────────────────────────── */
.tk-section .tk-pfeile {
    display: flex;
    gap: 4px;
    margin-bottom: 26px;
    /* Die Seite hat eine feste Navigationsleiste. Ohne diesen Abstand
     * verschwindet die Pfeilkette darunter, sobald zum Schritt gerollt wird. */
    scroll-margin-top: 110px;
}

.tk-section .tk-pfeil {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    text-align: center;
    padding: 13px 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    background: #eef2f6;
    color: #94a3b8;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    /* Pfeilform: rechts eine Spitze, links die passende Kerbe */
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}
.tk-section .tk-pfeil:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.tk-section .tk-pfeil:last-child  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%); }

.tk-section .tk-pfeil-nr {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.7);
    color: #94a3b8;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
}
.tk-section .tk-pfeil-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tk-section .tk-pfeil.done {
    background: rgba(255,193,7,.18);
    color: #a97a00;
    cursor: pointer;
}
.tk-section .tk-pfeil.done .tk-pfeil-nr { background: #ffc107; color: #fff; }
.tk-section .tk-pfeil.done:hover { background: rgba(255,193,7,.3); }

.tk-section .tk-pfeil.cur {
    background: #ffc107;
    color: #fff;
}
.tk-section .tk-pfeil.cur .tk-pfeil-nr { background: rgba(255,255,255,.9); color: #a97a00; }

/* ── Spalten ──────────────────────────────────────────────────────────────── */
/*
 * minmax(0, …) statt 1fr: ein blosses "1fr" ist "minmax(auto, 1fr)", und das
 * auto verbietet der Spalte, unter ihre Min-Content-Breite zu schrumpfen. Die
 * Filterleisten des Katalogs laufen mit flex-wrap: nowrap - ihre Min-Content-
 * Breite ist die Summe aller Knoepfe. Gemessen auf dem Handy: die Steuerspalte
 * wurde 1120 px breit, obwohl nur 320 px Platz waren.
 */
.tk-section .tk-wrap {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.tk-section .tk-steuerung {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 22px;
}

.tk-section .tk-vorschau { min-width: 0; }

/* ── Tafelkopf ────────────────────────────────────────────────────────────── */
.tk-section .tk-panel-kopf { margin-bottom: 16px; }
.tk-section .tk-panel-kopf b {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}
.tk-section .tk-panel-kopf span {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}
.tk-section .tk-panel-kopf span b { display: inline; font-size: inherit; color: #333; }

/* ── Upload ───────────────────────────────────────────────────────────────── */
.tk-section .tk-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #fff;
    padding: 34px 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.tk-section .tk-upload:hover,
.tk-section .tk-upload.drag { border-color: #ffc107; background: #fffdf3; }
.tk-section .tk-upload i { font-size: 36px; color: #ffc107; display: block; margin-bottom: 10px; }
.tk-section .tk-upload p { margin: 0; font-size: 14px; color: #666; }
.tk-section .tk-upload .tk-klein { margin-top: 6px; font-size: 12px; color: #aaa; }

/* ── Texturbibliothek ─────────────────────────────────────────────────────── */
.tk-section .tk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tk-section .tk-tab {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 20px;
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
}
.tk-section .tk-tab:hover { border-color: #ffc107; color: #333; }
.tk-section .tk-tab.active { background: #ffc107; border-color: #ffc107; color: #fff; }

.tk-section .tk-gitter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.tk-section .tk-gitter-leer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 22px;
    color: #aaa;
    font-size: 13px;
}

.tk-section .tk-textur {
    position: relative;
    border: 2px solid transparent;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fa;
    transition: border-color .15s, transform .15s;
}
.tk-section .tk-textur:hover { transform: translateY(-2px); }
.tk-section .tk-textur img { width: 100%; height: 66px; object-fit: cover; display: block; }
.tk-section .tk-textur-name {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    padding: 5px;
    color: #666;
    background: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tk-section .tk-textur-haken {
    position: absolute;
    top: 4px; right: 4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #ffc107;
    color: #fff;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
}
.tk-section .tk-textur.selected { border-color: #ffc107; }
.tk-section .tk-textur.selected .tk-textur-haken { display: flex; }

/* ── Werkzeuge ────────────────────────────────────────────────────────────── */
.tk-section .tk-werkzeuge {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}
.tk-section .tk-werkzeug-reihe { display: flex; gap: 6px; margin-bottom: 14px; }
.tk-section .tk-werkzeug {
    flex: 1;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 8px;
    padding: 12px 4px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    min-height: 62px;
}
.tk-section .tk-werkzeug i,
.tk-section .tk-werkzeug .tk-zeichen { display: block; font-size: 19px; line-height: 1; margin-bottom: 5px; }
.tk-section .tk-werkzeug .tk-zeichen { font-weight: 700; }
.tk-section .tk-werkzeug:hover { border-color: #ffc107; color: #333; }
.tk-section .tk-werkzeug.active { background: #ffc107; border-color: #ffc107; color: #fff; }

.tk-section .tk-regler { margin-bottom: 13px; }
.tk-section .tk-regler:last-child { margin-bottom: 0; }
.tk-section .tk-regler-kopf {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}
.tk-section .tk-regler-kopf b { color: #333; font-weight: 600; }
.tk-section .tk-regler input[type=range] {
    width: 100%;
    accent-color: #ffc107;
    margin: 0;
    height: 26px;
}

.tk-section .tk-feld {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 7px;
    padding: 11px 12px;
    font-size: 15px;          /* darunter zoomt iOS beim Antippen hinein */
    font-family: inherit;
    color: #333;
    background: #fff;
}
.tk-section .tk-feld:focus { outline: none; border-color: #ffc107; }

.tk-section .tk-neben { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tk-section .tk-klein-btn {
    flex: 1 1 90px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 7px;
    padding: 11px 8px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
.tk-section .tk-klein-btn:hover:not(:disabled) { border-color: #ffc107; color: #333; }
.tk-section .tk-klein-btn:disabled { opacity: .45; cursor: default; }

/* Aufklapper fuer Zusaetzliches (Hilfe, Feineinstellung) */
.tk-section .tk-mehr {
    width: 100%;
    margin-top: 14px;
    border: none;
    background: none;
    color: #a97a00;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    padding: 8px 0;
    cursor: pointer;
}
.tk-section .tk-mehr:hover { color: #7a5c00; text-decoration: underline; }

/* ── Buehne ───────────────────────────────────────────────────────────────── */
.tk-section .tk-buehne {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tk-section .tk-buehne canvas { max-width: 100%; height: auto; display: block; }

.tk-section #tkCanvasFoto { display: none; }

.tk-section #tkBuehne {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.tk-section #tkCanvasErgebnis {
    cursor: crosshair;
    /*
     * pan-y laesst das senkrechte Rollen durch. Mit touch-action: none blieb
     * die Seite stehen, sobald der Finger auf dem Foto lag - kein Tester kam
     * damit weiter. Gesperrt wird nur waehrend des Streichens, siehe
     * .tk-malmodus.
     */
    touch-action: pan-y;
    border-radius: 8px;
}

/* Markierung liegt deckungsgleich ueber dem Bild, nur waehrend der Bearbeitung. */
.tk-section #tkCanvasMaske {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    display: none;
    border-radius: 8px;
}
.tk-section #tkBuehne.tk-maske-an #tkCanvasMaske { display: block; }

.tk-section .tk-platzhalter { text-align: center; color: #aaa; padding: 56px 20px; }
.tk-section .tk-platzhalter i { font-size: 44px; color: #e0e0e0; display: block; margin-bottom: 12px; }
.tk-section .tk-platzhalter p { margin: 0; font-size: 14px; line-height: 1.6; }

.tk-section .tk-laden {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 4;
}
.tk-section .tk-spinner {
    width: 38px; height: 38px;
    border: 3px solid #f0f0f0;
    border-top-color: #ffc107;
    border-radius: 50%;
    animation: tkDreh .8s linear infinite;
}
@keyframes tkDreh { to { transform: rotate(360deg); } }
.tk-section .tk-laden p { margin: 0; font-size: 13px; color: #666; text-align: center; padding: 0 20px; }

/* ── Pinselumfang ─────────────────────────────────────────────────────────── */
.tk-section .tk-pinsel-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0,0,0,.35);
    z-index: 3;
}
.tk-section .tk-pinsel-ring.tk-hinzu { border: 2px solid #ffc107; background: rgba(255,193,7,.18); }
.tk-section .tk-pinsel-ring.tk-weg   { border: 2px dashed #e53935; background: rgba(229,57,53,.12); }

/* ── Hinweise ─────────────────────────────────────────────────────────────── */
.tk-section .tk-hinweis {
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    background: #fffdf3;
    border: 1px solid #ffe9a8;
    color: #7a5c00;
    font-size: 13.5px;
    line-height: 1.55;
}
.tk-section .tk-hinweis-fehler { background: #fdf2f2; border-color: #f5c6c6; color: #a02020; }

.tk-section .tk-rapport-info { margin-top: 10px; font-size: 12px; color: #888; line-height: 1.5; }
.tk-section .tk-rapport-info i { color: #ffc107; }

/* ── Hilfe ────────────────────────────────────────────────────────────────── */
.tk-section .tk-hilfe {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #ffe9a8;
    border-radius: 8px;
    background: #fffdf3;
    display: grid;
    gap: 14px;
}
.tk-section .tk-hilfe-punkt { display: flex; gap: 12px; align-items: flex-start; }
.tk-section .tk-hilfe-nr {
    flex: 0 0 26px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #ffc107;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tk-section .tk-hilfe-punkt > div { font-size: 13px; line-height: 1.6; color: #6b5a2e; }
.tk-section .tk-hilfe-punkt b { display: block; color: #333; font-size: 13.5px; margin-bottom: 2px; }
.tk-section .tk-hilfe-punkt div b:not(:first-child) { display: inline; font-size: inherit; margin: 0; }

/* ── Schaltflaechen ───────────────────────────────────────────────────────── */
.tk-section .tk-btn {
    border: none;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: filter .15s;
}
.tk-section .tk-btn:hover:not(:disabled) { filter: brightness(.94); }
.tk-section .tk-btn:disabled { opacity: .45; cursor: default; }
.tk-section .tk-btn-haupt { background: #ffc107; color: #fff; }
.tk-section .tk-btn-neben { background: #fff; color: #666; border: 1px solid #e0e0e0; }
.tk-section .tk-btn-neben:hover:not(:disabled) { border-color: #ffc107; color: #333; }

.tk-section .tk-weiter { width: 100%; margin-top: 16px; }

/* ── Anfrage ──────────────────────────────────────────────────────────────── */
.tk-section .tk-anfrage { display: grid; gap: 9px; }
.tk-section .tk-anfrage textarea { resize: vertical; }

/* Zaehler unter der Vorschau: "Vorschau 3 von 50 in 24 Stunden". Leise, aber
   lesbar - und auffaellig, sobald es eng wird. */
.tk-section .tk-zaehler {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #999;
    text-align: center;
}
.tk-section .tk-zaehler.knapp { color: #a97a00; font-weight: 600; }

/* Datenschutzhinweis unter dem Absendeknopf. Bewusst leise gesetzt: er muss
   lesbar sein, aber nicht mit dem Knopf um Aufmerksamkeit ringen. */
.tk-section .tk-datenschutz {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.65;
    color: #7a7a7a;
}
.tk-section .tk-datenschutz a { color: #a97a00; text-decoration: underline; }
.tk-section .tk-datenschutz a:hover { color: #7a5c00; }

/* ── Handy und Tablet ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .tk-section { padding: 26px 0 44px; }

    /* Siehe oben: ohne minmax(0, …) sprengen die Filterleisten die Spalte. */
    .tk-section .tk-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; }

    /* Bild nach oben: beim Markieren muss man sehen, was man tut, ohne
     * zwischen Werkzeug und Vorschau hin und her zu scrollen. */
    .tk-section .tk-vorschau { order: -1; }

    /* Solange kein Foto da ist, ist die Buehne ein leerer Kasten. Mit den
     * 280 px vom Schreibtisch schob er auf dem Handy die gesamte Bedienung
     * unter die Bildkante. */
    .tk-section .tk-buehne { min-height: 170px; }

    .tk-section .tk-steuerung { padding: 18px; }

    /* Pfeile bleiben nebeneinander, notfalls waagerecht scrollbar */
    .tk-section .tk-pfeile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 18px;
    }
    .tk-section .tk-pfeile::-webkit-scrollbar { display: none; }
    .tk-section .tk-pfeil {
        flex: 1 0 auto;
        min-width: 78px;
        font-size: 12.5px;
        padding: 11px 6px;
        gap: 5px;
    }
    .tk-section .tk-pfeil-nr { width: 19px; height: 19px; flex-basis: 19px; font-size: 11px; }

    /* Die Hoehe muss ueber .tk-katalog .tk-gitter gesetzt werden: weiter unten
     * steht genau dieser Selektor mit 420 px. Stuende hier nur .tk-gitter,
     * gewaenne der spaetere, staerkere Selektor - die Regel waere wirkungslos. */
    .tk-section .tk-gitter,
    .tk-section .tk-katalog .tk-gitter {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        max-height: 264px;
    }
    .tk-section .tk-textur img { height: 74px; }

    .tk-section .tk-werkzeug { min-height: 68px; font-size: 12px; }
    .tk-section .tk-klein-btn { padding: 13px 8px; }
    .tk-section .tk-btn { padding: 15px 18px; font-size: 15px; }
}

@media (max-width: 420px) {
    .tk-section .tk-pfeil { min-width: 66px; font-size: 11.5px; }
    .tk-section .tk-pfeil-txt { display: none; }
    .tk-section .tk-pfeil.cur .tk-pfeil-txt { display: inline; }
}

/* ── Schwebende Kontaktknoepfe auf dem Handy ──────────────────────────────────
 *
 * .floating-buttons aus css/theme.css steht fest auf right:20px, top:31%, drei
 * Knoepfe zu 60 px - ohne jede Media Query. Auf dem Handy liegt dieser Block
 * damit mitten auf den waagerecht rollenden Filterleisten: die Knoepfe am
 * rechten Ende lassen sich weder sehen noch antippen.
 *
 * Diese Datei laedt nur der Textur-Konfigurator, die Regel gilt also auch nur
 * dort. theme.css bleibt unangetastet - es haengt an jeder Seite.
 *
 * Aus der senkrechten Saeule wird eine waagerechte Reihe am unteren Rand: sie
 * verdeckt dann nur noch ein schmales Band statt der halben Spaltenhoehe.
 * Die Sektion bekommt unten Platz, damit der letzte Knopf nicht dauerhaft
 * darunter verschwindet.
 */
@media (max-width: 991px) {
    .floating-buttons {
        top: auto;
        bottom: 14px;
        right: 12px;
        transform: none;
        flex-direction: row;
        gap: 10px;
    }
    .floating-btn { width: 46px; height: 46px; }
    .floating-btn svg { width: 21px; height: 21px; }

    .tk-section { padding-bottom: 84px; }
}

/* ── Wegwahl nach dem Upload ───────────────────────────────────────────────
 * Zwei Wege zum Ziel: die KI macht alles allein, oder der Kunde markiert die
 * Flaeche und bekommt dafuer den Stoff originalgetreu. */
.tk-section .tk-weg {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    padding: 15px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.tk-section .tk-weg:hover { border-color: #ffc107; box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.tk-section .tk-weg-kopf {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.tk-section .tk-weg-kopf i { color: #ffc107; }
.tk-section .tk-weg-tipp {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #ffc107;
    color: #fff;
    border-radius: 999px;
    padding: 3px 9px;
}
.tk-section .tk-weg-tipp-grau { background: #e9ecef; color: #6b7280; }
.tk-section .tk-weg-txt { display: block; font-size: 13px; line-height: 1.55; color: #6b7280; }

/* Beim KI-Weg entfaellt das Markieren - der Schritt bleibt sichtbar,
 * aber blass und nicht anspringbar. */
.tk-section .tk-pfeil.tk-uebersprungen { opacity: .45; }

/* ── Bauteile einzeln behandeln (nur im KI-Weg) ───────────────────────────── */
.tk-section .tk-teile-hinweis {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #7a5c00;
    background: #fffdf3;
    border: 1px solid #ffe9a8;
    border-radius: 7px;
    padding: 9px 11px;
}
.tk-section .tk-teil {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}
.tk-section .tk-teil > span {
    flex: 0 0 108px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.tk-section .tk-teil .tk-feld { flex: 1; padding: 9px 10px; }

@media (max-width: 991px) {
    .tk-section .tk-teil { flex-wrap: wrap; gap: 5px; }
    .tk-section .tk-teil > span { flex: 1 1 100%; }
}

/* ── Masseingabe ──────────────────────────────────────────────────────────
 * Steht bewusst weit vorn: ohne die reale Breite laesst sich nicht
 * ausrechnen, wie gross das Stoffmuster im Foto erscheinen muss. */
.tk-section .tk-masse {
    background: #fffdf3;
    border: 1px solid #ffe9a8;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
}
.tk-section .tk-masse label b {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}
.tk-section .tk-masse label span {
    display: block;
    font-size: 12.5px;
    line-height: 1.55;
    color: #7a5c00;
    margin-bottom: 10px;
}
.tk-section .tk-masse-feld { display: flex; align-items: center; gap: 9px; }
.tk-section .tk-masse-feld .tk-feld { flex: 1; font-size: 17px; font-weight: 600; text-align: center; }
.tk-section .tk-masse-feld .tk-einheit { font-size: 14px; font-weight: 600; color: #7a5c00; flex: 0 0 auto; }
.tk-section .tk-masse-feld .tk-feld:invalid { border-color: #ddd; }

/* ── Wegwahl gesperrt, solange die Breite fehlt ───────────────────────────
   Ohne das Mass laesst sich die Musterskalierung nicht berechnen; die
   beiden Knoepfe waeren dann eine Sackgasse. */
.tk-section .tk-weg:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Waehrend Pinsel oder Radierer aktiv sind, darf die Seite nicht mitrollen. */
.tk-section #tkCanvasErgebnis.tk-malmodus { touch-action: none; }

/* Der Auslöser steht jetzt ueber der Stoffliste und braucht Luft nach unten,
   sonst klebt die Kategorienreihe daran. */
.tk-section #tkNeulauf { margin-bottom: 18px; }

/* ── Stoffkatalog ─────────────────────────────────────────────────────────────
 * Aus 48 Stoffen sind knapp 500 aus 60 Serien geworden. Eine einzige Reihe
 * Knoepfe reicht dafuer nicht mehr: es gibt jetzt Suchfeld, Kollektions- und
 * Farbleiste, und die Serien kommen erst dazu, wenn eine Kollektion steht.
 *
 * Die Leisten laufen bewusst waagerecht weiter statt umzubrechen - sonst
 * schoebe die Galerie-Kollektion mit ihren 21 Serien das Gitter aus dem Bild.
 * Entwickler: Toni Sciacca - mail@tonisciacca.com
 */
.tk-section .tk-katalog-suche {
    position: relative;
    margin-bottom: 10px;
}
.tk-section .tk-katalog-suche > .fa-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 13px;
    pointer-events: none;
}
.tk-section .tk-katalog-suche input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 34px 9px 32px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fff;
}
.tk-section .tk-katalog-suche input:focus {
    outline: none;
    border-color: #ffc107;
}
.tk-section .tk-katalog-suche input::-webkit-search-cancel-button { display: none; }
.tk-section .tk-suche-leeren {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
}
.tk-section .tk-suche-leeren:hover { color: #666; background: #f2f2f2; }

/* ── Filter als Akkordeon ─────────────────────────────────────────────────────
 *
 * Vorher: vier waagerecht rollende Leisten uebereinander (Material, Kollektion,
 * Farbe, Serie). Auf dem Handy war das unbedienbar - bei 320 px Spaltenbreite
 * lagen von 13 Farbknoepfen zwei im Bild, der Rest hinter dem rechten Rand,
 * ohne sichtbaren Hinweis darauf.
 *
 * Jetzt: je Filter eine Zeile mit Namen und aktueller Wahl. Antippen klappt
 * die Knoepfe auf, die dann umbrechen statt zu rollen. Es ist immer hoechstens
 * einer offen, und nach der Wahl klappt er wieder zu.
 */
.tk-section .tk-falter {
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
}

.tk-section .tk-falte + .tk-falte { border-top: 1px solid #f0f0f0; }

.tk-section .tk-falte-kopf {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: #fff;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    color: #333;
}
.tk-section .tk-falte-kopf:hover { background: #fffdf3; }

.tk-section .tk-falte-name { font-weight: 600; flex: 0 0 auto; }

/* Die aktuelle Wahl. Nimmt den Platz in der Mitte und wird gekuerzt, statt
   die Zeile zu sprengen - Kollektionsnamen sind lang. */
.tk-section .tk-falte-wahl {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    color: #9a9a9a;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tk-section .tk-falte-wahl.gesetzt { color: #a97a00; font-weight: 600; }

.tk-section .tk-falte-kopf .fa {
    flex: 0 0 auto;
    color: #bbb;
    font-size: 15px;
    transition: transform .18s;
}
.tk-section .tk-falte.offen .tk-falte-kopf .fa { transform: rotate(180deg); }
.tk-section .tk-falte.offen .tk-falte-kopf { background: #fffdf3; }

/* Zugeklappt ohne Hoehe. display:none waere einfacher, verboete aber jede
   Animation und liesse das Aufklappen springen. */
.tk-section .tk-falte-inhalt {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    padding: 0 14px;
    transition: max-height .2s ease, padding .2s ease;
}
.tk-section .tk-falte.offen .tk-falte-inhalt {
    max-height: 320px;
    overflow-y: auto;
    padding: 2px 14px 12px;
    -webkit-overflow-scrolling: touch;
}

.tk-section .tk-falte-inhalt .tk-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tk-section .tk-farbpunkt {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .12);
}

.tk-section .tk-treffer {
    font-size: 12px;
    color: #999;
    margin: 2px 0 8px;
}

/* Bei 500 Stoffen darf das Gitter etwas hoeher sein als die alten 300 px -
   sonst sieht man von einer Kollektion nur drei Reihen. */
.tk-section .tk-katalog .tk-gitter { max-height: 420px; }

/*
 * "Mehr anzeigen" unter dem Gitter. Bewusst auf .tk-katalog eingegrenzt:
 * dieselbe Klasse traegt auch der Hilfe-Aufklapper in Schritt 2, und der soll
 * ein Textlink bleiben. Ohne die Eingrenzung gewaenne diese Regel - sie steht
 * spaeter in der Datei - und machte aus dem Textlink einen Pillenknopf mit
 * linksbuendiger Schrift.
 */
.tk-section .tk-katalog .tk-mehr {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
}
.tk-section .tk-katalog .tk-mehr:hover { border-color: #ffc107; color: #333; text-decoration: none; }

@media (max-width: 600px) {
    .tk-section .tk-katalog .tk-gitter { max-height: 264px; }
}
