/**
 * Carrito — layout móvil mejorado.
 * Escritorio (≥992px): sin cambios; se respeta theme.css.
 */

@media (max-width: 991.98px) {
    body.cart-page .nexlap-cart-page__scroll {
        max-height: none;
        overflow: visible;
    }

    body.cart-page .nexlap-cart-page__list .table {
        margin-bottom: 0;
    }

    body.cart-page .nexlap-cart-page__list .table thead {
        display: none;
    }

    body.cart-page .nexlap-cart-page__list .table tbody tr.nexlap-cart-page-item {
        display: block;
        position: relative;
        margin-bottom: 1rem;
        padding: 1rem 1rem 1rem 0.75rem;
        border: 1px solid #eceeef;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(51, 62, 72, 0.06);
    }

    body.cart-page .nexlap-cart-page__list .table tbody tr.nexlap-cart-page-item td {
        display: block;
        width: 100%;
        padding: 0;
        border: none !important;
        text-align: left;
    }

    body.cart-page .nexlap-cart-page__list .table tbody tr.nexlap-cart-page-item td::before {
        display: none !important;
        content: none !important;
    }

    body.cart-page .nexlap-cart-page__list .table tbody tr:first-child td {
        padding-top: 0;
    }

    body.cart-page .nexlap-cart-page__list .table tbody tr td {
        padding: 0;
    }

    /* Eliminar */
    body.cart-page .nexlap-cart-page-item__remove {
        position: absolute;
        top: 0.65rem;
        right: 0.5rem;
        width: auto;
        text-align: right;
    }

    body.cart-page .nexlap-cart-page-item__remove .btn-link {
        line-height: 1;
        min-width: 2rem;
        min-height: 2rem;
    }

    /* Producto: imagen + nombre */
    body.cart-page .nexlap-cart-page-item__product {
        padding-right: 2rem;
        margin-bottom: 0.85rem;
    }

    body.cart-page .nexlap-cart-page-item__product-inner {
        display: flex;
        align-items: flex-start;
        gap: 0.85rem;
    }

    body.cart-page .nexlap-cart-page-item__thumb-mobile {
        flex: 0 0 4.5rem;
        width: 4.5rem;
        height: 4.5rem;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid #eceeef;
        background: #f7f8fa;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.cart-page .nexlap-cart-page-item__img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body.cart-page .nexlap-cart-page-item__img-placeholder {
        color: #b0b8c0;
        font-size: 1.25rem;
    }

    body.cart-page .nexlap-cart-page-item__info {
        flex: 1;
        min-width: 0;
    }

    body.cart-page .nexlap-cart-page-item__name {
        display: block;
        font-size: 0.9375rem;
        font-weight: 600;
        line-height: 1.35;
        margin-bottom: 0.25rem;
    }

    body.cart-page .nexlap-cart-page-item__unit-price {
        display: block;
        font-size: 0.8125rem;
        color: #77838f;
    }

    /* Fila inferior: cantidad | total */
    body.cart-page .nexlap-cart-page-item__qty,
    body.cart-page .nexlap-cart-page-item__total {
        display: inline-block;
        width: auto;
        vertical-align: middle;
    }

    body.cart-page .nexlap-cart-page-item__qty {
        width: 58%;
        padding-top: 0.75rem;
        border-top: 1px solid #eceeef;
    }

    body.cart-page .nexlap-cart-page-item__qty::before {
        display: block !important;
        content: 'Cantidad' !important;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #77838f;
        margin-bottom: 0.35rem;
    }

    body.cart-page .nexlap-cart-page-item__total {
        width: 42%;
        text-align: right;
        padding-top: 0.75rem;
        border-top: 1px solid #eceeef;
        float: right;
    }

    body.cart-page .nexlap-cart-page-item__total::before {
        display: block !important;
        content: 'Total' !important;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #77838f;
        margin-bottom: 0.35rem;
    }

    body.cart-page .nexlap-cart-page-item__total-value {
        font-size: 1.0625rem;
    }

    body.cart-page .nexlap-cart-page-qty {
        justify-content: flex-start;
    }

    body.cart-page .nexlap-cart-page__empty {
        display: block !important;
        border: 1px dashed #dde2e8;
        border-radius: 10px;
        padding: 2rem 1rem !important;
    }

    /* Resumen del pedido */
    body.cart-page .nexlap-cart-summary {
        margin-top: 0.5rem;
    }

    body.cart-page .nexlap-cart-summary > .row > [class*='col-'] {
        margin-left: 0 !important;
        max-width: 100%;
        flex: 0 0 100%;
    }

    body.cart-page .nexlap-cart-summary__box {
        text-align: center;
        border-bottom: 1px solid #eceeef !important;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem !important;
    }

    body.cart-page .nexlap-cart-summary__table {
        width: 100%;
        margin-bottom: 0;
    }

    body.cart-page .nexlap-cart-summary__table tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f2f4;
    }

    body.cart-page .nexlap-cart-summary__table tr:last-child {
        border-bottom: none;
        padding-top: 0.75rem;
        margin-top: 0.25rem;
        border-top: 2px solid #eceeef;
    }

    body.cart-page .nexlap-cart-summary__table th,
    body.cart-page .nexlap-cart-summary__table td {
        display: block;
        width: auto;
        padding: 0;
        border: none;
        font-size: 0.9375rem;
    }

    body.cart-page .nexlap-cart-summary__table td {
        text-align: right;
        font-weight: 600;
    }

    body.cart-page .nexlap-cart-summary__table .order-total th,
    body.cart-page .nexlap-cart-summary__table .order-total td {
        font-size: 1.125rem;
        font-weight: 700;
    }

    body.cart-page .nexlap-cart-summary__table .shipping td {
        font-size: 0.8125rem;
        font-weight: 400;
        max-width: 65%;
        line-height: 1.35;
    }

    body.cart-page .nexlap-cart-summary__actions {
        position: sticky;
        bottom: 0;
        z-index: 10;
        padding: 0.75rem 0 0.25rem;
        background: linear-gradient(to top, #fff 85%, rgba(255, 255, 255, 0));
    }

    body.cart-page h1.text-center {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    body.cart-page .breadcrumb {
        font-size: 0.8125rem;
    }
}

/* Limpiar float en items */
@media (max-width: 991.98px) {
    body.cart-page .nexlap-cart-page-item::after {
        content: '';
        display: table;
        clear: both;
    }
}
