/* Heimatfotos High-End Konfigurator Master Styles v22.7
   FIX: .back-gallery Positionierung (Absolute) zur Layout-Stabilisierung
*/

:root {
    --hf-primary: #235635;
    --hf-accent: #799c4b;
    --hf-accent-hover: #6a8a40;
    --hf-black: #1D1D1B;
    --hf-panel: #262624;
    --hf-border: #333330;
    --text-main: #e0e0e0;
    --text-muted: #888;
    --text-dim: #666;
    --led-glow: rgba(170, 210, 255, 0.45);
    --led-border: rgba(200, 230, 255, 0.8);
}

/* GRUNDLAYOUT */
.detail-wrapper { 
    display: flex; 
    width: 100%; 
    height: calc(100vh - var(--nav-height) - 50px); 
    position: relative; 
    background: var(--hf-black);
    font-family: 'Lato', sans-serif;
}

/* --- LINKE SEITE: STAGE --- */
.image-stage { 
    flex: 1; 
    background: radial-gradient(circle at center, #222 0%, #000 100%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
    transition: background 0.6s ease; 
    overflow: hidden;
}

#roomBackground {
    position: absolute; 
    inset: 0;
    background-size: cover; 
    background-position: center center;
    opacity: 0; 
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 1;
}

.room-mode #roomBackground { opacity: 1; }

/* Pfad-Korrekturen für Klickdummy-Struktur */
.room-living #roomBackground { background-image: url('../../../uploads/living-room.jpg'); }
.room-bedroom #roomBackground { background-image: url('../../../uploads/bedroom.jpg'); }
.room-office #roomBackground { background-image: url('../../../uploads/office.jpg'); }

.image-stage.room-mode::before { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    background: rgba(0,0,0,0.1); 
    z-index: 2; 
}

/* FIX: ZURÜCK BUTTON POSITIONIERUNG */
.back-gallery {
    position: absolute; 
    top: 30px; 
    left: 30px; 
    color: #666; 
    text-decoration: none; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    letter-spacing: 1.5px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: 0.3s; 
    z-index: 120;
}

.back-gallery:hover { 
    color: #fff; 
    transform: translateX(-5px); 
}

/* BILD-PRÄSENTATION & PHYSIK */
.stage-content { 
    position: relative; 
    z-index: 5; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
}

.image-wrapper { 
    position: relative; 
    display: inline-block; 
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1); 
    max-width: 85%; 
    max-height: 80vh; 
    pointer-events: auto;
}

.room-mode .image-wrapper { transform: translateY(-100px); }

#mainImage { 
    width: 100%; 
    height: auto; 
    display: block; 
    transition: all 0.6s ease; 
    object-fit: contain; 
}

#imageOverlay { 
    position: absolute; 
    inset: 0; 
    pointer-events: none; 
    z-index: 3; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.08) 100%); 
}

/* MATERIAL SIMULATIONEN */
.mat-leinwand #mainImage { filter: saturate(0.75) brightness(0.9) blur(0.3px); border-radius: 3px; }
.mat-leinwand::after { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    pointer-events: none; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.35); 
    z-index: 4; 
}

.mat-acryl #mainImage { filter: saturate(1.25) contrast(1.15); }
.mat-acryl #imageOverlay { opacity: 1; }

.mat-led #mainImage { filter: brightness(1.4) saturate(1.4); border: 0.5px solid #666; }
.led-active #mainImage { 
    box-shadow: 0 0 60px var(--led-glow); 
    border-color: var(--led-border) !important; 
}

/* STEUERUNGSELEMENTE STAGE */
.stage-controls { 
    position: absolute; 
    bottom: 85px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 22px; 
    z-index: 110; 
}

.view-toggle { 
    display: flex; 
    background: rgba(0,0,0,0.85); 
    padding: 5px; 
    border-radius: 50px; 
    border: 1px solid rgba(255,255,255,0.15); 
    backdrop-filter: blur(10px); 
}

.toggle-btn { 
    padding: 8px 18px; 
    border-radius: 50px; 
    font-size: 0.7rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    color: #666; 
    cursor: pointer; 
    transition: 0.3s; 
}

.toggle-btn.active { background: #fff; color: #000; }

.room-selector { 
    display: flex; 
    gap: 15px; 
    opacity: 0; 
    transform: translateY(10px); 
    pointer-events: none; 
    transition: 0.4s; 
}

.room-mode .room-selector { opacity: 1; transform: translateY(0); pointer-events: auto; }

.room-dot { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    border: 2px solid rgba(255,255,255,0.2); 
    cursor: pointer; 
    transition: 0.3s; 
    background-size: 220%; 
    background-position: center; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.room-dot:hover { transform: scale(1.15); border-color: #fff; background-size: 250%; }
.room-dot.active { border-color: var(--hf-accent); box-shadow: 0 0 15px var(--hf-accent); transform: scale(1.1); }

.dot-living { background-image: url('../../../uploads/living-room.jpg'); }
.dot-bedroom { background-image: url('../../../uploads/bedroom.jpg'); }
.dot-office { background-image: url('../../../uploads/office.jpg'); }

/* FOOTER-ELEMENTE STAGE */
.media-id-footer { 
    position: absolute; 
    bottom: 20px; 
    left: 20px; 
    font-size: 0.7rem; 
    color: #444; 
    text-transform: uppercase; 
    font-weight: 400; 
    z-index: 120; 
    cursor: pointer;
    padding: 6px 10px; 
    border-radius: 4px; 
    transition: 0.2s;
}

.media-id-footer:hover { color: #fff; background: rgba(255,255,255,0.05); }

.wishlist-btn { 
    position: absolute; 
    top: 20px;
    right: 25px;
    background: rgba(255,255,255,0.08); 
    border: 1px solid rgba(255,255,255,0.15); 
    color: #fff; 
    width: 46px; 
    height: 46px; 
    border-radius: 50%; 
    cursor: pointer; 
    transition: 0.3s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 120; 
}

.wishlist-btn.active { background: #ff4757; border-color: #ff4757; opacity:.8; }
.wishlist-btn:hover { background: #ff4757; border-color: #ff4757; }
.wishlist-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* --- RECHTE SEITE: SIDEBAR --- */
.config-sidebar { 
    width: 480px; 
    background: var(--hf-panel); 
    border-left: 1px solid var(--hf-border); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    z-index: 10; 
}

.prod-header { padding: 40px 40px 20px 40px; position: relative; }
.prod-photog { color: var(--hf-accent); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1.5px; display: block; margin-bottom: 8px; }
.prod-title { font-size: 2.2rem; font-weight: 900; color: #fff; line-height: 1.1; margin:15px 0; }
.prod-location { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.95rem; }

.close-detail {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none !important;
    border: none !important;
    color: #fff; /* Standardfarbe */
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    padding: 0;
    opacity: .5;
}

.close-detail:hover {
    opacity: 1; 
    transform: rotate(90deg) scale(1.2);
}

.slider-viewport { flex: 1; overflow: hidden; }
.slider-track { display: flex; width: 200%; height: 100%; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.step-panel { width: 50%; height: 100%; padding: 10px 40px 40px 40px; display: flex; flex-direction: column; overflow-y: auto; }

.nav-back-step { cursor: pointer; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.nav-back-step:hover { color: #fff; }

.mode-switch { display: flex; background: #111; padding: 4px; border-radius: 8px; margin-bottom: 30px; border: 1px solid #333; flex-shrink: 0; }
.mode-opt { flex: 1; text-align: center; padding: 12px; font-size: 0.85rem; font-weight: 900; text-transform: uppercase; cursor: pointer; border-radius: 6px; transition: 0.3s; color: #555; }
.mode-opt.active { background: var(--hf-accent); color: #fff; }

.section-label { font-size: 0.7rem; font-weight: 900; color: #555; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; display: block; }

/* DATEI INFORMATIONEN */
.file-info-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    background: rgba(255,255,255,0.02); 
    border: 1px solid var(--hf-border); 
    border-radius: 10px; 
    padding: 18px; 
    margin-bottom: 25px;
}

.info-item { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; color: #fff; font-weight: 700; }
.info-item span { font-size: 0.6rem; color: #555; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 900; }
.info-val { color: var(--hf-accent); }

/* MATERIAL KACHELN & AKKORDEON */
.config-list { display: flex; flex-direction: column; gap: 12px; }
.config-item-wrapper { display: flex; flex-direction: column; position: relative; }

.config-item { 
    display: flex; 
    align-items: center; 
    background: #1a1a1a; 
    border: 1px solid #333; 
    border-radius: 10px; 
    padding: 14px; 
    cursor: pointer; 
    transition: 0.2s; 
    position: relative; 
    overflow: hidden; 
}

.config-item.selected { 
    border-color: var(--hf-accent); 
    background: rgba(121, 156, 75, 0.08); 
}

.led-item-style { background: #0f0f0f; border: 1px solid #444; }

/* BADGES */
.highlight-badge { 
    position: absolute; top: 8px; left: 8px; background: var(--hf-accent); 
    color: #fff; font-size: 0.55rem; font-weight: 900; padding: 3px 6px; 
    border-radius: 3px; text-transform: uppercase; z-index: 2; 
}

.budget-badge { 
    position: absolute; top: 8px; left: 8px; background: #4a5a6a; 
    color: #fff; font-size: 0.55rem; font-weight: 900; padding: 3px 6px; 
    border-radius: 3px; text-transform: uppercase; z-index: 2; 
}

.item-thumb { 
    width: 60px; height: 60px; border-radius: 6px; object-fit: cover; 
    margin-right: 15px; border: 1px solid #333; 
    display: flex; align-items: center; justify-content: center; 
    background: #111; flex-shrink: 0; 
}

.item-thumb svg { width: 28px; height: 28px; color: #888; }

.item-info { flex: 1; }
.item-name { display: block; font-weight: 700; color: #fff; font-size: 0.9rem; margin-bottom: 2px; }
.item-desc-short { display: block; font-size: 0.75rem; color: #777; line-height: 1.3; }
.item-price-hint { display: block; font-size: 0.8rem; color: var(--hf-accent); font-weight: 700; margin-top: 4px; }

.item-description-long { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease, padding 0.4s ease; 
    font-size: 0.8rem; color: #aaa; line-height: 1.5; padding: 0 14px; 
}

.config-item-wrapper.active .item-description-long { 
    max-height: 200px; 
    padding: 12px 14px 20px 14px; 
}

/* HOVER INTERAKTIONEN */
.item-hover-cta { 
    position: absolute; 
    top: 0; 
    right: 0; 
    height: 100%; 
    width: 110px; 
    background: var(--hf-accent); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    font-weight: 900; 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    transform: translateX(100%); 
    transition: transform 0.3s ease; 
    z-index: 5; 
}

.config-item:hover .item-hover-cta { transform: translateX(0); }

.change-badge { 
    background: var(--hf-accent); 
    color: #fff; 
    padding: 6px 12px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    margin-left: auto; 
    z-index: 5; 
}

/* FORMAT GRID */
.size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.size-card { background: #1a1a1a; border: 1px solid #333; padding: 22px 15px; border-radius: 10px; text-align: center; cursor: pointer; transition: 0.2s; }
.size-card.selected { border-color: var(--hf-accent); background: rgba(121, 156, 75, 0.1); }
.size-dim { display: block; font-weight: 900; color: #fff; font-size: 1.1rem; margin-bottom: 5px; }
.size-val-total { display: block; font-size: 0.85rem; color: var(--hf-accent); font-weight: 700; }

/* SIDEBAR FOOTER & PREIS */
.sidebar-footer { 
    margin-top: auto; 
    padding: 20px 40px; 
    border-top: 1px solid #333; 
    background: var(--hf-panel); 
}

.price-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 25px; 
}

.price-label { font-size: 0.7rem; color: #555; text-transform: uppercase; font-weight: 900; display: block; margin-bottom: 6px; }
.price-value { font-size: 2.2rem; font-weight: 900; color: #fff; letter-spacing: -1px; }
#netPriceDisplay { font-size: 0.85rem; color: #666; font-weight: 400; margin-left: 8px; }

.btn-cta { 
    width: 100%; 
    padding: 22px; 
    border: none; 
    border-radius: 6px; 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    cursor: pointer; 
    transition: 0.3s; 
    font-size: 0.95rem; 
    background: var(--hf-accent); 
    color: #fff; 
}

.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.4); }

/* SERVICE BAR */
.service-bar { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    padding: 15px 15px 0 15px; 
}

.service-link { 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: #666; 
    font-size: 0.75rem; 
    font-weight: 700; 
    transition: 0.2s;
}

.service-link:hover { color: #fff; opacity: .6; }
.service-link svg { width: 24px; height: 24px; color: #666; }
.service-divider { width: 1px; height: 12px; background: #333; }

.hidden { display: none !important; }

/* DOWNLOAD INFO */
.download-badge-info { 
    margin-top: 20px; 
    font-size: 0.8rem; 
    color: var(--hf-accent); 
    font-weight: 700; 
    text-align: center; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    border: 1px dashed var(--hf-accent); 
    padding: 15px; 
    border-radius: 8px; 
}
