@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* Modern CSS Reset & Variables */
:root {
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --color-primary: #1c1917; /* Stone 900 */
    --color-accent: #dc2626; /* Red 600 */
    --color-gold: #d4af37;
    --color-bg: #fafaf9; /* Stone 50 */
}

body { 
    font-family: var(--font-sans); 
    background-color: var(--color-bg);
    color: var(--color-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-serif { 
    font-family: var(--font-serif); 
}

/* Smooth Scroll */
html { scroll-behavior: smooth; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.hover-scale { transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.hover-scale:hover { transform: scale(1.02); }

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(28, 25, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Critical CSS Fallback & Utils */
.block { display: block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }
.hidden { display: none !important; }

/* Modal Helpers - REMOVED ID-specific display:none to fix admin panel issues */
#auth-modal.hidden, #admin-login-modal.hidden, #cart-modal.hidden, #res-success-modal.hidden, #admin-order-modal.hidden, #admin-panel.hidden { display: none !important; }
#auth-modal:not(.hidden), #admin-login-modal:not(.hidden), #cart-modal:not(.hidden), #res-success-modal:not(.hidden), #admin-order-modal:not(.hidden), #admin-panel:not(.hidden) { display: flex !important; }

/* Fix for White Screen: Ensure menu-app has height */
#menu-app { min-height: 100vh; background-color: var(--color-bg); width: 100%; }
#menu-container { min-height: 200px; }

.hero-title { font-family: var(--font-serif); font-weight: 700; }

.hero-brand {
    font-family: var(--font-serif);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-gold);
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: clamp(3.2rem, 8vw, 6.5rem);
}

.brand-black-gold {
    background: linear-gradient(135deg, #0c0a09 0%, #3f3f46 18%, #d4af37 55%, #8a6b1a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-muted {
    background: linear-gradient(135deg, rgba(245, 245, 244, 0.55) 0%, rgba(214, 211, 209, 0.35) 45%, rgba(120, 113, 108, 0.25) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.admin-card { transition: all 0.3s ease; }
.admin-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

/* Toast Notification */
.toast {
    visibility: hidden;
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: min(520px, calc(100vw - 32px));
    width: max-content;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #0c0a09;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(231, 229, 228, 0.9);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.toast-icon.info { background: rgba(28, 25, 23, 0.08); color: #1c1917; }
.toast-icon.success { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.toast-icon.error { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #78716c; margin-bottom: 4px; }
.toast-msg { font-size: 14px; font-weight: 600; line-height: 1.35; color: #1c1917; word-break: break-word; }

.toast-close {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 25, 23, 0.06);
    border: 1px solid rgba(231, 229, 228, 0.9);
    color: #78716c;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.toast-close:hover { background: rgba(28, 25, 23, 0.10); color: #1c1917; }

.toast-progress {
    position: relative;
    height: 3px;
    margin-top: 10px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(120, 113, 108, 0.15);
}

.toast-progress > div {
    height: 100%;
    width: 100%;
    transform-origin: left;
    background: #1c1917;
    opacity: 0.45;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background-color: #fafaf9;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
#loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
