/* ============================================================
 * fleischtheke.css — Online-Fleischtheke (Wave 3b)
 * Kachel-Grid, Suchfeld, Filter-Zeile, Detail-Modal, responsiv.
 * ============================================================ */

/* Header — global `header { background: linear-gradient(...) }` aus style.css
   (blauer Primary-Gradient) schlägt sonst auf diese Seite durch. Hier bewusst
   neutralisiert, damit „Online-Fleischtheke" auf hellem Grund steht. */
.fleischtheke-header {
    text-align: center; padding: 3rem 1rem 2rem;
    background: transparent !important;
    color: inherit;
}
.fleischtheke-header h1 { font-size: 2.5rem; font-weight: 300; margin: 0; }
.fleischtheke-subline { color: #666; margin-top: 0.5rem; }

/* Suchfeld — prominent, mit Lupe-Icon-Button rechts */
.fleischtheke-suche { max-width: 700px; margin: 0 auto 1.5rem; padding: 0 1rem; }
.suchfeld-wrapper { position: relative; max-width: 700px; margin: 0 auto; }
#fleischtheke-suchfeld {
    width: 100%; padding: 1rem 3.5rem 1rem 1.5rem; font-size: 1.2rem;
    border: 2px solid #333; border-radius: 999px;
    background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
#fleischtheke-suchbutton {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer; padding: 0.5rem;
    color: #333; display: flex; align-items: center; justify-content: center;
}
#fleischtheke-suchbutton:hover { color: #b8894c; }

/* Filter-Zeile */
.fleischtheke-filter {
    max-width: 1200px; margin: 0 auto 2rem; padding: 0 1rem;
    display: flex; flex-wrap: wrap; align-items: flex-start;
    gap: 1rem; justify-content: space-between;
}
.filter-chips-container {
    display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; flex: 1;
}
.chip-cluster { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.chip-cluster-label { color: #666; font-size: 0.85rem; margin-right: 0.25rem; }
.filter-chip {
    padding: 0.4rem 0.9rem; border: 1px solid #ccc; border-radius: 999px;
    background: #fff; cursor: pointer; font-size: 0.9rem;
    transition: all 0.15s;
}
.filter-chip:hover { border-color: #333; }
.filter-chip.active { background: #333; color: #fff; border-color: #333; }
.filter-chip:disabled { opacity: 0.3; cursor: not-allowed; }
.filter-reset {
    display: inline-block; margin-top: 0.5rem; font-size: 0.85rem;
    color: #b8894c; text-decoration: underline;
}
.filter-sortierung { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.filter-sortierung select { padding: 0.35rem 0.6rem; border: 1px solid #ccc; border-radius: 6px; }

/* Ergebnis-Kopf */
.fleischtheke-ergebnisse { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.ergebnis-anzahl { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }
.keine-ergebnisse { text-align: center; color: #666; padding: 3rem 1rem; }

/* Kachel-Grid — 3 Spalten Desktop, 2 Tablet/Mobile */
.kachel-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
@media (max-width: 1024px) {
    .kachel-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (max-width: 640px) {
    .kachel-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* Einzelne Kachel */
.fleischtheke-kachel {
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    overflow: hidden; cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.fleischtheke-kachel:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.fleischtheke-kachel:focus-visible { outline: 2px solid #333; outline-offset: 2px; }
.kachel-foto { aspect-ratio: 4/3; overflow: hidden; background: #f5f5f5; }
.kachel-foto img { width: 100%; height: 100%; object-fit: cover; }
.kachel-foto-fallback {
    width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, #f0ede6, #f0ede6 10px, #eae5da 10px, #eae5da 20px);
}
.kachel-info { padding: 1rem; }
.kachel-teilstueck { font-size: 1rem; font-weight: 500; margin: 0 0 0.4rem; }
.kachel-meta { display: flex; gap: 0.75rem; color: #666; font-size: 0.85rem; margin-bottom: 0.5rem; }
.kachel-preis { font-size: 1.15rem; font-weight: 600; }

/* Mobile: Suchfeld + Filter kompakter (2 Reihen + Peek passen) */
@media (max-width: 640px) {
    .fleischtheke-header { padding: 1.5rem 1rem 1rem; }
    .fleischtheke-header h1 { font-size: 1.75rem; }
    #fleischtheke-suchfeld { padding: 0.75rem 3rem 0.75rem 1.25rem; font-size: 1rem; }
    .filter-chips-container {
        overflow-x: auto; flex-wrap: nowrap;
        padding-bottom: 0.5rem; scrollbar-width: thin;
    }
    .kachel-info { padding: 0.75rem; }
    .kachel-teilstueck { font-size: 0.9rem; }
    .kachel-preis { font-size: 1rem; }
}

/* Fungibel-Fallback-Karte */
.fungibel-fallback-karte {
    max-width: 800px; margin: 0 auto 2rem; padding: 1.5rem 2rem;
    background: #f9f4ec; border-left: 4px solid #b8894c; border-radius: 4px;
}
.fungibel-fallback-karte h3 { margin-top: 0; }
.btn-fungibel-fallback {
    display: inline-block; margin-top: 0.5rem; padding: 0.6rem 1.2rem;
    background: #b8894c; color: #fff; text-decoration: none; border-radius: 4px;
}

/* Detail-Modal — echtes Fullscreen-Overlay.
   z-index 1200 liegt über der fixierten Shop-Chrome (Navbar 1036,
   Cart-Sidebar 1050, Mobile-Nav 1100). pointer-events explizit auto,
   damit keine Bootstrap-/Fremd-Regel die Klickbarkeit aushebelt. */
#fleischtheke-detail-modal.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 1200; display: flex; align-items: center; justify-content: center;
    padding: 1rem; pointer-events: auto;
}
#fleischtheke-detail-modal.hidden { display: none; }
.modal-dialog-detail {
    background: #fff; border-radius: 8px; max-width: 700px; width: 100%;
    max-height: 90vh; overflow-y: auto; position: relative; z-index: 1201;
    display: grid; grid-template-columns: 1fr 1fr; pointer-events: auto;
}
@media (max-width: 640px) {
    .modal-dialog-detail { grid-template-columns: 1fr; }
}
.modal-dialog-detail .modal-close {
    position: absolute; top: 0.5rem; right: 0.75rem; z-index: 2;
    background: rgba(255,255,255,0.85); border: none; border-radius: 50%;
    width: 2rem; height: 2rem; font-size: 1.4rem; line-height: 1;
    cursor: pointer; pointer-events: auto;
}
.detail-foto { background: #f5f5f5; }
.detail-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { padding: 2rem; }
.detail-info h2 { margin-top: 0; }
.detail-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 1rem 0; }
.detail-meta dt { color: #666; }
.detail-meta dd { margin: 0; }
.detail-preis { font-size: 1.6rem; font-weight: 600; }
.btn-in-warenkorb-detail {
    width: 100%; margin-top: 1.5rem; padding: 1rem; font-size: 1.1rem;
    background: #333; color: #fff; border: none; border-radius: 4px;
    cursor: pointer; pointer-events: auto;
}
.btn-in-warenkorb-detail:disabled { opacity: 0.5; cursor: not-allowed; }
.detail-conflict-notice {
    margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 4px;
    background: #fdf3e3; border: 1px solid #e5c98a; font-size: 0.9rem;
}
.detail-conflict-notice.hidden { display: none; }

/* Deep-Link im Wave-2b-Modal */
.modal-fleischtheke-link { margin-top: 1rem; text-align: center; }
.btn-fleischtheke-link { color: #b8894c; text-decoration: none; font-size: 0.9rem; }
.btn-fleischtheke-link:hover { text-decoration: underline; }

/* ============================================================
 * Mobile-Filter-Drawer (Bottom-Sheet)
 * Desktop: der Drawer-Wrapper ist wirkungslos, die Filter-Section
 * rendert normal inline. Nur ≤768px wird daraus ein Bottom-Sheet.
 * z-index 1098 (Overlay 1097): bewusst NICHT 1100/1099 — das würde exakt
 * mit .mobile-nav (1100) / .mobile-nav-overlay (1099) kollidieren
 * (siehe Z-Index-Tabelle in CLAUDE.md). Liegt über der Cart-Sidebar
 * (1050) und unter dem Detail-Modal (1200).
 * ============================================================ */

/* Filter-Button + Drawer-Chrome: auf Desktop komplett ausgeblendet. */
.fleischtheke-filter-toggle,
.fleischtheke-filter-drawer-header,
.fleischtheke-filter-drawer-footer,
.fleischtheke-filter-close {
    display: none;
}

@media (max-width: 768px) {
    /* Trigger-Button sichtbar */
    .fleischtheke-filter-toggle {
        display: flex; align-items: center; justify-content: center;
        gap: 0.5rem; width: 100%; margin-bottom: 1rem;
        padding: 0.75rem 1rem; font-weight: 500; cursor: pointer;
        background: #fff; border: 1px solid #ddd; border-radius: 8px;
    }
    .fleischtheke-filter-toggle:hover { background: #f5f5f5; }

    /* Drawer standardmäßig unterhalb des Viewports geparkt */
    .fleischtheke-filter-drawer {
        position: fixed; bottom: 0; left: 0; right: 0;
        max-height: 80vh; background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        z-index: 1098;
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
        display: flex; flex-direction: column;
    }
    .fleischtheke-filter-drawer.open { transform: translateY(0); }

    /* Overlay (per JS ans <body> gehängt) */
    .fleischtheke-filter-drawer-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        z-index: 1097; opacity: 0; pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }
    .fleischtheke-filter-drawer-overlay.open { opacity: 1; pointer-events: auto; }

    /* Drawer-Header */
    .fleischtheke-filter-drawer-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 1rem 1.5rem; border-bottom: 1px solid #eee;
    }
    .fleischtheke-filter-drawer-header h2 { margin: 0; font-size: 1.25rem; }
    .fleischtheke-filter-close {
        display: block; background: none; border: none; cursor: pointer;
        font-size: 1.75rem; line-height: 1; padding: 0; width: 2rem; height: 2rem;
    }

    /* Filter-Section im Drawer: vertikal gestapelt + scrollbar.
       Überschreibt das horizontale Chip-Scroll-Layout (≤640px) im Drawer-
       Kontext, damit die Kategorien untereinander stehen. */
    .fleischtheke-filter-drawer .fleischtheke-filter {
        flex: 1; overflow-y: auto; margin: 0;
        flex-direction: column; padding: 1rem 1.5rem;
    }
    .fleischtheke-filter-drawer .filter-chips-container {
        flex-wrap: wrap; overflow-x: visible;
    }

    /* Drawer-Footer */
    .fleischtheke-filter-drawer-footer {
        display: flex; gap: 1rem;
        padding: 1rem 1.5rem; border-top: 1px solid #eee;
    }
    .fleischtheke-filter-drawer-footer .btn-reset {
        flex: 1; padding: 0.75rem; text-align: center;
        background: #fff; border: 1px solid #ddd; border-radius: 8px;
        text-decoration: none; color: #333;
    }
    .fleischtheke-filter-drawer-footer .btn-anwenden {
        flex: 2; padding: 0.75rem; font-weight: 500; cursor: pointer;
        background: #a43434; color: #fff; border: none; border-radius: 8px;
    }
}

/* HINWEIS: Die Fleischtheken-Parallax-Card (Video-Vollfläche + Content-Box
   rechts) wird ausschließlich auf der Startseite (shop.html) gerendert und
   dort über shop.css gestylt (Block „PARALLAX FLEISCHTHEKE", gescoped über
   .parallax-fleischtheke). fleischtheke.css wird auf der Startseite NICHT
   geladen — deshalb wohnen die Regeln bewusst nicht mehr hier. Ein früherer
   ungescopeter .parallax-section/.parallax-content-Block an dieser Stelle
   war wirkungslos (kein Parallax-Element auf /fleischtheke) und hätte bei
   versehentlichem Laden die geteilten Parallax-Cards überschrieben. */