/* Shopping Cart Styles */

.carrinho-page {
    padding: 2rem 0;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 700;
}

/* Empty Cart */
.carrinho-vazio {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.carrinho-vazio-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.carrinho-vazio h2 {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 1rem;
}

.carrinho-vazio p {
    color: #777;
    margin-bottom: 2rem;
}

.btn-continuar-comprando {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--cor-primaria);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-continuar-comprando:hover {
    background-color: var(--cor-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Cart with Items */
.carrinho-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.carrinho-itens {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.carrinho-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1.5fr 1fr 0.5fr;
    padding: 1rem;
    background-color: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.carrinho-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1.5fr 1fr 0.5fr;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.carrinho-produto {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carrinho-produto-imagem {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
}

.carrinho-produto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carrinho-produto-info {
    flex: 1;
}

.carrinho-produto-nome {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.carrinho-produto-tamanho,
.carrinho-produto-frete {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.carrinho-preco {
    font-weight: 600;
    color: #555;
}

.carrinho-quantidade {
    max-width: 120px;
    margin: 0 auto;
}

.carrinho-total-item {
    font-weight: 700;
    color: var(--cor-primaria);
}

.carrinho-acao {
    text-align: center;
}

.btn-remover {
    color: #e74c3c;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-remover:hover {
    color: #c0392b;
    transform: scale(1.1);
}

.carrinho-acoes {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 1rem;
}

.btn-limpar-carrinho {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #f5f5f5;
    color: #777;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-limpar-carrinho:hover {
    background-color: #e0e0e0;
}

/* Order Summary */
.carrinho-resumo {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    height: fit-content;
}

.resumo-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    color: #333;
}

.resumo-itens {
    margin-bottom: 1.5rem;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #555;
}

/* Shipping Calculator in Cart Summary */
.frete-calculo-container {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.frete-calculo-container h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.frete-calculo-form {
    position: relative;
    margin-bottom: 10px;
}

.frete-calculo-form input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.frete-calculo-form input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(74, 106, 219, 0.1);
}

.cep-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.cep-status.valid {
    color: #28a745;
}

.cep-status.invalid {
    color: #ffc107;
}

.frete-instrucao {
    margin: 10px 0 0 0;
    padding: 8px;
    background-color: #e8f4f8;
    border-radius: 4px;
    font-size: 12px;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 6px;
}

.frete-instrucao i {
    color: #17a2b8;
    font-size: 14px;
}

.btn-calcular-frete {
    padding: 10px 15px;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-calcular-frete:hover {
    background-color: var(--cor-hover);
}

.resultado-frete {
    margin-top: 10px;
}

.opcoes-frete {
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.opcao-frete {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opcao-frete:last-child {
    border-bottom: none;
}

.frete-info {
    display: flex;
    align-items: center;
}

.frete-tipo {
    font-weight: 500;
    margin-left: 8px;
}

.frete-prazo {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.frete-valor {
    font-weight: 600;
    color: var(--cor-primaria);
}

.frete-erro, .frete-calculando {
    padding: 8px;
    text-align: center;
    font-size: 14px;
}

.frete-erro {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f1aeb5;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.frete-erro i {
    margin-right: 8px;
}

.frete-calculando {
    color: #3498db;
    text-align: center;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 6px;
    border: 1px solid #bee5eb;
}

.frete-calculando i {
    margin-right: 8px;
}

.frete-titulo {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.frete-titulo i {
    margin-right: 8px;
    color: var(--cor-primaria);
}

.frete-required-message {
    color: #ff3366;
    font-size: 0.9rem;
    margin: 10px 0;
    text-align: center;
    padding: 8px;
    background-color: #fff0f3;
    border-radius: 6px;
    border: 1px solid #ffccd5;
}

.aviso-frete-recalculo {
    background-color: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    color: #0c5460;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aviso-frete-recalculo i {
    color: #17a2b8;
    font-size: 16px;
}

.frete-opcoes-container {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.frete-opcoes-container h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.frete-observacao {
    margin: 10px 0 0 0;
    padding: 8px;
    background-color: #e8f4f8;
    border-radius: 4px;
    font-size: 12px;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 6px;
}

.frete-observacao i {
    color: #17a2b8;
    font-size: 14px;
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.btn-finalizar {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background-color: var(--cor-primaria);
    color: white;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.btn-finalizar:hover {
    background-color: var(--cor-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-finalizar.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quantity Control (copied from product page) */
.quantidade-controle {
    display: flex;
    align-items: center;
}

.quantidade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.quantidade-btn:hover {
    background-color: #eee;
}

.quantidade-btn.menos {
    border-radius: 4px 0 0 4px;
}

.quantidade-btn.mais {
    border-radius: 0 4px 4px 0;
}

.quantidade-input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 0.9rem;
    color: #333;
    appearance: none;
    -moz-appearance: textfield;
}

.quantidade-input::-webkit-outer-spin-button,
.quantidade-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Frete calculator */
.resumo-frete-calculadora {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.frete-form {
    margin-bottom: 0.5rem;
}

.frete-form label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.frete-input-group {
    display: flex;
    gap: 0.5rem;
}

#calcular-frete-cep {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

#btn-calcular-frete {
    padding: 0.5rem 1rem;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#btn-calcular-frete:hover {
    background-color: var(--cor-hover);
}

.frete-resultado {
    margin-top: 1rem;
}

.frete-calculando {
    color: #555;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

.frete-erro {
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

.opcoes-frete {
    margin-top: 0.5rem;
}

.frete-titulo {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.opcao-frete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: white;
    transition: all 0.2s ease;
}

.opcao-frete:hover {
    border-color: var(--cor-primaria);
    background-color: #fafafa;
}

.frete-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.frete-info input[type="radio"] {
    accent-color: var(--cor-primaria);
}

.frete-info label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.frete-tipo {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.frete-prazo {
    font-size: 0.8rem;
    color: #777;
}

.frete-valor {
    font-weight: 600;
    color: var(--cor-primaria);
    font-size: 0.9rem;
}

.frete-selecionado {
    background-color: #f1f9ff;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--cor-primaria);
}

/* Responsive styles */
@media (max-width: 992px) {
    .carrinho-grid {
        grid-template-columns: 1fr;
    }
    
    .carrinho-header, .carrinho-item {
        grid-template-columns: 2.5fr 1fr 1fr 1fr 0.5fr;
    }
    
    .carrinho-header-quantidade, .carrinho-quantidade {
        display: none;
    }
}

@media (max-width: 768px) {
    .carrinho-header {
        display: none;
    }
    
    .carrinho-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .carrinho-preco, .carrinho-total-item, .carrinho-acao {
        text-align: left;
    }
    
    .carrinho-acoes {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-continuar-comprando, .btn-limpar-carrinho {
        width: 100%;
        text-align: center;
    }
    
    .frete-calculo-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-calcular-frete {
        width: 100%;
    }
    
    .opcao-frete {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .frete-valor {
        align-self: flex-end;
    }
    
    /* Garantir que o campo de cálculo de frete apareça corretamente */
    .frete-calculo-container {
        width: 100% !important;
        padding: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .frete-calculo-form {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .frete-calculo-form input {
        width: 100% !important;
        height: 45px !important;
        padding: 10px !important;
    }
    
    .btn-calcular-frete {
        width: 100% !important;
        height: 45px !important;
        font-size: 14px !important;
        margin-top: 5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Melhorar layout do resumo do carrinho */
    .carrinho-resumo {
        position: static !important;
        width: 100% !important;
        margin-top: 20px !important;
        padding: 15px !important;
    }
    
    /* Estilizar botões de finalizar compra para melhor toque */
    .btn-finalizar {
        height: 55px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 15px !important;
        font-size: 16px !important;
        font-weight: bold !important;
    }
    
    /* Melhorar visualização de itens no carrinho */
    .carrinho-item {
        flex-direction: column !important;
        padding: 15px !important;
        display: flex !important;
    }
    
    .carrinho-produto {
        width: 100% !important;
        margin-bottom: 15px !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .carrinho-produto-imagem {
        width: 100% !important;
        max-width: 120px !important;
        margin: 0 auto 15px !important;
    }
    
    .carrinho-produto-info {
        width: 100% !important;
        text-align: center !important;
    }
    
    .carrinho-item-acoes {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 15px !important;
    }
    
    /* Ajustar layout grid para mobile */
    .carrinho-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Ajustes adicionais para telas muito pequenas */
@media (max-width: 576px) {
    .carrinho-item-quantidade {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .quantidade-controle {
        margin: 10px auto !important;
    }
    
    .btn-continuar-comprando, 
    .btn-limpar-carrinho {
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
} 

/* Alerta de Frete Obrigatório */
.alerta-frete {
    background-color: #ffe6e6;
    border: 1px solid #ff9999;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #d63031;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.alerta-frete i {
    margin-right: 8px;
    font-size: 16px;
}

/* Animação de shake para chamar atenção */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Destacar campo de CEP quando frete não selecionado */
.frete-calculo-form input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.frete-calculo-form input.erro {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25) !important;
}

/* Melhorar visibilidade do botão finalizar quando frete não selecionado */
.btn-finalizar:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

/* Estilo para quando o frete está selecionado */
.frete-selecionado {
    background-color: #d1f2eb;
    border-left: 4px solid #27ae60;
    padding-left: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.frete-selecionado .resumo-item-nome {
    color: #27ae60;
    font-weight: 600;
}

/* Responsividade para o alerta */
@media (max-width: 768px) {
    .alerta-frete {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .alerta-frete i {
        font-size: 14px;
        margin-right: 6px;
    }
}

/* Instrução obrigatória do frete */
.frete-instrucao {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 14px;
    color: #856404;
    text-align: center;
}

.frete-instrucao i {
    color: #f39c12;
    margin-right: 8px;
}

.frete-instrucao strong {
    color: #e67e22;
} 