/* True Axis Bio Toolkit v2.3.41 — scoped phone/tablet layout repairs.
 * Only layout constraints change. Desktop styling, WooCommerce data,
 * scientific content, images, and checkout behavior are untouched.
 */
@media (max-width:420px) {
  /* The brand and three action controls previously needed ~350px at 320px. */
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__inner {
    box-sizing:border-box!important;gap:7px!important;padding-inline:10px!important;
    min-width:0!important;width:100%!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__brand {
    display:flex!important;flex:1 1 auto!important;min-width:0!important;max-width:100%!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__logo--brand-lockup {
    align-items:center!important;display:flex!important;gap:5px!important;
    min-width:0!important;max-width:100%!important;width:100%!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__emblem {
    flex:0 0 auto!important;width:clamp(31px,9.3vw,39px)!important;
    height:clamp(31px,9.3vw,39px)!important;max-height:39px!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__wordmark {
    box-sizing:border-box!important;display:inline-block!important;flex:0 1 auto!important;
    min-width:0!important;font-size:clamp(10px,3.1vw,13px)!important;
    letter-spacing:.055em!important;white-space:nowrap!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__actions {
    flex:0 0 auto!important;gap:2px!important;min-width:0!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__action {
    box-sizing:border-box!important;align-items:center!important;justify-content:center!important;
    min-height:38px!important;min-width:30px!important;padding:3px!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__action svg {
    height:21px!important;width:21px!important;
  }
  .true-axis-bio-toolkit-homepage .tabt-home-chrome .tabt-home-header__toggle {
    box-sizing:border-box!important;align-content:center!important;justify-items:center!important;
    min-width:36px!important;min-height:40px!important;padding:6px!important;
  }
}

@media (max-width:1024px) {
  /* Prevent one long card title from forcing the two-column layout wider. */
  .true-axis-bio-toolkit-homepage .tabt-homepage--v231-exact-reference :is(
    .tabt-home-category-grid,.tabt-home-information .tabt-home-info-grid,
    .tabt-home-category-card,.tabt-home-resource-card,.tabt-home-card__media,.tabt-home-card__body
  ) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  .true-axis-bio-toolkit-homepage .tabt-homepage--v231-exact-reference :is(
    .tabt-home-category-card h3,.tabt-home-resource-card h3
  ) {max-width:100%!important;overflow-wrap:break-word!important;}
}

@media (max-width:900px) {
  /* The two-column purchase hero can pinch the quantity and add-to-cart controls. */
  body.tabt-product-template-active .tabt-product-hero {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:clamp(18px,4vw,32px)!important;
  }
  body.tabt-product-template-active .tabt-product-hero > *,
  body.tabt-product-template-active .tabt-product-buy-box,
  body.tabt-product-template-active .tabt-product-buy-box :is(form.cart,.variations_form,.single_variation_wrap) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  }
  body.tabt-product-template-active .tabt-product-gallery {
    width:100%!important;max-width:min(100%,430px)!important;margin-inline:auto!important;
  }
  body.tabt-product-template-active .tabt-product-buy-box :is(table.variations,select,.woocommerce-variation-add-to-cart) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  }
}
@media (max-width:600px) {
  body.tabt-product-template-active .tabt-product-shell {padding-inline:clamp(12px,4vw,20px)!important;}
  body.tabt-product-template-active .tabt-product-hero {padding:clamp(10px,3vw,18px)!important;}
  body.tabt-product-template-active .tabt-product-buy-box .single_add_to_cart_button.button {
    box-sizing:border-box!important;flex:1 1 100%!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
  body.tabt-product-template-active .tabt-action-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.tabt-product-template-active :is(.tabt-action-button,.tabt-action-button span) {
    min-width:0!important;overflow-wrap:normal!important;word-break:normal!important;
  }
}

/* COA: the five-column document grid was overflowing the document panel
 * before the old 980px breakpoint; switch to the existing labeled-card style. */
@media (min-width:981px) and (max-width:1199px) {
  .tabt-coa-hub .tabt-coa-table__head {display:none!important;}
  .tabt-coa-hub .tabt-coa-table__row {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;min-height:0!important;
  }
  .tabt-coa-hub .tabt-coa-table__row > * {
    min-width:0!important;border-right:0!important;border-bottom:1px solid #282828!important;
  }
  .tabt-coa-hub .tabt-coa-doc-main {grid-column:1/-1!important;}
  .tabt-coa-hub :is(.tabt-coa-table__cell,.tabt-coa-table__actions) {
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    justify-content:center!important;padding:12px 14px!important;min-height:70px!important;
  }
  .tabt-coa-hub :is(.tabt-coa-table__cell,.tabt-coa-table__actions)::before {
    content:attr(data-label)!important;color:#ff3038!important;
    font-size:10px!important;font-weight:800!important;text-transform:uppercase!important;
  }
}
@media (max-width:760px) {
  .tabt-coa-hub :is(.tabt-coa-browser,.tabt-coa-sidebar,.tabt-coa-documents,
    .tabt-coa-peptide-list,.tabt-coa-table,.tabt-coa-table__row) {
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
  }
  .tabt-coa-hub .tabt-coa-browser {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
  }
  .tabt-coa-hub .tabt-coa-peptide-list {overflow-x:auto!important;overflow-y:hidden!important;}
  .tabt-coa-hub .tabt-coa-table__row {width:100%!important;}
  .tabt-coa-hub :is(.tabt-coa-doc-main,.tabt-coa-doc-main > div,.tabt-coa-table__cell,.tabt-coa-table__actions) {
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
    overflow-wrap:anywhere!important;
  }
}
@media (max-width:560px) {
  .tabt-coa-hub .tabt-coa-table__row {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  }
  .tabt-coa-hub .tabt-coa-doc-main {grid-column:auto!important;}
  .tabt-coa-hub .tabt-coa-table__actions a {box-sizing:border-box!important;max-width:100%!important;}
}

/* Contact emails must remain readable, not be squeezed into half-width tiles. */
@media (max-width:540px) {
  .tabt-resource-page .tabt-contact-card-grid {grid-template-columns:minmax(0,1fr)!important;}
  .tabt-resource-page .tabt-contact-card {min-width:0!important;}
  .tabt-resource-page .tabt-contact-card strong {
    font-size:clamp(11px,3vw,13px)!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
  .tabt-resource-page .tabt-resource-heading {min-width:0!important;gap:8px!important;}
  .tabt-resource-page .tabt-resource-heading span {width:clamp(12px,5vw,28px)!important;flex:0 1 auto!important;}
  .tabt-resource-page .tabt-resource-heading h1 {
    min-width:0!important;font-size:clamp(23px,6.5vw,30px)!important;
    overflow-wrap:normal!important;word-break:normal!important;
  }
}

/* Commerce and account controls should wrap within their page column,
 * without changing the WooCommerce table data or Blocks logic. */
@media (max-width:767px) {
  body.woocommerce-account .woocommerce {display:block!important;}
  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce-MyAccount-content {
    box-sizing:border-box!important;float:none!important;width:100%!important;
    max-width:100%!important;min-width:0!important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation {margin-bottom:20px!important;}
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__wrap,
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__product {
    min-width:0!important;max-width:100%!important;overflow-wrap:break-word!important;
  }
  body:is(.woocommerce-cart,.woocommerce-checkout) :is(
    .wc-block-components-main,.wc-block-components-sidebar,
    .wc-block-checkout__main,.wc-block-checkout__sidebar
  ) {box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
}
@media (max-width:820px) {
  body.woocommerce-checkout :is(.wc-block-checkout,.wp-block-woocommerce-checkout) {
    box-sizing:border-box!important;max-width:100%!important;min-width:0!important;
  }
  body.woocommerce-checkout :is(input,select,textarea) {max-width:100%!important;box-sizing:border-box!important;}
}

@media (max-width:680px) {
  body.woocommerce-checkout .wc-block-checkout {display:block!important;}
  body.woocommerce-checkout :is(.wc-block-components-main,.wc-block-components-sidebar) {width:100%!important;min-width:0!important;max-width:100%!important;}
}

@media (prefers-reduced-motion:reduce) {
  .true-axis-bio-toolkit-homepage .tabt-home-card,
  body.tabt-product-template-active .tabt-related-card {scroll-behavior:auto!important;}
}
