/* 
 * PREMIUM FRENCH QR MENU - DESIGN SYSTEM
 * "Putain... c'est propre."
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Base Palette - Neutrals */
    --color-bg: #F9F9F9; /* Off-white, soft on eyes */
    --color-surface: #FFFFFF;
    --color-text-primary: #1A1A1A; /* Charcoal, not pure black */
    --color-text-secondary: #666666; /* Elegant grey */
    --color-text-light: #999999;
    --color-border: #EAEAEA;
    
    /* Brand Colors (Injected via PHP usually, but defaults here) */
    --color-accent: #CDAD7D; /* Gold/Sand - Premium feel */
    --color-accent-dim: #F4EFE6;
    
    /* Spacing & Layout */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows - Soft & Expensive */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-float: 0 16px 32px rgba(0,0,0,0.08);
}

/* RESET & BASE */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    overflow-x: hidden;
    padding-bottom: 80px; /* Safe area for bottom nav/fab */
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
}

img {
    max-width: 100%;
    display: block;
}

/* LAYOUT CONTAINER */
.app-container {
    max-width: 600px; /* Mobile focused */
    margin: 0 auto;
    background: var(--color-bg);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.02);
}

/* HERO SECTION */
.hero {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
    background: var(--color-surface);
    text-align: center;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 10;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: var(--color-accent);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
}

.brand-name {
    font-size: 28px;
    letter-spacing: -0.5px;
    margin-bottom: var(--spacing-xs);
}

.brand-tagline {
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* STICKY CATEGORY NAV */
.category-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(249, 249, 249, 0.95); /* Matches bg, glassy */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.category-nav {
    display: flex;
    overflow-x: auto;
    padding: 0 var(--spacing-md);
    gap: var(--spacing-md);
    scrollbar-width: none; /* Firefox */
}
.category-nav::-webkit-scrollbar { display: none; }

.nav-item {
    white-space: nowrap;
    color: var(--color-text-secondary);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-item.active {
    color: var(--color-text-primary);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* MENU SECTION */
.menu-section {
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    scroll-margin-top: 80px; /* For sticky header anchor offset */
}

.section-title {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.section-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    max-width: 90%;
}

/* PRODUCT CARDS */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.product-card:active {
    transform: scale(0.98);
}

.product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-primary);
}

.product-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 16px;
    margin-top: auto;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: #f0f0f0;
}

.no-photo .product-card {
    grid-template-columns: 1fr; /* Full width if no photo */
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.badge-suggestion {
    background-color: var(--color-accent-dim);
    color: var(--color-accent);
}

/* FAB (Floating Action Button) - Call Waiter / Cart */
.fab-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    gap: 16px;
}

.fab {
    background: var(--color-text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-float);
    cursor: pointer;
    white-space: nowrap;
}

/* Language Switcher - Subtle */
.lang-switch {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.6;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease backwards;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }

/* UTILS */
.text-accent { color: var(--color-accent); }

/* MODAL / POPUP OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-surface);
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    font-size: 20px;
    color: #333;
}

.modal-image-wrapper {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--color-text-primary);
}

.modal-desc {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-price {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-bg);
    border-radius: 12px;
}

/* Make products clickable */
.product-card {
    cursor: pointer;
}

/* CENTERING FIXES */
.brand-logo-img {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    width: 100%;
}
.brand-logo-img img {
    display: block;
    margin: 0 auto;
}
