/* =============================================================
 * TUT Fenster Pages
 * Die Sub-Navigation nutzt die generischen .tut-subnav-*-Klassen
 * aus tut-zaunanlagen-pages/assets/zaunanlagen.css.
 * Diese Datei ist reserviert fuer fenster-spezifische Ergaenzungen.
 * ============================================================= */

/* =============================================================
 * Hersteller-Vergleich (tut_fep_render_manufacturers)
 * ============================================================= */
.tut-fep-mfr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
}
/* Ein-Hersteller-Variante: Karte zentriert & begrenzt statt vollbreit */
.tut-fep-mfr-grid--single {
    grid-template-columns: minmax(0, 620px);
    justify-content: center;
}
.tut-fep-mfr-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15,23,42,.08);
    display: flex; flex-direction: column;
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s;
}
.tut-fep-mfr-card:hover { transform: translateY(-5px); box-shadow: 0 24px 56px rgba(15,23,42,.14); }
.tut-fep-mfr-media { position: relative; margin: 0; aspect-ratio: 16/10; overflow: hidden; background: #eef1f6; }
.tut-fep-mfr-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.tut-fep-mfr-card:hover .tut-fep-mfr-media img { transform: scale(1.04); }
.tut-fep-mfr-logo {
    position: absolute; left: 16px; top: 14px;
    background: rgba(10,18,40,.9); color: #fff;
    font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    font-size: 13px; padding: 6px 14px; border-radius: 6px;
}
.tut-fep-mfr-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.tut-fep-mfr-tagline { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: #c8a44e; letter-spacing: .01em; }
.tut-fep-mfr-desc { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #475569; }
.tut-fep-mfr-systems { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tut-fep-chip {
    font-size: 12px; font-weight: 700; color: #1a327b;
    background: rgba(26,50,123,.08); border-radius: 999px; padding: 5px 12px;
}
.tut-fep-mfr-swatches { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; }
.tut-fep-sw { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(15,23,42,.12); flex-shrink: 0; }
.tut-fep-sw-more { font-size: 12px; font-weight: 700; color: #94a3b8; }
.tut-fep-mfr-cta { margin-top: auto; align-self: flex-start; }

/* =============================================================
 * Farb-/Dekor-Swatch-Galerie (tut_fep_render_swatches)
 * ============================================================= */
.tut-fep-sw-group { margin-bottom: 30px; }
.tut-fep-sw-group:last-of-type { margin-bottom: 0; }
.tut-fep-sw-group-label {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #64748b; margin: 0 0 14px;
}
.tut-fep-sw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
}
.tut-fep-sw-tile {
    margin: 0; background: #fff; border-radius: 12px; overflow: hidden;
    border: 1px solid #eef1f6; box-shadow: 0 6px 18px rgba(15,23,42,.05);
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}
.tut-fep-sw-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15,23,42,.12); }
.tut-fep-sw-chip { display: block; height: 78px; background-size: cover; background-position: center; }
.tut-fep-sw-tile figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.tut-fep-sw-tile figcaption strong { font-size: 13px; color: #0e1b3d; font-weight: 700; }
.tut-fep-sw-tile figcaption span { font-size: 11.5px; color: #94a3b8; }
.tut-fep-sw-note { margin-top: 22px; font-size: 13px; color: #94a3b8; text-align: center; }

/* ===== Technik im Detail: Schnitt + Detail ===== */
.tut-fep-det-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.tut-fep-det {
    margin: 0; background: #fff; border-radius: 14px; overflow: hidden;
    border: 1px solid #eef1f6; box-shadow: 0 8px 22px rgba(15,23,42,.06);
    cursor: pointer; transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}
.tut-fep-det:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(15,23,42,.14); }
.tut-fep-det:focus-visible { outline: 3px solid #c8a44e; outline-offset: 2px; }
.tut-fep-det-media {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    background: #f4f6fb;
}
.tut-fep-det-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.tut-fep-det:hover .tut-fep-det-media img { transform: scale(1.04); }
/* Schnittzeichnungen nicht beschneiden — contain auf neutralem Grund */
.tut-fep-det.is-diagram .tut-fep-det-media {
    background: linear-gradient(160deg,#fbfcff 0%,#eef1f8 100%);
}
.tut-fep-det.is-diagram .tut-fep-det-media img { object-fit: contain; padding: 16px; }
.tut-fep-det.is-diagram:hover .tut-fep-det-media img { transform: scale(1.02); }
.tut-fep-det-tag {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px; color: #fff;
    backdrop-filter: none; box-shadow: 0 4px 12px rgba(15,23,42,.18);
}
.tut-fep-det-tag.is-cut    { background: #c8a44e; color: #1a2330; }
.tut-fep-det-tag.is-detail { background: #1a327b; }
.tut-fep-det-tag.is-photo  { background: rgba(15,23,42,.78); }
.tut-fep-det .tut-gallery-zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.92); color: #1a327b;
    opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s;
    box-shadow: 0 4px 14px rgba(15,23,42,.18);
}
.tut-fep-det .tut-gallery-zoom svg { width: 17px; height: 17px; }
.tut-fep-det:hover .tut-gallery-zoom,
.tut-fep-det:focus-visible .tut-gallery-zoom { opacity: 1; transform: scale(1); }
.tut-fep-det figcaption { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.tut-fep-det figcaption strong { font-size: 14.5px; color: #0e1b3d; font-weight: 700; line-height: 1.3; }
.tut-fep-det figcaption span { font-size: 12.5px; color: #6b7689; line-height: 1.5; }

/* ===== Widerstandsklassen-Tabelle (RC) ===== */
.tut-fep-rc {
    border: 1px solid #e6eaf2; border-radius: 16px; overflow: hidden;
    background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.tut-fep-rc-head, .tut-fep-rc-row {
    display: grid;
    grid-template-columns: 0.9fr 2fr 1fr 1.6fr;
    align-items: center;
}
.tut-fep-rc-head {
    background: #0e1b3d; color: #fff;
    font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.tut-fep-rc-head span { padding: 14px 18px; }
.tut-fep-rc-row { border-top: 1px solid #eef1f6; transition: background .2s; }
.tut-fep-rc-row:hover { background: #f8fafd; }
.tut-fep-rc-row.is-hl { background: #fbf7ec; }
.tut-fep-rc-row.is-hl:hover { background: #f7f0dd; }
.tut-fep-rc-cell { padding: 16px 18px; font-size: 13.5px; color: #43506b; line-height: 1.5; }
.tut-fep-rc-class { display: block; font-size: 16px; color: #0e1b3d; font-weight: 800; }
.tut-fep-rc-badge {
    display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
    background: #c8a44e; color: #1a2330;
}
.tut-fep-rc-row.is-hl .tut-fep-rc-cell:first-child { box-shadow: inset 3px 0 0 #c8a44e; }

@media (max-width: 860px) {
    .tut-fep-rc { border: none; box-shadow: none; background: transparent; }
    .tut-fep-rc-head { display: none; }
    .tut-fep-rc-row {
        grid-template-columns: 1fr; gap: 0;
        border: 1px solid #e6eaf2; border-radius: 14px; margin-bottom: 14px;
        background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.06); overflow: hidden;
    }
    .tut-fep-rc-row.is-hl { border-color: #e6c878; }
    .tut-fep-rc-cell { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #f1f4f9; }
    .tut-fep-rc-cell:first-child { border-top: none; background: #f8fafd; }
    .tut-fep-rc-row.is-hl .tut-fep-rc-cell:first-child { background: #fbf7ec; box-shadow: none; }
    .tut-fep-rc-cell::before {
        content: attr(data-label); font-size: 11px; font-weight: 700; color: #8a97ad;
        text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
    }
    .tut-fep-rc-cell:first-child::before { display: none; }
    .tut-fep-rc-cell:first-child { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 920px) {
    .tut-fep-det-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
    .tut-fep-mfr-grid { gap: 18px; }
    .tut-fep-sw-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
    .tut-fep-sw-chip { height: 64px; }
    .tut-fep-det-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
 * Farb-Simulator (Rehau KALEIDO) — interaktive Fenster-Vorschau
 * ========================================================================== */
.tut-fep-studio {
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) 1.08fr;
    gap: 36px;
    align-items: start;
    margin-top: 6px;
}
@media (max-width: 900px) { .tut-fep-studio { grid-template-columns: 1fr; gap: 26px; } }

/* --- Bühne / Vorschau --- */
.tut-fep-studio-stage { position: sticky; top: 96px; }
@media (max-width: 900px) { .tut-fep-studio-stage { position: static; } }

.tut-fep-studio-toggle {
    display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
}
.tut-fep-studio-toggle button {
    border: 0; background: transparent; color: rgba(255,255,255,0.72);
    font: inherit; font-size: 13px; font-weight: 600;
    padding: 7px 16px; border-radius: 999px; cursor: pointer;
    transition: background .2s, color .2s;
}
.tut-fep-studio-toggle button:hover { color: #fff; }
.tut-fep-studio-toggle button.is-active { background: var(--gold,#c8a44e); color: var(--brand-deep,#0a1228); }
.tut-fep-studio-hint { margin: 0 0 14px; color: rgba(255,255,255,0.55); font-size: 12.5px; line-height: 1.4; }

.tut-fep-window {
    position: relative;
    border-radius: 18px; overflow: hidden;
    background: #e9e3d8;
    box-shadow: 0 30px 70px rgba(0,0,0,.38);
}
.tut-fep-window svg { display: block; width: 100%; height: auto; }
.tut-fep-window .fep-frame { fill: var(--frame,#f2f2ef); transition: fill .35s ease; }
/* Holzdekor: prozedurale Maserung (SVG) — nur auf dem Rahmen, moduliert die Grundfarbe */
.tut-fep-window .fep-wood { opacity: 0; mix-blend-mode: soft-light; transition: opacity .35s ease; pointer-events: none; }
.tut-fep-window.is-wood .fep-wood { opacity: 1; }
/* Fenstergriffe nur in der Innenansicht sichtbar */
.tut-fep-window .fep-handles { opacity: 0; transition: opacity .3s ease; }
.tut-fep-window.is-inside .fep-handles { opacity: 1; }

.tut-fep-studio-label { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.tut-fep-studio-swatch {
    width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: inset 0 1px 2px rgba(255,255,255,.35);
    transition: background .35s ease;
}
.tut-fep-studio-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tut-fep-studio-text strong { color: #fff; font-size: 1.05rem; }
.tut-fep-studio-text span { color: rgba(255,255,255,.6); font-size: .82rem; }

/* --- Palette --- */
.tut-fep-studio-palette { display: flex; flex-direction: column; gap: 20px; }
.tut-fep-studio-palette .tut-fep-sw-group { margin: 0; }
.tut-fep-studio-palette .tut-fep-sw-group-label {
    color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 700;
    letter-spacing: .01em; margin: 0 0 11px;
}
.tut-fep-studio-palette .tut-fep-sw-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px;
}
.tut-fep-sw-btn {
    display: flex; align-items: center; gap: 9px; text-align: left;
    padding: 7px 9px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    border-radius: 12px;
    transition: border-color .18s, background .18s, transform .18s;
}
.tut-fep-sw-btn:hover { background: rgba(255,255,255,.09); transform: translateY(-1px); }
.tut-fep-sw-btn:focus-visible { outline: 2px solid var(--gold,#c8a44e); outline-offset: 2px; }
.tut-fep-sw-btn.is-active { border-color: var(--gold,#c8a44e); background: rgba(200,164,78,.14); }
.tut-fep-sw-btn .tut-fep-sw-chip {
    width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; display: block;
    background: var(--c,#eee);
    border: 1px solid rgba(0,0,0,.28);
    box-shadow: inset 0 1px 2px rgba(255,255,255,.4);
}
.tut-fep-sw-btn.is-active .tut-fep-sw-chip { box-shadow: 0 0 0 2px var(--gold,#c8a44e), inset 0 1px 2px rgba(255,255,255,.4); }
.tut-fep-sw-cap { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tut-fep-sw-cap strong { color: #fff; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-fep-sw-cap span { color: rgba(255,255,255,.5); font-size: .68rem; }
@media (prefers-reduced-motion: reduce) {
    .tut-fep-window .fep-frame, .tut-fep-studio-swatch,
    .tut-fep-window .fep-wood, .tut-fep-window .fep-handles { transition: none; }
}
