:root {
    --primary-color: #0c8346; 
    --primary-light: #f0fdf4; 
    --text-dark: #1e293b;
    --text-muted: #64748b; 
    --bg-gray: #f8fafc; 
    --card-white: #ffffff;
    --border-soft: #f1f5f9; 
    --danger: #ef4444;
    --secondary-link: #ff4757;
}

body.woocommerce-cart { 
    background-color: var(--bg-gray); 
    font-family: 'Inter', -apple-system, sans-serif; 
    padding-bottom: 150px !important; 
}

.rahi-cart-page-wrapper { max-width: 1100px; margin: 0 auto; padding: 15px; display: flex; flex-direction: column; gap: 15px; }

.rahi-cart-card { background: var(--card-white); border-radius: 20px; padding: 20px; box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03); margin-bottom: 15px; border: 1px solid var(--border-soft); }

.items-header { font-size: 17px; font-weight: 800; color: var(--text-dark); margin: 0 0 15px 0; display: flex; align-items: center; justify-content: space-between; }

/* --- PREMIUM ITEM LIST --- */
.rahi-cart-item { 
    display: flex; align-items: center; gap: 14px; padding: 16px 0; 
    border-bottom: 1px solid var(--border-soft); transition: all 0.3s ease;
}
.rahi-cart-item:last-child { border-bottom: none; }

.product-thumbnail img { 
    width: 68px; height: 68px; border-radius: 14px; 
    border: 1px solid var(--border-soft); object-fit: cover; 
    background: #fff;
}

.product-details { flex-grow: 1; }
.product-name { margin: 0; font-weight: 700; font-size: 14px; color: var(--text-dark); line-height: 1.4; }
.product-price { font-size: 13px; font-weight: 800; color: #000; margin-top: 5px; display: block; }

.product-actions-wrap { display: flex; align-items: center; gap: 10px; }

/* Premium Pill Quantity Selector */
.quantity-selector-premium { 
    display: flex; align-items: center; background: var(--primary-color); 
    border-radius: 12px; color: white; height: 34px; 
    box-shadow: 0 4px 10px rgba(12, 131, 70, 0.2);
}
.qty-btn-premium { 
    background: transparent; border: none; color: white; font-size: 20px; 
    width: 32px; height: 100%; cursor: pointer; display: flex; 
    align-items: center; justify-content: center; font-weight: 400;
}
.qty-display-premium { font-weight: 900; font-size: 14px; min-width: 22px; text-align: center; }

/* Premium Delete Button */
.rahi-item-remove-btn {
    background: #fff; border: 1.5px solid #fecaca; color: var(--danger);
    width: 34px; height: 34px; border-radius: 12px; display: flex; 
    align-items: center; justify-content: center; cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.rahi-item-remove-btn:hover { background: #fef2f2; border-color: var(--danger); transform: rotate(5deg); }

/* Donation Card Style */
.donation-card { border-left: 5px solid #ff4757; }
.donation-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.donation-text h4 { margin: 0; font-size: 15px; font-weight: 800; }
.donation-text p { margin: 0; font-size: 11px; color: var(--text-muted); }
.donation-options { display: flex; flex-wrap: wrap; gap: 8px; }
.donation-pill { 
    padding: 7px 15px; border: 1.5px solid #e2e8f0; border-radius: 14px; 
    font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.2s;
}
.donation-pill.active { background: #ff4757; color: white; border-color: #ff4757; box-shadow: 0 4px 10px rgba(255, 71, 87, 0.2); }

/* Bill Details Refined */
.bill-details-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 18px; color: var(--text-dark); }
.bill-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text-dark); }
.bill-row.fee { color: var(--text-muted); }
.grand-total { font-size: 17px; font-weight: 900; border-top: 2px dashed #e2e8f0; padding-top: 15px; margin-top: 8px; color: #000; }

/* Sticky Footer UI */
.rahi-cart-footer { 
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); 
    width: 100%; max-width: 600px; background: #fff; 
    box-shadow: 0 -15px 40px rgba(0,0,0,0.1); 
    padding: 15px 20px; border-radius: 28px 28px 0 0; z-index: 9999; 
}
.delivery-address-footer-card { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 12px; }
.address-display strong { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 900; letter-spacing: 0.8px; }
.address-display p { margin: 2px 0 0 0; font-size: 13px; font-weight: 800; color: var(--text-dark); }
.button-secondary { color: var(--secondary-link); font-size: 13px; font-weight: 900; text-decoration: none; border-bottom: 1px solid transparent; }

.total-section { display: flex; justify-content: space-between; align-items: center; }
.total-amount-display .amount { font-size: 22px; font-weight: 900; color: #000; line-height: 1; }
.total-amount-display .view-bill-link { font-size: 10px; color: var(--primary-color); font-weight: 900; text-transform: uppercase; margin-top: 5px; display: block; }

.checkout-button { 
    background: var(--primary-color) !important; color: #fff !important; 
    border-radius: 16px !important; padding: 14px 40px !important; 
    font-weight: 900 !important; font-size: 16px !important; border: none; 
    box-shadow: 0 6px 15px rgba(12, 131, 70, 0.3);
}

.rahi-cart-loader-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); z-index: 10000; justify-content: center; align-items: center; }
.rahi-cart-spinner { border: 5px solid #f3f3f3; border-top: 5px solid var(--primary-color); border-radius: 50%; width: 45px; height: 45px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (min-width: 768px) { .rahi-cart-page-wrapper { flex-direction: row; align-items: flex-start; } .rahi-cart-footer { display: none; } .rahi-cart-sidebar { position: sticky; top: 20px; } }