/**
 * Solve the catalog page problems here, since sass is not available
 * and style.min.css is already minified and no changes can be made
 *
 * \wp-content\themes\asic\assets\css\catalog_hacks.css
 */

@media (max-width: 1300px) {
  .catalog__items ul.products,
  .searchsec-items.grid-col-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1040px) {
  .catalog__items ul.products,
  .searchsec-items.grid-col-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 919px) {
  .catalog__items ul.products,
  .searchsec-items.grid-col-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .catalog__items ul.products,
  .searchsec-items.grid-col-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.catalog__active-filters .wpc-custom-selected-terms {
  width: auto;
}

.site-main > .wpc-filters-open-button-container {
  display: none !important;
}

.wpc_show_bottom_widget .wpc-filters-open-button-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.asic-mobile-tools-wrapper {
  display: none;
  margin-bottom: 20px;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container {
  display: none;
}

@media (max-width: 920px) {
  .asic-mobile-tools-wrapper {
    display: block;
  }

  .asic-mobile-tools-wrapper .wpc-filters-open-button-container {
    display: block;
  }
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button {
  border: 2px #f8f8fa solid;
  display: flex;
  height: 50px;
  width: 100%;
  max-width: 170px;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  transition: all 250ms ease-in-out;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button:hover {
  border-color: #ff6a16;
  color: #ff6a16;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button svg path {
  transition: all 250ms ease-in-out;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button:hover svg path {
  fill: #ff6a16;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button .wpc-button-inner {
  display: flex;
  gap: 11px;
  font-size: 14px;
  line-height: 20px;
  color: #7d8389;
  transition: all 250ms ease-in-out;
}

.asic-mobile-tools-wrapper .wpc-filters-open-button-container .asic-filter-button:hover .wpc-button-inner {
  color: #ff6a16;
}

.filters.wpc-force-visibility {
  position: absolute !important;
}
@media (max-width: 919px) {
  .catalog__wrap .filters {
    transition: none !important;
  }
}

.wpc-wrap-icons .wpc-filter-selected-values {
  display: none !important;
}

/* Catalog: before aside */
.catalog-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  margin-bottom: 32px;
}
.catalog-shop-toolbar__count {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 20px;
  white-space: normal;
}
.catalog-shop-toolbar__count-label {
  color: #333;
}
.catalog-shop-toolbar__count-value {
  color: #a1a1a1;
}
.catalog-shop-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.catalog-shop-toolbar__pill {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 15px;
  padding: 16px 12px;
  min-width: 140px;
  height: 50px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.catalog-shop-toolbar__pill-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 40px;
}

.catalog__wrap {
  display: flex;
  gap: 20px;
}

@media (min-width: 1024px) {
  .catalog__header {
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e5e7e8;
    padding: 15px 18px;
  }

  .widget_wpc_chips_widget {
    display: flex;
    gap: 12px;
    align-items: baseline;
    position: relative;
  }

  .catalog__active-filters .widgettitle {
    white-space: nowrap;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.78;
    color: #333;
  }

  .catalog__active-filters .wpc-filter-chips-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .wpc-filter-chips-list li,
  body .wpc-filter-chips-list li.wpc-filter-chip,
  li.wpc-filter-chip {
    margin: 0 !important;
    font-size: 100%;
  }

  .catalog__active-filters .wpc-filter-chips-list .wpc-filter-chip:not(.wpc-chip-reset-all) a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 5px;
    background-color: #f8f8fa;
    text-decoration: none;
  }
  .wpc-chip-remove-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 11px;
    height: 11px;
    color: #fa8d15;
    transition: color 0.3s ease;
  }
  .wpc-chip-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .catalog__active-filters .wpc-filter-chips-list .wpc-chip-reset-all a {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.78571;
    color: #b42f28;
    border: 0;
    padding: 0;
    transition: color 0.3s ease;
  }
  .catalog__active-filters .wpc-filter-chips-list .wpc-chip-reset-all a .wpc-chip-remove-icon {
    display: none;
  }
  .catalog__active-filters .wpc-chip-reset-all {
    position: absolute;
    left: 0;
    top: 42px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

/* Catalog: aside filters */
.catalog__wrap .filters {
  width: 310px;
  min-width: 310px;
}
.catalog-aside-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 100%;
}
.catalog-aside-filters__promo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  min-height: 105px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(48.47deg, #ee2c72 7.79%, #4c07df 91.64%);
  box-shadow: 0 5px 12.5px rgba(12, 11, 13, 0.04);
  box-sizing: border-box;
}
.catalog-aside-filters__promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 21px;
}
.catalog-aside-filters__promo-title {
  margin: 0;
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
}
.catalog-aside-filters__info {
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.catalog-aside-filters__info--muted {
  flex: 0 0 auto;
  color: #201926;
  opacity: 0.32;
}
.catalog-aside-filters__promo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  background: #fff;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: #8113bb;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.catalog-aside-filters__row {
  display: flex;
  align-items: center;
  gap: 25px;
  width: 100%;
  margin-bottom: 20px;
}
.catalog-aside-filters__row-icon {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 100px;
  background: #3975ea;
  overflow: hidden;
}
.catalog-aside-filters__row-icon img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.catalog-aside-filters__row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.catalog-aside-filters__row-text {
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: #201926;
}
.catalog-aside-filters__toggle {
  flex: 0 0 44px;
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.catalog-aside-filters__toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.catalog-aside-filters__toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  padding: 2px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.catalog-aside-filters__toggle-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  background: #fff;
  box-shadow: 0 5px 25px -5px rgba(12, 11, 13, 0.04);
  transition: transform 0.3s ease;
}
.catalog-aside-filters__toggle-input:checked + .catalog-aside-filters__toggle-track .catalog-aside-filters__toggle-thumb {
  transform: translateX(20px);
  background: #fa8d15;
}

.wpc-filters-section {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}
.wpc-filter-header {
  padding: 0 16px 20px 32px;
  margin: 0 -20px 20px;
  border-bottom: 2px solid #f8f8fa;
}
.widget-title.wpc-filter-title,
.wpc-filter-title {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.875;
  background: linear-gradient(-63.13deg, #f99515 7.42%, #ff7316 112.6%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wpc-filter-layout-checkboxes .wpc-filter-title {
  background: none;
  color: #333;
  -webkit-background-clip: none;
  -webkit-text-fill-color: inherit;
  background-clip: none;
}
.wpc-filter-title button {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 16px;
  width: 100%;
  margin: 0 !important;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wpc-filter-collapsible .wpc-filter-title .wpc-open-icon,
.wpc-filter-collapsible-reverse.wpc-filter-collapsible.wpc-closed .wpc-filter-title .wpc-open-icon,
.wpc-filter-collapsible.wpc-closed .wpc-filter-title .wpc-open-icon,
.wpc-filter-has-selected.wpc-closed .wpc-filter-title .wpc-open-icon {
  border-left: 2px solid #fd8216;
  border-top: 2px solid #fd8216;
}

.wpc-filters-range-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.wpc-filters-range-column {
  flex: 1;
}
.wpc-filters-range-min,
.wpc-filters-range-max {
  width: 100%;
  height: 40px;
  padding: 10px !important;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #333;
  box-sizing: border-box;
}
.wpc-filters-range-slider-wrapper {
  position: relative;
  padding: 5px 0;
}
.wpc-filters-range-slider-control,
.ui-slider {
  position: relative;
  height: 2px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f8fa !important;
}
.ui-slider-range {
  position: absolute;
  height: 2px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(176.4deg, #ff6a16 14.73%, #ffa216 111.57%);
}
.wpc-filters-range-inputs .ui-slider-horizontal .ui-slider-handle {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(105.86deg, #ff6a16 14.73%, #ffa216 111.57%);
  cursor: pointer;
}

.wpc-filters-main-wrap ul.wpc-filters-ul-list {
  max-height: 190px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #fa8d15 #fff;
}
.wpc-filters-main-wrap ul.wpc-filters-ul-list::-webkit-scrollbar {
  width: 6px;
}
.wpc-filters-main-wrap ul.wpc-filters-ul-list::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 2px;
}
.wpc-filters-main-wrap ul.wpc-filters-ul-list::-webkit-scrollbar-thumb {
  background: #fa8d15;
  border-radius: 2px;
}
.wpc-filters-main-wrap ul.wpc-filters-ul-list::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  background-color: #ccc;
  display: block; /* Required in some browsers to show */
  height: 16px;
}
body .wpc-filters-main-wrap li.wpc-term-item {
  margin-bottom: 10px !important;
}
.wpc-term-item-content-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wpc-term-item-content-wrapper input[type="checkbox"] {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0 !important;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  appearance: none;
  cursor: pointer;
}
.wpc-term-item-content-wrapper input[type="checkbox"]:checked {
  border: 3px solid #fa8d15;
  background: linear-gradient(-82.06deg, #f99515 7.42%, #ff7316 112.6%);
  background-image:
    url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.98959 11.293L10.9393 16.2427L9.52513 17.657L4.57538 12.7072L5.98959 11.293Z" fill="white" /><path d="M9.52512 14.828L18.0104 6.34277L19.4246 7.75698L10.9393 16.2422L9.52512 14.828Z" fill="white" /></svg>'),
    linear-gradient(-82.06deg, #f99515 7.42%, #ff7316 112.6%);
  background-position:
    center,
    0 0;
  background-size:
    24px 24px,
    100% 100%;
  background-repeat: no-repeat;
}
.wpc-term-item-content-wrapper label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.78571 !important;
  color: #333;
  cursor: pointer;
}
.wpc-filters-main-wrap li.wpc-term-item a {
  margin-right: 0;
}
.wpc-term-count-brackets-open,
.wpc-term-count-brackets-close {
  display: none;
}

.wpc-term-item-content-wrapper span.wpc-term-count {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding-block: 3px;
  padding-inline: 1px;
  min-width: 24px;
  width: auto !important;
  min-height: 24px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1 !important;
  text-align: center;
  color: #fff;
  background: #38373f;
  opacity: 1;
}

.wpc-filters-main-wrap a.wpc-toggle-a {
  color: #fa8d15;
}

.catalog__items ul.products {
  grid-template-columns: repeat(3, 1fr);
}

li.product {
  padding: 16px;
}

li.product .woocommerce-LoopProduct-link {
  order: -1;
}

li.product .woocommerce-loop-product__title {
  margin-top: 10px;
  margin-bottom: 8px;
  height: auto;
}

li.product ul.product-attributes {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: auto;
}

.product-attributes .product-attr {
  padding-left: 24px;
}

li.product .product-attributes .algo-image {
  position: static;
}

.product-meta-wrap {
  background: #f6f6f6;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.product-meta-wrap .woocommerce-loop-product__meta {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.2;
  justify-content: space-between;
  width: 100%;
}
.product-meta-wrap .product-code {
  font-weight: 300;
  font-size: 12px;
  line-height: 1.2;
  color: #676767;
}
.product-meta-wrap .product-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 0 !important;
}
.product-meta-wrap .price-from,
.product-meta-wrap .price-to-uah {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.2;
  color: #676767;
}
.product-meta-wrap .price-to-uah {
  padding-left: 10px;
}
li.product .product-price .price {
  font-size: 20px;
  line-height: 1;
}
.product-buttons > .button {
  border-radius: 12px;
}
li.product .product-buttons > .add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Product card icons: external sprite (nested <svg id>, not <symbol>) + mask */
li.product .product-buttons > .add_to_cart_button::before {
  content: none;
  display: none;
}

li.product .add_to_cart_button .button-icon {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

li.product .add_to_cart_button .button-icon::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background-color: #fff;
  mask-image: url("../img/header/product-icons.svg#icon-cart");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url("../img/header/product-icons.svg#icon-cart");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

li.product .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt::before {
  content: "" !important;
  display: block;
  width: 24px;
  height: 24px;
  background: url("../img/header/product-icons.svg#icon-heart") center / contain no-repeat !important;
  position: static;
  top: auto;
  left: auto;
  transform: none;
  animation: none;
  font-size: 0;
  line-height: 0;
}

li.product .br_compare_button::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: url("../img/header/product-icons.svg#icon-compare") center / contain no-repeat !important;
}

li.product .br_compare_button i {
  display: none;
}

/* Pagination */
.shop-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 0;
  border-top: none;
}

.shop-footer-row .woocommerce-result-count {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  color: #a1a1a1;
  white-space: nowrap;
}

.shop-footer-row .woocommerce-result-count span {
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  color: #333;
}

.shop-footer-row .woocommerce-pagination {
  margin: 0;
}

.shop-footer-row ul.page-numbers {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-footer-row ul.page-numbers li {
  margin: 0;
  padding: 0;
}

.shop-footer-row ul.page-numbers a.page-numbers,
.shop-footer-row ul.page-numbers span.page-numbers {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
}

.shop-footer-row ul.page-numbers span.page-numbers.current {
  color: #fa8d15;
}

.shop-footer-row ul.page-numbers span.page-numbers.dots {
  color: #333;
}

.shop-footer-row ul.page-numbers .prev.page-numbers,
.shop-footer-row ul.page-numbers .next.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 10px;
  font-size: 0;
  line-height: 0;
}

.shop-footer-row ul.page-numbers .prev.page-numbers {
  margin-right: 25px;
  background: #fff;
  color: #c6c6cb;
  border: 1px solid #e5e7e8;
}

.shop-footer-row ul.page-numbers span.prev.page-numbers {
  pointer-events: none;
  cursor: default;
}

.shop-footer-row ul.page-numbers .next.page-numbers {
  margin-left: 25px;
  background: linear-gradient(180deg, #f99515 0%, #ff7316 100%);
  color: #fff;
  border: none;
}

.catalog .woocommerce-pagination ul li:first-child span.current::before,
.catalog .woocommerce-pagination ul li:first-child span.current::after {
  display: none;
}

@media (max-width: 920px) {
  .shop-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .shop-footer-row .woocommerce-result-count {
    max-width: none;
    white-space: normal;
  }

  .shop-footer-row ul.page-numbers .prev.page-numbers {
    margin-right: 6px;
  }

  .shop-footer-row ul.page-numbers .next.page-numbers {
    margin-left: 6px;
  }

  .shop-footer-row ul.page-numbers span.page-numbers.current::before,
  .shop-footer-row ul.page-numbers span.page-numbers.current::after {
    content: none;
  }

  .shop-footer-row ul.page-numbers li:first-child span.page-numbers.current,
  .shop-footer-row ul.page-numbers li:last-child span.page-numbers.current {
    padding: 0;
  }
}
