/* --- ESTILO GERAL DO CARRINHO --- */
.cart-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.cart-container h1 { font-family: 'Playfair Display'; text-align: center; margin-bottom: 40px; }

.cart-content { display: flex; gap: 40px; }
.cart-items { flex: 2; }
.cart-summary { flex: 1; background: #f9f9f9; padding: 30px; border-radius: 12px; height: fit-content; }

/* Tabela Desktop */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding-bottom: 20px; border-bottom: 1px solid #ddd; color: #888; font-size: 13px; text-transform: uppercase; }
.cart-table td { padding: 20px 0; border-bottom: 1px solid #eee; vertical-align: middle; }

/* Detalhes do Produto */
.product-wrapper { display: flex; align-items: center; gap: 15px; }
.product-wrapper img { width: 70px; height: 90px; object-fit: cover; border-radius: 6px; }

.item-details strong { display: block; font-size: 14px; margin-bottom: 4px; color: #333; }

/* Bolinha de Cor e Tamanho */
.variant-info { 
    display: flex; 
    align-items: center; /* Centraliza verticalmente o texto com a bolinha */
    gap: 10px; /* Dá um espaço entre o Tamanho e a Cor */
    font-size: 12px; 
    color: #666;
    margin-top: 4px;
}

.color-dot { 
    display: inline-block; 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    border: 1px solid #999; /* Borda mais escura para cores claras aparecerem */
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Sombrinha leve */
}

.mobile-price { display: none; } /* Esconde preço mobile no desktop */

.btn-remove { background: none; border: none; color: #cc0000; cursor: pointer; font-size: 16px; transition: 0.2s; padding: 5px; }
.btn-remove:hover { transform: scale(1.1); }

/* --- RESPONSIVIDADE (TRANSFORMA TABELA EM CARDS) --- */
@media (max-width: 768px) {
    .cart-content { flex-direction: column; }
    
    .cart-table thead { display: none; } /* Esconde cabeçalho */
    
    .cart-item-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #f0f0f0;
        padding: 15px 0;
        position: relative;
    }

    .product-col { width: 100%; padding: 0 !important; border: none !important; }
    
    .desktop-only { display: none; } /* Esconde colunas repetidas */
    
    .mobile-price { 
        display: block; 
        margin-top: 5px; 
        font-weight: bold; 
        color: #000; 
        font-size: 14px;
    }

    .action-col {
        padding: 0 !important; border: none !important;
        display: flex; align-items: center;
    }
    
    .product-wrapper img { width: 80px; height: 100px; } /* Foto maior no celular */
}

/* Resumo do Pedido */
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 14px; }
.total { font-weight: 800; font-size: 18px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #ddd; }

.btn-checkout { 
    display: block; width: 100%; background: black; color: white; 
    text-align: center; padding: 15px; text-transform: uppercase; 
    font-weight: bold; margin-bottom: 10px; border-radius: 30px; text-decoration: none;
}
.btn-continue { display: block; width: 100%; text-align: center; font-size: 12px; text-decoration: underline; }

/* --- SELETOR DE QUANTIDADE --- */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 20px;
    width: fit-content;
    border: 1px solid #eee;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.2s;
}

.qty-btn:hover { background: #000; color: white; }
.qty-btn:active { transform: scale(0.9); }

.qty-number {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .mobile-price { margin-top: 10px; color: #666; font-size: 13px; }
}

/* Esconde o seletor da esquerda quando estiver no PC */
@media (min-width: 769px) {
    .mobile-only-qty { display: none !important; }
}

/* Mostra o seletor da esquerda (e esconde as colunas desktop) no celular */
@media (max-width: 768px) {
    .mobile-only-qty { display: flex !important; }
}

/* --- BARRA DE PROGRESSO FRETE GRÁTIS --- */
.free-shipping-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.progress-track {
    background-color: #eee;
    height: 8px;
    border-radius: 10px;
    position: relative;
    margin: 25px 10px 10px; /* Espaço para o caminhão andar */
}

.progress-fill {
    background: linear-gradient(to right, #ff9966, #ff5e62); /* Degradê Laranja/Vermelho */
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

/* O Caminhãozinho que anda junto com a barra */
.truck-icon-progress {
    position: absolute;
    right: -15px; /* Ajuste para centralizar no final da barra */
    top: -22px;
    background: white;
    color: #ff5e62;
    border: 2px solid #ff5e62;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: right 0.5s;
}

.shipping-msg {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
}

.shipping-msg strong {
    color: #ff5e62;
    font-weight: 700;
}

/* Estado de Sucesso (Atingiu a meta) */
.shipping-msg.success {
    color: #27ae60;
    font-weight: bold;
}

/* --- ALERTAS DE CARRINHO --- */
.alert-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    animation: slideDown 0.5s ease;
}

.alert-box.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-box.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}