/* =========================
   CART PAGE — DESKTOP FIRST
========================= */

.cart-container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 20px;
}

.cart-container h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}

/* ===== TABLE ===== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 🔑 IMPORTANT */
    background: #fff;
}

/* Column widths (DESKTOP) */
.cart-table th:nth-child(1),
.cart-table td:nth-child(1) {
    width: 40%;
}

.cart-table th:nth-child(2),
.cart-table td:nth-child(2) {
    width: 15%;
}

.cart-table th:nth-child(3),
.cart-table td:nth-child(3) {
    width: 15%;
}

.cart-table th:nth-child(4),
.cart-table td:nth-child(4) {
    width: 15%;
}

.cart-table th:nth-child(5),
.cart-table td:nth-child(5) {
    width: 15%;
}

/* Headers */
.cart-table th {
    background: #000;
    color: #fff;
    padding: 14px;
    font-size: 13px;
    text-transform: uppercase;
    text-align: left;
}

/* Cells */
.cart-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    text-align: left;
}

/* ===== PRODUCT CELL ===== */
.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
}

.cart-product img {
    width: 100px;
    height: auto;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.cart-product span {
    white-space: nowrap;
    /* overflow: hidden; */
    text-overflow: ellipsis;
}

/* ===== QUANTITY ===== */
.quantity-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ===== REMOVE ===== */
.remove-btn {
    background: transparent;
    border: 1px solid #cc0000;
    color: #cc0000;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.remove-btn:hover {
    background: #cc0000;
    color: #fff;
}

/* ===== SUMMARY ===== */
.cart-summary {
    max-width: 350px;
    margin-left: auto;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 20px;
}

.checkout-btn {
    display: block;
    width: 100%;
    background: #111;
    color: #fff;
    padding: 14px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.checkout-btn:hover {
    background: #333;
}

/* ===== EMPTY CART ===== */
.empty-cart {
    text-align: center;
    margin-top: 40px;
    font-size: 18px;
    color: #777;
}

/* ===== TOAST ===== */
#cart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        margin-bottom: 20px;
        border-bottom: 2px solid #eee;
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
    }

    .cart-summary {
        max-width: 100%;
    }
}
