﻿.cart_area {
    direction: rtl;
    font-family: "Vazirmatn", "IRANSans", Tahoma, sans-serif;
    color: #2b2b2b;
}

.section-padding {
    padding: 80px 0;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.cart_inner {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(20, 30, 50, 0.06);
    padding: 24px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.cart_inner .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
}

    .cart_inner .table thead th {
        background: #f7f8fa;
        color: #1f2733;
        font-weight: 700;
        font-size: 15px;
        padding: 16px 14px;
        border: none;
        white-space: nowrap;
    }

        .cart_inner .table thead th:first-child {
            border-radius: 0 12px 12px 0;
        }

        .cart_inner .table thead th:last-child {
            border-radius: 12px 0 0 12px;
        }

    .cart_inner .table tbody td {
        padding: 18px 14px;
        vertical-align: middle;
        border-bottom: 1px solid #f0f2f5;
        font-size: 14px;
        color: #44505f;
    }

    .cart_inner .table tbody tr:hover td {
        background: #fbfcfe;
    }

.cart_inner .media {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-start;
    text-align: right;
}

    .cart_inner .media img {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid #eef0f3;
        background: #fafbfc;
    }

.cart_inner .media-body a {
    color: #1f2733;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    max-width: 260px;
}

    .cart_inner .media-body a:hover {
        color: #2d6cdf;
    }

.cart_inner h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1f2733;
    white-space: nowrap;
}

    .cart_inner h5 span {
        font-size: 12px;
        font-weight: 500;
        color: #8a94a3;
        margin-right: 4px;
    }

.totalprice,
#totalprice {
    color: #2d6cdf;
}

.product_count {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    vertical-align: middle;
    direction: ltr; /* keep controls ordered LTR inside this component */
    gap: 6px;
    padding: 2px;
}

    .product_count .input-number {
        width: 44px;
        height: 38px;
        text-align: center;
        border: none;
        outline: none;
        font-size: 14px;
        font-weight: 700;
        color: #1f2733;
        background: transparent;
    }

.input-number-decrement,
.input-number-increment {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5a6573;
    background: #f7f8fa;
    transition: background 0.2s ease, color 0.2s ease;
    user-select: none;
}

    .input-number-decrement:hover,
    .input-number-increment:hover {
        background: #2d6cdf;
        color: #fff;
    }

.trash-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    border-radius: 10px;
    color: #e2495a;
    background: #fdecee;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    vertical-align: middle;
}

    .trash-box:hover {
        background: #e2495a;
        color: #fff;
    }

.cart_inner .last-tr td {
    background: #f7f8fa;
    padding: 20px 14px;
    border-bottom: none;
}

.cart_inner .last-tr h5 {
    font-size: 18px;
}

.cart_inner .last-tr #totalprice {
    font-size: 20px;
}

.checkout_btn_inner {
    margin-top: 24px;
    display: flex;
    justify-content: flex-start;
}

.float-right {
}

.checkout_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2d6cdf;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 36px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 20px rgba(45, 108, 223, 0.25);
}

    .checkout_btn:hover {
        background: #1f57bd;
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(45, 108, 223, 0.35);
    }

    .checkout_btn:active {
        transform: translateY(0);
    }

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }

    .cart_inner {
        padding: 14px;
    }

        .cart_inner .table thead th,
        .cart_inner .table tbody td {
            padding: 12px 8px;
            font-size: 13px;
        }

        .cart_inner .media-body a {
            max-width: 160px;
            font-size: 13px;
        }

        .cart_inner .media img {
            width: 56px;
            height: 56px;
        }

    .checkout_btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile: adjust quantity + trash layout */
    .cart_inner .table tbody td .product_count {
        direction: rtl; /* restore rtl ordering on small screens */
        gap: 6px;
        padding: 0 4px;
    }

        .cart_inner .table tbody td .product_count .input-number {
            width: 36px;
            height: 34px;
            font-size: 13px;
        }

    .cart_inner .table tbody td .trash-box {
        width: 34px;
        height: 34px;
        margin-left: 0;
        margin-right: 8px; /* place trash near controls in RTL */
    }
}
