/**
 * Shared commerce data tables (ARCH2): table shell, catalog table and quick-order / ProductRow table.
 * Neutral table shell: .dc-data-table-shell (cart lines card shares surface chrome).
 * Cart lines live in cart-lines.css and the quantity steppers in stepper.css (both load after this sheet).
 */

.dc-cart__lines-card,
.dc-data-table-shell {
    overflow: hidden;
}

.dc-data-table-shell {
    background: var(--dc-blanco);
    border: var(--dc-border-width) solid var(--dc-ceniza, var(--ab2b-border));
    border-radius: var(--dc-radius-card);
}

/* B1: shell class is semantic only — card chrome lives on the table scroll, not the wrap. */
.dc-quick-order-table-wrap.dc-data-table-shell {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.dc-catalog-table-wrap {
    overflow-x: auto;
}

.dc-catalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--dc-size-body-s);
}

.dc-catalog-table__head .dc-catalog-table__cell {
    padding: var(--dc-space-3) var(--dc-space-4);
    text-align: left;
    font-size: 0.75rem;
    font-weight: var(--dc-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dc-gris);
    background: var(--dc-hueso);
    border-bottom: var(--dc-border-width) solid var(--ab2b-border);
}

.dc-catalog-table__body .dc-catalog-table__row:nth-child(even) {
    background: rgba(245, 243, 239, 0.45);
}

.dc-catalog-table__body .dc-catalog-table__row:hover {
    background: rgba(196, 214, 176, 0.35);
}

.dc-catalog-table__cell {
    padding: var(--dc-space-3) var(--dc-space-4);
    vertical-align: middle;
    border-bottom: var(--dc-border-width) solid var(--ab2b-border);
}

.dc-catalog-table__cell--thumb {
    width: 3.5rem;
}

.dc-catalog-table__thumb .dc-product-thumb {
    width: 2.5rem;
    height: 2.5rem;
}

.dc-catalog-table__cell--ref {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dc-catalog-table__cell--price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dc-catalog-table__cell--price-locked .dc-price--locked {
    justify-content: flex-end;
}

/**
 * ProductRow table (A3-2 / B1) — real <table> + colgroup; maqueta column px widths.
 */
.ab2b-quick-order-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ab2b-quick-order-table {
    --dc-product-row-scroll-min: 50rem;
    table-layout: fixed;
    width: 100%;
    min-width: var(--dc-product-row-scroll-min);
    border-collapse: collapse;
    box-shadow: none;
}

.ab2b-quick-order-table .dc-product-row-col--thumb {
    width: 2.5rem;
}

.ab2b-quick-order-table .dc-product-row-col--ref {
    width: 7rem;
}

.ab2b-quick-order-table .dc-product-row-col--content {
    width: 5.25rem;
}

.ab2b-quick-order-table .dc-product-row-col--stock {
    width: 7.25rem;
}

.ab2b-quick-order-table .dc-product-row-col--pvd {
    width: 4.75rem;
}

.ab2b-quick-order-table .dc-product-row-col--m2 {
    width: 3.625rem;
}

.ab2b-quick-order-table .dc-product-row-col--qty {
    width: 8.75rem;
}

.ab2b-quick-order-table .dc-product-row-col--subtotal {
    width: 4.375rem;
}

.ab2b-quick-order-table .dc-product-row-col--actions {
    width: 3.125rem;
}

.ab2b-quick-order-table .dc-quick-order-table__head-row th {
    box-sizing: border-box;
    height: 2.75rem;
    padding: 0 var(--dc-space-3);
    font-size: var(--dc-size-caption);
    letter-spacing: 0.0625rem;
    text-transform: uppercase;
    font-weight: var(--dc-weight-semibold);
    color: var(--dc-gris, var(--ab2b-muted));
    white-space: nowrap;
    vertical-align: middle;
    background: var(--dc-hueso, var(--ab2b-surface));
    border-bottom: 1px solid var(--dc-ceniza, var(--ab2b-border));
}

.ab2b-quick-order-table .dc-quick-order-table__group-title {
    height: 2.5rem;
    padding: 0 var(--dc-space-3);
    font-size: var(--dc-size-caption);
    letter-spacing: var(--dc-ls-caption);
    text-transform: uppercase;
    font-weight: var(--dc-weight-semibold);
    color: var(--dc-gris, var(--ab2b-muted));
}

.ab2b-quick-order-table .dc-quick-order-table__col--pvd,
.ab2b-quick-order-table .dc-quick-order-table__col--m2 {
    text-align: right;
}

.ab2b-quick-order-table .dc-quick-order-row__cell {
    padding: var(--dc-space-2) var(--dc-space-3);
    min-height: 3.5rem;
    box-sizing: border-box;
    overflow: hidden;
    vertical-align: middle;
    background: var(--dc-blanco, var(--ab2b-surface));
    border-bottom: 1px solid var(--dc-ceniza, var(--ab2b-border));
}

.ab2b-quick-order-table tbody tr.dc-quick-order-row:nth-child(even of .dc-quick-order-row) .dc-quick-order-row__cell {
    background: var(--dc-hueso-a50, rgba(246, 245, 239, 0.5));
}

.ab2b-quick-order-table tbody .dc-quick-order-row.is-active .dc-quick-order-row__cell {
    background: rgba(233, 245, 210, 0.3);
}

.ab2b-quick-order-table .dc-quick-order-row__cell--ref {
    font-size: var(--dc-size-caption);
    font-weight: var(--dc-weight-semibold);
    letter-spacing: 0.01875rem;
    text-transform: uppercase;
    color: var(--dc-gris, var(--ab2b-muted));
    white-space: nowrap;
}

.ab2b-quick-order-table .dc-quick-order-row__cell--name {
    min-width: 0;
}

.ab2b-quick-order-table .dc-quick-order-row__name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--dc-size-body-s);
    font-weight: var(--dc-weight-medium);
    line-height: 1.25;
}

.ab2b-quick-order-table .dc-quick-order-row__subtitle {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--dc-size-small);
    line-height: var(--dc-lh-h2);
    color: var(--dc-gris, var(--ab2b-muted));
    text-transform: none;
    letter-spacing: normal;
}

.ab2b-quick-order-table .dc-quick-order-row__cell--content {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--dc-gris, var(--ab2b-muted));
}

.ab2b-quick-order-table .dc-quick-order-row__cell--pvd,
.ab2b-quick-order-table .dc-quick-order-row__cell--m2,
.ab2b-quick-order-table .dc-quick-order-row__cell--subtotal {
    text-align: right;
}

.ab2b-quick-order-table .dc-quick-order-row__cell--pvd .dc-price {
    justify-content: flex-end;
}

.ab2b-quick-order-table .dc-quick-order-row__cell--actions {
    text-align: center;
    padding-inline: var(--dc-space-1);
}

.ab2b-quick-order-table .dc-quick-order-row__add-line {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
    border-radius: var(--dc-radius-pill);
}

.ab2b-quick-order-table .dc-quick-order-row__add-line .dc-icon {
    width: 1rem;
    height: 1rem;
}

.ab2b-quick-order-table .dc-quick-order-row__m2-price {
    font-size: var(--dc-size-small);
    color: var(--dc-gris, var(--ab2b-muted));
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .ab2b-quick-order-table .dc-quick-order-row__add-line {
        margin-inline: auto;
    }
}
