.cart-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Cart Header */
.cart-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a5f3c 100%);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cart-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cart-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-title i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.cart-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
    white-space: nowrap;
}

/* Cart Content Layout */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cart-items-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.continue-shopping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.continue-shopping:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 60, 0.3);
}

/* Cart Items List */
.cart-items-list {
    padding: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1.5rem;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

/* Item Image */
.item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.item-image:hover {
    transform: scale(1.05);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-image:hover img {
    transform: scale(1.1);
}

/* Item Details */
.item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.item-info {
    flex: 1;
}

.item-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.item-name a:hover {
    color: var(--primary);
}

.item-variant {
    margin: 0;
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.variant-color,
.variant-size {
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.item-category {
    margin: 0;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-recipe {
    margin: 0.25rem 0 0 0;
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

/* Quantity Controls */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 140px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.quantity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quantity-btn:hover::before {
    opacity: 1;
}

.quantity-btn .btn-text {
    display: block;
    line-height: 1;
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
    position: relative;
    z-index: 1;
    user-select: none;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.quantity-btn:hover .btn-text {
    color: white;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    font-size: 1rem;
}

.quantity-input:focus {
    outline: none;
    background: #f8f9fa;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    -moz-appearance: textfield;
}

.update-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.update-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 60, 0.3);
}

/* Item Price */
.item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.price-info {
    text-align: right;
}

.unit-price {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.unit-price.original-price {
    text-decoration: line-through;
}

.unit-price.discounted-price {
    color: #dc3545;
    font-weight: 600;
    font-size: 1rem;
}

.subtotal {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Item Actions */
.item-actions {
    display: flex;
    align-items: flex-start;
}

.remove-btn {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    min-width: 80px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.remove-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.remove-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 114, 128, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.remove-btn:hover::before {
    opacity: 1;
}

.remove-btn .btn-text {
    display: block;
    line-height: 1;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    position: relative;
    z-index: 1;
    user-select: none;
}

.remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15);
}

.remove-btn:hover .btn-text {
    color: #dc2626;
}

/* Order Summary Section */
.order-summary-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
    width: 450px;
}

.order-summary {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.order-summary h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

/* Summary Items */
.summary-items {
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.donation-row {
    background-color: #fff5f5;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 1px solid #fed7d7;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    border-bottom: none;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.summary-value {
    font-weight: 600;
    color: #2c3e50;
}

.summary-row.total .summary-value {
    color: var(--primary);
}

/* Summary Actions */
.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkout-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #1a5f3c 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(26, 95, 60, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 95, 60, 0.4);
    color: white;
    text-decoration: none;
}

.continue-btn {
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary);
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.continue-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 60, 0.3);
    text-decoration: none;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.trust-item i {
    color: var(--primary);
    font-size: 1rem;
    width: 20px;
}

.trust-item i.fa-heart {
    color: #dc3545;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 2rem;
}

.empty-cart h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.empty-cart p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.empty-cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1a5f3c 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 95, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 95, 60, 0.4);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 60, 0.3);
    text-decoration: none;
}

/* Toast Animations */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.btn-success-animation {
    animation: successPulse 0.3s ease-out;
}

.btn-error-animation {
    animation: errorShake 0.3s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: #28a745; }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .order-summary-section {
        position: static;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .cart-header {
        padding: 1rem 0;
    }
    
    .cart-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-title {
        font-size: 1.5rem;
    }
    
    .cart-title i {
        font-size: 1.25rem;
    }
    
    .cart-subtitle {
        white-space: normal;
    }
    
    .cart-subtitle {
        font-size: 0.9rem;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .item-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .item-quantity {
        justify-content: center;
    }
    
    .item-price {
        align-items: center;
    }
    
    .item-actions {
        justify-content: center;
    }
    
    .remove-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .remove-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .quantity-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .empty-cart-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .cart-items-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cart-item {
        padding: 1.5rem;
    }
    
    .order-summary {
        padding: 1.5rem;
    }
    
    .summary-actions {
        gap: 0.75rem;
    }
    
    .checkout-btn,
    .continue-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .remove-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 60px;
        gap: 4px;
    }
    
    .remove-btn svg {
        width: 12px;
        height: 12px;
    }
}

/* Animation for cart items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Loading states */
.quantity-btn:disabled,
.update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus states for accessibility */
.quantity-btn:focus,
.update-btn:focus,
.remove-btn:focus,
.checkout-btn:focus,
.continue-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hover effects for better interactivity */
.cart-item:hover .item-image {
    transform: scale(1.05);
}

.cart-item:hover .remove-btn {
    transform: translateY(-1px);
}