/*
 * RPD Online - Basis-Stylesheet fuer alle Mandanten.
 * Abgeleitet aus rpd_sprs/css/teci.css (Referenz-Optik). Farben kommen nur ueber die
 * Variablen unten; css/mandant-<key>.css ueberschreibt sie.
 */

/* === FARBEN (Default = TEC-MAR/SPRS) === */
:root {
    --c-heading: #101010;              /* Titel, Labels */
    --c-text: #101010;                 /* Fliesstext, Werte */
    --c-accent: rgb(239, 46, 45);      /* Linien, Haken, CTA */
    --c-accent-hover: rgb(200, 30, 30);
    --c-accent-shadow: rgba(239, 46, 45, 0.3);
    --c-overlay: rgba(16, 16, 16, 0.8);
    --c-light-bg: #f4f4f4;
    --c-white: #ffffff;
    --c-border: #e0e0e0;
    --c-image-bg: #fff;
    --c-footer-bg: rgb(16, 16, 16);
    --c-btn-bg: rgb(239, 46, 45);      /* Bootstrap-Buttons (.button-mandant) */
    --c-btn-border: rgb(204, 51, 102);
    --c-btn-hover: rgb(64, 64, 64);
    --logo-max: 150px;                 /* Header-Logo */
    --modal-logo-width: 150px;
    --container-font-size: 0.9rem;
}

/* === GRUNDLEGENDES === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--c-white);
    color: var(--c-text);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Skip-Link: erst bei Tastaturfokus sichtbar */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--c-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* === PRODUKT HEADER === */
.product-header {
    background: var(--c-light-bg);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--c-border);
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-heading);
    margin-bottom: 0;
}

/* === LAYOUT (2 Spalten) === */
.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* === BILDERGALERIE === */
.main-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--c-image-bg);
    border: 1px solid var(--c-border);
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    border-radius: 4px;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.main-image-container:hover .main-image {
    transform: scale(1.02);
}

.zoom-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--c-overlay);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.main-image-container:hover .zoom-overlay {
    opacity: 1;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.thumbnail {
    width: 100%;
    height: 100px;
    border: 2px solid var(--c-border);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail:hover {
    border-color: var(--c-heading);
}

.thumbnail.active {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 1px var(--c-accent);
}

/* === VIDEO === */
.video-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.video-section h2,
.video-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-accent);
}

.video-container {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--c-border);
    cursor: pointer;
    text-decoration: none;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.video-container:hover .video-thumbnail {
    transform: scale(1.03);
    filter: brightness(0.75);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.video-container:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--c-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.video-link:hover {
    text-decoration: underline;
}

/* === DATA SECTIONS === */
.data-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-heading);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--c-accent);
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    background: var(--c-light-bg);
    padding: 1rem;
    border-radius: 4px;
}

.info-label {
    font-weight: 600;
    color: var(--c-heading);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-value {
    font-size: 1.1rem;
    color: var(--c-text);
    font-weight: 500;
}

.info-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--c-light-bg);
    border-radius: 4px;
    border-left: 4px solid var(--c-accent);
}

.info-box h3,
.info-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--c-heading);
}

.info-box p {
    margin: 0;
    line-height: 1.8;
    color: var(--c-text);
}

/* === PRODUKTMERKMALE === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-box {
    background: var(--c-light-bg);
    padding: 1.5rem;
    border-radius: 4px;
}

.feature-box h3,
.feature-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--c-heading);
}

.feature-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-box li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--c-accent);
    font-weight: bold;
}

/* === TECHNISCHE DATEN (ausklappbar) === */
.collapsible-section {
    margin-bottom: 1rem;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: var(--c-white);
}

.collapsible-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--c-light-bg);
    transition: background 0.3s ease;
}

.collapsible-header:hover {
    background: #e8e8e8;
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c-heading);
}

.collapsible-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: var(--c-heading);
}

.collapsible-icon.rotated {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.show {
    max-height: 2000px;
}

.collapsible-body {
    padding: 1.5rem;
}

/* Technische Daten als Tabelle (th scope=row), Optik wie die bisherigen Zeilen */
.tech-data-table {
    width: 100%;
    border-collapse: collapse;
}

.tech-data-table th,
.tech-data-table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.tech-data-table tr:last-child th,
.tech-data-table tr:last-child td {
    border-bottom: none;
}

.tech-data-table th {
    font-weight: 600;
    color: var(--c-heading);
    width: 40%;
    text-align: left;
    padding-right: 1rem;
}

.tech-data-table td {
    text-align: right;
    color: var(--c-text);
}

.tech-data-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.tech-data-item:last-child {
    border-bottom: none;
}

.tech-data-label {
    font-weight: 600;
    color: var(--c-heading);
    flex: 0 0 40%;
}

.tech-data-value {
    text-align: right;
    color: var(--c-text);
    flex: 1;
}

/* === DOWNLOADS === */
.downloads-section {
    margin-top: 2rem;
}

.downloads-section h2,
.downloads-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--c-heading);
}

.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--c-light-bg);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--c-text);
    transition: all 0.3s ease;
}

.download-card:hover {
    background: var(--c-heading);
    color: var(--c-white);
    border-color: var(--c-heading);
    transform: translateX(5px);
}

.download-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.download-info {
    flex: 1;
}

.download-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.download-filename {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.downloads-hint {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* === ZUBEHOER === */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.accessory-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.accessory-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--c-accent);
}

.accessory-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--c-light-bg);
    padding: 1rem;
}

.accessory-info {
    padding: 1rem;
}

.accessory-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-heading);
    margin-bottom: 0.5rem;
}

.accessory-han {
    font-size: 0.8rem;
    color: #666;
}

/* === CTA BUTTON === */
.cta-button {
    background: var(--c-accent);
    color: var(--c-white);
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--c-accent-hover);
    color: var(--c-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--c-accent-shadow);
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-data {
        order: 2;
    }

    .product-gallery {
        order: 1;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }

    .main-image-container {
        height: 350px;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .thumbnail {
        height: 80px;
    }

    .quick-info-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .tech-data-table th,
    .tech-data-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .tech-data-table th {
        border-bottom: none;
        padding-bottom: 0.25rem;
    }

    .tech-data-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tech-data-label {
        flex: none;
    }

    .tech-data-value {
        text-align: left;
    }
}

/* === MANDANTEN-BAUSTEINE (Footer, Buttons) === */
.bg-mandant {
    background-color: var(--c-footer-bg);
    border-color: var(--c-footer-bg);
}

.button-mandant {
    background-color: var(--c-btn-bg);
    border-color: var(--c-btn-border);
}

.button-mandant:hover,
.button-mandant:focus {
    background-color: var(--c-btn-hover);
    border-color: var(--c-btn-hover);
}

.modal-logo {
    width: var(--modal-logo-width);
}

/* === KAMPAGNEN-KARTEN (vorher Inline-Style in campaign.php) === */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-img-container .card-img-top {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: cover;
    display: block;
}

.product-card .card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-card .card-text {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 1rem;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .card-img-container {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .card-img-container {
        height: 150px;
    }
}

/* === BESTEHENDE KLASSEN (Admin-/Kampagnenseiten, Werte-Block) === */
.prod_detail {
    border-bottom: 1px solid #cecece;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    line-height: 1.5rem;
    margin-bottom: 15px;
}

.fon_600 { font-weight: 600; }
.fon_300 { font-weight: 300; }
.fon_size08 { font-size: 0.8rem; }

.img_border {
    border: 1px solid #cecece;
}

.container {
    font-size: var(--container-font-size);
}

.rpd_card {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    text-align: left;
    padding: 20px;
    margin: 1px;
    display: flex;
    align-items: center;
}

.rpd_card .svgcenter {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rpd_card-title {
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: uppercase;
}

.rpd_card-text {
    font-size: 0.875rem;
}

.bottom_text {
    font-size: 1.1rem;
}

#anfrageModal .form-label {
    font-weight: 600;
}

/* Checkboxen im Anfrage-Formular: einheitlich, lesbarer Kontrast (#91959a war zu blass) */
#anfrageModal .anfrage-intro,
#anfrageModal .anfrage-option {
    color: #5f6368;
    font-size: 0.9rem;
    line-height: 1.4;
}

.navbar-logo {
    transition: max-width 0.3s ease;
}

@media (max-width: 768px) {
    .navbar-brand .d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .navbar-logo {
        max-width: 100px;
    }
    .navbar-text {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

@media (min-width: 768px) {
    .navbar-logo {
        max-width: var(--logo-max);
    }
}

/* Steht bewusst am Ende: wirkt wie das fruehere Inline-Style am <img> und schlaegt
   die mobile 100px-Regel oben (so sah es bisher aus). */
.header-logo {
    max-width: var(--logo-max);
    height: auto;
}

/* === KATALOG (Phase 2): Breadcrumb, Suche, Kacheln, Facetten === */
.rpd-breadcrumb {
    background: var(--c-light-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.rpd-breadcrumb a {
    color: var(--c-text);
    text-decoration: none;
}

.rpd-breadcrumb a:hover,
.rpd-breadcrumb a:focus {
    text-decoration: underline;
}

.rpd-breadcrumb .breadcrumb-item.active a {
    color: #595959;             /* Kontrast >= 4.5:1 auf --c-light-bg */
}

.suchfeld {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.suggest-liste {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1050;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    text-align: left;
}

.suggest-liste .list-group-item.aktiv,
.suggest-liste .list-group-item:hover {
    background: var(--c-light-bg);
}

.suggest-han {
    display: block;
    font-size: 0.8rem;
    color: #595959;
}

.kachel {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--c-text);
    text-decoration: none;
    background: var(--c-white);
    transition: box-shadow 0.2s, transform 0.2s;
}

.kachel:hover,
.kachel:focus {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    color: var(--c-text);
}

.kachel-bild {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    margin-bottom: 0.5rem;
    background: var(--c-image-bg);
}

.kachel-bild img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.kachel-name {
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.kachel-unter,
.kachel-anzahl {
    font-size: 0.8rem;
    color: #595959;
}

.typen-rest .list-inline-item {
    margin-bottom: 0.25rem;
}

.facette-titel {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.facette-wert {
    display: block;
    padding: 0.15rem 0;
    color: var(--c-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.facette-wert.aktiv {
    font-weight: 600;
}

.sprungmarken {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
}

.sprungmarke {
    color: var(--c-text);
    text-decoration: none;
    border-bottom: 2px solid var(--c-accent);
}

.product-card .card-title a:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

/* Anfrage: Honeypot-Feld fuer Bots -- fuer Menschen unsichtbar, nicht per display:none
   (manche Bots ueberspringen versteckte Felder) */
.hp-feld {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Erfolgsansicht nach dem Absenden der Anfrage */
#anfrageModal .anfrage-erfolg {
    padding: 2.5rem 1.5rem 2rem;
}
#anfrageModal .anfrage-erfolg-icon {
    color: var(--c-accent);
    animation: anfrage-erfolg-rein 0.4s ease-out;
}
@keyframes anfrage-erfolg-rein {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    #anfrageModal .anfrage-erfolg-icon { animation: none; }
}

/* Link kopieren / E-Mail neben den Sprungmarken (Produktseite) */
.sprungmarken-teilen {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
}
.link-kopieren,
.link-teilen {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
    color: var(--c-text);
    text-decoration: none;
    cursor: pointer;
}
.link-kopieren:hover,
.link-teilen:hover {
    border-color: var(--c-accent);
    color: var(--c-accent-hover);
}
.link-kopieren.ist-kopiert {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

/* Nicht-gefunden-Seite: kompakter Kopf, Suche und Vorschlaege sofort sichtbar */
.fehler-seite .fehler-hilfe .kacheln-grid,
.fehler-seite .fehler-hilfe .row {
    margin-top: 0.25rem;
}
