/* Sortarea catalogului WooCommerce. Păstrăm selectul nativ al temei. */
body.tax-product_cat .products .wd-add-btn-replace:has(> a.add_to_cart_button:is(.product_type_simple, .product_type_variable)) {
  display: none !important;
}

body .woocommerce-ordering {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

body .woocommerce-ordering select.orderby,
body .woocommerce-ordering.wd-style-underline select.orderby {
  appearance: none;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 42px 0 16px;
  border: 1px solid #d6dfe3;
  border-radius: 12px;
  background: #fff;
  color: #0a202c;
  box-shadow: 0 2px 8px rgb(10 32 44 / 6%);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

body .woocommerce-ordering select.orderby:hover {
  border-color: #aab9bf;
}

body .woocommerce-ordering select.orderby option {
  color: #0a202c;
  background: #fff;
}

body .woocommerce-ordering select.orderby:focus-visible {
  outline: 2px solid #0a6478;
  outline-offset: 2px;
}

body .woocommerce-ordering::after,
body .woocommerce-ordering.wd-ordering-mb-icon::after {
  position: absolute;
  top: 50%;
  right: 17px;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-right: 2px solid #0a202c;
  border-bottom: 2px solid #0a202c;
  color: inherit;
  content: '';
  font: inherit;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

/* Reprezentăm permanent primul breadcrumb (pagina principală) prin iconița home. */
body .woocommerce-breadcrumb > a:first-child {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  vertical-align: middle;
}

body .woocommerce-breadcrumb > a:first-child::before {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a202c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill='%230a202c' d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-6v-7h-4v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  content: '';
}

body .woocommerce-breadcrumb > a:first-child:hover::before,
body .woocommerce-breadcrumb > a:first-child:focus-visible::before {
  filter: brightness(0) saturate(100%) invert(47%) sepia(91%) saturate(2084%) hue-rotate(353deg) brightness(98%) contrast(93%);
}

@media (max-width: 768.98px) {
  body .woocommerce-ordering.wd-ordering-mb-icon {
    width: auto;
    min-width: 0;
    height: 46px;
  }

  body .woocommerce-ordering.wd-ordering-mb-icon select.orderby {
    position: relative;
    z-index: 0;
    width: min(190px, calc(100vw - 120px));
    height: 46px;
    min-height: 46px;
    padding: 0 40px 0 14px;
    border: 1px solid #d6dfe3;
    border-radius: 12px;
    background: #fff;
    color: #0a202c !important;
    font-size: 13px;
    text-overflow: ellipsis;
  }

  body .woocommerce-breadcrumb {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body .woocommerce-breadcrumb::-webkit-scrollbar {
    display: none;
  }

}
