/* =========================================================
   BioString + LabtechCO archive layout
   The LabtechCO theme may place WooCommerce archives inside
   a narrow main-content column. These rules make this
   catalogue span the full available page width.
   ========================================================= */

body.biostring-catalogue-archive #primary,
body.biostring-catalogue-archive #content,
body.biostring-catalogue-archive .content-area,
body.biostring-catalogue-archive .site-main,
body.biostring-catalogue-archive .main-content,
body.biostring-catalogue-archive .woocommerce,
body.biostring-catalogue-archive .woocommerce-page {
    max-width: 100% !important;
}

body.biostring-catalogue-archive #primary,
body.biostring-catalogue-archive .content-area,
body.biostring-catalogue-archive .site-main,
body.biostring-catalogue-archive .main-content {
    width: 100% !important;
    float: none !important;
    flex: 0 0 100% !important;
}

body.biostring-catalogue-archive .biostring-product-catalogue-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    overflow: visible !important;
}

body.biostring-catalogue-archive #biostring-catalogue {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
}

body.biostring-catalogue-archive .bs-catalogue-inner {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
}

@media (max-width: 767px) {
    body.biostring-catalogue-archive .bs-catalogue-inner {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* BioString Product Catalogue */

.bs-catalogue {
    width: 100%;
    margin: 0 auto;
    font-family: inherit !important;
}

/* Use the LabtechCO/theme body typography throughout the catalogue. */
.bs-catalogue,
.bs-catalogue * {
    font-family: inherit !important;
}

.bs-catalogue *,
.bs-catalogue *::before,
.bs-catalogue *::after {
    box-sizing: border-box;
}

.bs-catalogue-inner {
    width: 100%;
}

.bs-category-header {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    margin: 0 0 32px;
    padding: 0;
}

.bs-category-image-wrap {
    width: 165px;
    height: 120px;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f5f7;
    border: 1px solid #e2e7eb;
}

.bs-category-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    display: block;
}

.bs-category-copy {
    min-width: 0;
    width: 100%;
}

.bs-category-copy h2 {
    font-size: 30px !important;
    margin: 0 0 14px;
    color: #383838;
    line-height: 1.25;
    font-weight: 600;
}

.bs-category-description {
    display: block;
    width: 100%;
    max-width: none;
    color: #383838;
    line-height: 1.75;
}

.bs-category-description:empty {
    display: none;
}

.bs-category-description p {
    margin: 0 0 8px;
}

.bs-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 28px;
    color: #383838;
}

.bs-breadcrumbs a {
    color: #17a2a2;
    text-decoration: none;
}

.bs-breadcrumbs a:hover {
    text-decoration: underline;
}

.bs-breadcrumb-separator {
    color: #9aa4ae;
}

.bs-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin: 0 0 18px;
}

.bs-search {
    display: flex;
    width: min(750px, 100%);
    margin-left: auto;
}

.bs-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d6dce2;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    outline: none;
    background: #fff;
}

.bs-search input:focus {
    border-color: #17a2a2;
}

.bs-search button {
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 0 5px 5px 0;
    background: #17a2a2;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}


.bs-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0 0 18px;
}

.bs-alphabet button {
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border: 1px solid #e1e5e9;
    border-radius: 3px;
    background: #f4f6f8;
    color: #383838;
    cursor: pointer;
}

.bs-alphabet button:hover,
.bs-alphabet button.active {
    border-color: #17a2a2;
    background: #17a2a2;
    color: #fff;
}

.bs-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.bs-category-card {
    display: block;
    overflow: hidden;
    border: 1px solid #e3e7eb;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bs-category-card:hover {
    transform: translateY(-2px);
    border-color: #cbd6df;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

/* Images are rendered only for top-level category cards by the JS. */
.bs-category-card-image {
    width: 100%;
    overflow: hidden;
    background: #f3f5f7;
}

.bs-category-card-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    object-fit: cover;
}

.bs-category-card-content {
    font-size: 14px !important;
    position: relative !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    min-height: 82px;
    padding: 15px 16px 17px !important;
    background: #fff !important;
    z-index: 2;
}

.bs-category-card-content h2 {
    font-size: 14px !important;
    margin: 0 0 6px;
    color: #383838;
    line-height: 1.35;
    font-weight: 600;
}

.bs-category-card-content span {
    font-size: 14px !important;
    color: #383838;
}

.bs-subcategory-card-image {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    margin: 10px;
    border-radius: 10px;
}

.bs-subcategory-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bs-category-card:has(.bs-subcategory-card-image) {
    display: flex;
    align-items: center;
}

.bs-category-card:has(.bs-subcategory-card-image) .bs-category-card-content {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    min-height: 0;
    padding: 20px !important;
}

.bs-product-table th,
.bs-product-table td {
    font-size: 13px !important;
}

.bs-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d5dde4;
}

.bs-product-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: auto;
    margin: 0;
    background: #fff;
}

.bs-product-table th {
    padding: 9px 8px;
    border: 1px solid #d5dde4;
    background: #17a2a2;
    color: #fff;
    text-align: center;
    line-height: 1.25;
    font-weight: 600;
    white-space: nowrap;
}

.bs-product-table td {
    padding: 8px;
    border: 1px solid #d5dde4;
    color: #383838;
    text-align: center;
    line-height: 1.35;
    vertical-align: middle;
}

.bs-product-table tbody tr:nth-child(even) {
    background: #fafbfd;
}

.bs-product-table tbody tr:hover {
    background: #f1f7fb;
}

.bs-product-table .bs-product-name {
    min-width: 260px;
    text-align: left;
}

.bs-product-table .bs-product-name a,
.bs-product-table .bs-product-name a:hover,
.bs-product-table .bs-product-name a:focus,
.bs-product-table .bs-product-name a:active {
    color: #383838;
    text-decoration: none !important;
}

.bs-view-button {
    color: #17a2a2;
    text-decoration: none;
    font-weight: 500;
}

.bs-view-button:hover {
    text-decoration: underline;
}

.bs-no-results {
    padding: 30px !important;
    text-align: center !important;
    color: #777 !important;
}

.bs-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 22px 0 10px;
}

.bs-pagination button {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d7dde3;
    border-radius: 4px;
    background: #fff;
    color: #383838;
    cursor: pointer;
}

.bs-pagination button:hover:not(:disabled),
.bs-pagination button.active {
    border-color: #17a2a2;
    background: #17a2a2;
    color: #fff;
}

.bs-pagination button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.bs-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 120px;
    color: #383838;
}

.bs-loader span:first-child {
    width: 24px;
    height: 24px;
    border: 3px solid #e4e9ee;
    border-top-color: #17a2a2;
    border-radius: 50%;
    animation: bs-spin .8s linear infinite;
}

@keyframes bs-spin {
    to { transform: rotate(360deg); }
}

.bs-empty {
    padding: 45px 20px;
    border: 1px solid #e4e8ec;
    background: #fafbfc;
    color: #383838;
    text-align: center;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Category description: use the entire text column beside the image. */
.bs-category-header .bs-category-copy,
.bs-category-header .bs-category-description {
    max-width: none !important;
}

@media (max-width: 1024px) {
    .bs-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bs-category-header {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 25px;
    }

    .bs-category-image-wrap {
        width: 140px;
        height: 105px;
    }
}

@media (max-width: 767px) {
    .bs-category-header {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .bs-category-image-wrap {
        width: 150px;
        height: 110px;
    }

    .bs-category-copy h2 {
    font-size: 30px !important;
    }

    .bs-toolbar {
        display: block;
    }

    .bs-search {
        width: 100%;
        margin-bottom: 10px;
    }


    .bs-category-grid {
        grid-template-columns: 1fr;
    }


    .bs-alphabet {
        justify-content: flex-start;
    }
}





/* Main Products page introduction (independent of category archive headers). */
.bs-main-intro {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin: 0 0 30px;
}
.bs-main-intro[hidden] { display: none !important; }
.bs-main-intro-image-wrap { overflow: hidden; border-radius: 10px; }
.bs-main-intro-image-wrap img { display: block; width: 100%; height: auto; object-fit: cover; }
.bs-main-intro-copy h2 { margin: 0 0 12px; font-size: 30px; line-height: 1.25; }
.bs-main-intro-copy > div { font-size: 15px; line-height: 1.65; }

/* The main Products landing page uses five columns; category/sub-category pages stay at three. */
.bs-category-grid.bs-main-products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bs-category-grid.bs-inner-subcategory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1200px) {
    .bs-category-grid.bs-main-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .bs-category-grid.bs-inner-subcategory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .bs-main-intro { grid-template-columns: 1fr; gap: 16px; }
    .bs-main-intro-image-wrap { max-width: 100%; }
    .bs-category-grid.bs-main-products-grid,
    .bs-category-grid.bs-inner-subcategory-grid { grid-template-columns: 1fr; }
}
