/* ========================================== */
/* 🔴 BAMS DESIGN - GASTRO SYSTEM STYLES      */
/* Autor: Bams Design                         */
/* ========================================== */

:root { 
    --bams-bg: #000000; 
    --bams-card: #1c1c1e; 
    --bams-gold: #C5A059; /* Standard Bams-Gold */
    --bams-btn-text: #000000; 
    --bams-text: #ffffff; 
    --bams-muted: #8e8e93; 
    --bams-border: #38383a; 
    --radius-lg: 24px;
    --radius-md: 16px;
}

body.light-mode {
    --bams-bg: #f2f2f7; 
    --bams-card: #ffffff;
    --bams-gold: #967332; /* Standard Light-Gold */
    --bams-text: #000000;
    --bams-muted: #8e8e93; 
    --bams-border: #e5e5ea; 
    --bams-btn-text: #ffffff; 
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { margin: 0; background: var(--bams-bg); color: var(--bams-text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; display: flex; flex-direction: column; min-height: 100vh; transition: background 0.3s, color 0.3s; }

.bams-top-sticky-bar { 
    position: sticky; top: 0; z-index: 100; 
    background: rgba(0, 0, 0, 0.65); 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--bams-border); 
    padding-top: env(safe-area-inset-top); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
body.light-mode .bams-top-sticky-bar { background: rgba(255, 255, 255, 0.75); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.bams-header-row { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.bams-header-title { font-size: 1.3rem; color: var(--bams-text); font-weight: 800; margin: 0; letter-spacing: -0.5px;}

.bams-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(197, 160, 89, 0.15);
    display: flex; justify-content: space-around; 
    padding: 10px 10px calc(15px + env(safe-area-inset-bottom)) 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 -10px 30px rgba(0,0,0,0.5);
}
body.light-mode .bams-bottom-nav { background: rgba(255, 255, 255, 0.7); border-top: 1px solid rgba(0,0,0,0.05); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 -10px 30px rgba(0,0,0,0.05);}

.nav-item { background: transparent; border: none; color: var(--bams-muted); display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; font-weight: 700; cursor: pointer; transition: 0.3s; width: 60px; }

.nav-icon-wrapper {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.05), 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 6px;
}
body.light-mode .nav-icon-wrapper { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 4px 10px rgba(0,0,0,0.05); }
.nav-icon { font-size: 1.3rem; }

.nav-item.active { color: var(--bams-gold); }
.nav-item.active .nav-icon-wrapper {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.3), rgba(197, 160, 89, 0.05));
    border: 1px solid rgba(197, 160, 89, 0.6);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.4), inset 0 2px 4px rgba(255,255,255,0.2);
    transform: translateY(-8px); 
}
body.light-mode .nav-item.active .nav-icon-wrapper { background: linear-gradient(135deg, rgba(150, 115, 50, 0.2), rgba(150, 115, 50, 0.05)); border: 1px solid var(--bams-gold); }

.cart-badge { background: #ff3b30; color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.65rem; position: absolute; top: -2px; right: -5px; font-weight: bold; min-width: 18px; text-align: center; border: 2px solid var(--bams-bg); box-shadow: 0 2px 5px rgba(0,0,0,0.5);}

.app-tab { display: none; padding-top: 10px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); flex-grow: 1;}
.app-tab.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bams-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--bams-gold); padding: 12px 20px; border-radius: var(--radius-md); font-size: 0.95rem; cursor: pointer; transition: 0.2s; font-weight: 600;}
body.light-mode .bams-btn { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); }
.bams-btn:active { transform: scale(0.96); opacity: 0.8;}
.bams-btn.primary { background: var(--bams-gold); border: none; color: var(--bams-btn-text) !important; box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3); }
.bams-btn-danger { color: #ff3b30; background: rgba(255, 59, 48, 0.1); border: none;}

.bams-ticker-wrapper { background: var(--bams-gold); color: #000000; overflow: hidden; padding: 8px 0; font-size: 0.85rem; font-weight: bold; white-space: nowrap; }
.bams-ticker-inner { display: inline-block; animation: ticker 25s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

.bams-hero { text-align: center; padding: 20px 20px 10px 20px; display: flex; flex-direction: column; align-items: center; }
#heroLogoContainer img { max-height: 140px; max-width: 85%; border-radius: var(--radius-md); object-fit: contain; margin-bottom: 15px; filter: drop-shadow(0 8px 15px rgba(0,0,0,0.3)); }
.bams-hero h1 { font-size: 2.2rem; margin-bottom: 5px; font-weight: 800; letter-spacing: -1px;}
.bams-hero p { color: var(--bams-muted); font-size: 1.05rem; margin-top: 0; margin-bottom: 15px; font-weight: 500; }

#bamsBanners { padding: 0 15px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.status-banner { padding: 12px; border-radius: var(--radius-md); text-align: center; font-weight: 600; font-size: 0.95rem; }

.apple-card { margin: 0 15px 20px 15px; padding: 20px; background: var(--bams-card); border-radius: var(--radius-lg); box-shadow: 0 8px 30px rgba(0,0,0,0.06); border: 1px solid var(--bams-border); }
.stamp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 15px; }
.stamp-slot { aspect-ratio: 1/1; border: 2px dashed var(--bams-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: transparent; transition: 0.3s; color: var(--bams-muted); font-weight: bold;}
.stamp-slot.active { border-style: solid; border-color: var(--bams-gold); background: var(--bams-gold); color: var(--bams-btn-text); transform: scale(1.05); box-shadow: 0 4px 10px rgba(197, 160, 89, 0.4);}

.bams-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; padding: 0 15px 30px 15px; }
@media (max-width: 900px) { .bams-gallery { grid-template-columns: 1fr; } }
.bams-item { width: 100%; aspect-ratio: 1/1; overflow: hidden; border-radius: var(--radius-lg); position: relative; cursor: pointer; background: var(--bams-border); box-shadow: 0 8px 25px rgba(0,0,0,0.1);}
.bams-item img { position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover; z-index: 2;}
.bams-item-meta { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 20px 15px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); display: flex; justify-content: space-between; align-items: flex-end; z-index: 5;}

.bams-cat-scroll { display:flex; gap:12px; overflow-x:auto; padding:0 15px 20px 15px; -webkit-overflow-scrolling:touch; scroll-snap-type: x mandatory; }
.bams-cat-scroll::-webkit-scrollbar { display:none; }
.cat-btn { 
    flex: 0 0 auto; scroll-snap-align: start; 
    padding: 10px 18px 12px 18px; border-radius: var(--radius-lg); border: 1px solid var(--bams-border); 
    color: var(--bams-text); background: var(--bams-card); 
    font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: 0.3s; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); min-width: 80px;
}
.cat-icon-glass {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 8px;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.05); transition: 0.3s;
}
body.light-mode .cat-icon-glass { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.05); }
.cat-btn.active { border-color: var(--bams-gold) !important; color: var(--bams-gold) !important; }
.cat-btn.active .cat-icon-glass {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.4), rgba(197, 160, 89, 0.1));
    border: 1px solid rgba(197, 160, 89, 0.8);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3), inset 0 2px 5px rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.bams-shop-grid { padding: 0 15px; display: flex; flex-direction: column; gap: 15px; }
.bams-prod-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bams-card); border: 1px solid var(--bams-border); border-radius: var(--radius-lg); box-shadow: 0 6px 20px rgba(0,0,0,0.04);}
.bams-prod-info strong { color: var(--bams-text); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.5px;}
.bams-prod-info small { color: var(--bams-muted); display: block; margin: 4px 0 6px 0; font-size: 0.85rem; line-height: 1.3;}
.bams-qty-btn { background: rgba(197, 160, 89, 0.15); border: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: var(--bams-gold); font-weight: bold; font-size: 1.5rem; display:flex; align-items:center; justify-content:center; transition: 0.2s;}
.bams-qty-btn:active { background: var(--bams-gold); color: var(--bams-btn-text); transform: scale(0.9);}

.bams-lb-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 99999; flex-direction: column; justify-content: flex-end; animation: fadeInBg 0.3s ease;}
.bams-lb-overlay.active { display: flex; }
@keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }

.apple-sheet {
    background: var(--bams-bg); border-radius: 35px 35px 0 0;
    padding: 15px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
    display: flex; flex-direction: column; max-height: 92vh;
    animation: slideUpSheet 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

.pull-handle { width: 45px; height: 6px; background: rgba(150,150,150,0.3); border-radius: 10px; margin: 0 auto 20px auto; }

.bams-input { width: 100%; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--bams-border); background: rgba(150,150,150,0.05); color: var(--bams-text); margin-bottom: 12px; outline: none; box-sizing: border-box; font-size: 1rem; font-family: inherit; transition: 0.2s;}
.bams-input:focus { border-color: var(--bams-gold); background: rgba(197, 160, 89, 0.05); }

.order-type-container { display:flex; gap:8px; margin-bottom:20px; background: rgba(150,150,150,0.05); padding:6px; border-radius: var(--radius-md); }
.order-type-btn { flex:1; border:none; padding:12px 0; font-size:0.85rem; border-radius: 12px; background:transparent; color:var(--bams-muted); font-weight:700; cursor:pointer; transition:0.2s;}
.order-type-btn.active { background: var(--bams-card); color: var(--bams-text); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border: 1px solid var(--bams-border);}

.bams-custom-cb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border: 2px solid var(--bams-border); border-radius: 8px; outline: none; cursor: pointer; position: relative; margin-right: 15px; flex-shrink: 0; background: var(--bams-card); transition: 0.2s;}
.bams-custom-cb:checked { background: var(--bams-gold); border-color: var(--bams-gold); transform: scale(1.1);}
.bams-custom-cb:checked::after { content: '✔'; position: absolute; color: var(--bams-btn-text); font-size: 16px; top: 1px; left: 4px; font-weight: 800; pointer-events: none;}
.topping-label { display: flex; justify-content: space-between; align-items:center; padding: 14px 15px; background: var(--bams-card); border-radius: var(--radius-md); border: 1px solid var(--bams-border); margin-bottom: 10px; cursor: pointer; font-weight: 600;}

.bams-gallery-lb-container { background: var(--bams-bg); width: 100%; height: 100%; display: flex; flex-direction: column; padding-top: calc(env(safe-area-inset-top)); animation: slideUpSheet 0.3s ease;}
.bams-lb-image-col { background: #000; display: flex; align-items: center; justify-content: center; position: relative; min-height: 45vh; max-height: 45vh;}
.bams-lb-image-col img { max-width: 100%; max-height: 100%; object-fit: contain; }

.ios-prompt-banner {
    display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px; z-index: 100000;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    padding: 15px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center; border: 1px solid rgba(0,0,0,0.1);
}
body:not(.light-mode) .ios-prompt-banner { background: rgba(30, 30, 30, 0.95); border-color: rgba(255,255,255,0.1); color: #fff;}

/* ========================================== */
/* 🔴 KÜCHEN-MONITOR                          */
/* ========================================== */
.bams-kitchen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bams-status-bar {
    display: flex;
    gap: 15px;
    font-weight: bold;
    font-size: 1.2rem;
}

.bams-kitchen-board {
    display: flex;
    gap: 20px;
    min-height: 75vh;
    padding: 0 20px;
}

.bams-kitchen-column {
    flex: 1;
    background: #2a2a2a; 
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.bams-kitchen-column h2 {
    color: #fff;
    text-align: center;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #444;
    font-size: 1.4rem;
}

.bams-col-new h2 { border-color: #ff3b30; } 
.bams-col-prep h2 { border-color: #ffcc00; } 
.bams-col-done h2 { border-color: #10b981; } 

.bams-order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

@media (max-width: 992px) {
    .bams-kitchen-board {
        flex-direction: column;
    }
}

/* ========================================== */
/* 🔴 PERFEKTER DRUCK-FIX (PRINT STYLES)      */
/* ========================================== */
@media print {
    body * { visibility: hidden; }
    
    #bamsInvoiceOverlay.active, 
    #bamsInvoiceOverlay.active *,
    #qrOverlay.active, 
    #qrOverlay.active * { 
        visibility: visible; 
    }

    #bamsInvoiceOverlay.active,
    #qrOverlay.active { 
        display: block !important; 
        position: absolute !important; 
        left: 0 !important; 
        top: 0 !important; 
        width: 100% !important; 
        height: auto !important; 
        background: #fff !important; 
        padding: 0 !important;
    }

    .bams-lb-container,
    #bamsInvoiceContent,
    #bamsInvoiceContent > div { 
        position: static !important;
        overflow: visible !important; 
        height: auto !important; 
        max-height: none !important; 
        box-shadow: none !important; 
        border: none !important; 
        margin: 0 !important;
    }

    .qr-no-print, 
    .qr-no-print *, 
    .bams-btn { 
        display: none !important; 
        visibility: hidden !important; 
        height: 0 !important; 
        width: 0 !important;
        margin: 0 !important; 
        padding: 0 !important; 
        opacity: 0 !important;
    }

    @page { margin: 1cm; size: auto; }
}

/* ========================================== */
/* 🔴 WARENKORB & CHECKOUT GRÜNER GLOW-EFFEKT  */
/* ========================================== */
@keyframes bamsGlowIcon { 
    0% { box-shadow: 0 0 0px #34C759; transform: scale(1); } 
    50% { box-shadow: 0 0 15px #34C759; transform: scale(1.1); } 
    100% { box-shadow: 0 0 0px #34C759; transform: scale(1); } 
}
@keyframes bamsGlowBtn { 
    0% { box-shadow: 0 0 0px #34C759; } 
    50% { box-shadow: 0 0 20px #34C759; } 
    100% { box-shadow: 0 0 0px #34C759; } 
}

.bams-cart-icon-ready { 
    animation: bamsGlowIcon 1.5s infinite !important; 
    background: rgba(52, 199, 89, 0.15) !important; 
    border-color: #34C759 !important; 
}
.bams-checkout-btn-ready { 
    animation: bamsGlowBtn 1.5s infinite !important; 
    background: #34C759 !important; 
    color: #fff !important; 
    border-color: #34C759 !important; 
}
/* ✅ BAMS UPGRADE: WARENKORB OVERLAY - APPLE SHEET SCROLL FIX */
.apple-sheet {
    background: var(--bams-bg); border-radius: 35px 35px 0 0;
    padding: 15px 20px calc(80px + env(safe-area-inset-bottom)) 20px;
    display: block; 
    max-height: 85svh; /* svh berechnet die Adressleiste auf Handys perfekt mit ein! */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* Butterweiches Scrollen auf dem iPhone */
    animation: slideUpSheet 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

/* ========================================== */
/* 🔴 BAMS UPGRADE: MOBILE SCROLL FIX         */
/* ========================================== */

/* 1. Dynamische Höhe für Handys erzwingen (fixt den Adressleisten-Bug) */
html, body {
    min-height: 100dvh !important; /* 100dvh = Dynamic Viewport Height */
    -webkit-overflow-scrolling: touch !important; /* Butterweiches Scrollen auf iOS */
}

/* 2. Zwingt das Handy, einen physischen, unsichtbaren Block am Ende der Seite zu rendern.
      So kann die Bottom-Nav niemals das letzte Produkt verdecken! */
.app-tab::after {
    content: "";
    display: block;
    height: calc(140px + env(safe-area-inset-bottom));
    width: 100%;
    pointer-events: none; /* Klicks gehen durch den Block hindurch */
}

/* ========================================== */
/* 🔴 BAMS UPGRADE: WARENKORB ANDROID FIX     */
/* ========================================== */

/* 1. Zwingt das Warenkorb-Fenster, Platz am Ende zu lassen (überschreibt Inline-0px) */
.bams-lb-overlay .apple-sheet {
    padding-bottom: 120px !important; 
    max-height: calc(100vh - 60px) !important; /* Fallback für ältere Android-Versionen */
    max-height: calc(100dvh - 60px) !important;
    overflow-y: scroll !important; /* Sichert das Scrollen des Inhalts ab */
}

/* 2. Baut einen unzerstörbaren, unsichtbaren Block GANZ ans Ende vom Warenkorb-Formular */
.bams-lb-overlay .apple-sheet::after {
    content: "";
    display: block !important;
    height: 150px !important; /* Riesiger Platzhalter, der den Button in die Mitte des Bildschirms drückt */
    min-height: 150px !important;
    width: 100% !important;
    pointer-events: none;
}

/* =========================================
   Ergänzung für mobile Ansicht (Warenkorb)
   Autor: Bams Design
   ========================================= */

/* Erzwingt das Dark-Theme für Standard-Elemente wie Scrollbars im mobilen Browser */
html {
    color-scheme: dark;
}

/* Verhindert horizontales Scrollen/Überlappen, das die weiße Kante erzeugen könnte */
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Blendet die störende weiße Scrollbar in Webkit-Browsern (Chrome, Safari, iOS/Android) komplett aus */
::-webkit-scrollbar {
    width: 0px !important;
    background: transparent !important;
    display: none !important;
}

/* Blendet die Scrollbar in Firefox aus */
* {
    scrollbar-width: none !important;
}

/* =========================================
   Layout-Korrektur: Box-Sizing & Randabstände (Warenkorb)
   Autor: Bams Design
   ========================================= */

/* Zwingt den Browser, Padding und Border in die 100%-Breite einzurechnen,
   damit Elemente nicht über den Bildschirmrand wachsen */
*, *::before, *::after {
    box-sizing: border-box !important;
}

/* Stellt sicher, dass Body und HTML exakt auf den Viewport begrenzt bleiben */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Verhindert, dass Flex- oder Grid-Container seitlich ausbrechen */
.row, .flex, .grid, form {
    max-width: 100% !important;
}

/* Sicherheitsmaßnahme: Buttons und Input-Felder bleiben innerhalb des sichtbaren Bereichs */
input, button, select, textarea {
    max-width: 100% !important;
}

/* =========================================
   Finale Layout-Korrektur (Warenkorb Overlap)
   Autor: Bams Design
   ========================================= */

/* 1. Behebt den abgeschnittenen Einlösen-Button (Gutschein) */
#promoCodeInput {
    flex: 1 1 auto !important; /* Nimmt nur den Platz ein, der neben dem Button frei ist */
    min-width: 0 !important;
}

/* 2. Zwingt alle Eingabefelder im Warenkorb exakt in die Display-Breite */
#cartOverlay .bams-input, 
#cartOverlay .order-type-container {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* 3. Sperrt die horizontale X-Achse im scrollbaren Bereich und tötet die weiße Kante */
#cartOverlay [style*="overflow-y: auto"] {
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Für Firefox */
}

/* Blendet die Browser-Scrollbar auf iOS/Android komplett aus */
#cartOverlay [style*="overflow-y: auto"]::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

/* =========================================
   Warenkorb Flexbox-Bändiger (Ultimativer Fix)
   Autor: Bams Design
   ========================================= */

/* Begrenzt das Modal strikt auf die maximal verfügbare Fensterbreite */
#cartOverlay, 
#cartOverlay > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; 
    margin: 0 !important;
    left: 0 !important;
}

/* Zwingt ausnahmslos ALLE Elemente innerhalb des Warenkorbs zur border-box */
#cartOverlay * {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* Der Kern des Problems: Flex-Items (Buttons, Inputs) weigern sich auf Handys oft, kleiner 
   als ihr Inhalt zu werden. 'min-width: 0' zwingt sie, die Container-Breite zu respektieren. */
#cartOverlay input,
#cartOverlay button,
#cartOverlay .bams-btn,
#cartOverlay .order-type-btn {
    min-width: 0 !important;
    flex-shrink: 1 !important;
    /* Verhindert, dass Text das Element sprengt; kürzt stattdessen sauber mit ... ab */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Erlaubt der Trinkgeld-Reihe und den Liefer-Buttons einen Umbruch auf sehr schmalen Displays */
#cartOverlay .order-type-container,
#cartOverlay div[style*="gap:8px"] {
    flex-wrap: wrap !important;
    min-width: 0 !important;
}

/* =========================================
   Nuklear-Fix: Warenkorb Modal & Scrollbar-Track
   Autor: Bams Design
   ========================================= */

/* 1. Isoliert das komplette Overlay absolut an den Fenstergrenzen */
#cartOverlay {
    position: fixed !important;
    inset: 0 !important; /* Zwingt alle Kanten auf 0 */
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* 2. Zwingt die innere Modal-Box (die Sheet) exakt in den Container */
#cartOverlay > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-right: none !important;
    border-left: none !important;
}

/* 3. Zwingt alle Kind-Elemente zur Rahmenbox und tötet Microsoft/Firefox Scrollbars */
#cartOverlay * {
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* 4. Vernichtet JEDEN Teil der Webkit-Scrollbar (Track, Hintergrund, Rahmen) komplett */
#cartOverlay *::-webkit-scrollbar,
#cartOverlay *::-webkit-scrollbar-track,
#cartOverlay *::-webkit-scrollbar-track-piece,
#cartOverlay *::-webkit-scrollbar-thumb,
#cartOverlay *::-webkit-scrollbar-corner {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-appearance: none !important;
}

/* =========================================
   Fix: Padding-Überlauf der App-Overlays
   Autor: Bams Design
   ========================================= */

#cartOverlay,
#bamsToppingOverlay,
#onboardingOverlay {
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}
/* ════════════════════════════════════════════════════════════ */
/* ✨ BAMS WOW-DESIGN 2026 — Edel-Upgrade (Dark Gold Edition)    */
/* Autor: Bams Design                                            */
/* Dieser Block liegt bewusst GANZ UNTEN und überschreibt        */
/* gezielt das alte Design. Zum Anpassen reichen die Variablen   */
/* direkt hier drunter.                                          */
/* ════════════════════════════════════════════════════════════ */

:root {
    --wow-gold-1: #e8c47c;          /* helles Gold (Glanzpunkt)  */
    --wow-gold-2: #C5A059;          /* Marken-Gold               */
    --wow-gold-3: #8a6a2f;          /* dunkles Gold (Tiefe)      */
    --wow-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. Bühne: edler Verlaufs-Hintergrund statt flachem Schwarz ── */
body:not(.light-mode) {
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(197,160,89,0.14), transparent 60%),
        radial-gradient(900px 500px at 110% 30%, rgba(197,160,89,0.05), transparent 55%),
        linear-gradient(180deg, #0b0a08 0%, #000000 45%) !important;
    background-attachment: fixed !important;
}
body.light-mode {
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(197,160,89,0.18), transparent 60%),
        linear-gradient(180deg, #faf7f0 0%, #f2f2f7 50%) !important;
    background-attachment: fixed !important;
}

/* ── 2. Hero: Logo-Glow + Gold-Verlaufs-Titel ── */
#heroLogoContainer img {
    filter: drop-shadow(0 12px 30px rgba(197,160,89,0.35));
    animation: wowHeroIn 0.9s var(--wow-ease) both;
}
.bams-hero h1 {
    background: linear-gradient(120deg, var(--wow-gold-1), var(--wow-gold-2) 45%, var(--wow-gold-1) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: wowHeroIn 0.9s var(--wow-ease) both, wowShine 6s linear infinite;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0;
}
.bams-hero p { animation: wowHeroIn 0.9s var(--wow-ease) 0.15s both; }
@keyframes wowHeroIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes wowShine { to { background-position: 200% center; } }

/* ── 3. Laufband: Gold-Verlauf statt Vollton ── */
.bams-ticker-wrapper {
    background: linear-gradient(90deg, var(--wow-gold-3), var(--wow-gold-2), var(--wow-gold-1), var(--wow-gold-2), var(--wow-gold-3));
    box-shadow: 0 6px 18px rgba(197,160,89,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ── 4. Produkt-Karten: Glas, Tiefe & sanftes Einschweben ── */
.bams-prod-item {
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)) , var(--bams-card);
    border: 1px solid rgba(197,160,89,0.22);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.35s var(--wow-ease), box-shadow 0.35s var(--wow-ease), border-color 0.35s;
    animation: wowCardIn 0.6s var(--wow-ease) both;
}
body.light-mode .bams-prod-item {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
}
.bams-prod-item:hover {
    transform: translateY(-3px);
    border-color: rgba(197,160,89,0.55);
    box-shadow: 0 18px 45px rgba(0,0,0,0.5), 0 0 0 1px rgba(197,160,89,0.25), 0 8px 30px rgba(197,160,89,0.15);
}
.bams-prod-item img { transition: transform 0.4s var(--wow-ease); }
.bams-prod-item:hover img { transform: scale(1.06) rotate(-1deg); }
@keyframes wowCardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Gestaffeltes Einschweben der ersten Karten */
.bams-prod-item:nth-child(1) { animation-delay: 0.05s; }
.bams-prod-item:nth-child(2) { animation-delay: 0.12s; }
.bams-prod-item:nth-child(3) { animation-delay: 0.19s; }
.bams-prod-item:nth-child(4) { animation-delay: 0.26s; }
.bams-prod-item:nth-child(5) { animation-delay: 0.33s; }
.bams-prod-item:nth-child(6) { animation-delay: 0.40s; }

/* ── 5. Der [+]-Button: Gold-Verlauf mit Puls ── */
.bams-qty-btn {
    background: linear-gradient(145deg, var(--wow-gold-1), var(--wow-gold-2) 60%, var(--wow-gold-3));
    color: #1a1408;
    box-shadow: 0 6px 16px rgba(197,160,89,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
    transition: transform 0.2s var(--wow-ease), box-shadow 0.2s;
}
.bams-qty-btn:hover { transform: scale(1.08); box-shadow: 0 8px 22px rgba(197,160,89,0.55), inset 0 1px 0 rgba(255,255,255,0.5); }
.bams-qty-btn:active { transform: scale(0.92); }

/* ── 6. Kategorie-Chips: aktive Kachel leuchtet ── */
.cat-btn { transition: transform 0.25s var(--wow-ease), border-color 0.25s, box-shadow 0.25s; }
.cat-btn:hover { transform: translateY(-2px); }
.cat-btn.active {
    box-shadow: 0 8px 25px rgba(197,160,89,0.25);
    background: linear-gradient(160deg, rgba(197,160,89,0.12), rgba(197,160,89,0.03)), var(--bams-card);
}

/* ── 7. Bottom-Nav: schwebende Glas-Leiste mit Goldkante ── */
.bams-bottom-nav {
    background: rgba(12, 11, 9, 0.72);
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(197,160,89,0.5), transparent) 1;
    box-shadow: 0 -15px 40px rgba(0,0,0,0.6);
}
body.light-mode .bams-bottom-nav { background: rgba(255,255,255,0.8); }
.nav-item { transition: color 0.3s; }
.nav-item.active .nav-icon-wrapper {
    background: linear-gradient(145deg, rgba(232,196,124,0.35), rgba(197,160,89,0.08));
    box-shadow: 0 10px 25px rgba(197,160,89,0.45), inset 0 1px 3px rgba(255,255,255,0.25);
}

/* ── 8. Sheets & Overlays: mehr Glas, weichere Kanten ── */
.apple-sheet {
    background:
        linear-gradient(180deg, rgba(197,160,89,0.06), transparent 120px),
        var(--bams-bg) !important;
    border-top: 1px solid rgba(197,160,89,0.35);
}
.pull-handle { background: rgba(197,160,89,0.4); }

/* ── 9. Eingabefelder: Gold-Fokus mit sanftem Glow ── */
.bams-input:focus {
    border-color: var(--wow-gold-2);
    box-shadow: 0 0 0 3px rgba(197,160,89,0.18);
}

/* ── 10. Primär-Buttons: Verlauf + Glanz-Sweep wenn bereit ── */
.bams-btn.primary {
    background: linear-gradient(145deg, var(--wow-gold-1), var(--wow-gold-2) 55%, var(--wow-gold-3));
    box-shadow: 0 8px 25px rgba(197,160,89,0.4), inset 0 1px 0 rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}
.bams-checkout-btn-ready {
    background: linear-gradient(145deg, #4cd97a, #34C759 55%, #1f9c43) !important;
    position: relative;
    overflow: hidden;
}
.bams-checkout-btn-ready::after {
    content: "";
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.45), transparent);
    animation: wowSweep 2.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes wowSweep { 0% { left: -80%; } 60% { left: 130%; } 100% { left: 130%; } }

/* ── 11. Galerie: Bilder zoomen sanft, Sterne in Gold ── */
.bams-item { transition: transform 0.35s var(--wow-ease), box-shadow 0.35s; }
.bams-item:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(0,0,0,0.5), 0 0 0 1px rgba(197,160,89,0.3); }
.bams-item img { transition: transform 0.6s var(--wow-ease); }
.bams-item:hover img { transform: scale(1.05); }
.bams-stars-display { color: var(--wow-gold-1); text-shadow: 0 2px 8px rgba(0,0,0,0.8); }

/* ── 12. Treuestempel: eingelöste Stempel funkeln ── */
.stamp-slot.active {
    background: linear-gradient(145deg, var(--wow-gold-1), var(--wow-gold-2) 60%, var(--wow-gold-3));
    border-color: var(--wow-gold-1);
    box-shadow: 0 6px 18px rgba(197,160,89,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
    animation: wowStampPop 0.45s var(--wow-ease);
}
@keyframes wowStampPop { 0% { transform: scale(0.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1.05); } }

/* ── 13. Sticky-Header: feine Goldlinie unten ── */
.bams-top-sticky-bar {
    border-bottom: 1px solid rgba(197,160,89,0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.bams-header-title { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.3px; }

/* ── 14. Badges (Empfehlung / VIP): Gold-Verlauf ── */
.bams-prod-info strong span[style*="background:var(--bams-gold)"],
span[style*="background:var(--bams-gold)"] {
    background: linear-gradient(145deg, var(--wow-gold-1), var(--wow-gold-2)) !important;
    color: #1a1408 !important;
    box-shadow: 0 3px 8px rgba(197,160,89,0.35);
}

/* ── 15. Rücksicht: Nutzer mit reduzierter Bewegung ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ════════════════════════════════════════════════════════════ */
/* ✨ PROFIL-BEREICH — Begrüssung, Verlauf, Treuekarte           */
/* ════════════════════════════════════════════════════════════ */

/* ── Begrüssung mit Initiale ── */
.bams-profil-kopf {
    display: flex; align-items: center; gap: 16px;
    margin: 4px 15px 22px 15px; padding: 20px;
    background: linear-gradient(135deg, rgba(197,160,89,0.16), rgba(197,160,89,0.03));
    border: 1px solid rgba(197,160,89,0.3); border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: wowCardIn 0.5s var(--wow-ease) both;
}
body.light-mode .bams-profil-kopf { box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.bams-profil-kreis {
    width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; color: #1a1408;
    background: linear-gradient(145deg, var(--wow-gold-1), var(--wow-gold-2) 60%, var(--wow-gold-3));
    box-shadow: 0 8px 20px rgba(197,160,89,0.45), inset 0 1px 0 rgba(255,255,255,0.5);
}
.bams-profil-kopf h2 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.4px; color: var(--bams-text); }
.bams-profil-kopf p { margin: 4px 0 0 0; color: var(--bams-muted); font-size: 0.88rem; line-height: 1.45; }

/* ── Karten-Überschriften ── */
.bams-karten-titel { margin: 0 0 4px 0; font-size: 1.15rem; font-weight: 800; color: var(--bams-text); letter-spacing: -0.3px; }
.bams-karten-hinweis { color: var(--bams-muted); font-size: 0.88rem; margin: 0 0 18px 0; line-height: 1.5; }
.bams-karten-fuss { color: var(--bams-muted); font-size: 0.78rem; margin: 14px 0 0 0; text-align: center; line-height: 1.45; }

/* ── Beschriftete Eingabefelder ── */
.bams-feld-titel {
    display: block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.6px;
    text-transform: uppercase; color: var(--bams-muted); margin: 0 0 6px 4px;
}
.bams-speichern-knopf {
    width: 100%; margin-top: 8px; padding: 16px; border-radius: var(--radius-md);
    font-size: 1.02rem; transition: background 0.3s, box-shadow 0.3s, transform 0.18s;
}
.bams-speichern-knopf.ist-gespeichert {
    background: linear-gradient(145deg, #4cd97a, #34C759 55%, #1f9c43) !important;
    color: #fff !important; box-shadow: 0 8px 24px rgba(52,199,89,0.45) !important;
}

/* ── Leere Bereiche freundlich statt kahl ── */
.bams-leerhinweis {
    text-align: center; padding: 26px 16px; color: var(--bams-muted);
    border: 2px dashed var(--bams-border); border-radius: var(--radius-md);
    font-size: 0.92rem; line-height: 1.5;
}
.bams-leerhinweis small { font-size: 0.82rem; opacity: 0.85; }

/* ── Bestellverlauf ── */
.bams-verlauf-eintrag {
    background: rgba(255,255,255,0.035); border: 1px solid var(--bams-border);
    padding: 15px; border-radius: var(--radius-md);
    transition: border-color 0.25s, transform 0.25s var(--wow-ease);
}
body.light-mode .bams-verlauf-eintrag { background: rgba(0,0,0,0.02); }
.bams-verlauf-eintrag:hover { border-color: rgba(197,160,89,0.5); transform: translateY(-2px); }
.bams-verlauf-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.bams-verlauf-datum { color: var(--bams-muted); font-size: 0.84rem; }
.bams-verlauf-preis { color: var(--bams-gold); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.bams-verlauf-artikel { color: var(--bams-text); font-size: 0.9rem; line-height: 1.5; margin-bottom: 14px; }
.bams-verlauf-knopf {
    width: 100%; padding: 12px; font-size: 0.9rem; font-weight: 700;
    border-color: rgba(197,160,89,0.55); color: var(--bams-gold);
}
.bams-verlauf-knopf:hover { background: rgba(197,160,89,0.12); }

/* ── Treuekarte ── */
.bams-treue-balken {
    height: 10px; border-radius: 999px; overflow: hidden; margin-bottom: 10px;
    background: rgba(150,150,150,0.16); box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.bams-treue-fuellung {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--wow-gold-3), var(--wow-gold-2), var(--wow-gold-1));
    box-shadow: 0 0 12px rgba(197,160,89,0.6);
    transition: width 0.7s var(--wow-ease);
}
.bams-treue-stand { text-align: center; font-size: 0.92rem; color: var(--bams-muted); margin: 0 0 4px 0; line-height: 1.5; }

/* ── Anleitung zum Aufklappen ── */
.bams-anleitung {
    border: 1px solid var(--bams-border); border-radius: var(--radius-md);
    overflow: hidden; background: rgba(255,255,255,0.03); transition: border-color 0.25s;
}
body.light-mode .bams-anleitung { background: rgba(0,0,0,0.02); }
.bams-anleitung[open] { border-color: rgba(197,160,89,0.5); }
.bams-anleitung summary {
    padding: 15px 17px; cursor: pointer; font-weight: 700; color: var(--bams-text);
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bams-anleitung summary::-webkit-details-marker { display: none; }
.bams-anleitung summary::after { content: "▾"; color: var(--bams-gold); font-size: 1.15rem; transition: transform 0.28s var(--wow-ease); }
.bams-anleitung[open] summary::after { transform: rotate(180deg); }
.bams-anleitung ul {
    margin: 0; padding: 4px 20px 18px 34px; color: var(--bams-text);
    font-size: 0.9rem; line-height: 1.65; border-top: 1px solid var(--bams-border);
}
.bams-anleitung li { margin-bottom: 9px; }
.bams-anleitung li b { color: var(--bams-gold); }
.bams-anleitung-knopf { width: 100%; margin-top: 12px; padding: 13px; font-size: 0.88rem; color: var(--bams-muted); border-color: var(--bams-border); }

/* ── Hellmodus: Eingabefelder verbindlich lesbar ──────────────────────────
   Ohne diese Regel erbte die Schrift in Formularfeldern die helle Farbe des
   Dunkelmodus — der Kunde tippte weiss auf weiss und sah seine Eingabe nicht. */
body.light-mode .bams-input,
body.light-mode input.bams-input,
body.light-mode textarea.bams-input,
body.light-mode select.bams-input,
body.light-mode #profName,
body.light-mode #profPhone,
body.light-mode #profAddr {
    color: #111111 !important;
    background: #ffffff !important;
    border: 1px solid #d6d6db !important;
}
body.light-mode .bams-input::placeholder { color: #9a9aa0 !important; }
body.light-mode .bams-input:focus {
    border-color: var(--bams-gold) !important;
    box-shadow: 0 0 0 3px rgba(150,115,50,0.18) !important;
}
