﻿/* ===== View Cart Page Styles ===== */

.table th img,
.table td img {
    width: 60%;
    height: 100%;
    border-radius: 0px;
}

/* ===== Cart Table - Professional Styles (Red Theme) ===== */

.cart_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.cart_table thead {
    background: #fff5f5;
}

.cart_table thead th {
    padding: 18px 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9b2c2c;
    border-bottom: 1px solid #fecaca;
    text-align: left;
    white-space: nowrap;
}

.cart_table thead th.product-remove {
    width: 50px;
    text-align: center;
}

/* Body rows */
.cart_table tbody tr.cart_item {
    transition: background-color 0.2s ease;
}

.cart_table tbody tr.cart_item:hover {
    background-color: #fffafa;
}

.cart_table tbody td {
    padding: 20px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #fee2e2;
    color: #212529;
    font-size: 15px;
}

/* Product Image */
.cart_table .product-thumbnail {
    width: 100px;
}

.cart_table .product-thumbnail img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #fecaca;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart_table .product-thumbnail a:hover img {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Product Name */
.cart_table .product-name,
.cart_table td:nth-child(2) {
    font-weight: 500;
    color: #212529;
    max-width: 280px;
}

.cart_table td:nth-child(2) a {
    color: #212529;
    text-decoration: none;
}

.cart_table td:nth-child(2) a:hover {
    color: #dc3545;
}

/* Price */
.cart_table .product-price {
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

.cart_table .product-price del {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #adb5bd;
    margin-top: 4px;
}

/* Quantity Input */
.cart_table .product-quantity .quantity {
    display: inline-flex;
    align-items: center;
}

.cart_table .product-quantity input[type="number"] {
    width: 70px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #212529;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.cart_table .product-quantity input[type="number"]::-webkit-outer-spin-button,
.cart_table .product-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart_table .product-quantity input[type="number"]:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Subtotal */
.cart_table .product-subtotal {
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

.cart_table .product-subtotal span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #dc3545;
    margin-top: 4px;
}

/* Remove button */
.cart_table .product-remove {
    text-align: center;
    width: 50px;
}

.cart_table .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #f87171;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart_table .product-remove a:hover {
    background: #fee2e2;
    color: #dc3545;
}

/* Actions row (Update Cart button) */
.cart_table tbody tr:last-child td {
    border-bottom: none;
    padding: 24px 16px;
    background: #fff5f5;
}

.cart_table .actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #dc3545;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.cart_table .actions .button:hover {
    background: #bb2d3b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

.cart_table .actions .button:active {
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .cart_table thead {
        display: none;
    }

    .cart_table,
    .cart_table tbody,
    .cart_table tr,
    .cart_table td {
        display: block;
        width: 100%;
    }

    .cart_table tbody tr.cart_item {
        position: relative;
        padding: 20px 16px 20px 110px;
        margin-bottom: 16px;
        border: 1px solid #fecaca;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.08);
    }

    .cart_table tbody tr.cart_item:hover {
        background: #fff;
    }

    .cart_table .product-thumbnail {
        position: absolute;
        left: 16px;
        top: 20px;
        width: 80px;
        padding: 0;
        border: none;
    }

    .cart_table .product-thumbnail img {
        width: 80px;
        height: 80px;
    }

    .cart_table td {
        padding: 6px 0;
        border: none;
        text-align: left !important;
    }

    .cart_table td::before {
        content: attr(data-title);
        display: inline-block;
        width: 90px;
        font-size: 12px;
        font-weight: 600;
        color: #9b2c2c;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .cart_table td:nth-child(2)::before {
        content: "Product";
    }

    .cart_table .product-price::before {
        content: "Price";
    }

    .cart_table .product-quantity::before {
        content: "Qty";
    }

    .cart_table .product-subtotal::before {
        content: "Subtotal";
    }

    .cart_table .product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
        padding: 0;
    }

    .cart_table .product-remove a {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .cart_table tbody tr:last-child {
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .cart_table tbody tr:last-child td {
        padding: 16px 0 0;
        background: transparent;
    }

    .cart_table .actions .col-sm-12 {
        text-align: center !important;
    }

    .cart_table .actions .button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 575px) {
    .cart_table tbody tr.cart_item {
        padding-left: 100px;
    }

    .cart_table .product-thumbnail {
        left: 12px;
    }

    .cart_table .product-thumbnail img {
        width: 70px;
        height: 70px;
    }
}
