/* assets/css/style.css - VERSÃO LISTA HORIZONTAL (IFOOD STYLE) */

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

:root {
    --primary: #ea1d2c;      
    --primary-dark: #b60f1b;
    --background: #f7f7f7;
    --text-dark: #3e3e3e;
    --card-bg: #ffffff;
    --green-btn: #198754;    
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    padding-bottom: 90px; /* Espaço maior para barra flutuante */
    overflow-x: hidden;
}

/* --- CABEÇALHO HERO --- */
.header-hero {
    background: white;
    padding: 20px 0 15px 0;
    text-align: center;
    position: relative;
    border-top: 10px solid var(--primary);    
    border-bottom: 10px solid var(--primary); 
    box-shadow: 0 4px 15px -10px rgba(0,0,0,0.1); 
    margin-bottom: 0;
}

.restaurant-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 8px;
    margin-top: -5px;
}

.restaurant-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 5px 0 0 0;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* --- MENU NAVEGAÇÃO STICKY --- */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 10px 0;
}

.category-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.category-scroll::-webkit-scrollbar { height: 0; }

.cat-pill {
    display: inline-block;
    padding: 7px 18px;
    margin-right: 8px;
    background-color: #198754; 
    color: #ffffff !important; 
    border: 1px solid #157347;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cat-pill:hover, .cat-pill.active {
    background-color: #0f5132;
    transform: translateY(-2px);
}

/* --- NOVO LAYOUT: CARD EM LISTA (FOTO ESQUERDA - TEXTO DIREITA) --- */
.category-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.3rem;
    margin: 30px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
}

.category-title i {
    color: var(--primary);
    margin-right: 10px;
    opacity: 0.8;
}

.product-card {
    display: flex; /* Mágica do Layout Horizontal */
    flex-direction: row;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    height: auto; /* Altura flexível */
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 0; /* Controlado pelo grid */
    padding: 10px;
    align-items: flex-start;
}

/* Imagem Fixa Quadrada na Esquerda */
.product-img {
    width: 160px;
    height: 160px;
    object-fit: cover; /* Cobre o quadrado sem distorcer */
    border-radius: 10px;
    flex-shrink: 0; /* Não deixa a imagem esmagar */
    margin-right: 15px;
    background-color: #f8f8f8;
}

/* Corpo do Texto à Direita */
.card-body {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px; /* Mesma altura da imagem */
}

/* Cabeçalho: Título e Preço na mesma linha */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
    color: #333;
    line-height: 1.2;
    text-transform: uppercase;
    padding-right: 5px;
}

.price-tag {
    font-size: 1rem;
    font-weight: 800;
    color: #198754; 
    white-space: nowrap; /* Preço não quebra linha */
}

.card-text {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.1;
    
    /* Limita a 2 linhas e põe ... */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; 
}

/* Área dos Botões (Alinhada à direita embaixo) */
.card-actions {
    margin-top: auto; /* Empurra para baixo */
    align-self: flex-end; /* Alinha à direita */
    width: auto;
}

/* --- BARRA FLUTUANTE INFERIOR --- */
.bottom-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 500px;
    background: #198754;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(25, 135, 84, 0.4);
    z-index: 1050;
    display: flex;
    cursor: pointer;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { bottom: -100px; } to { bottom: 20px; } }

/* --- MODAIS --- */
.modal-content { border-radius: 20px; border: none; }
.modal-header { background: var(--primary); color: white; border-top-left-radius: 20px; border-top-right-radius: 20px; }

/* Responsividade */
@media (max-width: 380px) {
    .product-img { width: 80px; height: 80px; }
    .card-title { font-size: 0.85rem; }
}