/* =========================================
   RESET E VARIÁVEIS GERAIS
   ========================================= */
:root {
    --app-bg: #f4f6f8;         /* Fundo geral do app */
    --card-bg: #ffffff;        /* Fundo dos cartões/lista */
    --text-main: #2d3436;      /* Cor do texto principal */
    --text-sec: #636e72;       /* Cor do texto secundário */
    --primary: #2ecc71;        /* Verde padrão (será substituído pelo PHP se necessário) */
    --radius-sheet: 30px;      /* Curvatura do topo do cardápio */
    --fab-size: 65px;          /* Tamanho do botão da sacola */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dynamic-bg-color, var(--app-bg)); /* Recebe cor do PHP */
    margin: 0;
    padding: 0;
    color: var(--text-main);
    overflow-x: hidden; /* Evita rolagem lateral */
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; transition: 0.2s; }
a:hover { text-decoration: none; opacity: 0.9; }

/* =========================================
   1. HEADER (BANNER GRANDE)
   ========================================= */
.app-header {
    position: relative;
    width: 100%;
    height: 380px; /* Altura generosa para mobile */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradiente escuro para o texto ficar legível sobre a foto */
.header-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding-bottom: 40px; /* Empurra conteúdo para cima para não ficar escondido pela folha */
    width: 100%;
    max-width: 600px;
}

/* Logo Estilo Perfil */
.app-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    background: #fff;
    object-fit: cover;
}

.app-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 5px 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

.app-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
}

/* Badge de Status (Aberto/Fechado) */
.status-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.status-open { background-color: #27ae60; color: white; }
.status-closed { background-color: #e74c3c; color: white; }

/* =========================================
   2. CORPO "FOLHA" (SHEET)
   ========================================= */
.app-sheet {
    background-color: var(--card-bg);
    margin-top: -30px; /* Sobe por cima do banner */
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    position: relative;
    z-index: 10;
    min-height: 60vh;
    padding-bottom: 100px; /* Espaço extra no final p/ não cortar atrás do botão flutuante */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

/* Barra de Informações Flutuante (Local, Whats, Hora) */
.info-floater {
    display: flex;
    justify-content: space-around;
    background: #fff;
    width: 90%;
    max-width: 500px;
    margin: -40px auto 20px auto; /* Sobe metade para ficar entre banner e corpo */
    padding: 15px 10px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    position: relative;
    z-index: 20;
}

.info-btn {
    text-align: center;
    color: var(--text-sec);
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    flex: 1;
}

.info-btn i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--dynamic-bg-color, #333); /* Usa a cor da marca */
}

.container-custom {
    padding: 20px 15px;
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================
   3. BOTÃO FLUTUANTE (CARRINHO / FAB)
   ========================================= */
.fab-container {
    position: fixed;
    bottom: 25px;
    right: 20px;
    z-index: 9999; /* Garante que fica ACIMA de tudo */
    display: flex;
    align-items: center;
    flex-direction: row-reverse; /* Ícone na direita, texto na esquerda */
}

.fab-cart {
    width: var(--fab-size);
    height: var(--fab-size);
    background-color: #27ae60; /* Verde compra */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-cart:active {
    transform: scale(0.9);
}

/* Etiqueta "Ver Sacola" que aparece ao lado */
.fab-label {
    background: white;
    color: #333;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateX(10px);
    transition: 0.3s;
    pointer-events: none; /* Não atrapalha o clique */
}

/* Animação para chamar atenção */
.fab-container:hover .fab-label {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   AJUSTES BOOTSTRAP E UTILITÁRIOS
   ========================================= */
.mg-b-10 { margin-bottom: 10px; }
.mg-t-10 { margin-top: 10px; }
.mg-r-5 { margin-right: 5px; }

/* Garante que o Grid do Bootstrap funcione dentro do nosso container */
.row {
    margin-right: -15px;
    margin-left: -15px;
    display: flex;
    flex-wrap: wrap;
}
.col-md-4, .col-md-8 {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 768px) {
    .app-header { height: 320px; }
    .app-title { font-size: 1.5rem; }
    .fab-label { opacity: 1; transform: translateX(0); margin-right: 10px; } /* Sempre visível no mobile */
}