
a {
    text-decoration: none;
}


.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; 
}

.checkout-steps {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.step-content {
    width: 65%; 
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-right: 20px; 
    margin-bottom: 20px;
}

.cart-items {
    margin-bottom: 20px;
}


.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    width: 100%; 
    box-sizing: border-box; 
}


.book-image {
    width: 100px;
    height: 150px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 4px;
}

.book-details {
    flex-grow: 1;
    font-size: 0.9rem;
}

.book-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quantity {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.book-price {
    font-size: 1.1rem;
    font-weight: bold;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
    white-space: nowrap;
}


.original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.discounted-price {
    color: #dc3545;
    font-size: 1.1rem;
    margin-top: 5px;
}

.sale-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
}


.receipt-card {
    width: 300px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
    margin-bottom: 20px; 
}

.receipt-card h3 {
    margin: 0;
    margin-top: 10px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.receipt-total {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}


.btn-next {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%; 
    max-width: 400px; 
    text-align: center;
    margin: 0 auto; 
    margin-top: 20px;
}

.btn-next:hover {
    background-color: #218838;
}

.quantity-error,
.not-available {
    border: 1px solid #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    transition: box-shadow 0.3s ease-in-out;
}

.not-available {
    background-color: #f0f0f0;
}

.error-message {
    color: #dc3545;
    font-weight: bold;
    margin-top: 5px;
    display: block;
    padding-left: 10px;
}

.cart-item .quantity .error-message {
    margin-left: 10px;
    font-weight: bold;
}

.out-of-stock {
    background-color: #e9ecef;
    border: 1px solid #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    transition: box-shadow 0.3s ease-in-out;
    pointer-events: none;
    
}

.out-of-stock .book-details .quantity,
.out-of-stock .book-details h3,
.out-of-stock .book-price,
.out-of-stock a{
    opacity: 0.6;
}

.out-of-stock .btn-delete {
    pointer-events: auto; 
    background-color: #dc3545;
    opacity: 1;
}

@media screen and (min-width: 1920px) {
    .cart-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .btn-delete:hover {
        background-color: #c82333;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .step-content {
        width: 90%;
        padding: 20px;
        margin-right: 0;
    }

    .receipt-card {
        width: 90%;
        max-width: 100%;
        margin-top: 20px;
        text-align: center;
    }

    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .book-image {
        width: 80%;
        max-width: 150px;
        height: auto;
        margin: 0 auto 10px;
    }

    .book-details {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-delete {
        font-size: 1rem;
        padding: 10px 15px;
        margin-top: 10px;
    }

    .quantity input {
        font-size: 1rem;
        padding: 8px;
        width: 80px;
        text-align: center;
    }

    .book-price {
        font-size: 1.2rem;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .btn-next {
        width: 90%;
        max-width: 100%;
        padding: 15px;
    }
}
