/* --- ESTILOS PARA A PÁGINA DO CARRINHO --- */
.page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

/* Novo layout para o conteúdo principal do carrinho */
.cart-content {
    display: flex;
    flex-direction: column; /* Organiza itens em coluna */
    gap: 30px; /* Espaçamento entre os blocos */
    max-width: 900px; /* Largura máxima para centralizar */
    margin: 0 auto; /* Centraliza */
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.cart-items {
    /* Não precisa mais de flex: 2, será um bloco completo */
    width: 100%; /* Ocupa a largura total dentro de cart-content */
}

/* Remover .checkout-form, pois ele não existe mais no carrinho.php */
/* .checkout-form { ... } */


/* Tabela de Itens */
.tabela-carrinho {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px; /* Espaço antes do total */
}

.tabela-carrinho th,
.tabela-carrinho td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tabela-carrinho th {
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

.product-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.product-name {
    font-weight: bold;
    color: #333;
}

.remove-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-link:hover {
    opacity: 1;
}

/* Total do Carrinho */
.cart-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
    text-align: right;
    font-size: 20px;
}

.cart-total span {
    color: #e83e8c;
    font-weight: bold;
    margin-left: 15px;
}

/* Nova seção para o botão de checkout */
.checkout-actions {
    text-align: center; /* Centraliza o botão */
}

.btn-checkout {
    display: inline-block; /* Para que padding e margin funcionem como esperado */
    padding: 15px 30px; /* Aumenta um pouco o padding para o botão */
    background-color: #e83e8c; /* Cor do Lenna */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px; /* Aumenta um pouco a fonte */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none; /* Remover sublinhado do link */
    width: auto; /* Deixa a largura automática pelo conteúdo */
}

.btn-checkout:hover {
    background-color: #d12c7b; /* Tom mais escuro no hover */
}

/* Carrinho Vazio */
.cart-empty {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cart-empty h2 {
    color: #333;
}

.btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background-color: #e83e8c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: bold;
}

/* Responsividade */
@media (max-width: 992px) {
    /* Não precisa mais de flex-direction: column no cart-container, pois agora é cart-content */
}

@media (max-width: 768px) {
    .tabela-carrinho thead {
        display: none; /* Esconde o cabeçalho da tabela em telas pequenas */
    }

    .tabela-carrinho,
    .tabela-carrinho tbody,
    .tabela-carrinho tr,
    .tabela-carrinho td {
        display: block; /* Faz as células se comportarem como blocos */
        width: 100%;
    }

    .tabela-carrinho tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
    }

    .tabela-carrinho td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .tabela-carrinho td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: bold;
        color: #555;
    }

    .product-image {
        text-align: center;
        margin-bottom: 10px;
    }

    .product-image img {
        margin: 0 auto;
    }

    .product-name,
    .remove-link {
        text-align: center;
        display: block;
        width: 100%;
    }
}

