/* =============================================
   Sistema Restaurante Penha - CSS Publico
   ============================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #D4380D;
    --primary-dark: #b82e0a;
    --primary-light: #FF6B35;
    --bg: #FFF7E6;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }

/* Header publico */
.header-pub {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-pub h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-pub small {
    opacity: 0.8;
    font-size: 13px;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

.container-wide {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

/* Categorias nav */
.cat-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.cat-nav a:hover,
.cat-nav a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
}

/* Cards de item do cardapio */
.menu-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    transition: transform 0.2s;
}

.menu-item:active { transform: scale(0.98); }

.menu-item-img {
    width: 120px;
    min-height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.menu-item-img-placeholder {
    width: 120px;
    min-height: 120px;
    background: #f0ebe3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
    flex-shrink: 0;
}

.menu-item-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.menu-item-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-item-info .desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-info .preco {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.menu-item-info .destaque-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Categoria title */
.cat-title {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary-dark);
}

/* Carrinho flutuante */
.cart-float {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(212, 56, 13, 0.4);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s;
    max-width: calc(100% - 40px);
}

.cart-float:hover { background: var(--primary-dark); transform: translateX(-50%) scale(1.02); }

.cart-float .cart-count {
    background: #fff;
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.cart-float.hidden { display: none; }

/* Modal do carrinho */
.cart-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    transition: transform 0.3s;
}

.cart-modal.active { display: block; }

.cart-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 150;
}

.cart-modal-overlay.active { display: block; }

.cart-modal h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 500; }
.cart-item-info small { color: var(--text-light); font-size: 12px; }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-qty span { font-weight: 600; min-width: 20px; text-align: center; }

.cart-total {
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    padding: 16px 0;
    color: var(--primary);
}

/* Botao grande */
.btn-full {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.btn-full:hover { background: var(--primary-dark); }

.btn-full-outline {
    display: block;
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.btn-full-outline:hover { background: var(--primary); color: #fff; }

/* Observacoes */
.obs-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-top: 8px;
}

.obs-input:focus { outline: none; border-color: var(--primary); }

/* Forma pagamento */
.pgto-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.pgto-option {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pgto-option:hover { border-color: var(--primary-light); }
.pgto-option.selected { border-color: var(--primary); background: #fff5f0; }
.pgto-option i { font-size: 24px; margin-bottom: 8px; color: var(--primary); display: block; }
.pgto-option span { font-size: 13px; font-weight: 500; }

/* Tipo pedido */
.tipo-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.tipo-option {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tipo-option:hover { border-color: var(--primary-light); }
.tipo-option.selected { border-color: var(--primary); background: #fff5f0; }
.tipo-option i { font-size: 20px; margin-bottom: 6px; color: var(--primary); display: block; }
.tipo-option span { font-size: 13px; font-weight: 500; }

/* Status do pedido */
.status-timeline {
    padding: 20px 0;
}

.status-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    position: relative;
}

.status-step::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 48px;
    bottom: -16px;
    width: 2px;
    background: #e0e0e0;
}

.status-step:last-child::before { display: none; }

.status-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: #e0e0e0;
    color: #999;
}

.status-step.active .status-dot {
    background: var(--primary);
    color: #fff;
}

.status-step.done .status-dot {
    background: var(--success);
    color: #fff;
}

.status-step.done::before { background: var(--success); }

.status-info h4 { font-size: 15px; font-weight: 500; }
.status-info small { color: var(--text-light); font-size: 12px; }

/* PIX */
.pix-box {
    text-align: center;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pix-box img {
    max-width: 250px;
    margin: 16px auto;
}

.pix-copiacola {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    font-size: 12px;
    color: var(--text-light);
    margin: 12px 0;
}

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

.fade-in { animation: fadeIn 0.3s ease; }

/* Responsivo */
@media (max-width: 400px) {
    .menu-item-img,
    .menu-item-img-placeholder {
        width: 100px;
        min-height: 100px;
    }
    .menu-item-info h3 { font-size: 14px; }
    .menu-item-info .preco { font-size: 16px; }
}
