/**
 * Telecom Chimp catalogue UX.
 * Light industrial B2B styling: white surfaces, ink controls and yellow cues.
 */

:root {
  --tc-catalogue-ink: #041e42;
  --tc-catalogue-text: #212121;
  --tc-catalogue-muted: #667085;
  --tc-catalogue-border: #dfe3e8;
  --tc-catalogue-soft: #f7f8f9;
  --tc-catalogue-yellow: #ffbd27;
  --tc-catalogue-yellow-dark: #d99d00;
}

/* Product-category heading supplied by the PIM. */
.tc-catalogue-header {
  border-bottom: 1px solid var(--tc-catalogue-border);
  margin: 1.25rem 0 0;
  padding: 0 0 1.25rem;
}

.tc-catalogue-header__title {
  color: var(--tc-catalogue-ink);
  font-size: clamp(1.625rem, 2.8vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}

/* WooCommerce-native fallback filters; no Filter Everything dependency. */
.tc-native-filters {
  background: #fff;
  color: var(--tc-catalogue-text);
}

.content-primary .remove-filter,
.filtered-sidebar .wpc-filter-chips-list,
.filtered-sidebar .wpc-filter-chip-reset-all,
.filtered-sidebar .tc-filter-clear-control {
  display: none !important;
}

.tc-filter-summary {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--tc-catalogue-border);
  border-top: 3px solid var(--tc-catalogue-yellow);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  padding: 0.375rem 0.625rem;
}

.tc-filter-summary[hidden],
.tc-mobile-filter-actions [hidden] {
  display: none !important;
}

.tc-filter-summary__count {
  color: var(--tc-catalogue-ink);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.tc-filter-summary__clear {
  align-items: center;
  color: var(--tc-catalogue-ink);
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 750;
  min-height: 44px;
  padding: 0 0.25rem;
  text-decoration: underline;
  text-decoration-color: var(--tc-catalogue-yellow-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-content .content-primary {
  position: relative;
}

.site-content .content-primary .products {
  transition: opacity 180ms ease;
}

.site-content.ajax-loading .content-primary .products {
  opacity: 0.42;
  pointer-events: none;
}

.site-content.ajax-loading .content-primary .loader-image.preloader {
  color: var(--tc-catalogue-ink);
  display: block;
  left: 50%;
  margin: 0;
  position: absolute;
  right: auto;
  top: 5rem;
  transform: translateX(-50%);
  z-index: 5;
}

.tc-native-filter-section {
  border-bottom: 1px solid var(--tc-catalogue-border);
  margin: 0 !important;
  padding: 0.625rem 0;
}

.tc-native-filter-section__title {
  color: var(--tc-catalogue-ink);
  font-size: 0.9375rem !important;
  font-weight: 750 !important;
  line-height: 1.3;
  margin: 0 0 0.25rem !important;
}

.tc-filter-section--collapsible {
  padding: 0;
}

.tc-filter-section--collapsible > .widget-title,
.tc-filter-section--collapsible > .tc-native-filter-section__title {
  margin: 0 !important;
}

.tc-filter-section--collapsible > .widget-title:hover,
.tc-filter-section--collapsible > .widget-title:focus-within,
.tc-filter-section--collapsible > .tc-native-filter-section__title:hover,
.tc-filter-section--collapsible
  > .tc-native-filter-section__title:focus-within {
  background: transparent !important;
  color: var(--tc-catalogue-ink) !important;
}

.tc-filter-accordion__toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--tc-catalogue-ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 750;
  gap: 0.75rem;
  justify-content: space-between;
  min-height: 44px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.tc-filter-accordion__toggle:hover,
.tc-filter-accordion__toggle:focus,
.tc-filter-accordion__toggle:active {
  background: transparent !important;
  color: var(--tc-catalogue-ink) !important;
}

.tc-filter-accordion__toggle:focus-visible {
  outline: 2px solid var(--tc-catalogue-ink);
  outline-offset: 2px;
}

.tc-filter-accordion__toggle::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  flex: 0 0 8px;
  height: 8px;
  margin: 0 0.25rem 4px 0;
  transform: rotate(45deg);
  transition: transform 180ms ease;
  width: 8px;
}

.tc-filter-accordion__toggle[aria-expanded="true"]::after {
  margin-bottom: -4px;
  transform: rotate(225deg);
}

.tc-filter-accordion__panel {
  padding-bottom: 0.5rem;
}

.tc-filter-accordion__panel[hidden] {
  display: none !important;
}

.tc-native-filters .woocommerce-widget-layered-nav-list {
  margin: 0;
  padding: 0;
}

.tc-native-filters .woocommerce-widget-layered-nav-list__item {
  list-style: none;
  margin: 0;
  padding: 0 !important;
  position: relative;
}

.tc-native-filters .woocommerce-widget-layered-nav-list__item::before,
.tc-native-filters .woocommerce-widget-layered-nav-list__item::after {
  display: none !important;
}

.tc-native-filters .woocommerce-widget-layered-nav-list__item a {
  align-items: center;
  color: var(--tc-catalogue-text);
  display: flex !important;
  font-size: 0.875rem;
  gap: 0.5rem;
  line-height: 1.35;
  min-height: 34px;
  min-width: 0;
  padding: 0.0625rem 2rem 0.0625rem 0;
  position: relative;
  text-decoration: none;
  width: 100%;
}

.tc-native-filters
  .woocommerce-widget-layered-nav-list__item[hidden] {
  display: none !important;
}

.tc-filter-values-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--tc-catalogue-ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  justify-content: center;
  margin-top: 0.125rem;
  min-height: 44px;
  padding: 0.25rem 0;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--tc-catalogue-yellow-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  touch-action: manipulation;
  width: 100%;
}

.tc-filter-values-toggle:hover,
.tc-filter-values-toggle:focus,
.tc-filter-values-toggle:active {
  background: transparent !important;
  color: var(--tc-catalogue-ink) !important;
}

.tc-filter-values-toggle:focus-visible {
  outline: 2px solid var(--tc-catalogue-ink);
  outline-offset: 2px;
}

.tc-native-filters .woocommerce-widget-layered-nav-list__item a::before {
  background: #fff;
  border: 1.5px solid #667085;
  border-radius: 3px;
  box-sizing: border-box;
  content: "";
  display: block !important;
  flex: 0 0 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  min-width: 20px !important;
  width: 20px !important;
}

.tc-native-filters
  .woocommerce-widget-layered-nav-list__item--chosen
  a::before {
  background: var(--tc-catalogue-ink);
  border-color: var(--tc-catalogue-ink);
  box-shadow: inset 0 0 0 4px var(--tc-catalogue-yellow);
}

.tc-native-filters .woocommerce-widget-layered-nav-list__item .count {
  color: var(--tc-catalogue-muted);
  font-size: 0.75rem;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.tc-native-filters
  .woocommerce-widget-layered-nav-list__item.tc-native-filter-option--disabled
  a {
  color: var(--tc-catalogue-muted);
  cursor: not-allowed;
  opacity: 0.48;
}

.tc-native-filters
  .woocommerce-widget-layered-nav-list__item.tc-native-filter-option--disabled
  a::before {
  background: var(--tc-catalogue-soft);
  border-color: #aeb7c2;
}

.tc-native-filter-boolean-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tc-native-filter-boolean-item a[aria-current="true"] {
  font-weight: 650;
}

/* Server-rendered subcategory navigation. */
.tc-subcategory-chooser {
  background: #fff;
  border: 1px solid var(--tc-catalogue-border);
  border-top: 4px solid var(--tc-catalogue-yellow);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(4, 30, 66, 0.06);
  margin: 1.5rem 0 0;
  padding: 1.25rem;
}

.tc-subcategory-chooser__heading {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tc-subcategory-chooser h2 {
  color: var(--tc-catalogue-ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.tc-subcategory-search {
  flex: 0 1 21rem;
  position: relative;
}

.tc-subcategory-search__icon {
  border: 2px solid var(--tc-catalogue-ink);
  border-radius: 50%;
  height: 0.8rem;
  left: 1rem;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 0.8rem;
}

.tc-subcategory-search__icon::after {
  background: var(--tc-catalogue-ink);
  content: "";
  height: 2px;
  left: 0.62rem;
  position: absolute;
  top: 0.62rem;
  transform: rotate(45deg);
  width: 0.42rem;
}

.tc-subcategory-search input {
  background: #fff;
  border: 1px solid #aeb7c2;
  border-radius: 4px;
  color: var(--tc-catalogue-text);
  font-size: 0.9375rem;
  height: 44px;
  padding: 0 2.75rem;
  width: 100%;
}

.tc-subcategory-search input:focus-visible,
.tc-subcategory-list:focus-visible,
.tc-subcategory-link:focus-visible,
.tc-filter-trigger:focus-visible,
.tc-gallery-thumb-button:focus-visible,
.filtered-sidebar a:focus-visible,
.filtered-sidebar button:focus-visible,
.filtered-sidebar input:focus-visible,
.filtered-sidebar select:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 189, 39, 0.55);
  outline: 2px solid var(--tc-catalogue-ink);
  outline-offset: 1px;
}

.tc-subcategory-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 21rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.125rem 0.5rem 0.125rem 0.125rem;
  scrollbar-color: var(--tc-catalogue-yellow-dark) #edf0f3;
  scrollbar-width: thin;
}

.tc-subcategory-list-shell {
  min-width: 0;
  position: relative;
}

.tc-subcategory-list::-webkit-scrollbar {
  width: 10px;
}

.tc-subcategory-list::-webkit-scrollbar-track {
  background: #dfe4e9;
  border-radius: 999px;
}

.tc-subcategory-list::-webkit-scrollbar-thumb {
  background: var(--tc-catalogue-ink);
  border: 2px solid var(--tc-catalogue-yellow);
  border-radius: 999px;
  min-height: 44px;
}

.tc-subcategory-list-shell.has-custom-scrollbar .tc-subcategory-list {
  padding-right: 1rem;
  scrollbar-width: none;
}

.tc-subcategory-list-shell.has-custom-scrollbar
  .tc-subcategory-list::-webkit-scrollbar {
  height: 0;
  width: 0;
}

.tc-subcategory-scroll-rail {
  background: #dfe4e9;
  border: 1px solid #c8d0d9;
  border-radius: 999px;
  bottom: 0.25rem;
  box-shadow: inset 0 1px 2px rgba(4, 30, 66, 0.16);
  box-sizing: border-box;
  display: none;
  pointer-events: none;
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  width: 6px;
  z-index: 2;
}

.tc-subcategory-list-shell.is-scrollable .tc-subcategory-scroll-rail {
  display: block;
}

.tc-subcategory-scroll-thumb {
  background: var(--tc-catalogue-ink);
  border: 1px solid var(--tc-catalogue-yellow);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(4, 30, 66, 0.22);
  box-sizing: border-box;
  left: -1px;
  min-height: 44px;
  position: absolute;
  top: -1px;
  transition: transform 80ms linear;
  width: 6px;
}

.tc-subcategory-link {
  align-items: center;
  background: var(--tc-catalogue-soft);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--tc-catalogue-text);
  display: grid;
  gap: 0.1rem 0.625rem;
  grid-template-columns: minmax(0, 1fr) 0.5rem;
  min-height: 52px;
  padding: 0.625rem 0.75rem;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.tc-subcategory-link:hover {
  background: #fff8df;
  border-color: var(--tc-catalogue-yellow-dark);
  color: var(--tc-catalogue-ink);
}

.tc-subcategory-link__name {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.25;
  min-width: 0;
}

.tc-subcategory-link__label {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.tc-subcategory-link__badge {
  background: var(--tc-catalogue-yellow);
  border: 1px solid var(--tc-catalogue-yellow-dark);
  border-radius: 999px;
  color: var(--tc-catalogue-ink);
  flex: 0 0 auto;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  text-transform: uppercase;
}

.tc-subcategory-link__count {
  color: var(--tc-catalogue-muted);
  font-size: 0.6875rem;
  grid-column: 1;
  line-height: 1.2;
}

.tc-subcategory-link__arrow {
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  grid-column: 2;
  grid-row: 1 / 3;
  height: 0.42rem;
  transform: rotate(45deg);
  width: 0.42rem;
}

.tc-subcategory-empty {
  background: var(--tc-catalogue-soft);
  color: var(--tc-catalogue-muted);
  font-size: 0.875rem;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

/* Archive toolbar and product actions. */
.before-shop-loop .content-column > .filter-button {
  display: none !important;
}

.before-shop-loop .sorting-product {
  align-items: center;
  gap: 0.5rem;
}

.before-shop-loop .woocommerce-ordering {
  margin: 0;
}

.before-shop-loop .woocommerce-ordering select:not(.select2-hidden-accessible) {
  appearance: none;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--tc-catalogue-ink) 50%),
    linear-gradient(135deg, var(--tc-catalogue-ink) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 1px),
    calc(100% - 0.625rem) calc(50% - 1px);
  background-repeat: no-repeat;
  background-size: 0.4rem 0.4rem;
  border: 1px solid #8c9298;
  border-radius: 4px;
  color: var(--tc-catalogue-ink);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  height: 44px;
  min-width: 11rem;
  padding: 0 2.25rem 0 0.75rem;
}

.before-shop-loop
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--tc-catalogue-ink) !important;
  font-weight: 500 !important;
}

.before-shop-loop .select2-container .select2-selection,
.before-shop-loop .filter-wrapper .sorting-product .select2-selection {
  align-items: center;
  background: #fff !important;
  border: 1px solid #8c9298 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: var(--tc-catalogue-ink) !important;
  display: flex !important;
  height: 44px !important;
  min-width: 11rem;
}

.before-shop-loop .select2-selection--single .select2-selection__rendered {
  padding-right: 2.75rem !important;
}

.before-shop-loop
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 44px !important;
  right: 0.375rem !important;
  top: 50% !important;
  transform: translateY(-50%);
  width: 2rem !important;
}

.before-shop-loop
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  border: 0 !important;
  border-bottom: 2px solid var(--tc-catalogue-ink) !important;
  border-right: 2px solid var(--tc-catalogue-ink) !important;
  height: 0.625rem;
  left: 50%;
  margin: 0 !important;
  top: 50%;
  transform: translate(-50%, -65%) rotate(45deg);
  transform-origin: center;
  width: 0.625rem;
}

.before-shop-loop
  .select2-container--default.select2-container--open
  .select2-selection--single
  .select2-selection__arrow
  b {
  transform: translate(-50%, -35%) rotate(225deg);
}

.before-shop-loop .select2-container .select2-selection:hover,
.before-shop-loop .woocommerce-ordering select:not(.select2-hidden-accessible):hover {
  background-color: var(--tc-catalogue-soft) !important;
  border-color: #555b61 !important;
}

.before-shop-loop .select2-container--focus .select2-selection,
.before-shop-loop .woocommerce-ordering select:focus-visible {
  border-color: var(--tc-catalogue-ink) !important;
  box-shadow: 0 0 0 3px rgba(255, 189, 39, 0.42) !important;
  outline: 0;
}

.tc-mobile-filter-actions {
  display: none;
}

.tc-empty-filter-toolbar {
  display: none;
}

/* Product cards stay aligned even when source titles have different lengths. */
.shop-content .products:not(.list-view-products) {
  align-items: stretch;
}

.shop-content .products:not(.list-view-products) > .product {
  display: flex;
  flex-direction: column;
}

.shop-content
  .products:not(.list-view-products)
  > .product
  > .product-wrapper {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.shop-content
  .products:not(.list-view-products)
  > .product
  .product-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.shop-content
  .products:not(.list-view-products)
  > .product
  :is(.content-wrapper, .product-content-wrapper) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.shop-content .products:not(.list-view-products) > .product .product-title {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  height: 3.2rem;
  min-height: 3.2rem;
  overflow: hidden;
}

.shop-content
  .products:not(.list-view-products)
  > .product
  .product-price-cart {
  margin-top: auto;
}

.shop-content
  .products:not(.list-view-products)
  > .product
  .product-content-wrapper
  > .product-meta {
  margin-top: auto;
}

.tc-filter-trigger {
  align-items: center;
  background: var(--tc-catalogue-yellow);
  border: 1px solid var(--tc-catalogue-yellow-dark);
  border-radius: 4px;
  color: var(--tc-catalogue-ink);
  cursor: pointer;
  display: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  gap: 0.5rem;
  height: 44px;
  justify-content: center;
  min-width: 7rem;
  padding: 0 0.875rem;
  touch-action: manipulation;
}

.tc-filter-trigger__icon {
  border-bottom: 2px solid currentColor;
  border-top: 2px solid currentColor;
  height: 0.75rem;
  position: relative;
  width: 1rem;
}

.tc-filter-trigger__icon::after {
  background: currentColor;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  top: 0.2rem;
  width: 1rem;
}

.tc-filter-trigger__count {
  align-items: center;
  background: var(--tc-catalogue-yellow);
  border-radius: 999px;
  color: var(--tc-catalogue-ink);
  display: inline-flex;
  font-size: 0.6875rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.25rem;
}

.tc-filter-trigger__count[hidden] {
  display: none;
}

.tc-loop-purchase-controls {
  align-items: stretch;
  display: flex;
  gap: 0.5rem;
  margin: auto 0.9375rem 0.9375rem;
  min-width: 0;
  overflow: hidden;
  width: calc(100% - 1.875rem);
}

.tc-loop-purchase-controls > .quantity {
  border-radius: 4px;
  box-sizing: border-box;
  flex: 1 1 0;
  height: 46px;
  margin: 0 !important;
  min-width: 0;
  overflow: hidden;
  padding-left: 44px;
  padding-right: 44px;
  width: auto;
}

.tc-loop-purchase-controls > .added_to_cart {
  display: none !important;
}

.tc-loop-purchase-controls > .quantity.tc-quantity-readonly {
  background: #f2f4f6;
  border-color: #cfd5dc;
  color: #6b7280;
}

.tc-loop-purchase-controls
  > .quantity.tc-quantity-readonly
  .quantity-button {
  cursor: default;
  opacity: 0.32;
  pointer-events: none;
}

.tc-loop-purchase-controls > .quantity.tc-quantity-readonly .qty {
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: #6b7280;
}

.tc-loop-purchase-controls > .quantity .quantity-button {
  touch-action: manipulation;
  width: 44px;
}

.tc-loop-purchase-controls > .quantity .qty {
  height: 44px;
  min-width: 0;
  width: 100%;
}

.tc-loop-purchase-controls > .quantity .minus::after,
.tc-loop-purchase-controls > .quantity .plus::after,
.tc-loop-purchase-controls > .quantity .plus::before {
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
}

.tc-loop-purchase-controls > .add_to_cart_button {
  align-items: center;
  background: var(--color-shop-button, #00a046);
  border: 1px solid var(--color-shop-button, #00a046);
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
  margin: 0 !important;
  min-height: 46px;
  min-width: 46px;
  position: relative;
  touch-action: manipulation;
  width: 46px;
}

.tc-loop-purchase-controls > .add_to_cart_button.tc-cart-pending {
  cursor: progress;
  opacity: 0.72;
}

.tc-loop-purchase-controls > .add_to_cart_button.tc-cart-pending i {
  opacity: 0;
}

.tc-loop-purchase-controls > .add_to_cart_button.tc-cart-pending::after {
  animation: tc-filter-action-spin 700ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  border-top-color: #fff;
  content: "";
  height: 18px;
  inset: 0;
  margin: auto;
  position: absolute;
  width: 18px;
}

.tc-product-cta-unavailable {
  align-items: stretch;
  border-top: 1px solid var(--tc-catalogue-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: auto 0.9375rem 0.9375rem;
  padding-top: 0.75rem;
}

.tc-product-cta-unavailable__label {
  color: #8a2c0d;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
}

.products .product .tc-view-product-button {
  align-items: center;
  background: #fff7db;
  border: 1px solid var(--tc-catalogue-yellow-dark);
  border-radius: 4px;
  color: var(--tc-catalogue-ink);
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.75rem;
  text-decoration: none;
}

/* Cache-order-independent product thumbnail rail. */
.woocommerce-product-gallery ol.flex-control-thumbs {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 0.125rem;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--tc-catalogue-yellow-dark) #edf0f3;
  scrollbar-width: thin;
  width: 100%;
}

.woocommerce-product-gallery ol.flex-control-thumbs > li,
.woocommerce-product-gallery ol.flex-control-thumbs > .owl-item {
  border: 1px solid var(--tc-catalogue-border);
  border-radius: 4px;
  box-sizing: border-box;
  flex: 0 0 calc((100% - 3rem) / 7) !important;
  float: none !important;
  min-width: 58px;
  overflow: hidden;
  scroll-snap-align: start;
  width: auto !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs img {
  aspect-ratio: 1 / 1;
  display: block;
  height: auto !important;
  object-fit: cover;
  opacity: 0.72;
  padding: 0;
  width: 100% !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs img.flex-active,
.woocommerce-product-gallery ol.flex-control-thumbs img:hover {
  opacity: 1;
}

.woocommerce-product-gallery ol.flex-control-thumbs > li:has(img.flex-active) {
  border-color: var(--tc-catalogue-ink);
  box-shadow: 0 0 0 2px var(--tc-catalogue-yellow);
}

.tc-gallery-thumbs-shell {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  margin-top: 0.75rem;
  min-width: 0;
}

.tc-gallery-thumbs-shell ol.flex-control-thumbs {
  margin: 0;
}

.tc-gallery-thumb-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tc-catalogue-border);
  border-radius: 4px;
  color: var(--tc-catalogue-ink);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  width: 36px;
}

.tc-gallery-thumb-button span {
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  height: 0.5rem;
  width: 0.5rem;
}

.tc-gallery-thumb-prev span {
  transform: rotate(-135deg);
}

.tc-gallery-thumb-next span {
  transform: rotate(45deg);
}

.tc-gallery-thumb-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.tc-gallery-thumb-button[hidden] {
  display: block;
  visibility: hidden;
}

/* Dedicated mobile filter drawer. */
.tc-filter-overlay {
  background: rgba(4, 21, 35, 0.56);
  border: 0;
  box-sizing: border-box;
  display: none;
  height: 100dvh !important;
  inset: 0;
  max-height: none !important;
  max-width: none !important;
  min-height: 100dvh !important;
  min-width: 100vw !important;
  padding: 0;
  position: fixed;
  width: 100vw !important;
  z-index: 1000000;
}

@media (max-width: 1023px) {
  html.tc-filter-drawer-open,
  html.tc-filter-drawer-open body {
    overflow: hidden;
  }

  .tc-filter-trigger {
    display: inline-flex;
  }

  .tc-empty-filter-toolbar {
    border-bottom: 1px solid var(--tc-catalogue-border);
    display: flex;
    margin-top: 1rem;
    padding-bottom: 0.625rem;
  }

  .tc-empty-filter-toolbar .tc-filter-trigger {
    flex: 1 1 auto;
  }

  .before-shop-loop .content-column,
  .before-shop-loop .filter-wrapper,
  .before-shop-loop .sorting-product {
    width: 100%;
  }

  .before-shop-loop .sorting-product {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tc-filter-trigger {
    background: #fff;
    border-color: #8c9298;
    min-width: 0;
    width: 100%;
  }

  .tc-filter-trigger:hover,
  .tc-filter-trigger:focus-visible {
    background: var(--tc-catalogue-soft);
    border-color: #555b61;
    color: var(--tc-catalogue-ink);
  }

  .before-shop-loop .woocommerce-ordering {
    align-items: stretch;
    display: flex;
    flex: 1 1 auto;
    height: 44px;
    margin: 0 !important;
    min-width: 0;
    width: 100%;
  }

  .before-shop-loop .select2-container,
  .before-shop-loop .woocommerce-ordering select:not(.select2-hidden-accessible) {
    display: block !important;
    height: 44px !important;
    margin: 0 !important;
    min-width: 0;
    max-width: 100%;
    width: 100% !important;
  }

  .before-shop-loop .woocommerce-ordering select.select2-hidden-accessible {
    max-width: 1px !important;
    min-width: 1px !important;
    width: 1px !important;
  }

  .before-shop-loop .select2-selection,
  .before-shop-loop .filter-wrapper .sorting-product .select2-selection {
    align-items: center;
    background: #fff !important;
    border: 1px solid #8c9298 !important;
    display: flex !important;
    height: 44px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .before-shop-loop .select2-selection__rendered {
    color: var(--tc-catalogue-ink) !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 42px !important;
    min-width: 0;
    overflow: hidden;
    padding-left: 0.875rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tc-filter-drawer-open .tc-filter-overlay {
    display: block;
  }

  .filtered-sidebar {
    bottom: 0;
    box-shadow: 12px 0 36px rgba(4, 21, 35, 0.2);
    display: block !important;
    height: 100dvh;
    left: 0;
    max-width: min(92vw, 420px) !important;
    opacity: 1 !important;
    overflow: hidden;
    padding: 0 !important;
    top: 0;
    transform: translate3d(-102%, 0, 0) !important;
    transition: transform 190ms ease, visibility 190ms linear;
    visibility: hidden;
    width: min(92vw, 420px) !important;
    z-index: 1000001;
  }

  .filtered-sidebar.tc-filter-open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible;
  }

  .filtered-sidebar .site-scroll,
  .filtered-sidebar .sidebar-inner,
  .filtered-sidebar .tc-native-filters,
  .filtered-sidebar .wpc-filters-main-wrap,
  .filtered-sidebar .wpc-filters-widget-content,
  .filtered-sidebar .wpc-filters-widget-containers-wrapper {
    height: 100%;
    max-height: none !important;
  }

  .filtered-sidebar .site-scroll {
    overflow: hidden !important;
  }

  .filtered-sidebar .sidebar-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .filtered-sidebar .sidebar-mobile-header {
    align-items: center;
    background: #fff;
    border-bottom: 3px solid var(--tc-catalogue-yellow);
    display: flex !important;
    flex: 0 0 auto;
    margin: 0;
    min-height: 64px;
    padding: 0.625rem 1rem;
  }

  .filtered-sidebar .sidebar-mobile-header .entry-title {
    color: var(--tc-catalogue-ink);
    font-size: 1rem;
    font-weight: 750;
  }

  .filtered-sidebar .sidebar-mobile-header .tc-filter-summary {
    background: transparent;
    border: 0;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
  }

  .filtered-sidebar .sidebar-mobile-header .close-sidebar {
    align-items: center;
    background: var(--tc-catalogue-ink);
    border: 2px solid var(--tc-catalogue-yellow);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    width: 44px;
  }

  .filtered-sidebar .tc-filter-summary {
    background: #fff;
    border-top: 0;
    flex: 0 0 auto;
    justify-content: flex-start;
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .filtered-sidebar .tc-filter-summary__count {
    align-items: center;
    background: var(--tc-catalogue-yellow);
    border: 1px solid var(--tc-catalogue-yellow-dark);
    border-radius: 999px;
    display: inline-flex;
    min-height: 30px;
    padding: 0 0.75rem;
  }

  .filtered-sidebar .tc-filter-summary__clear {
    display: none !important;
  }

  .filtered-sidebar .widget {
    flex: 1 1 auto;
    height: auto !important;
    margin: 0;
    min-height: 0;
    overflow: hidden;
  }

  .filtered-sidebar .tc-native-filters {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: auto !important;
    min-height: 0;
  }

  .filtered-sidebar .tc-native-filters__scroll {
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 0 1rem 1rem;
    scrollbar-color: var(--tc-catalogue-yellow-dark) #edf0f3;
    scrollbar-width: thin;
    touch-action: pan-y;
  }

  .filtered-sidebar .tc-native-filter-section {
    flex: 0 0 auto;
    height: auto !important;
    overflow: visible;
  }

  .filtered-sidebar
    .tc-native-filters
    .woocommerce-widget-layered-nav-list__item
    a {
    min-height: 44px;
  }

  .filtered-sidebar .wpc-filters-open-button-container,
  .filtered-sidebar .wpc-widget-close-container,
  .filtered-sidebar .wpc-filter-set-widget-title,
  .filtered-sidebar .wpc-edit-filter-set,
  .filtered-sidebar .ps__rail-x,
  .filtered-sidebar .ps__rail-y {
    display: none !important;
  }

  .filtered-sidebar .wpc-filters-widget-content {
    background: #fff !important;
    display: block !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    width: 100% !important;
  }

  .filtered-sidebar .wpc-filters-widget-containers-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .filtered-sidebar .wpc-filters-widget-top-container {
    flex: 0 0 auto;
    padding: 0 1rem;
  }

  .filtered-sidebar .wpc-filters-scroll-container {
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    padding: 0.75rem 1rem 1rem;
    scrollbar-color: var(--tc-catalogue-yellow-dark) #edf0f3;
    scrollbar-width: thin;
    touch-action: pan-y;
  }

  .filtered-sidebar .wpc-filters-section {
    border-bottom: 1px solid var(--tc-catalogue-border);
    margin: 0;
    padding: 1rem 0;
  }

  .filtered-sidebar .wpc-filter-title {
    color: var(--tc-catalogue-ink);
    font-size: 0.9375rem;
    font-weight: 750;
    margin-bottom: 0.625rem;
  }

  .filtered-sidebar .wpc-checkbox-item,
  .filtered-sidebar .wpc-radio-item {
    margin: 0 !important;
  }

  .filtered-sidebar .wpc-term-item-content-wrapper {
    align-items: center;
    display: grid !important;
    gap: 0.625rem;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    min-height: 44px;
    min-width: 0;
    width: 100%;
  }

  .filtered-sidebar .wpc-term-item-content-wrapper input {
    align-self: center;
    box-sizing: border-box;
    flex: 0 0 20px;
    height: 20px;
    margin: 0 !important;
    min-height: 20px;
    min-width: 20px;
    width: 20px;
  }

  .filtered-sidebar .wpc-term-item-content-wrapper label,
  .filtered-sidebar .wpc-term-item-content-wrapper a {
    align-items: center;
    display: flex;
    line-height: 1.35;
    margin: 0 !important;
    min-height: 44px;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
  }

  .filtered-sidebar .wpc-term-count {
    align-self: center;
    margin: 0 !important;
  }

  .filtered-sidebar select.wpc-filters-widget-select {
    background: #fff;
    border: 1px solid #aeb7c2;
    border-radius: 4px;
    color: var(--tc-catalogue-text);
    font-size: 1rem;
    height: 46px;
    padding: 0 0.75rem;
    width: 100%;
  }

  .filtered-sidebar .wpc-filters-widget-controls-container {
    display: none !important;
  }

  .filtered-sidebar .tc-mobile-filter-actions {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--tc-catalogue-border);
    box-shadow: 0 -8px 22px rgba(4, 30, 66, 0.1);
    display: grid;
    flex: 0 0 auto;
    gap: 0.5rem;
    grid-template-columns: minmax(6rem, auto) minmax(0, 1fr);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .tc-mobile-filter-actions__clear,
  .tc-mobile-filter-actions__apply {
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 750;
    min-height: 48px;
    padding: 0.5rem 0.875rem;
    touch-action: manipulation;
  }

  .tc-mobile-filter-actions__clear {
    background: #fff;
    border: 1px solid #aeb7c2;
    color: var(--tc-catalogue-ink);
  }

  .tc-mobile-filter-actions__apply {
    align-items: center;
    background: var(--tc-catalogue-yellow);
    border: 1px solid var(--tc-catalogue-yellow-dark);
    color: var(--tc-catalogue-ink);
    display: inline-flex;
    justify-content: center;
    position: relative;
  }

  .tc-mobile-filter-actions__clear:focus-visible,
  .tc-mobile-filter-actions__apply:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 197, 0, 0.34);
    outline: 2px solid var(--tc-catalogue-ink);
    outline-offset: 2px;
  }

  .tc-mobile-filter-actions__apply:disabled {
    background: #e4e7ec;
    border-color: #c5cbd3;
    color: var(--tc-catalogue-muted);
    cursor: not-allowed;
    opacity: 1;
  }

  .tc-mobile-filter-actions__clear[hidden]
    + .tc-mobile-filter-actions__apply {
    grid-column: 1 / -1;
  }

  .tc-mobile-filter-actions__apply.is-loading {
    cursor: pointer;
    padding-right: 2.75rem;
  }

  .tc-mobile-filter-actions__apply.is-loading::after {
    animation: tc-filter-action-spin 700ms linear infinite;
    border: 2px solid rgba(4, 30, 66, 0.24);
    border-radius: 50%;
    border-top-color: var(--tc-catalogue-ink);
    content: "";
    height: 18px;
    position: absolute;
    right: 0.875rem;
    width: 18px;
  }
}

@keyframes tc-filter-action-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .tc-loop-purchase-controls {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    width: calc(100% - 1rem);
  }

  .tc-catalogue-header {
    margin-top: 1rem;
    padding-bottom: 1rem;
  }

  .tc-catalogue-header__title {
    font-size: 1.625rem;
  }

  .tc-subcategory-chooser {
    margin-top: 1rem;
    padding: 1rem;
  }

  .tc-subcategory-chooser__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tc-subcategory-search {
    flex-basis: auto;
    width: 100%;
  }

  .tc-subcategory-list {
    grid-template-columns: 1fr;
    max-height: var(--tc-subcategory-mobile-height, 11rem);
  }

  .woocommerce-product-gallery ol.flex-control-thumbs > li,
  .woocommerce-product-gallery ol.flex-control-thumbs > .owl-item {
    flex-basis: calc((100% - 1.5rem) / 4) !important;
  }

  .tc-gallery-thumbs-shell {
    gap: 0.375rem;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .tc-gallery-thumb-button {
    height: 44px;
    width: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-subcategory-link,
  .filtered-sidebar,
  .tc-filter-accordion__toggle::after,
  .site-content .content-primary .products,
  .tc-mobile-filter-actions__apply.is-loading::after,
  .tc-subcategory-scroll-thumb,
  .woocommerce-product-gallery ol.flex-control-thumbs {
    scroll-behavior: auto;
    transition: none;
  }

  .site-content.ajax-loading .loader-image.preloader .path {
    animation: none !important;
  }

  .tc-mobile-filter-actions__apply.is-loading::after {
    animation-duration: 1.4s;
  }

  .tc-loop-purchase-controls > .add_to_cart_button.tc-cart-pending::after {
    animation-duration: 1.4s;
  }
}
