﻿:root {
    --primary-color: #004282;
    --secondary-color: #87c508;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 2rem;
}

    .page-header h2 {
        font-size: 1.75rem;
        font-weight: 600;
        color: #333;
        margin: 0;
    }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #fafafa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

    .cart-item:hover {
        background: #f0f0f0;
    }

.item-image {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    flex-shrink: 0;
}

    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.item-price {
    color: #666;
    font-size: 0.95rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 0.5rem;
}

.discounted-price {
    color: var(--secondary-color);
    font-weight: 600;
}

.current-price {
    color: var(--primary-color);
    font-weight: 600;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
}

    .quantity-selector button {
        background: none;
        border: none;
        color: #666;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        line-height: 1;
    }

    .quantity-selector input {
        width: 40px;
        text-align: center;
        border: none;
        font-weight: 600;
        color: #333;
        background: transparent;
    }

.item-total {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: left;
}

.remove-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

    .remove-btn:hover {
        color: #dc3545;
    }

.summary-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
}

    .summary-row.total {
        font-size: 1.25rem;
        font-weight: 700;
        color: #333;
        padding-top: 1rem;
        border-top: 2px solid #eee;
        margin-top: 1.5rem;
    }

.total-amount {
    color: var(--secondary-color);
}

.checkout-btn {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

    .checkout-btn:hover {
        background: #76b007;
        transform: translateY(-2px);
    }

.continue-shopping {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: color 0.2s;
}

    .continue-shopping:hover {
        color: #003168;
    }

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
}

    .empty-cart i {
        font-size: 4rem;
        color: #ddd;
        margin-bottom: 1.5rem;
    }

    .empty-cart h4 {
        color: #999;
        margin-bottom: 2rem;
    }

.alert-success {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: none;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .summary-section {
        position: static;
    }
}

@media (max-width: 576px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .item-image {
        width: 100%;
        height: 120px;
    }
}
