/* Cart Page Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f9fdfa;
    color: #333;
    font-family: 'Outfit', sans-serif;
}

/* Header Spacer */
.cart-header {
    background-color: transparent;
    padding: 8rem 5% 3rem;
    text-align: center;
}

.cart-header h1 {
    color: #1a1a1a;
    font-size: 3rem;
    font-weight: 800;
}

/* Cart Layout */
.cart-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 6rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Cart Items Grid (Replaces Table) */
.cart-items-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    /* Img, Details, Qty, Remove */
    gap: 2rem;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.cart-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(44, 95, 45, 0.08);
    border-color: #e8f5e9;
}

.cart-item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 14px;
    background: #f9f9f9;
}

.cart-item-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.1rem;
    color: #2c5f2d;
    font-weight: 600;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 5px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
    background: #2c5f2d;
    color: white;
}

.qty-display {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

/* Remove Button */
.remove-btn {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: rotate(90deg);
}

/* Order Summary */
.cart-summary {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.05rem;
}

.summary-total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f5f5f5;
    font-weight: 800;
    font-size: 1.5rem;
    color: #2c5f2d;
}

.checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #2c5f2d 0%, #3d7c3e 100%);
    color: white;
    text-decoration: none;
    padding: 1.2rem;
    border-radius: 14px;
    font-weight: 600;
    margin-top: 2rem;
    box-shadow: 0 10px 25px rgba(44, 95, 45, 0.25);
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(44, 95, 45, 0.35);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 6rem 2rem;
    grid-column: 1 / -1;
}

.empty-cart-text {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 2rem;
}

.continue-shopping-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #e8f5e9;
    color: #2c5f2d;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.continue-shopping-btn:hover {
    background: #2c5f2d;
    color: white;
}

/* Responsive */
@media (max-width: 900px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
        order: 2;
        /* Move to bottom on mobile if desired, or keep top */
    }
}

@media (max-width: 600px) {
    .cart-item-card {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
        position: relative;
    }

    .cart-item-details {
        grid-column: 2;
    }

    .qty-control {
        grid-column: 2;
        width: fit-content;
    }

    .remove-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 30px;
        height: 30px;
    }
}