/* General Styles for Cart Page */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

.cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cart-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.cart-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-header h1 .fas {
    margin-right: 15px;
    color: #4CAF50;
    font-size: 1.2em;
}

/* Cart Steps */
.cart-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    position: relative;
}

.cart-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background-color: #e0e0e0;
    transform: translateY(-50%);
    z-index: 0;
}

.cart-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cart-steps .step span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #777;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.cart-steps .step p {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.cart-steps .step.active span {
    background-color: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.cart-steps .step.active p {
    color: #4CAF50;
}

.cart-steps .step.completed span {
    background-color: #28a745; /* Darker green for completed */
    color: #fff;
    border-color: #28a745;
}

.cart-steps .step.completed p {
    color: #28a745;
}


/* Cart Content Layout */
.cart-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.cart-items-list {
    flex: 3;
    min-width: 60%;
}

.cart-summary {
    flex: 1;
    min-width: 300px;
}

/* Cart Item Card */
.cart-item-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.cart-item-card:hover {
    transform: translateY(-3px);
}

.cart-item-card .product-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-card .placeholder-image {
    font-size: 3em;
    color: #bbb;
}

.cart-item-card .product-details {
    flex-grow: 1;
}

.cart-item-card .product-details h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
}

.cart-item-card .product-details .price {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

.cart-item-card .quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: fit-content;
    overflow: hidden;
}

.cart-item-card .qty-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1em;
    color: #555;
    transition: background-color 0.2s ease;
}

.cart-item-card .qty-btn:hover {
    background-color: #e0e0e0;
}

.cart-item-card .qty-value {
    padding: 8px 15px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: bold;
    color: #333;
    min-width: 30px;
    text-align: center;
}

.cart-item-card .item-total {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 10px;
    text-align: right;
}

.cart-item-card .item-actions {
    margin-left: 20px;
    flex-shrink: 0;
}

.cart-item-card .remove-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.cart-item-card .remove-btn:hover {
    background-color: #c82333;
}

/* Cart Summary */
.summary-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-card h3 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1.1em;
    color: #555;
}

.summary-row.total {
    font-size: 1.4em;
    font-weight: bold;
    color: #4CAF50;
    border-top: 1px dashed #ddd;
    margin-top: 15px;
    padding-top: 15px;
}

.checkout-btn, .continue-shopping {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.checkout-btn {
    background-color: #4CAF50;
    color: #fff;
    border: none;
}

.checkout-btn:hover {
    background-color: #45a049;
}

.continue-shopping {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
}

.continue-shopping:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background-color: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    grid-column: 1 / -1; /* Span across all columns in grid */
}

.empty-cart-icon {
    font-size: 5em;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 2em;
    color: #555;
    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 1.1em;
    color: #777;
    margin-bottom: 30px;
}

.empty-cart .shop-btn {
    background-color: #4CAF50;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.empty-cart .shop-btn:hover {
    background-color: #45a049;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .cart-content {
        flex-direction: column;
    }
    .cart-items-list, .cart-summary {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cart-container {
        margin: 20px auto;
        padding: 15px;
    }
    .cart-header h1 {
        font-size: 2em;
    }
    .cart-steps {
        gap: 15px;
    }
    .cart-steps .step span {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
    .cart-steps .step p {
        font-size: 0.8em;
    }
    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    .cart-item-card .product-image {
        margin-right: 0;
        margin-bottom: 15px;
        width: 80px;
        height: 80px;
    }
    .cart-item-card .product-details {
        width: 100%;
        text-align: center;
    }
    .cart-item-card .quantity-control {
        margin: 10px auto;
    }
    .cart-item-card .item-total {
        text-align: center;
    }
    .cart-item-card .item-actions {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }
    .cart-item-card .remove-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cart-header h1 {
        font-size: 1.8em;
    }
    .cart-steps {
        flex-wrap: wrap;
    }
    .cart-steps::before {
        display: none;
    }
    .cart-steps .step {
        width: 30%;
    }
    .summary-card {
        padding: 15px;
    }
    .summary-card h3 {
        font-size: 1.5em;
    }
    .summary-row {
        font-size: 1em;
    }
    .summary-row.total {
        font-size: 1.2em;
    }
}
