/* KL Orçamentos - Frontend Styles */

/* Esconde checkboxes que não devem aparecer */
input[type="checkbox"][name*="orcamento"] {
    display: none !important;
}

/* Botão Solicitar Orçamento */
.kl-btn-orcamento {
    background: #4E7535 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

.kl-btn-orcamento:hover {
    background: #375225 !important;
    transform: translateY(-2px);
}

/* Contador do Carrinho */
.kl-orcamento-counter {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #4E7535;
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    font-weight: bold;
    transition: all 0.3s ease;
}

.kl-orcamento-counter:hover {
    background: #375225;
    transform: scale(1.05);
}

.kl-orcamento-counter .count {
    background: #fff;
    color: #4E7535;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    font-size: 14px;
}

/* Carrinho de Orçamento */
.kl-carrinho-orcamento {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.kl-carrinho-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.kl-carrinho-table table {
    width: 100%;
    border-collapse: collapse;
}

.kl-carrinho-table thead {
    background: #4E7535;
    color: #fff;
}

.kl-carrinho-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.kl-carrinho-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.kl-carrinho-table tbody tr:hover {
    background: #f9f9f9;
}

.kl-produto-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.kl-produto-nome {
    font-weight: bold;
    color: #333;
}

.kl-quantidade-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.kl-btn-remover {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kl-btn-remover:hover {
    background: #c9302c;
}

.kl-carrinho-vazio {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.kl-carrinho-vazio h3 {
    color: #999;
    font-size: 24px;
    margin-bottom: 20px;
}

.kl-btn-continuar {
    background: #5cb85c;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.kl-btn-continuar:hover {
    background: #4cae4c;
    color: #fff;
}

/* Formulário de Orçamento */
.kl-formulario-orcamento {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kl-formulario-orcamento h2 {
    color: #4E7535;
    margin-bottom: 30px;
    border-bottom: 2px solid #4E7535;
    padding-bottom: 10px;
}

.kl-form-group {
    margin-bottom: 20px;
}

.kl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.kl-form-group label .required {
    color: #d9534f;
}

.kl-form-group input,
.kl-form-group textarea,
.kl-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.kl-form-group input:focus,
.kl-form-group textarea:focus,
.kl-form-group select:focus {
    outline: none;
    border-color: #4E7535;
}

.kl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.kl-btn-enviar {
    background: #4E7535;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.kl-btn-enviar:hover {
    background: #375225;
}

.kl-btn-enviar:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mensagens */
.kl-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
}

.kl-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kl-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.kl-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.kl-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.kl-loading.active {
    display: block;
}

.kl-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4E7535;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resumo do Pedido */
.kl-resumo-pedido {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.kl-resumo-pedido h3 {
    color: #4E7535;
    margin-bottom: 15px;
}

.kl-resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.kl-resumo-item:last-child {
    border-bottom: none;
    font-size: 18px;
    font-weight: bold;
    color: #4E7535;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #4E7535;
}

/* Modal */
.kl-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.kl-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kl-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.kl-modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.kl-modal-close:hover {
    color: #333;
}

/* Responsivo */
@media (max-width: 768px) {
    .kl-form-row {
        grid-template-columns: 1fr;
    }
    
    /* Carrinho Mobile - Layout Empilhado */
    .kl-carrinho-table {
        overflow-x: visible;
        box-shadow: none;
    }
    
    .kl-carrinho-table table {
        border: 0;
    }
    
    .kl-carrinho-table thead {
        display: none;
    }
    
    .kl-carrinho-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .kl-carrinho-table tbody tr:hover {
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
    
    .kl-carrinho-table td {
        display: block;
        text-align: left !important;
        border: none;
        padding: 8px 0;
    }
    
    .kl-carrinho-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #4E7535;
        display: block;
        margin-bottom: 5px;
        font-size: 11px;
        text-transform: uppercase;
    }
    
    .kl-produto-image {
        text-align: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .kl-produto-image::before {
        display: none;
    }
    
    .kl-produto-image img {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .kl-produto-nome {
        font-size: 16px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .kl-quantidade-input {
        width: 100%;
        max-width: 150px;
        padding: 12px;
        font-size: 16px;
    }
    
    .kl-btn-remover {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        margin-top: 10px;
    }
    
    .kl-orcamento-counter {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
    
    .kl-formulario-orcamento {
        padding: 20px;
    }
    
    .kl-carrinho-orcamento {
        padding: 10px;
    }
    
    .kl-carrinho-orcamento h2 {
        font-size: 20px;
    }
}