.tobor-accessory-list {
    width: 100%;
    padding: 64px 96px;
    background: #fff;
    color: #171717;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.tobor-accessory-list__inner {
    width: 100%;
    max-width: 1248px;
    margin: 0 auto;
}

.tobor-accessory-list__intro {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.tobor-accessory-list__heading {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
}

.tobor-accessory-list__description,
.tobor-accessory-list__description p {
    margin: 0;
    color: #525252;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.tobor-accessory-list__group + .tobor-accessory-list__group {
    margin-top: 32px;
}

.tobor-accessory-list__group-title {
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #f8fafc;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.tobor-accessory-list__scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tobor-accessory-list__scroll:focus-visible {
    outline: 2px solid #506ccd;
    outline-offset: 2px;
}

.tobor-accessory-list__table {
    width: 100%;
    min-width: 1248px;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.tobor-accessory-list__table th,
.tobor-accessory-list__table td {
    padding: 16px 24px;
    border: 0;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    text-align: left;
    vertical-align: middle;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #525252;
}

.tobor-accessory-list__table thead th {
    height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
    color: #171717;
    font-weight: 500;
}

.tobor-accessory-list__table th:first-child {
    width: 249px;
}

.tobor-accessory-list__table--product th:first-child {
    width: 361px;
}

.tobor-accessory-list__table--product thead th:nth-child(2) {
    width: 139px;
}

/* 214px, not 198px: "Non-Tactile/Tactile/" has to fit on the first line with
   "Vision-Tactile" below it (BugHerd #57). The 16px comes off the Hand Type
   column so the table's total width is unchanged. */
.tobor-accessory-list__table--product thead th:nth-child(3) {
    width: 214px;
}

.tobor-accessory-list__table--product thead th:nth-child(4) {
    width: 170px;
}

/* Tables with fewer than the 5 Figma columns (e.g. Compute Board Expansion)
   ignore those pixel widths (BugHerd #45). The nth-child rules above outrank a
   bare `th` selector, so they have to be overridden by name or the value columns
   stay pinned at 139/214/170px and the product column swallows the remaining
   ~725px (BugHerd #68). The product column keeps a fixed width for its
   thumbnail and View Details link; the value columns share what is left. */
.tobor-accessory-list__table:not(.tobor-accessory-list__table--cols-5) th:first-child {
    width: 320px;
}

.tobor-accessory-list__table:not(.tobor-accessory-list__table--cols-5) thead th:nth-child(n+2) {
    width: auto;
}

.tobor-accessory-list__product strong {
    display: block;
    color: #171717;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.tobor-accessory-list__product {
    height: 80px;
}

.tobor-accessory-list__product-content {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tobor-accessory-list__product-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.tobor-accessory-list__product a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #506ccd;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
}

.tobor-accessory-list__product a:hover {
    text-decoration: underline;
}

.tobor-accessory-list__product a img {
    display: block;
    width: 16px;
    height: 16px;
}

.tobor-accessory-list__table td {
    height: 80px;
}

.tobor-accessory-list__table td:first-of-type {
    display: table-cell;
}

.tobor-accessory-list__image {
    display: block;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.tobor-accessory-list__accessory {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

.tobor-accessory-list__empty {
    margin: 0;
    padding: 24px;
    border: 1px dashed #cbd5e1;
    color: #525252;
}

@media (max-width: 1024px) {
    .tobor-accessory-list {
        padding: 64px 32px;
    }
}

/* Scroll indicator under each mobile card row (Figma 3315:36866). Hidden on
   desktop, where the tables are not card-scrolled. */
.tobor-accessory-list__scrollbar {
    display: none;
}

@media (max-width: 767px) {
    .tobor-accessory-list {
        padding: 32px 16px;
    }

    .tobor-accessory-list__heading {
        font-size: 28px;
        line-height: 32px;
    }

    /* Mobile group title is plain text, not the desktop grey table bar. */
    .tobor-accessory-list__group-title {
        margin-bottom: 16px;
        padding: 0;
        border-bottom: 0;
        background: none;
    }

    .tobor-accessory-list__group + .tobor-accessory-list__group {
        margin-top: 32px;
    }

    /* Mobile: the table is transposed into individual spec cards that scroll
       horizontally (Figma 3316:41879 / 3315:39909). Each row becomes one
       228px card; the column headings move inside the cells via data-label. */
    .tobor-accessory-list__scroll {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tobor-accessory-list__scroll::-webkit-scrollbar {
        display: none;
    }

    .tobor-accessory-list__table,
    .tobor-accessory-list__table--product,
    .tobor-accessory-list__table:not(.tobor-accessory-list__table--cols-5) {
        display: flex;
        width: max-content;
        min-width: 0;
        table-layout: auto;
    }

    .tobor-accessory-list__table thead {
        display: none;
    }

    .tobor-accessory-list__table tbody {
        display: flex;
        gap: 24px;
        /* Stretch keeps every card in a row the same height, as in Figma. */
        align-items: stretch;
    }

    .tobor-accessory-list__table tbody tr {
        display: flex;
        flex: 0 0 228px;
        width: 228px;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #e8e8e8;
        border-radius: 8px;
        background: #fff;
    }

    .tobor-accessory-list__table tbody th,
    .tobor-accessory-list__table tbody td,
    .tobor-accessory-list__table tbody td:first-of-type,
    .tobor-accessory-list__table--product tbody th,
    .tobor-accessory-list__table th:first-child {
        display: flex;
        width: 100%;
        height: auto;
        min-height: 80px;
        padding: 16px 24px;
        border-bottom: 1px solid #e8e8e8;
    }

    .tobor-accessory-list__table tbody th,
    .tobor-accessory-list__product {
        flex: 0 0 128px;
        align-items: center;
        height: 128px;
        min-height: 128px;
        background: #f8fafc;
    }

    .tobor-accessory-list__table tbody td,
    .tobor-accessory-list__table tbody td:first-of-type {
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
    }

    .tobor-accessory-list__product-copy {
        gap: 4px;
    }

    /* Column heading printed above the value inside each card cell. */
    .tobor-accessory-list__table tbody td::before {
        content: attr(data-label);
        color: #171717;
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
    }

    .tobor-accessory-list__table tbody tr > *:last-child {
        border-bottom: 0;
    }

    .tobor-accessory-list__scrollbar {
        display: block;
        height: 8px;
        /* Sits close under the card row — 16px read as a detached gap
           (BugHerd #72). */
        margin-top: 8px;
        background: none;
    }

    .tobor-accessory-list__scrollbar.is-hidden {
        display: none;
    }

    .tobor-accessory-list__scrollbar-thumb {
        display: block;
        width: 70px;
        height: 8px;
        border-radius: 4px;
        background: #d4d4d4;
    }
}
