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

/* Título da página */
.cart-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Container principal do carrinho */
.cart-container {
    background: #FFFFFF;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Cabeçalho da tabela */
.cart-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.cart-header h6 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

/* Itens do carrinho */
.cart-items {
    padding: 0;
}

.cart-item {
    padding: 25px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: #f8f9fa;
}

/* Imagem do produto no carrinho */
.product-image-cart {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Informações do produto */
.product-info-cart {
    flex-grow: 1;
}

.product-name-cart {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Botão remover item */
.btn-remove-item {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-item:hover {
    opacity: 0.7;
}

/* Preço do produto */
.product-price-cart {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* Quantidade + disponível em estoque */
.cart-qty-wrap {
    min-height: 2.5rem;
}

.cart-qty-disponivel {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
}

.cart-qty-disponivel i {
    color: var(--secondary-solid, #96c322);
    margin-right: 2px;
    vertical-align: -0.1em;
}

/* Controles de quantidade */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e9ecef;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.quantity-btn:hover {
    background: var(--primary-solid);
    color: white;
    border-color: var(--primary-solid);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 0.2rem rgba(31, 128, 166, 0.25);
}

/* Preço subtotal */
.subtotal-price {
    color: var(--primary-solid);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Rodapé do carrinho */
.cart-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* Seção do total */
.total-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.total-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.total-price {
    color: var(--primary-solid);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Botões de ação */
.cart-actions {
    margin-top: 2rem;
}

.cart-actions .btn {
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: var(--transition);
}

.cart-actions .btn-outline-primary {
    border: 2px solid var(--primary-solid);
    color: var(--primary-solid);
}

.cart-actions .btn-outline-primary:hover {
    background: var(--primary-solid);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cart-actions .btn-success {
    background: var(--secondary-solid);
    border: 2px solid var(--secondary-solid);
    color: white;
}

.cart-actions .btn-success:hover {
    background: #7fb800;
    border-color: #7fb800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Botão limpar carrinho */
.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Responsividade */
@media (max-width: 768px) {
    .cart-title {
        font-size: 2rem;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-header h6 {
        font-size: 0.9rem;
    }
    
    .cart-item {
        padding: 20px 15px;
    }
    
    .product-image-cart {
        width: 60px;
        height: 60px;
    }
    
    .product-name-cart {
        font-size: 0.9rem;
    }
    
    .cart-footer {
        padding: 15px;
    }
    
    .total-price {
        font-size: 1.5rem;
    }
    
    .cart-actions .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .cart-title {
        font-size: 1.8rem;
    }
    
    .cart-header .row {
        display: none;
    }
    
    .cart-item .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-item .col-md-2,
    .cart-item .col-md-3 {
        text-align: left !important;
    }
    
    .quantity-controls {
        justify-content: flex-start;
    }
    
    .total-section {
        align-items: flex-start;
        margin-top: 15px;
    }
}

/* Estados vazios */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.cart-empty h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.cart-empty p {
    margin-bottom: 30px;
}

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

.cart-item {
    animation: slideInCart 0.3s ease-out;
}

/* Tema escuro para carrinho */
body.dark-theme .cart-container {
    background: #FFFFFF;
    border-color: #e9ecef;
}

body.dark-theme .cart-header {
    background: #f8f9fa;
}

body.dark-theme .cart-item:hover {
    background: #f8f9fa;
}

body.dark-theme .cart-footer {
    background: #f8f9fa;
}

body.dark-theme .product-name-cart {
    color: var(--text-primary);
}

body.dark-theme .product-price-cart {
    color: var(--text-primary);
}

body.dark-theme .quantity-input {
    background: #FFFFFF;
    color: var(--text-primary);
}

body.dark-theme .quantity-btn {
    background: #FFFFFF;
    color: var(--text-primary);
}
