/* ============================
   Cart Page Styles
============================ */

/* Container */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cart-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-details h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.cart-item-details .cart-price {
    font-size: 16px;
    color: #d9534f; /* bootstrap danger red */
    font-weight: 500;
}

/* Quantity Box */
.qty-box {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.qty-input {
    width: 50px;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.qty-btn {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.qty-btn:hover {
    background-color: #e2e6ea;
}

/* Remove button */
.remove-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    width: fit-content;
    transition: background 0.2s;
}

.remove-btn:hover {
    background-color: #c82333;
}

/* Cart Summary */
.cart-summary-box {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    margin-top: 30px;
    text-align: center;
}

.cart-summary-box .summary-total {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.checkout-btn {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-btn:hover {
    background-color: #218838;
    color: #ddd;
}

/* Stock count / out of stock */
.stock-count, .stock-out {
    font-size: 14px;
    margin-top: 6px;
    font-weight: 500;
}

.stock-out {
    color: #dc3545;
}

/* Full-page height fix */
html, body {
    height: 100%;
    margin: 0;
}

/* Wrapper forces footer down */
.page-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Make cart area stretch */
.cart-container {
    flex: 1; /* Pushes footer down */
}

/* ============================
   EMPTY CART DESIGN
============================ */

.empty-cart-box {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 420px;
    margin: 40px auto;
}

.empty-cart-box img {
    width: 160px;
    margin-bottom: 20px;
    opacity: 0.95;
}

.empty-cart-box h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.empty-cart-box p {
    font-size: 15px;
    color: #777;
    margin-bottom: 20px;
}

.continue-btn {
    display: inline-block;
    padding: 10px 22px;
    background: #dc3545;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background .2s;
}

.continue-btn:hover {
    background: #c82333;
}



/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cart-item img {
        width: 120px;
        height: 120px;
    }

    .cart-item-details {
        align-items: center;
    }
}

/* ============================
   Desktop Horizontal Layout
============================ */

@media (min-width: 992px) {

    .cart-item {
        display: grid;
        grid-template-columns: 100px 1fr 120px 150px 120px 80px;
        align-items: center;
        gap: 20px;
        padding: 15px;
    }

    /* Image */
    .cart-item img {
        width: 100px;
        height: 100px;
    }

    /* Name + small details */
    .cart-item-details {
        align-items: flex-start;
        text-align: left;
    }

    .cart-item-details h5 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 6px;
    }

    /* Price (single item price) */
    .cart-price {
        font-size: 18px;
        color: #d9534f;
        font-weight: 600;
    }

    /* Quantity */
    .qty-box {
        justify-content: center;
    }

    .qty-input {
        width: 50px;
    }

    /* Total price (qty × price) */
    .item-total {
        font-size: 18px;
        font-weight: 700;
        color: #333;
        text-align: right;
    }

    /* Remove button */
    .remove-btn {
        justify-self: end;
        margin-top: 0;
    }

    /* Summary Box moves to RIGHT SIDE */
    .cart-summary-wrapper {
        display: flex;
        justify-content: flex-end;
    }

    .cart-summary-box {
        width: 350px;
        text-align: left;
    }

}
