/* پرشین پت — سبد خرید (نمای XShop ViewBasket؛ فقط با CSS) */

#frm_panelBasket {
    padding-top: 32px;
}

#frm_panelBasket::before {
    content: "سبد خرید شما";
    display: block;
    font-family: var(--pp-display);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.15;
    padding-bottom: 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--pp-line);
}

/*#region table */
#frm_panelBasket .table-responsive {
    overflow: visible;
}

table.basket {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
}

table.basket > :not(caption) > * > * {
    border-width: 0;
    border-bottom: 1px solid var(--pp-line);
    padding: 22px 12px;
    vertical-align: middle;
    background: transparent;
    box-shadow: none;
}

/* bootstrap 5.1 بین بخش‌های جدول خط ضخیم می‌کشد */
table.basket > :not(:first-child) {
    border-top: 0;
}

table.basket > thead > tr > th {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pp-muted);
}

table.basket > tbody > tr > td:first-child {
    padding-right: 0;
}

table.basket > tbody td > a {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--pp-ink);
    font-weight: 500;
}

table.basket > tbody td > a > img {
    flex: none;
    width: 96px;
    height: 120px;
    object-fit: cover;
    background: var(--pp-canvas);
    border-radius: var(--pp-radius);
}

table.basket > tbody td > a:hover > span {
    color: var(--pp-accent);
}

table.basket > tbody td:nth-child(2),
table.basket > tbody td:nth-child(4) {
    white-space: nowrap;
}

table.basket > tbody td:nth-child(4) {
    font-weight: 600;
}

table.basket input[type=number] {
    width: 72px;
    height: 44px;
    border: 1px solid var(--pp-line-2);
    border-radius: var(--pp-btn-radius);
    background: var(--pp-surface);
    text-align: center;
    font: inherit;
}

table.basket > tbody td:last-child {
    white-space: nowrap;
}

table.basket > tbody td:last-child > .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--pp-line);
    border-radius: 999px !important;
    background: transparent;
}

table.basket > tfoot td {
    font-weight: 600;
    font-size: 17px;
    border-bottom: 0;
}
/*#endregion */

/*#region actions */
#frm_panelBasket > div:not(.table-responsive) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

#frm_panelBasket > div:not(.table-responsive) > .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    border-radius: var(--pp-btn-radius) !important;
}

#frm_panelBasket > div:not(.table-responsive) > .btn-success {
    margin-right: auto;
    min-height: 56px;
    padding: 0 48px;
    font-size: 16px;
}

/* سبد خالی */
#frm_panelBasket > div:not(.table-responsive):last-child {
    display: block;
    padding: 56px 0;
}

#frm_panelBasket > div:last-child > h2 {
    display: none;
}

#frm_panelBasket > div:last-child > p {
    font-size: 17px;
    color: var(--pp-muted) !important;
}
/*#endregion */

/*#region responsive */
@media (max-width: 767.98px) {
    #frm_panelBasket::before {
        font-size: 28px;
    }

    table.basket > thead {
        display: none;
    }

    table.basket, table.basket > tbody, table.basket > tfoot {
        display: block;
    }

    table.basket > tbody > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 18px 0;
        border-bottom: 1px solid var(--pp-line);
    }

    table.basket > tbody > tr > td {
        padding: 0 !important;
        border: 0 !important;
    }

    table.basket > tbody > tr > td:first-child {
        grid-column: 1 / -1;
    }

    table.basket > tbody td > a > img {
        width: 72px;
        height: 90px;
    }

    table.basket > tbody > tr > td:nth-child(2) {
        display: none;
    }

    table.basket > tbody > tr > td:nth-child(4) {
        align-self: center;
        text-align: left;
    }

    table.basket > tfoot > tr {
        display: flex;
        justify-content: space-between;
    }

    table.basket > tfoot td:empty {
        display: none;
    }

    #frm_panelBasket > div:not(.table-responsive) > .btn {
        flex: 1 1 45%;
        justify-content: center;
    }

    #frm_panelBasket > div:not(.table-responsive) > .btn-success {
        flex-basis: 100%;
        order: -1;
        margin: 0;
    }
}
/*#endregion */
