/* =====================================================
   🌍 Globales Layout & Scroll-Verhalten
   ===================================================== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 👉 Fix gegen Springen beim Warenkorb */
html {
    overflow-y: scroll; /* Platz der Scrollbar immer reservieren */
}

body {
    background-color: var(--shop-body-bg);
    font-family: system-ui, sans-serif;

    overflow-y: auto;         /* ✅ BODY scrollt */
    display: flex;
    flex-direction: column;
}

/* Bootstrap Offcanvas Workaround */
body.offcanvas-open {
    padding-right: 0 !important;
}

/* Footer bleibt unten */
html, body {
    height: 100%;
}

.site-content {
    flex: 1;                  /* ✅ drückt Footer korrekt */
}

/* =====================================================
   🛍️ Shop-Übersicht & Karten
   ===================================================== */
.shop-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #003366;
}

.shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 520px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.shop-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Produktbild */
.shop-img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 0.5rem;
    margin-bottom: 2.5rem;
}

/* Mobile Karten */
@media (max-width: 576px) {
    .shop-img {
        height: 160px;
        margin-bottom: 0.75rem;
    }

    .shop-card {
        min-height: auto;
    }

    .shop-title {
        font-size: 1.75rem;
    }
}

.shop-price {
    color: #4b4bf9;
    font-weight: 700;
    font-size: 1.25rem;
}

.shop-sku {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Ganze Karte klickbar */
.card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Interaktive Elemente über Overlay */
.shop-card button,
.shop-card input,
.shop-card a:not(.card-link-overlay) {
    position: relative;
    z-index: 2;
}

/* =====================================================
   📚 Sidebar / Kategorien
   ===================================================== */
.sidebar h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
}

.katalog-liste {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.katalog-liste li {
    margin-bottom: 0.25rem;
}

.katalog-liste a {
    display: block;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.katalog-liste a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0d6efd;
}

/* =====================================================
   🛒 Offcanvas Warenkorb
   ===================================================== */
#cartOffcanvas {
    top: 120px;
    height: calc(100% - 120px);
}

#cartOffcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#cart-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#cart-footer {
    flex-shrink: 0;
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
    background-color: #ffffff;
}

#cartOffcanvas .card {
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

/* =====================================================
   🧾 Artikel-Detailseite
   ===================================================== */

/* 🧱 Zentrale Bühne für Artikel */
.artikel-wrapper {
    max-width: 1300px;
    margin: 0 auto;                 /* ⬅️ TOP-Margin weg */
    padding: 2.5rem;
    padding-top: 8.5rem;            /* ⬅️ Platz für Header */
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.05);
}

/* 🎯 Fixe Bild-Bühne (verhindert Layout-Springen) */
.bild-buehne {
    width: 100%;
    height: 420px;
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #dee2e6;
    padding: 1rem;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🖼️ Hauptbild passt sich Bühne an */
.hauptbild {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 🧩 Thumbnail-Leiste */
.thumbnail {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.thumbnail:hover {
    transform: scale(1.04);
    border-color: #0d6efd;
}

/* 💰 Preis-Hervorhebung */
.artikelpreis {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d6efd;
}

/* ⬅️ Zurück-Link */
.shop-back-link {
    color: #0d6efd;
    text-decoration: none;
}

.shop-back-link:hover {
    text-decoration: underline;
}

/* 📱 Mobile Feinschliff */
@media (max-width: 576px) {
    .artikel-wrapper {
        padding: 1.5rem;
        padding-top: 9.5rem;        /* ⬅️ Mobile Header höher */
        margin: 0 auto;
    }

    .bild-buehne {
        height: 280px;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .artikelpreis {
        font-size: 1.5rem;
    }
}

