/* Fundo e Gaveta */
#cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9998; display: none; backdrop-filter: blur(4px);
}
#cart-sidebar {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 420px; height: 100%;
    background: #fdfdfd; z-index: 9999; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15); display: flex; flex-direction: column;
}
#cart-sidebar.open { right: 0; }

/* Header */
.cart-header {
    background: #fff; padding: 20px 25px; border-bottom: 1px solid #f0f0f0;
    display: flex; justify-content: space-between; align-items: center;
}
.cart-header h2 { margin: 0; font-size: 18px; font-weight: 800; color: #1f2937; letter-spacing: -0.5px; }
.close-cart { background: none; border: none; font-size: 24px; cursor: pointer; color: #9ca3af; transition: color 0.2s; }
.close-cart:hover { color: #1f2937; }

/* Área de Rolagem */
.cart-content-scroll { flex-grow: 1; overflow-y: auto; padding: 20px 20px 40px 20px; }

/* Item do Carrinho */
.cart-item {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 12px; margin-bottom: 15px; display: flex; gap: 15px;
    transition: all 0.2s; position: relative;
}
.cart-item:hover { border-color: #d1d5db; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }

.cart-item img {
    width: 75px; height: 75px; border-radius: 12px; object-fit: cover;
    border: 1px solid #f3f4f6;
}
.cart-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.cart-title { font-weight: 700; font-size: 14px; color: #1f2937; margin-bottom: 4px; line-height: 1.3; padding-right: 20px; }
.cart-details { font-size: 11px; color: #6b7280; margin-bottom: 8px; line-height: 1.4; }
.cart-details span { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; margin-right: 4px; display: inline-block; margin-bottom: 2px; }

.price-wrapper { display: flex; align-items: center; gap: 8px; }
.price-old { text-decoration: line-through; color: #9ca3af; font-size: 11px; font-weight: 500; }
.price-current { color: #16a34a; font-weight: 800; font-size: 15px; }

.item-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
.qty-selector-sm {
    display: flex; align-items: center; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; height: 28px;
}
.qty-btn-sm {
    width: 28px; height: 100%; background: none; border: none;
    font-weight: 700; color: #1f2937; cursor: pointer; font-size: 14px;
}
.qty-btn-sm:hover { background: #e5e7eb; }
.qty-val-sm {
    width: 24px; text-align: center; font-size: 12px; font-weight: 600; border: none; background: transparent;
}
.btn-remove-icon {
    position: absolute; top: 10px; right: 10px;
    color: #9ca3af; background: none; border: none; cursor: pointer; font-size: 13px;
}
.btn-remove-icon:hover { color: #ef4444; }

/* Order Bumps */
.bump-section { margin-top: 30px; border-top: 1px dashed #e5e7eb; padding-top: 20px; }
.bump-header { font-size: 13px; font-weight: 700; color: #1f2937; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.bump-header i { color: #EA1D2C; }
.bump-list-vertical { display: flex; flex-direction: column; gap: 10px; }
.bump-row {
    display: flex; align-items: center; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px;
    gap: 12px; transition: transform 0.2s;
}
.bump-row:hover { border-color: #EA1D2C; transform: translateX(2px); }
.bump-img-sm { width: 45px; height: 45px; border-radius: 8px; object-fit: cover; }
.bump-info { flex: 1; }
.bump-name { font-size: 13px; font-weight: 600; color: #1f2937; line-height: 1.2; }
.bump-price-box { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.bump-price-old { font-size: 10px; text-decoration: line-through; color: #9ca3af; }
.bump-price-new { font-size: 13px; font-weight: 800; color: #16a34a; }
.btn-add-bump-sm {
    background: #EA1D2C; color: white; border: none; width: 32px; height: 32px;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; transition: background 0.2s; box-shadow: 0 2px 5px rgba(234, 29, 44, 0.2);
}
.btn-add-bump-sm:hover { background: #c31722; transform: scale(1.05); }

/* --- FOOTER ATUALIZADO --- */
.cart-footer {
    background: #fff; padding: 25px 25px 15px 25px; border-top: 1px solid #f0f0f0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.03);
}
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: #6b7280; margin-bottom: 8px; }

/* Total agora em VERDE */
.summary-row.total { 
    font-size: 20px; font-weight: 800; color: #1f2937; 
    margin-top: 15px; padding-top: 15px; border-top: 1px dashed #e5e7eb; margin-bottom: 20px; 
}
/* ID Específico para a cor do valor total */
#cart-total-final { color: #16a34a; } 

.green-text { color: #16a34a; font-weight: 600; }

/* Botão Centralizado sem preço */
.btn-checkout {
    width: 100%; background: #EA1D2C; color: #fff; border: none;
    padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 700;
    cursor: pointer; text-align: center; display: block; /* Centraliza texto */
    box-shadow: 0 4px 12px rgba(234, 29, 44, 0.25); transition: transform 0.2s;
}
.btn-checkout:hover { background: #c31722; transform: translateY(-2px); }

.footer-security {
    margin-top: 15px; text-align: center; font-size: 11px; color: #9ca3af;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* Botão Flutuante */
#floating-cart-btn {
    position: fixed; bottom: 20px; right: 20px; background: #1f2937; color: #fff;
    width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 22px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 9990; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#floating-cart-btn:hover { transform: scale(1.1); background: #EA1D2C; }
#cart-count {
    position: absolute; top: -2px; right: -2px; background: #EA1D2C; color: #fff; border: 2px solid #fff;
    width: 24px; height: 24px; border-radius: 50%; font-size: 11px;
    display: flex; justify-content: center; align-items: center; font-weight: 800;
}