/* 
 * Shopptimer - Correções Mobile para Carrinho
 * 
 * Correções específicas para layout mobile do carrinho
 */

/* Correções para tabela do carrinho em dispositivos móveis */
@media (max-width: 768px) {
    /* Ocultar cabeçalho da tabela em mobile */
    .cart-table thead {
        display: none;
    }
    
    /* Transformar linhas da tabela em cards */
    .cart-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Transformar células em blocos */
    .cart-table tbody td {
        display: block;
        text-align: left !important;
        border: none;
        padding: 5px 0;
        position: relative;
    }
    
    /* Adicionar labels antes do conteúdo */
    .cart-table tbody td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 100px;
        margin-right: 10px;
        color: #666;
    }
    
    /* Estilo específico para célula do produto */
    .cart-table tbody td:first-child {
        border-bottom: 1px solid #eee;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .cart-table tbody td:first-child:before {
        display: none;
    }
    
    /* Ajustar imagem do produto */
    .cart-table .cart-item-image {
        width: 60px;
        height: 60px;
        margin-right: 10px;
        float: left;
    }
    
    /* Ajustar nome do produto */
    .cart-table .product-info {
        overflow: hidden;
        padding-left: 70px;
    }
    
    .cart-table .product-name {
        font-weight: bold;
        margin-bottom: 5px;
        line-height: 1.3;
    }
    
    /* Ajustar controles de quantidade */
    .cart-table .quantity-controls {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-top: 5px;
    }
    
    .cart-table .quantity-controls .input-group {
        width: 120px;
    }
    
    /* Ajustar botões de ação */
    .cart-table .action-buttons {
        text-align: center;
        margin-top: 10px;
    }
    
    /* Preço destacado */
    .cart-table .price-display {
        font-size: 1.1em;
        font-weight: bold;
        color: var(--primary-color, #0d6efd);
    }
    
    /* Subtotal destacado */
    .cart-table .subtotal-display {
        font-size: 1.2em;
        font-weight: bold;
        color: var(--success-color, #28a745);
    }
}

/* Melhorias gerais para o carrinho */
.cart-container {
    padding: 15px;
}

.cart-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.cart-total {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color, #0d6efd);
    border-top: 2px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

/* Botões do carrinho */
.cart-actions {
    margin-top: 20px;
    text-align: center;
}

.cart-actions .btn {
    margin: 5px;
    min-width: 150px;
}

/* Carrinho vazio */
.empty-cart {
    text-align: center;
    padding: 50px 20px;
}

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

/* Animações suaves */
.cart-item {
    transition: all 0.3s ease;
}

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

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsividade adicional para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .cart-table .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-table .quantity-controls .input-group {
        width: 100px;
    }
}

