/*
  IONTMAX category listing page
  v8 – anti-FOUC for listing product cards
*/

body.type-category,
body.in-category,
body.template-category {
  --im-cat-pad: var(--im-pad, clamp(16px, 4.2vw, 72px));
  --im-cat-max: var(--im-max, 1800px);
  --im-cat-text: #111214;
  --im-cat-muted: #6b7280;
  --im-cat-line: #ececec;
  --im-cat-surface: #f6f6f6;
  --im-cat-image-bg: #f2f2f2;
  --im-cat-radius: 12px;
  --im-cat-btn-bg: #1a1b1d;
  --im-cat-btn-text: #ffffff;
}

/* Anti-FOUC – hide native cards until iontmax-product-cards.js enhances them */
body.type-category #products .product:not(.iontmax-product-card-v23),
body.in-category #products .product:not(.iontmax-product-card-v23),
body.template-category #products .product:not(.iontmax-product-card-v23) {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.type-category #products .product.iontmax-product-card-v23,
body.in-category #products .product.iontmax-product-card-v23,
body.template-category #products .product.iontmax-product-card-v23 {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Breadcrumbs ── */
body.type-category .breadcrumbs-wrapper,
body.in-category .breadcrumbs-wrapper,
body.template-category .breadcrumbs-wrapper {
  box-sizing: border-box !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: 0 auto !important;
  padding: clamp(14px, 1.2vw, 18px) 0 0 !important;
  border: 0 !important;
}

body.type-category .breadcrumbs-wrapper .breadcrumbs,
body.in-category .breadcrumbs-wrapper .breadcrumbs,
body.template-category .breadcrumbs-wrapper .breadcrumbs {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--im-cat-muted) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

body.type-category #content-wrapper,
body.in-category #content-wrapper,
body.template-category #content-wrapper {
  padding-top: clamp(20px, 2vw, 28px) !important;
  padding-bottom: clamp(56px, 4.5vw, 80px) !important;
}

/* ── Category title ── */
body.type-category .content-inner > h1,
body.in-category .content-inner > h1,
body.template-category .content-inner > h1,
body.type-category .category-title,
body.in-category .category-title,
body.template-category .category-title {
  box-sizing: border-box !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: 0 auto clamp(20px, 2vw, 28px) !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--im-cat-text) !important;
  font-size: clamp(24px, 1.8vw, 32px) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  text-align: left !important;
}

/* ── Category top block (title + subcategories) ── */
body.type-category .category-top,
body.in-category .category-top,
body.template-category .category-top {
  box-sizing: border-box !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.type-category .category-top > h1,
body.in-category .category-top > h1,
body.template-category .category-top > h1,
body.type-category .category-top > .category-title,
body.in-category .category-top > .category-title,
body.template-category .category-top > .category-title {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  margin-bottom: clamp(16px, 1.4vw, 20px) !important;
}

/* ── Subcategory chips (parent categories) ── */
body.type-category ul.subcategories,
body.in-category ul.subcategories,
body.template-category ul.subcategories,
body.type-category ul.subcategories.with-image,
body.in-category ul.subcategories.with-image,
body.template-category ul.subcategories.with-image {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: 0 auto clamp(28px, 2.4vw, 40px) !important;
  padding: 0 !important;
  list-style: none !important;
}

body.type-category .category-top > ul.subcategories,
body.in-category .category-top > ul.subcategories,
body.template-category .category-top > ul.subcategories {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  margin-bottom: clamp(28px, 2.4vw, 40px) !important;
}

body.type-category ul.subcategories > li,
body.in-category ul.subcategories > li,
body.template-category ul.subcategories > li,
body.type-category ul.subcategories > li[class*="col-"],
body.in-category ul.subcategories > li[class*="col-"],
body.template-category ul.subcategories > li[class*="col-"] {
  flex: 0 0 auto !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.type-category ul.subcategories a,
body.in-category ul.subcategories a,
body.template-category ul.subcategories a {
  box-sizing: border-box !important;
  display: inline-block !important;
  position: relative !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px !important;
  min-height: 0 !important;
  padding: 0 18px !important;
  border: 1px solid var(--im-cat-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--im-cat-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  white-space: nowrap !important;
  text-align: center !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  transition: border-color 0.18s ease, background-color 0.18s ease !important;
}

body.type-category ul.subcategories.with-image a,
body.in-category ul.subcategories.with-image a,
body.template-category ul.subcategories.with-image a {
  padding-top: 0 !important;
  padding-right: 18px !important;
  padding-bottom: 0 !important;
  padding-left: 18px !important;
}

body.type-category ul.subcategories a::before,
body.in-category ul.subcategories a::before,
body.template-category ul.subcategories a::before,
body.type-category ul.subcategories a::after,
body.in-category ul.subcategories a::after,
body.template-category ul.subcategories a::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  content: none !important;
}

body.type-category ul.subcategories a:hover,
body.in-category ul.subcategories a:hover,
body.template-category ul.subcategories a:hover,
body.type-category ul.subcategories a:focus-visible,
body.in-category ul.subcategories a:focus-visible,
body.template-category ul.subcategories a:focus-visible {
  border-color: #d8d8d8 !important;
  background: var(--im-cat-surface) !important;
  color: var(--im-cat-text) !important;
  text-decoration: none !important;
}

body.type-category ul.subcategories .image,
body.in-category ul.subcategories .image,
body.template-category ul.subcategories .image {
  display: none !important;
}

body.type-category ul.subcategories .text,
body.in-category ul.subcategories .text,
body.template-category ul.subcategories .text {
  display: inline !important;
  position: static !important;
  top: auto !important;
  float: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  text-align: inherit !important;
  white-space: inherit !important;
  text-overflow: clip !important;
  transform: none !important;
  vertical-align: baseline !important;
}

body.type-category ul.subcategories .text::before,
body.in-category ul.subcategories .text::before,
body.template-category ul.subcategories .text::before,
body.type-category ul.subcategories .text::after,
body.in-category ul.subcategories .text::after,
body.template-category ul.subcategories .text::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  content: none !important;
}

/* Hide Shoptet "Nejprodávanější" strip on category pages */
body.type-category .products-top-wrapper,
body.in-category .products-top-wrapper,
body.template-category .products-top-wrapper {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   Sort picker – IONTMAX pill tabs
══════════════════════════════════════════════════════════════ */

body.type-category #category-header.category-header,
body.in-category #category-header.category-header,
body.template-category #category-header.category-header {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 12px 20px !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: 0 auto clamp(24px, 2vw, 32px) !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--im-cat-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.type-category .listSorting,
body.in-category .listSorting,
body.template-category .listSorting {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 14px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.type-category .listSorting__controls,
body.in-category .listSorting__controls,
body.template-category .listSorting__controls {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.type-category .listSorting__controls > li,
body.in-category .listSorting__controls > li,
body.template-category .listSorting__controls > li {
  margin: 0 !important;
  padding: 0 !important;
}

body.type-category .listSorting__control,
body.in-category .listSorting__control,
body.template-category .listSorting__control {
  box-sizing: border-box !important;
  display: inline-block !important;
  height: 36px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid var(--im-cat-line) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--im-cat-muted) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 34px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  text-align: center !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
}

body.type-category .listSorting__control::before,
body.in-category .listSorting__control::before,
body.template-category .listSorting__control::before,
body.type-category .listSorting__control::after,
body.in-category .listSorting__control::after,
body.template-category .listSorting__control::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  content: none !important;
}

body.type-category .listSorting__control:hover,
body.in-category .listSorting__control:hover,
body.template-category .listSorting__control:hover,
body.type-category .listSorting__control:focus-visible,
body.in-category .listSorting__control:focus-visible,
body.template-category .listSorting__control:focus-visible {
  color: var(--im-cat-text) !important;
  border-color: #d8d8d8 !important;
  background: #ffffff !important;
  outline: none !important;
}

body.type-category .listSorting__control--current,
body.in-category .listSorting__control--current,
body.template-category .listSorting__control--current,
body.type-category .listSorting__control--current:hover,
body.in-category .listSorting__control--current:hover,
body.template-category .listSorting__control--current:hover,
body.type-category .listSorting__control--current:focus-visible,
body.in-category .listSorting__control--current:focus-visible,
body.template-category .listSorting__control--current:focus-visible {
  color: var(--im-cat-btn-text) !important;
  border-color: var(--im-cat-btn-bg) !important;
  background: var(--im-cat-btn-bg) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

body.type-category .listItemsTotal,
body.in-category .listItemsTotal,
body.template-category .listItemsTotal {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 14px !important;
  color: var(--im-cat-muted) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body.type-category .listItemsTotal strong,
body.in-category .listItemsTotal strong,
body.template-category .listItemsTotal strong {
  color: var(--im-cat-text) !important;
  font-weight: 600 !important;
}

/* Dropdown sort mode (narrow screens) */
body.type-category .listSorting--dropdown .sortingToggle,
body.in-category .listSorting--dropdown .sortingToggle,
body.template-category .listSorting--dropdown .sortingToggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid var(--im-cat-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--im-cat-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.type-category .listSorting--dropdown.listSorting--open .listSorting__controls,
body.in-category .listSorting--dropdown.listSorting--open .listSorting__controls,
body.template-category .listSorting--dropdown.listSorting--open .listSorting__controls {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
  margin-top: 8px !important;
  padding: 6px !important;
  border: 1px solid var(--im-cat-line) !important;
  border-radius: var(--im-cat-radius) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(17, 18, 20, 0.08) !important;
}

body.type-category .listSorting--dropdown .listSorting__control,
body.in-category .listSorting--dropdown .listSorting__control,
body.template-category .listSorting--dropdown .listSorting__control {
  justify-content: flex-start !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

body.type-category .listSorting--dropdown .listSorting__control--current,
body.in-category .listSorting--dropdown .listSorting__control--current,
body.template-category .listSorting--dropdown .listSorting__control--current {
  border-color: var(--im-cat-btn-bg) !important;
  background: var(--im-cat-btn-bg) !important;
  color: var(--im-cat-btn-text) !important;
}

/* Hide duplicate listing heading */
body.type-category #products > h2,
body.in-category #products > h2,
body.template-category #products > h2,
body.type-category #products.products-block > h2,
body.in-category #products.products-block > h2,
body.template-category #products.products-block > h2 {
  display: none !important;
}

/* Main product grid width alignment */
body.type-category #products.products-block,
body.in-category #products.products-block,
body.template-category #products.products-block,
body.type-category #products.products,
body.in-category #products.products,
body.template-category #products.products {
  box-sizing: border-box !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* ══════════════════════════════════════════════════════════════
   Listing controls – load more, pagination, back to top
══════════════════════════════════════════════════════════════ */

body.type-category .listingControls,
body.in-category .listingControls,
body.template-category .listingControls {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  gap: 16px 20px !important;
  width: min(calc(100% - (var(--im-cat-pad) * 2)), var(--im-cat-max)) !important;
  max-width: var(--im-cat-max) !important;
  margin: clamp(28px, 2.4vw, 40px) auto 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.type-category .listingControls .loadMore,
body.in-category .listingControls .loadMore,
body.template-category .listingControls .loadMore {
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

body.type-category .listingControls .loadMore__button,
body.in-category .listingControls .loadMore__button,
body.template-category .listingControls .loadMore__button,
body.type-category .listingControls .loadMore__button.loadMore__button--products,
body.in-category .listingControls .loadMore__button.loadMore__button--products,
body.template-category .listingControls .loadMore__button.loadMore__button--products {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 220px !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 1px solid var(--im-cat-btn-bg) !important;
  border-radius: 7px !important;
  background: var(--im-cat-btn-bg) !important;
  box-shadow: none !important;
  color: var(--im-cat-btn-text) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.06em !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  appearance: none !important;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease !important;
}

body.type-category .listingControls .loadMore__button:hover,
body.in-category .listingControls .loadMore__button:hover,
body.template-category .listingControls .loadMore__button:hover,
body.type-category .listingControls .loadMore__button:focus-visible,
body.in-category .listingControls .loadMore__button:focus-visible,
body.template-category .listingControls .loadMore__button:focus-visible {
  border-color: #171819 !important;
  background: #171819 !important;
  color: var(--im-cat-btn-text) !important;
  outline: none !important;
}

body.type-category .listingControls .pagination,
body.in-category .listingControls .pagination,
body.template-category .listingControls .pagination {
  display: block !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.type-category .listingControls .pagination__list,
body.in-category .listingControls .pagination__list,
body.template-category .listingControls .pagination__list {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.type-category .listingControls .pagination__list > li,
body.in-category .listingControls .pagination__list > li,
body.template-category .listingControls .pagination__list > li {
  margin: 0 !important;
  padding: 0 !important;
}

body.type-category .listingControls .pagination__currentPage,
body.in-category .listingControls .pagination__currentPage,
body.template-category .listingControls .pagination__currentPage {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 24px !important;
  color: var(--im-cat-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

body.type-category .listingControls .pagination__link,
body.in-category .listingControls .pagination__link,
body.template-category .listingControls .pagination__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 1px solid var(--im-cat-line) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--im-cat-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: border-color 0.18s ease, background-color 0.18s ease !important;
}

body.type-category .listingControls .pagination__link:hover,
body.in-category .listingControls .pagination__link:hover,
body.template-category .listingControls .pagination__link:hover,
body.type-category .listingControls .pagination__link:focus-visible,
body.in-category .listingControls .pagination__link:focus-visible,
body.template-category .listingControls .pagination__link:focus-visible {
  border-color: #d8d8d8 !important;
  background: var(--im-cat-surface) !important;
  color: var(--im-cat-text) !important;
  outline: none !important;
}

body.type-category .listingControls .pagination__link--next,
body.in-category .listingControls .pagination__link--next,
body.template-category .listingControls .pagination__link--next {
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  font-size: 0 !important;
}

body.type-category .listingControls .pagination__link--next::after,
body.in-category .listingControls .pagination__link--next::after,
body.template-category .listingControls .pagination__link--next::after {
  display: block !important;
  width: 7px !important;
  height: 7px !important;
  border-right: 1.5px solid var(--im-cat-text) !important;
  border-bottom: 1.5px solid var(--im-cat-text) !important;
  transform: rotate(-45deg) !important;
  content: "" !important;
}

body.type-category .listingControls .pagination__link--last,
body.in-category .listingControls .pagination__link--last,
body.template-category .listingControls .pagination__link--last {
  min-width: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.type-category .listingControls .pagination__link--last:hover,
body.in-category .listingControls .pagination__link--last:hover,
body.template-category .listingControls .pagination__link--last:hover,
body.type-category .listingControls .pagination__link--last:focus-visible,
body.in-category .listingControls .pagination__link--last:focus-visible,
body.template-category .listingControls .pagination__link--last:focus-visible {
  background: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

body.type-category .listingControls .itemsTotal,
body.in-category .listingControls .itemsTotal,
body.template-category .listingControls .itemsTotal {
  display: block !important;
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--im-cat-muted) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

body.type-category .listingControls .itemsTotal strong,
body.in-category .listingControls .itemsTotal strong,
body.template-category .listingControls .itemsTotal strong {
  color: var(--im-cat-text) !important;
  font-weight: 600 !important;
}

body.type-category .listingControls .goToTop,
body.in-category .listingControls .goToTop,
body.template-category .listingControls .goToTop {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.type-category .listingControls .goToTop__button,
body.in-category .listingControls .goToTop__button,
body.template-category .listingControls .goToTop__button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid var(--im-cat-btn-bg) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--im-cat-btn-bg) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.06em !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  transition: background-color 0.18s ease, border-color 0.18s ease !important;
}

body.type-category .listingControls .goToTop__button::before,
body.in-category .listingControls .goToTop__button::before,
body.template-category .listingControls .goToTop__button::before {
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  border-top: 1.5px solid currentColor !important;
  border-left: 1.5px solid currentColor !important;
  transform: rotate(45deg) translateY(2px) !important;
  content: "" !important;
}

body.type-category .listingControls .goToTop__button:hover,
body.in-category .listingControls .goToTop__button:hover,
body.template-category .listingControls .goToTop__button:hover,
body.type-category .listingControls .goToTop__button:focus-visible,
body.in-category .listingControls .goToTop__button:focus-visible,
body.template-category .listingControls .goToTop__button:focus-visible {
  border-color: var(--im-cat-btn-bg) !important;
  background: var(--im-cat-surface) !important;
  color: var(--im-cat-btn-bg) !important;
  outline: none !important;
}

body.type-category .listingControls:not(:has(.loadMore)):not(:has(.pagination)):not(:has(.goToTop)) .itemsTotal,
body.in-category .listingControls:not(:has(.loadMore)):not(:has(.pagination)):not(:has(.goToTop)) .itemsTotal,
body.template-category .listingControls:not(:has(.loadMore)):not(:has(.pagination)):not(:has(.goToTop)) .itemsTotal {
  grid-row: 1 !important;
}

@media (max-width: 767px) {
  body.type-category .breadcrumbs-wrapper,
  body.in-category .breadcrumbs-wrapper,
  body.template-category .breadcrumbs-wrapper,
  body.type-category .content-inner > h1,
  body.in-category .content-inner > h1,
  body.template-category .content-inner > h1,
  body.type-category .category-top,
  body.in-category .category-top,
  body.template-category .category-top,
  body.type-category ul.subcategories,
  body.in-category ul.subcategories,
  body.template-category ul.subcategories,
  body.type-category #category-header.category-header,
  body.in-category #category-header.category-header,
  body.template-category #category-header.category-header,
  body.type-category #products.products-block,
  body.in-category #products.products-block,
  body.template-category #products.products-block,
  body.type-category #products.products,
  body.in-category #products.products,
  body.template-category #products.products,
  body.type-category .listingControls,
  body.in-category .listingControls,
  body.template-category .listingControls {
    width: min(calc(100% - 32px), var(--im-cat-max)) !important;
  }

  body.type-category .listingControls,
  body.in-category .listingControls,
  body.template-category .listingControls {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 14px !important;
  }

  body.type-category .listingControls .loadMore,
  body.in-category .listingControls .loadMore,
  body.template-category .listingControls .loadMore {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  body.type-category .listingControls .loadMore__button,
  body.in-category .listingControls .loadMore__button,
  body.template-category .listingControls .loadMore__button {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.type-category .listingControls .pagination,
  body.in-category .listingControls .pagination,
  body.template-category .listingControls .pagination {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
  }

  body.type-category .listingControls .itemsTotal,
  body.in-category .listingControls .itemsTotal,
  body.template-category .listingControls .itemsTotal {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  body.type-category .listingControls .goToTop,
  body.in-category .listingControls .goToTop,
  body.template-category .listingControls .goToTop {
    grid-column: 1 !important;
    grid-row: 4 !important;
    justify-self: center !important;
  }

  body.type-category #category-header.category-header,
  body.in-category #category-header.category-header,
  body.template-category #category-header.category-header {
    align-items: stretch !important;
  }

  body.type-category .listItemsTotal,
  body.in-category .listItemsTotal,
  body.template-category .listItemsTotal {
    width: 100% !important;
    padding-bottom: 0 !important;
    text-align: left !important;
  }

  body.type-category .listSorting__controls,
  body.in-category .listSorting__controls,
  body.template-category .listSorting__controls {
    gap: 6px !important;
  }

  body.type-category .listSorting__control,
  body.in-category .listSorting__control,
  body.template-category .listSorting__control {
    height: 34px !important;
    min-height: 0 !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    line-height: 32px !important;
  }

  body.type-category ul.subcategories a,
  body.in-category ul.subcategories a,
  body.template-category ul.subcategories a {
    height: 40px !important;
    min-height: 0 !important;
    padding: 0 16px !important;
    line-height: 38px !important;
  }
}
