/* ============================================================
   NEXUS - PEDIDOS.CSS (HISTÓRICO DE COMPRAS)
   Foco: Centralização Profissional e Elegância Visual
   Versão: V4.0 - Premium Layout
   ============================================================ */

/* 1. ESTRUTURA DE CENTRALIZAÇÃO */
.pedidos-layout {
    display: flex;
    justify-content: center;
    background-color: #f5f5f7; /* Fundo suave para destacar os cards */
    min-height: 100vh;
}

.pedidos-centralizador {
    width: 100%;
    max-width: 800px; /* Largura ideal para leitura e estética */
    padding: 40px 20px;
    margin: 0 auto;
}

/* 2. CARD DO PEDIDO */
.pedido-card {
    background: #ffffff;
    border-radius: 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pedido-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
}

/* 3. CONTEÚDO PRINCIPAL (IMAGEM + TEXTO) */
.pedido-main-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.pedido-img-wrapper {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.pedido-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pedido-textos {
    flex-grow: 1;
    min-width: 0; /* Impede o texto de empurrar o container */
}

.pedido-titulo-produto {
    margin: 0 0 5px 0;
    font-size: 17px;
    color: #1d1d1f;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedido-meta {
    font-size: 13px;
    color: #86868b;
    margin: 0;
}

.pedido-valor {
    text-align: right;
    min-width: 100px;
}

.pedido-valor p {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

/* 4. RODAPÉ E BOTÕES */
.pedido-footer-actions {
    background: #fafafa;
    padding: 16px 24px;
    border-top: 1px solid #f2f2f2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.btn-nexus-outline, .btn-nexus-solid {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s all;
    text-decoration: none;
    display: inline-block;
}

.btn-nexus-outline {
    background: #fff;
    color: #424245;
    border: 1px solid #d2d2d7;
}

.btn-nexus-outline:hover {
    background: #f5f5f7;
    border-color: #86868b;
}

.btn-nexus-solid {
    background: #0071e3;
    color: #ffffff;
    border: none;
}

.btn-nexus-solid:hover {
    background: #0077ed;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* 5. STATUS DO PEDIDO (BADGES) */
.status-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

.status-pago { background: #e8fcf8; color: #00a650; }
.status-pendente { background: #fff4e5; color: #ff8c00; }
.status-cancelado { background: #ffebee; color: #e63946; }

/* 6. RESPONSIVIDADE */
@media (max-width: 650px) {
    .pedidos-centralizador {
        padding: 20px 15px;
    }

    .pedido-main-content {
        padding: 20px;
        gap: 15px;
    }

    .pedido-valor {
        display: none; /* Oculta o preço lateral no mobile para dar espaço ao nome */
    }

    .pedido-titulo-produto {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 15px;
    }

    .pedido-footer-actions {
        flex-direction: column-reverse; /* Empilha os botões */
        padding: 15px;
    }

    .btn-nexus-outline, .btn-nexus-solid {
        width: 100%;
        text-align: center;
    }
}