/* Estilos específicos para a página do carrinho */

/* Layout geral */
.container {
    max-width: 1200px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Item do carrinho */
.carrinho-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    transition: all 0.3s ease;
}

.carrinho-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.item-imagem {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.item-info h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.item-preco {
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
}

.item-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
}

/* Controles de quantidade */
.quantidade-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-quantidade {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-quantidade:hover {
    transform: scale(1.1);
}

.input-quantidade {
    width: 60px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-weight: 600;
}

.input-quantidade:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Botão remover item */
.btn-remover {
    color: #dc3545;
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-remover:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Correção para botões que estão estourando a borda */
.remover-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.remover-item i {
    margin-right: 0.25rem;
}

/* Resumo do pedido */
.resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.resumo-total {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.75rem 0;
    border-top: 2px solid #e9ecef;
    margin-top: 0.5rem;
}

/* Formulários */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-control:read-only {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Input group */
.input-group .btn {
    border-radius: 0 8px 8px 0;
}

.input-group .form-control {
    border-radius: 8px 0 0 8px;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem;
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
}

.alert-success {
    background-color: #d1f2eb;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Botões */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Estados vazios e loading */
.estado-vazio {
    padding: 3rem 1rem;
    text-align: center;
}

.estado-vazio i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast */
.toast {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .carrinho-item {
        padding: 0.75rem;
    }
    
    .item-imagem {
        width: 60px;
        height: 60px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .resumo-total {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .carrinho-item {
        flex-direction: column;
        text-align: center;
    }
    
    .carrinho-item .row {
        flex-direction: column;
    }
    
    .item-imagem {
        margin: 0 auto 1rem;
    }
    
    .quantidade-controls {
        justify-content: center;
        margin: 1rem 0;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carrinho-item {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-finalizar-pedido:not(:disabled):hover {
    animation: pulse 0.6s ease-in-out;
}

/* Melhorias visuais */
.text-success {
    color: #28a745 !important;
}

.text-primary {
    color: #007bff !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.shadow-custom {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===== MELHORIAS PARA SEÇÃO "MEUS ITENS" ===== */

/* Card melhorado do item do carrinho */
.item-carrinho-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  background: #fff;
}

.item-carrinho-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Imagem do item */
.item-carrinho-imagem {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #f1f5f9;
  transition: all 0.3s ease;
}

.item-carrinho-imagem:hover {
  border-color: #3b82f6;
}

/* Informações do kit */
.item-carrinho-info .item-carrinho-titulo {
  color: #1e293b;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.item-carrinho-codigo {
  font-size: 0.875rem;
  color: #64748b !important;
  display: flex;
  align-items: center;
}

.item-carrinho-codigo i {
  color: #94a3b8;
}

/* Informações do aluno - design moderno */
.aluno-info-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
}

.aluno-info-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.aluno-info-content .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.aluno-info-content .info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.info-value {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
}

/* Valores do item */
.item-carrinho-valores {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
}

.valor-unitario, .quantidade-info, .subtotal-item {
  text-align: center;
}

.valor-unitario small, .quantidade-info small, .subtotal-item small {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: 500;
}

.preco-unitario {
  color: #059669;
  font-weight: 700;
  font-size: 1rem;
}

.subtotal-valor {
  color: #dc2626;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Botão remover melhorado */
.btn-remover-item {
  border-radius: 12px;
  padding: 0.75rem;
  border: 2px solid #fecaca;
  color: #dc2626;
  background: #fef2f2;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-remover-item:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: scale(1.05);
}

.btn-remover-item:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Responsividade melhorada */
@media (max-width: 992px) {
  .item-carrinho-valores {
    margin-top: 1rem;
  }
  
  .item-carrinho-valores .valor-unitario,
  .item-carrinho-valores .quantidade-info,
  .item-carrinho-valores .subtotal-item {
    display: inline-block;
    margin: 0 1rem;
  }
}

@media (max-width: 768px) {
  .item-carrinho-card .card-body {
    padding: 1.5rem !important;
  }
  
  .item-carrinho-imagem {
    height: 100px;
  }
  
  .item-carrinho-titulo {
    font-size: 1rem !important;
  }
  
  .aluno-info-card {
    margin-top: 1rem;
    padding: 0.75rem;
  }
  
  .aluno-info-content .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .info-value {
    text-align: left !important;
  }
  
  .item-carrinho-valores {
    text-align: center !important;
  }
  
  .item-carrinho-valores > div {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .item-carrinho-card .row {
    text-align: center;
  }
  
  .item-carrinho-valores > div {
    display: block;
    margin: 0.5rem 0;
  }
  
  .btn-remover-item {
    margin-top: 1rem;
    width: 100%;
  }
}

/* ===== MATRÍCULA DO ALUNO ===== */
.cart-item-matricula {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 8px 0;
    padding: 4px 8px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1565c0;
}

.cart-item-matricula i {
    color: #1976d2;
    font-size: 0.8rem;
}

.cart-item-matricula strong {
    color: #0d47a1;
    font-weight: 600;
}

/* Responsividade para matrícula */
@media (max-width: 576px) {
    .cart-item-matricula {
        font-size: 0.8rem;
        padding: 3px 6px;
        margin: 3px 0 6px 0;
    }
    
    .cart-item-matricula i {
        font-size: 0.75rem;
    }
}