﻿/* Container do produto */
.product-box {
    height: 420px; /* ou 400px, ajuste conforme necessário */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.panel-default {
    border-color: #cdcfcf14;
}

.product-box:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Ícone de favoritar */
.product-box .favoritar {
    position: absolute;
    top: 8px;
    right: 25px;
    color: #998e8e;
    font-size: 20px;  
    transition: color 0.3s ease;
}

    .product-box .favoritar:hover {
        color: #e74c3c; /* vermelho forte ao passar o mouse */
        text-decoration: none; /* remove sublinhado */
        cursor: pointer;
    }

/* Imagem do produto responsiva e dentro da box */
.image-produto img,
.image-produto svg {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin: 0 auto;
}

/* Texto centralizado e com boa tipografia */
.caption .product-name {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
    height: 85px; /* altura fixa */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* número máximo de linhas */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.caption .product-price {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.2em;
    min-height: 24px;
}

.caption .product-forma-pagamento {
    font-size: 0.9em;
    color: rgb(102, 102, 102);
    margin-bottom: 10px;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* Botão Escolher / Avise-me */
.btn-block {
    font-weight: 600;
    font-size: 0.95em;
}

/* Resumo fixo no lado direito em telas >= 768px */
#resumoPedidoFixo {
    position: fixed;
    top: 60px; /* ajuste conforme seu header */
    right: 5px;
    width: 280px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);   
    height: calc(100vh - 120px);
}

a {
    text-decoration: none !important;
}

/* Em telas menores, resumo fica abaixo e 100% largura */
@media (max-width: 767px) {
    #resumoPedidoFixo {
        width: inherit;
        box-shadow: none;
        padding: 10px 0;
        border: none;
        height: calc(100vh - 127px);
    }
}


/*total pedidos*/

/* Container geral */
.resume {
    max-width: 100%;
    padding: 0;
    margin-bottom: 20px;
}

/* Título */
.resume-title {
    font-size: 16px;
    font-weight: 600;
    color: #337ab7; /* cor bootstrap primary */
}

/* Lista de produtos */
.product-list {
    padding-left: 0;
    margin-bottom: 0;
    height: calc(100vh - 300px);
    overflow-y: auto;
}

.product-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    position: relative;
}

/* Imagem do produto */
.product-img img {
    max-width: 50px;
    height: auto;
    border-radius: 3px;
}

/* Info do produto */
.product-info {
    margin-left: 10px;
    max-width: calc(100% - 120px); /* evita overflow */
}

.product-name-resume {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-price-resume {
    font-size: 14px;
}

.product-resume-quantidade {
    font-size: 12px;
}

/* Botão remover */
.product-resume-remover {
    margin-left: 10px;
    margin-right: 10px; /* adiciona espaçamento à direita */
}

    .product-resume-remover .btn {
        padding: 3px 6px;
        font-size: 12px;
        line-height: 1;
        margin-top: 15px;
    }

/* Lista vazia */
.list-vazia {
    padding: 20px 10px;
    font-size: 14px;
}

/* Box do resumo */
.summary-box {
    background: #f7f7f9;
    padding: 15px;
    border-top: 1px solid #ddd;
}

.summary-box-text {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.summary-item {
    font-size: 14px;
    margin-bottom: 10px;
}

.resume-price {
    font-weight: 700;
}

.resumo-botao-fechar {
    border-radius: 5px;
    position: absolute;
    top: -0px;
    left: -28px;
    background-color: white;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 16px;
    color: #333;
    cursor: pointer; 
    box-shadow: -5px 1px 6px rgba(0, 0, 0, 0.5);
}

    .resumo-botao-fechar:hover {
        background-color: #f2f2f2;
    }

    .resumo-botao-fechar>.fa-times {
        color: #c11717;
    }
/* Responsividade */
@media (max-width: 767px) {
    .product-info {
        max-width: 60%;
    }

    .product-resume-remover {
        position: absolute;
        right: 10px; /* mantém 10px da borda */
        top: 15px;
        margin-left: 0;
        margin-right: 10px; /* garante espaço na direita */
    }
}


/* Responsividade */
@media (max-width: 420px) {
    /* Estilos apenas para telas menores que 375px */
    .btn-block {
        font-weight: 100;
        font-size: 0.68em;
    }
}
