/* ===== IMPROVED CART STYLING ===== */

.cart-main {
    padding-top: 100px;
    background: linear-gradient(135deg, var(--latte) 0%, #f8f9fa 100%);
    min-height: 100vh;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cart-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cart-header h1 {
    color: var(--coklat);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cart-header h1 i {
    color: var(--hijau);
    font-size: 2.5rem;
}

.cart-header p {
    color: var(--hijau2);
    font-size: 1.2rem;
    opacity: 0.8;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

.section-header {
    background: linear-gradient(135deg, var(--hijau), var(--hijau2));
    color: white;
    padding: 1.5rem 2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-items-list {
    padding: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--sage);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    color: var(--coklat);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--hijau);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: white;
    border: 2px solid var(--sage);
    border-radius: 25px;
    padding: 0.3rem;
}

.quantity-btn {
    background: var(--hijau);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.quantity-display {
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    color: var(--coklat);
    font-size: 1.1rem;
}

.item-total {
    text-align: right;
    min-width: 120px;
}

.item-total-price {
    font-weight: bold;
    color: var(--hijau);
    font-size: 1.2rem;
}

.remove-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Empty Cart State */
.empty-cart-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    color: var(--sage);
    margin-bottom: 1.5rem;
}

.empty-cart-state h3 {
    color: var(--hijau2);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.empty-cart-state p {
    color: var(--hijau2);
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hijau), var(--hijau2));
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    text-decoration: none;
    color: white;
}

/* Cart Summary Section */
.cart-summary-section {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.summary-header {
    background: linear-gradient(135deg, var(--hijau2), var(--coklat));
    color: white;
    padding: 1.5rem 2rem;
}

.summary-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.summary-details {
    padding: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f1f3f4;
}

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

.summary-label {
    color: var(--hijau2);
    font-weight: 500;
}

.summary-value {
    color: var(--coklat);
    font-weight: 600;
}

.summary-total {
    border-top: 2px solid var(--sage);
    padding: 1.5rem 2rem;
    background: #fafbfc;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.total-row span:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--coklat);
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hijau);
}

.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, var(--padi), #f6c531);
    color: var(--coklat);
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(246, 197, 49, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 197, 49, 0.4);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Action Buttons */
.button-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 2rem;
}

.button-row button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

#back-btn {
    background: var(--sage);
    color: var(--coklat);
}

#back-btn:hover {
    background: var(--hijau2);
    color: white;
    transform: translateY(-2px);
}

#clear-cart-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

#clear-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cart-summary-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-container {
        padding: 0 1rem;
    }
    
    .cart-header h1 {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .section-header,
    .summary-header {
        padding: 1rem 1.5rem;
    }
    
    .cart-items-list,
    .summary-details {
        padding: 1.5rem;
    }
    
    .summary-total {
        padding: 1rem 1.5rem;
    }
    
    .button-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-header h1 {
        font-size: 1.8rem;
    }
    
    .cart-item {
        padding: 1rem;
    }
    
    .quantity-controls {
        gap: 0.5rem;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
    }
}