/* Mobile catalog layouts. Loaded after the page's legacy inline styles. */
@media (max-width: 1024px) {
  #tt-products,
  #tt-search-results,
  .tt-product-detail-page #product-information,
  .tt-product-detail-page .tt-review-form-card {
    scroll-margin-top: 84px;
  }

  .tt-category-page,
  .tt-category-content,
  .tt-search-page,
  .tt-product-page {
    min-width: 0;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .tt-category-container,
  .tt-category-hero .tt-category-container,
  .tt-search-container,
  .tt-product-container,
  .tt-product-hero-band .tt-product-container {
    width: calc(100% - 32px) !important;
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
  }

  .tt-category-page :is(h1, h2, h3, p, a, label, span),
  .tt-search-page :is(h1, h2, h3, p, a, label, span),
  .tt-product-page :is(h1, h2, h3, p, a, label, span, strong) {
    overflow-wrap: anywhere;
  }

  .tt-category-copy,
  .tt-search-copy,
  .tt-search-form-card,
  .tt-product-summary-col,
  .tt-subcategory-info,
  .tt-product-body,
  .tt-search-product-body,
  .tt-related-body {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tt-category-hero .tt-section-eyebrow,
  .tt-category-page .tt-section-eyebrow,
  .tt-search-page .tt-section-eyebrow {
    max-width: 100%;
    padding-block: 7px;
    line-height: 1.35;
    white-space: normal;
  }

  .tt-category-copy h1 {
    font-size: clamp(28px, 6vw, 44px) !important;
    line-height: 1.12 !important;
  }

  .tt-category-page :is(.tt-section-row, .tt-product-toolbar) h2 {
    font-size: clamp(24px, 4vw, 32px) !important;
    line-height: 1.2 !important;
  }

  .tt-category-hero-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 12px;
  }

  .tt-category-hero-actions a.tt-info-btn,
  .tt-category-hero-actions a.arrow-link {
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: auto;
    padding: 12px 16px;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
  }

  .tt-category-hero-actions .arrow-icon {
    flex-shrink: 0;
  }

  .tt-subcategory-section,
  .tt-product-listing-section,
  .tt-empty-category {
    padding-block: 32px;
  }

  .tt-subcategory-grid,
  .tt-product-grid,
  .tt-search-product-grid,
  .tt-related-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .tt-subcategory-card {
    min-width: 0;
    box-sizing: border-box;
    padding: 16px 42px 16px 12px;
    gap: 12px;
    min-height: 124px;
  }

  .tt-subcategory-kicker {
    line-height: 1.4;
    white-space: normal;
  }

  .tt-product-card {
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 16px;
    overflow: visible;
  }

  .tt-product-name,
  .tt-product-name a,
  .tt-product-copy {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
  }

  .tt-product-name,
  .tt-product-name a {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  .tt-product-copy {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .tt-product-page .tt-product-actions,
  .tt-category-page .tt-product-actions,
  .tt-search-product-actions {
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
    background: transparent;
    overflow: visible;
  }

  .tt-category-page :is(.tt-btn-details, .tt-btn-inquiry),
  .tt-search-page :is(.tt-btn-details, .tt-btn-inquiry) {
    flex: 1 1 110px;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
  }

  .tt-category-page .tt-product-toolbar,
  .tt-search-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .tt-category-page .tt-filter-controls,
  .tt-search-page .tt-filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(100px, .45fr);
    width: 100%;
    min-width: 0;
    align-items: end;
  }

  .tt-category-page .tt-filter-controls label,
  .tt-search-page .tt-filter-controls label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .tt-category-page .tt-filter-controls select,
  .tt-search-page .tt-filter-controls select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    height: auto;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .tt-search-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 28px;
  }

  .tt-search-field,
  .tt-search-options,
  .tt-search-check,
  .tt-search-check span,
  .tt-search-stats > div,
  .tt-search-product-tag,
  .tt-search-tag-pill {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tt-search-check input {
    flex: 0 0 auto;
  }

  .tt-search-field input[type="text"],
  .tt-search-field select {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  .tt-search-submit {
    max-width: 100%;
    padding-block: 12px;
    line-height: 1.4;
    white-space: normal;
  }

  .tt-pagination-wrap .pagination,
  #content:has(.product-filter) .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tt-pagination-wrap .pagination .links,
  #content:has(.product-filter) .pagination .links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    float: none;
    min-width: 0;
    max-width: 100%;
  }

  .tt-pagination-wrap .pagination .links :is(a, b),
  #content:has(.product-filter) .pagination .links :is(a, b) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    box-sizing: border-box;
  }

  .tt-pagination-wrap .pagination .results,
  #content:has(.product-filter) .pagination .results {
    float: none;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tt-product-detail-page .tt-product-hero-top {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-block: 12px;
  }

  .tt-product-detail-page .breadcrumb,
  .tt-product-detail-page .breadcrumb-pp,
  .tt-product-detail-page #prev-next {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    text-align: left;
    box-sizing: border-box;
  }

  .tt-product-detail-page .breadcrumb-pp {
    gap: 6px;
    line-height: 1.6;
  }

  .tt-product-detail-page #prev-next {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .tt-product-detail-page #prev-next a {
    flex: 1 1 130px;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    box-sizing: border-box;
    justify-content: center;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
  }

  .tt-product-detail-page .product-info.tt-product-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    max-width: none;
    margin: 0 0 24px !important;
    padding: 0;
  }

  .tt-product-detail-page .product-info > .left,
  .tt-product-detail-page .product-info > .right,
  .tt-product-detail-page .product-info > .left + .right {
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow: visible;
  }

  body .tt-product-detail-page .product-info .left .image,
  body .tt-product-detail-page .product-info .image.tt-product-image-card {
    width: 100%;
    max-width: 100%;
    min-height: 320px !important;
    padding: 16px 12px 56px !important;
  }

  body .tt-product-detail-page .product-info .image img#image,
  body .tt-product-detail-page .product-info .image > img {
    height: auto !important;
    min-height: 0 !important;
    max-height: 360px !important;
    max-width: 100% !important;
    width: auto !important;
  }

  .tt-product-detail-page .product-info .image a.colorbox {
    min-height: 240px;
    max-width: 100%;
  }

  body .tt-product-detail-page .product-info .image .zoom-b.tt-product-zoom-btn {
    display: block !important;
  }

  .tt-product-detail-page .product-info .image-additional.tt-product-thumbs {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tt-product-detail-page .product-info .image-additional.tt-product-thumbs a {
    margin: 0;
  }

  .tt-product-detail-page .product-info .buy {
    min-width: 0;
    padding: 24px !important;
  }

  .tt-product-detail-page .product-name h1 {
    font-size: clamp(26px, 5vw, 34px);
    line-height: 1.2;
  }

  .tt-product-detail-page .product-info .description {
    padding: 14px;
  }

  .tt-product-detail-page .tt-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    line-height: 1.5;
  }

  .tt-product-detail-page .product-info .description span {
    min-width: 0;
    margin: 0;
  }

  .tt-product-detail-page .tt-meta-row :is(strong, a) {
    min-width: 0;
    text-align: right;
  }

  .tt-product-detail-page .tt-product-btn,
  .tt-product-detail-page .tt-product-service-row span,
  .tt-product-detail-page .tt-tag-pill {
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding-block: 10px !important;
    box-sizing: border-box;
    line-height: 1.4 !important;
    white-space: normal;
    text-align: center;
  }

  .tt-product-detail-page .tt-product-tags-list {
    min-width: 0;
    flex: 1 1 180px;
  }

  .tt-product-detail-page #product-information {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    overflow: visible;
  }

  .tt-product-detail-page .htabs.tt-product-tabs {
    padding: 0 12px !important;
    border-radius: 18px 18px 0 0;
  }

  .tt-product-detail-page .htabs.tt-product-tabs a {
    float: none;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 12px !important;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.4;
    text-align: left;
  }

  .tt-product-detail-page .tt-tab-panel {
    min-width: 0;
    max-width: 100%;
    padding: 20px !important;
    box-sizing: border-box;
  }

  .tt-product-detail-page .tt-description-body {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tt-product-detail-page .tt-description-body :is(img, iframe, video) {
    max-width: 100%;
    height: auto;
  }

  .tt-product-detail-page .tt-review-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-product-detail-page :is(.tt-field, .tt-field input, .tt-field textarea) {
    min-width: 0;
    max-width: 100%;
  }

  .tt-product-detail-page .tt-field input[type="text"],
  .tt-product-detail-page .tt-field textarea {
    font-size: 16px;
  }

  .tt-product-detail-page .tt-rating-options {
    gap: 12px;
    line-height: 1.6;
  }

  .tt-product-detail-page .tt-captcha-img {
    max-width: 100%;
    height: auto;
  }

  body .tt-product-detail-page .tt-related-body :is(.tt-btn-details, .tt-btn-inquiry) {
    flex: 1 1 120px;
    max-width: 100%;
    height: auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  /* The legacy manufacturer and specials views can switch between list and grid. */
  body:is([data-tt-route="product/manufacturer"], [data-tt-route="product/manufacturer/product"], [data-tt-route="product/compare"], [data-tt-route="product/special"]) #midsection #content {
    padding: 24px 16px !important;
  }

  body:is([data-tt-route="product/manufacturer"], [data-tt-route="product/manufacturer/product"], [data-tt-route="product/compare"], [data-tt-route="product/special"]) #content h1 {
    font-size: clamp(26px, 5vw, 34px);
    line-height: 1.25;
  }

  #content:has(.product-filter) :is(.product-filter, .sort, .limit) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #content .product-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    overflow: visible;
  }

  #content .product-filter :is(.display, .sort, .limit) {
    float: none;
    margin: 0;
  }

  #content .product-filter :is(.sort, .limit) {
    display: flex;
    flex: 1 1 180px;
    flex-direction: column;
    gap: 6px;
  }

  #content .product-filter select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 16px;
  }

  #content:has(.product-filter) .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
  }

  #content:has(.product-filter) .product-grid > div,
  #content:has(.product-filter) .product-list > div {
    float: none;
    width: 100% !important;
    min-width: 0;
    margin: 0;
    padding: 16px 0;
    box-sizing: border-box;
  }

  #content:has(.product-filter) .product-list :is(.left, .right, .span2, .span4, .image) {
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  #content:has(.product-filter) .product-grid :is(.pbox, .span2, .span4, .image) {
    position: relative;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  #content:has(.product-filter) :is(.product-list, .product-grid) .name a {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  #content:has(.product-filter) .product-list .left {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    text-align: left;
  }

  #content:has(.product-filter) :is(.product-list, .product-grid) .name a {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  #content:has(.product-filter) :is(.product-list, .product-grid) .description {
    width: 100%;
    height: auto;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  #content:has(.product-filter) :is(.product-list, .product-grid) .image img {
    width: auto !important;
    max-width: 100%;
    max-height: 220px;
    height: auto;
  }

  #content .manufacturer-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #content .manufacturer-content ul {
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
  }

  #content .manufacturer-content a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    overflow-wrap: anywhere;
  }

  /* Wide comparisons remain readable through a contained horizontal scroll. */
  #content #compare-content {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #content .compare-info {
    width: 100%;
    table-layout: auto;
  }

  #content .compare-info td {
    min-width: 130px;
    max-width: 260px;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #content .compare-info td img {
    max-width: 150px;
    height: auto;
  }

  #content .compare-info .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }

  #colorbox.tt-product-lightbox {
    max-width: calc(100vw - 16px);
  }

  #colorbox.tt-product-lightbox :is(#cboxBottomLeft, #cboxBottomCenter, #cboxBottomRight) {
    height: 104px;
    background: #fff;
  }

  #colorbox.tt-product-lightbox #cboxTitle {
    bottom: -46px;
    left: 0;
    width: 100%;
    padding: 0 6px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #colorbox.tt-product-lightbox #cboxCurrent {
    bottom: -90px;
    left: 50%;
    width: calc(100% - 108px);
    transform: translateX(-50%);
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
  }

  #colorbox.tt-product-lightbox :is(#cboxPrevious, #cboxNext) {
    bottom: -94px;
    width: 44px;
    height: 44px;
    border-radius: 5px;
    background: #12646c;
    color: #fff;
    text-indent: 0;
    font-size: 0;
  }

  #colorbox.tt-product-lightbox #cboxPrevious {
    left: 0;
  }

  #colorbox.tt-product-lightbox #cboxNext {
    left: auto;
    right: 0;
  }

  #colorbox.tt-product-lightbox #cboxPrevious::after,
  #colorbox.tt-product-lightbox #cboxNext::after {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font: 32px/1 Arial, sans-serif;
  }

  #colorbox.tt-product-lightbox #cboxPrevious::after {
    content: '\2039';
  }

  #colorbox.tt-product-lightbox #cboxNext::after {
    content: '\203a';
  }

  #colorbox.tt-product-lightbox #cboxClose {
    top: 8px !important;
    right: 8px !important;
    bottom: auto !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    background: #071827 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
  }
}

@media (max-width: 560px) {
  .tt-category-container,
  .tt-category-hero .tt-category-container,
  .tt-search-container,
  .tt-product-container,
  .tt-product-hero-band .tt-product-container {
    width: calc(100% - 24px) !important;
  }

  .tt-subcategory-grid,
  .tt-product-grid,
  .tt-search-product-grid,
  .tt-related-row,
  #content:has(.product-filter) .product-grid,
  #content .manufacturer-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-category-page .tt-filter-controls,
  .tt-search-page .tt-filter-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-category-page .tt-filter-controls select,
  .tt-search-page .tt-filter-controls select {
    font-size: 16px;
  }

  .tt-category-hero-actions a.tt-info-btn,
  .tt-category-hero-actions a.arrow-link {
    flex: 1 1 160px;
    justify-content: center;
  }

  .tt-search-form-card,
  .tt-search-empty-card {
    padding: 18px;
  }

  .tt-search-stats {
    gap: 8px;
  }

  .tt-search-stats > div {
    flex: 1 1 100px;
  }

  .tt-product-detail-page .product-info .buy {
    padding: 18px !important;
  }

  .tt-product-detail-page .product-info .review {
    padding: 12px;
    text-align: left;
  }

  .tt-product-detail-page .product-name {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .tt-product-detail-page .tt-tab-panel {
    padding: 16px !important;
  }

  .tt-product-detail-page .tt-review-form-card {
    min-width: 0;
    padding: 16px;
  }

  body .tt-product-detail-page .product-info .left .image,
  body .tt-product-detail-page .product-info .image.tt-product-image-card {
    min-height: 280px !important;
  }

  body .tt-product-detail-page .product-info .image img#image,
  body .tt-product-detail-page .product-info .image > img {
    max-height: 300px !important;
  }

  #content:has(.product-filter) .product-list .left {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
}
