/* --------------------------------------------------------------- */
/* Variablen & variables CSS                                       */
/* --------------------------------------------------------------- */

/* Ist ein spezieller CSS-Selektor, der das oberste Element des Dokuments auswählt. */
:root {
    --menu-breite: 600px;
    --menu-indent: 20px;
    --plastes_de_color_night: #df7508;
    --plastes_de_color_dark: #ffc04d;
    --plastes_de_color_light: #ffe5cc;
    --color_gray: #666;
    --menu-fontsize: 1.1em;
}

    /* Handy (klein) < 480 px */
    @media (max-width: 480px Handy) {
        :root {
            --max-ausgabe-breite: 99vw;
            --max-ausgabe-breite-klein: 98vw;
            --max-ausgabe-breite-menu: 98vw;
            --text-fontsize: 1.2em;
            --product-price-fontsize: 1.5em;
        }

        .product-list-small {
            grid-template-columns: 1fr;
        }

        .main-menu,
        .sub-menu {
            max-width: 100vw;
            width: 100vw;
        }

        .sub-menu {
            margin-left: 0;
            box-shadow: none;
            background: #000;
        }

        .combo,
        .combobox-group select,
        select {
            font-size: 1.4em;
            min-height: 3em;
            padding: 12px 18px;
        }

        .header-fullwidth-image,
        .header-fullwidth-image img,
        #header-rotating-image {
            width: 100%;
            max-width: 100%;
        }
    }

    /* Handy (groß) 480  – 767 px */
    @media (max-width: 767px) {
        :root {
            --max-ausgabe-breite: 99vw;
            --max-ausgabe-breite-klein: 98vw;
            --max-ausgabe-breite-menu: 75vw;
            --text-fontsize: 1.2em;
            --product-price-fontsize: 1.5em;
        }

        .product-list-small {
            grid-template-columns: repeat(2, 1fr);
        }

        .header-fullwidth-image,
        .header-fullwidth-image img,
        #header-rotating-image {
            width: 100%;
            max-width: 100%;
        }
    }

    /* Tablet 768  – 1023 px */
    /* u.a. Samsung S22     */
    @media (min-width: 768px) {
        :root {
            --max-ausgabe-breite: 99vw;
            --max-ausgabe-breite-klein: 98vw;
            --max-ausgabe-breite-menu: 75vw;
            --text-fontsize: 1.2em;
            --product-price-fontsize: 1.5em;
        }

        .product-list-small {
            grid-template-columns: repeat(2, 1fr);
        }

        .header-fullwidth-image,
        .header-fullwidth-image img,
        #header-rotating-image {
            width: 100%;
            max-width: 100%;
        }
    }

    /* Laptop 1024  – 1279 px */
    @media (min-width: 1024px) {
        :root {
            --max-ausgabe-breite: 99vw; /* entspricht 1200px bei 1920px Breite */
            --max-ausgabe-breite-klein: 98vw; /* entspricht 780px bei 1920px Breite */
            --max-ausgabe-breite-menu: 75vw;
            --text-fontsize: 1.2em;
            --product-price-fontsize: 1.4em;
        }

        @media (max-width: 1023px) {
            .product-list-small {
                grid-template-columns: repeat(3, 1fr);
            }
        }
    }

    /* Desktop 1280  – 1919 px */
    @media (min-width: 1280px) {
        :root {
            --max-ausgabe-breite: 99vw;
            --max-ausgabe-breite-klein: 98vw;
            --max-ausgabe-breite-menu: 75vw;
            --text-fontsize: 1.1em;
            --product-price-fontsize: 1.4em;
        }
    }

    /* 4K-Monitore ≥ 1920 px */
    @media (min-width: 1920px) {
        :root {
            --max-ausgabe-breite: 99vw;
            --max-ausgabe-breite-klein: 55vw;
            --max-ausgabe-breite-menu: 75vw;
            --text-fontsize: 1.1em;
            --product-price-fontsize: 1.4em;
        }
    }

/* --------------------------------------------------------------- */
/* Header, Footer und Content                                      */
/* --------------------------------------------------------------- */

/* Der große Bereich im HTML. */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}
/* Der reine Body Bereich. */
body {
    min-height: 100vh;
    background: #fff;
    font-family: "Arial", "Liberation Sans", "Helvetica Neue", Helvetica, sans-serif;
}

/* Verfeinerung. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Der Header Bereich mit dem Hamburger Menu und dem Logo. */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left,
.site-header {
    display: flex;
    flex-direction: row;
    flex: 1 0 auto;
    max-width: var(--max-ausgabe-breite);
    width: var(--max-ausgabe-breite-menu);
    margin-top: 0 !important;
    padding-top: env(safe-area-inset-top, 0) !important;
    font-size: var(--text-fontsize);
    gap: 16px; /* Abstand zwischen Menü und Logo */
    padding-left: 16px; /* optionaler Einzug von links */
}

/* Verfeinerung. */
.site-header {
    position: relative; /* NEU: für absolute Positionierung der Navigation */
}

/* Verfeinerung. */
.header-left {
    margin-top: 0 !important;
    padding-top: env(safe-area-inset-top, 0) !important; /* für Notch-Smartphones */
}

.header-left {
    float: left;
}

/* Verfeinerung. */
.header-right {
    float: right;
    margin-top: 10px;
    margin-right: 16px;
}

/* --------------------------------------------------------------- */
/* Basket                                                          */
/* --------------------------------------------------------------- */

.basket-button {
    display: inline-block;
    padding: 4px 6px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e0b96a;
    transition: background 0.2s;
    margin-top: 4px;
}

.basket-button_products {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e0b96a;
    transition: background 0.2s;
    margin-top: 8px;
}

.img-basket-add {
    transition: filter 0.2s, transform 0.2s;
    border-radius: 6px;
}

    .img-basket-add:hover {
        filter: brightness(1.2) drop-shadow(0 0 4px #ff9800);
        transform: scale(1.15);
        cursor: pointer;
    }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.basket-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    /* Optional: für bessere Lesbarkeit auf kleinen Bildschirmen */
    word-break: break-word;
}

    .basket-table th,
    .basket-table td {
        padding: 4px 8px;
        font-size: 0.95em;
        min-width: 50px;
        max-width: 150px;
        white-space: nowrap;
    }

    .basket-table th {
        background: #f5f5f5;
    }

    .basket-table td {
        background: #fff;
    }

        .basket-table td.border-right,
        .basket-table th.border-right {
            border-right: 2px solid #ddd;
        }

.basket-summe td,
.basket-summe th {
    border-right: none !important;
}

/* --------------------------------------------------------------- */
/* Bilder Header                                                   */
/* --------------------------------------------------------------- */

/* Das große Bild auf der Startseite, dass über die ganze Seite geht. */
.header-fullwidth-image,
.header-fullwidth-image img,
#header-rotating-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    display: block;
    box-sizing: border-box;
}

/* Verfeinerung. */
.header-fullwidth-image {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Logo der Homepage. */
.img-logo_title {
    max-height: 64px; 
    height: auto;
    width: auto;
    display: block;
}

/* Logo der Homepage. */
.img-basket_title {
    max-height: 64px;
    height: auto;
    width: auto;
    display: block;
    border-radius: 6px;
}

/* Der Contenct Bereich über die ganze Seite.  */
/* Wird vorrangig für das Wegscrollen bei Auf- */
/* ruf des Menüs benötigt?                     */
.main-content {
    flex: 1 0 auto;
    max-width: var(--max-ausgabe-breite);
    width: 88vw;
    margin: 0 auto;
    padding: 16px 0 0 0;
    background: #fff;
    font-size: var(--text-fontsize);
    transition: transform 0.3s;
}
    
    .main-content.shifted {
        transform: translateX(var(--menu-breite));
    }

/* Content Bereich für den wahren Content der Seite. */
.content-container {
    flex: 1 0 auto;
    max-width: var(--max-ausgabe-breite-klein);
    width: 80vw;
    margin: 0 auto;
    padding: 0 20px;
    background: #fff;
    font-size: var(--text-fontsize);
    overflow-x: auto;
}

/* Macht aus einem Bild und einem Link eine 2 Reihige Einheit. */
.header-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
    /* Verfeinerung. */
    .header-image-wrapper img {
        margin-bottom: 0;
        display: block;
        line-height: 1;
    }

/* Gibt Links im Header ein bestimmtes Aussehen. */
#header-link {
    text-align: center;
    margin-top: 0;
    padding-top: 0;
    line-height: 1.2;
}
    /* Verfeinerung. */
    #header-link a {
        font-size: 0.95em;
        color: var(--plastes_de_color_dark);
    }

/* Wird für das Logo in Verbindung mit einem Link verwendet. */
.logo-link {
    display: inline-block;
    vertical-align: middle;
    text-decoration: none; /* keine Unterstreichung */
    margin-right: 8px; /* Abstand zum nächsten Element, falls gewünscht */
}
    /* Verfeinerung. */
    .logo-link:focus,
    .logo-link:hover {
        outline: none;
        filter: brightness(0.85); /* optional: Logo leicht abdunkeln beim Hover */
    }

/* Der Bereich Footer der Seite. */
.site-footer {
    flex-shrink: 0;
    max-width: var(--max-ausgabe-breite);
    width: 88vw;
    margin: 0 auto;
    text-align: center;
    font-size: var(--text-fontsize);
    background: #000;
    color: #fff;
    border-bottom: none;
    border-top: 1px solid #ccc;
    margin-bottom: 0px;
    padding: 16px 20px 12px 20px;
}

    /* Verfeinerung. */
    .site-footer * {
        text-align: center !important;
        text-indent: 0;
    }

/* Die Footerausgabe unten am Rand. */
footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--plastes_de_color_light);
    color: var(--plastes_de_color_dark);
    z-index: 9000;
    padding: 1em 0;
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

/* Cookie-Banner, der am unteren Rand der Seite erscheint. */
#cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    /* Abstand zum Footer, z.B. 80px Footerhöhe + 12px Abstand */
    bottom: 100px;
    /* Breite begrenzen wie .content-container */
    max-width: var(--max-ausgabe-breite-klein);
    margin: 0 auto 0 auto;
    background: var(--plastes_de_color_light);
    color: var(--plastes_de_color_dark);
    z-index: 9999;
    padding: 1em;
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    display: none;
    border-radius: 8px;
    border: 2px solid #000;
}

/* Bild, das slidet auf Home. */
.site-header-4-cockpit {
    max-width: var(--max-ausgabe-breite);  
    width: 88vw;
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
    color: #000;
}

/* Verfeinerung. */
.site-header-4-cockpit img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --------------------------------------------------------------- */
/* Globale Einstellungen                                           */
/* --------------------------------------------------------------- */
a {
    color: var(--plastes_de_color_night);
    text-decoration: none;
    transition: color 0.2s;
}

    /* Verfeinerung */
    a:hover,
    a:focus {
        color: var(--plastes_de_color_dark); 
        text-decoration: none;
    }

.button-base {
    background: var(--plastes_de_color_dark);
    color: #000;
}

    .button-base:hover,
    .button-base:focus {
        background: var(--plastes_de_color_light);
        color: #000;
    }

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* --------------------------------------------------------------- */
/* Tabelle                                                         */
/* --------------------------------------------------------------- */
.display-table {
    width: 100%;
    table-layout: fixed;
    word-break: break-word;
}

    .display-table th,
    .display-table td {
        word-break: break-word;
        white-space: normal;
    }

    .display-table th, .display-table td {
        border: 1px solid #ccc;
        padding: 8px 12px;
        text-align: left;
    }

    .display-table th {
        background: #f5f5f5;
        font-weight: bold;
    }

    .display-table tr:nth-child(even) {
        background: #fafafa;
    }

    .display-table a {
        color: #0074d9;
        text-decoration: underline;
    }

        .display-table a:hover {
            color: #005fa3;
        }

/* --------------------------------------------------------------- */
/* Produkte                                                        */
/* --------------------------------------------------------------- */
.product-detail {
    max-width: 600px;
    max-height: auto;
    margin: 40px auto;
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Bild über der Beschreibung, i.d.R. ein Cockpit. */
.product-image-detail-over-text {
    display: block;
    max-width: 100%; /* nie breiter als der Container */
    width: auto; /* keine erzwungene Vergrößerung */
    height: auto;
    border-radius: 6px;
    object-fit: contain;
    margin: 0 0 8px 0;
}

/* Rahmen für Bilder im Beschreibungstext, die als Muster dienen, damit diese in einer Zeile bleiben. */
.product-image-row {
    display: flex;
    gap: 10px; /* Abstand zwischen den Bildern, nach Wunsch anpassen */
    align-items: flex-start;
    flex-wrap: wrap; /* Zeilenumbruch bei zu wenig Platz */
    max-width: 100%; /* nie breiter als der Container */
    box-sizing: border-box;
}

/* Bilder im Beschreibungstext, die als Muster dienen. */
.product-image-original {
    max-width: 100%;
    height: auto;
    width: auto; /* Bild bleibt in Originalbreite */
    max-height: 250px; /* Bild bleibt in Originalhöhe */
    object-fit: contain; /* Optional: Bild bleibt vollständig sichtbar */
    /* Verhindert Vergrößerung über Originalgröße hinaus */
    image-rendering: auto;
    border-radius: 6px;
}

.product-image-list {
    width: 60px; /* oder die Breite aus der Produktliste */
    height: 60px; /* oder die Höhe aus der Produktliste */
    object-fit: cover; /* Bild wird beschnitten, nicht verzerrt */
    border-radius: 4px; /* optional, für abgerundete Ecken */
    display: block;
    background: #f8f8f8; /* optional, für einheitlichen Hintergrund */
}

/* Produktseite Produktbild und Text: Produktbild und Text nebeneinander. Äußere Klasse. */
.product-detail-flex {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

/* Produktseite Produktbild und Text: Produktbild und Text nebeneinander. Innere Klasse für das Produktbild. */
.product-detail-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-radius: 6px;
    min-width: 200px;
    margin-right: 32px;
    position: relative;
    display: inline-block;
}

.offer-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--plastes_de_color_dark);
    color: #fff;
    font-weight: bold;
    font-size: 0.85em;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* Produktseite: Produktbild Hauptklasse. Es gibt noch Queformat und Hochformat. */
.product-image-detail {
    max-width: var(--max-ausgabe-breite-klein);
    max-height: 900px;
    display: block;
    border-radius: 6px;
    margin: 0 auto 8px auto;
}

/* Produktseite: Produktbild Nebenklasse von product-image-detail. */
.querformat {
    width: 300px;
    height: auto;
}

/* Produktseite: Produktbild Nebenklasse von product-image-detail. */
.hochformat {
    height: 300px;
    width: auto;
}

/* Produktseite Produktbild und Text: Produktbild und Text nebeneinander. Innere Klasse für den Text. */
.product-detail-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Produkseite: Restliche Items. */
.product-detail-title,
.product-detail-artikel,
.product-price {
    text-align: left;
    width: 100%;
    margin: 0 0 8px 0;
}

/* Verfeinerung. */
.product-price {
    text-align: left;
    font-size: var(--product-price-fontsize);
    margin-top: 10px;
    margin-bottom: 16px;
    color: var(--plastes_de_color_dark);
}

.product-title-small {
    width: 160px; /* exakt wie das Bild */
    font-size: 0.8em;
    font-weight: bold;
    margin: 4px auto 8px auto; /* etwas Abstand nach oben/unten, zentriert */
    word-break: break-word; /* Wortumbruch bei langen Wörtern */
    white-space: normal; /* Zeilenumbruch erlauben */
    text-align: center; /* zentrierter Text */
    line-height: 1.2;
    display: block;
}
    .product-title-small:hover {
        text-decoration: underline; /* Unterstreichung bei Hover */
    }

/* --------------------------------------------------------------- */
/* Helper                                                          */
/* --------------------------------------------------------------- */
/* Bereinigt die Angaben für Float. */
.clearfix {
    clear: both;
}

.footnote-text {
    font-size: 0.5em;
    color: var(--color_gray);
    line-height: 1.4;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    display: block;
}

.img-float-right {
    float: right;
    margin: 0 0 10px 20px;
    border-radius: 6px;
}

.img-float-left {
    float: left;
    margin: 0 20px 10px 0;
    border-radius: 6px;
}

.product-image-small-link {
    text-decoration: none;
    color: inherit;
    position: relative;
    display: inline-block;
}

.product-list-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0;
}

.product-image-small-img {
    width: 160px;
    height: 128px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto 8px auto;
}

.product-price-small {
    text-align: center;
    font-size: 1.0em;
    margin-top: 2px;
}

.product-price-old {
    color: var(--plastes_de_color_dark);
    text-decoration: line-through;
    font-weight: normal;
    margin-right: 8px;
    font-size: 0.5em;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 32px 0 16px 0;
    font-size: 1.2em;
}

    .pagination a {
        color: var(--plastes_de_color_dark);
        text-decoration: none;
        padding: 4px 10px;
        border-radius: 4px;
        transition: background 0.2s;
    }

        .pagination a:hover {
            background: var(--plastes_de_color_light);
        }

    .pagination .current-page {
        font-weight: bold;
        color: #000;
        background: var(--plastes_de_color_dark);
        padding: 4px 10px;
        border-radius: 4px;
    }

/* --------------------------------------------------------------- */
/* ComboBox-Layout und Design für das gesamte System               */
/* --------------------------------------------------------------- */

/* Layout für ComboBox-Reihen und Gruppen */
.combobox-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: flex-start; 
}

.combobox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    margin: 0;
    padding: 0;
}

.combobox-header {
    font-weight: bold;
    margin-bottom: 4px;
    text-align: left;
    width: 100%;
}

.combobox-label {
    min-width: 110px;
    font-weight: bold;
    text-align: left;
}

/* Einheitliches Design für alle ComboBoxen */
.combo,
.combobox-group select,
select {
    font-size: 1.0em;
    min-height: 1.8em;
    padding: 8px 16px;
    border-radius: 6px;
    box-sizing: border-box;
    background: #fafafa;
    border: 1px solid #bbb;
    color: #222;
    margin-bottom: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .combo:focus,
    .combobox-group select:focus,
    select:focus {
        border-color: #0074d9;
        box-shadow: 0 0 4px #0074d9;
        outline: none;
    }

/* --------------------------------------------------------------- */
/* Menü                                                            */
/* --------------------------------------------------------------- */

.drawer {
    position: fixed;
    left: 0;
    width: var(--menu-breite);
    height: 100vh; /* Volle Höhe des Viewports */
    max-height: 100vh;
    background: #000;
    color: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    padding: 16px 0 0 0;
}

    .drawer.open {
        transform: translateX(0);
    }

.drawer-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2em;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

#drawerOpenBtn,
.drawer-open {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #222 !important;
    font-size: 2.4em !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.drawer-content {
    max-height: calc(100vh - 48px); /* Platz für Button oben */
    overflow-y: auto;
}

.main-menu,
.sub-menu, 
.menu-disabled {
    font-size: var(--menu-fontsize);
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
}

.menu-disabled {
    cursor: default;
}

.main-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.sub-menu {
    margin-left: 24px;
    max-width: var(--menu-breite);
    box-sizing: border-box;
    word-break: break-word;
}

    .sub-menu > li {
        margin: 0;
        padding: 0;
        position: relative;
    }

.main-menu > li > a {
    color: #fff;
    display: block;
    padding: 3px 16px;
    border-bottom: 1px solid #222;
    text-decoration: none;
}

.main-menu > li > .menu-disabled {
    display: block;
    padding: 3px 16px;
    border-bottom: 1px solid #222;
    text-decoration: none;
    color: #aaa; /* Grau explizit für Root-Items ohne Link. */
}

.sub-menu > li > a {
    display: block;
    color: #fff;
    border-bottom: 1px solid #222;
    text-decoration: none;
    padding: 3px 16px 3px var(--menu-indent);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-menu > li > .menu-disabled {
    display: block;
    border-bottom: 1px solid #222;
    text-decoration: none;
    padding: 3px 16px 3px var(--menu-indent);
    color: #aaa; /* Grau explizit für Submenü */
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.main-menu > li > a:hover,
.sub-menu > li > a:hover,
.main-menu > li > a:focus,
.sub-menu > li > a:focus {
    background: #fff;
    color: #000;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
