/* Business directories for Port Market and competitor products. */
.products-table-panel,
.competitor-products-panel {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.products-data-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
}

.our-products-table { width: 100%; min-width: 1040px; table-layout: fixed; }
.our-products-table th,
.our-products-table td { min-width: 0; vertical-align: middle; }
.our-products-table th:nth-child(1), .our-products-table td:nth-child(1) { width: 8%; }
.our-products-table th:nth-child(2), .our-products-table td:nth-child(2) { width: 30%; }
.our-products-table th:nth-child(3), .our-products-table td:nth-child(3) { width: 9%; }
.our-products-table th:nth-child(4), .our-products-table td:nth-child(4) { width: 9%; }
.our-products-table th:nth-child(5), .our-products-table td:nth-child(5) { width: 7%; }
.our-products-table th:nth-child(6), .our-products-table td:nth-child(6) { width: 11%; }
.our-products-table th:nth-child(7), .our-products-table td:nth-child(7) { width: 9%; }
.our-products-table th:nth-child(8), .our-products-table td:nth-child(8) { width: 8%; }
.our-products-table th:nth-child(9), .our-products-table td:nth-child(9) { width: 9%; }
.our-products-table th:nth-child(n+3),
.our-products-table td:nth-child(n+3) { text-align: center; }
.product-code-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.our-products-table .product-name-cell { min-width: 0; }
.our-products-table .product-name-cell a { display: block; color: inherit; text-decoration: none; }
.our-products-table .product-name-cell strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.32; overflow-wrap: anywhere; }
.our-products-table .product-name-cell a:hover strong { text-decoration: underline; }
.product-directory-meta { display: block; margin-top: 3px; overflow: hidden; color: var(--text-muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.our-products-table .num,
.our-products-table .money-cell,
.our-products-table .catalog-data-quality,
.our-products-table .catalog-matched-count,
.our-products-table .catalog-active-request,
.our-products-table td:last-child { white-space: nowrap; }
.our-products-table .money-cell { font-variant-numeric: tabular-nums; }
.catalog-data-chip,
.catalog-position-chip { max-width: 100%; padding: 3px 7px; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 10px; font-weight: 700; background: var(--surface-secondary); border-radius: 999px; }
.catalog-data-chip.is-ok { color: var(--success); background: var(--success-soft); }
.catalog-data-chip.is-error { color: var(--danger); background: var(--danger-soft); }
.catalog-data-chip.is-warning { color: var(--warning, var(--text-secondary)); background: var(--warning-soft, var(--surface-tertiary)); }
.catalog-data-chip.is-muted,
.catalog-data-chip.is-loading { color: var(--text-muted); }
.catalog-more-filters { min-width: 190px; align-self: end; }
.catalog-more-filters summary { min-height: 36px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 11px; font-weight: 650; cursor: pointer; background: var(--surface-secondary); border: 1px solid var(--border-subtle); border-radius: 8px; list-style: none; }
.catalog-more-filters summary::-webkit-details-marker { display: none; }
.catalog-more-filters summary::after { content: "⌄"; color: var(--text-muted); }
.catalog-more-filters[open] summary::after { transform: rotate(180deg); }
.catalog-more-fields { position: static; min-width: 0; width: 100%; margin-top: 7px; }

/* Competitor catalog: one nine-column contract that fills the card and scrolls internally only when necessary. */
.competitor-products-table {
    width: 100%;
    min-width: 1120px;
    table-layout: fixed;
    font-size: 11.5px;
}
.competitor-products-table th,
.competitor-products-table td { min-width: 0; padding: 9px 10px; vertical-align: middle; }
.competitor-products-table th { font-size: 10.5px; line-height: 1.25; }
.competitor-products-table th:nth-child(1) { width: 26%; }
.competitor-products-table th:nth-child(2) { width: 9%; }
.competitor-products-table th:nth-child(3) { width: 16%; }
.competitor-products-table th:nth-child(4),
.competitor-products-table th:nth-child(5),
.competitor-products-table th:nth-child(6) { width: 8%; }
.competitor-products-table th:nth-child(7) { width: 10%; }
.competitor-products-table th:nth-child(8) { width: 8%; }
.competitor-products-table th:nth-child(9) { width: 7%; }
.competitor-products-table td { overflow: hidden; text-overflow: ellipsis; }
.competitor-product-name strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.competitor-products-table .store-name-cell > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.35; overflow-wrap: anywhere; }
.competitor-products-table .money-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.competitor-availability { min-width: 0; }
.competitor-availability strong,
.competitor-availability span { display: block; }
.competitor-availability strong { font-size: 11px; line-height: 1.25; }
.competitor-availability span { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.25; white-space: nowrap; }
.competitor-availability .is-in-stock { color: var(--success); }
.competitor-availability .is-out-of-stock { color: var(--danger); }
.competitor-availability .is-unknown { color: var(--text-muted); }

@media (max-width: 900px) {
    .our-products-table { min-width: 980px; }
    .competitor-products-table { min-width: 1060px; }
}


/* Customer feedback: keep primary catalog actions on the search row on wide screens only. */
@media (min-width: 1100px) {
    .catalog-inline-actions--our {
        grid-template-columns: repeat(4, minmax(120px, 1fr)) max-content;
    }
    .catalog-inline-actions--retailer {
        grid-template-columns: repeat(5, minmax(110px, 1fr)) max-content;
    }
    .catalog-inline-actions--our > .pm-filter-actions {
        grid-column: 5;
        grid-row: 1;
    }
    .catalog-inline-actions--retailer > .pm-filter-actions {
        grid-column: 6;
        grid-row: 1;
    }
    .catalog-inline-actions > .pm-filter-actions {
        align-self: end;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-top: 0;
        white-space: nowrap;
    }
    .catalog-inline-actions > .pm-more-filters {
        grid-column: 1 / -1;
    }
}
