/* Phox Woo Builder: shop archive parts (Woo Catalog Ordering, Woo Result
   Count, Woo Product Badge). Every colour reads a house token (pwb-base.css),
   so a container's Colors section restyles it. Element design controls
   (css.twig) are emitted at `%%SELECTOR%% .class` weight and come after this
   file. WooCommerce's own classes (woocommerce-ordering,
   woocommerce-result-count) stay on the markup for third-party code, so the
   rules below also cancel the floats and margins WooCommerce's stylesheet
   puts on them. */

/* ---- Catalog ordering ------------------------------------------------ */
.pwb-cord,
.pwb-cord.woocommerce-ordering {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: var(--pwb-cord-align, center);
  gap: 10px;
  float: none;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.pwb-cord__label {
  font-size: var(--pwb-font-sm, 13px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.pwb-cord__control {
  position: relative;
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  --pwb-cord-arrow: var(--pwb-text-2, #595959);
}
/* The arrow is drawn here (not as a background image) so one colour control
   can change it. It ignores the pointer so the select gets every click. */
.pwb-cord__control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--pwb-cord-arrow);
  border-bottom: 2px solid var(--pwb-cord-arrow);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.pwb-cord__select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: var(--pwb-input-h, 44px);
  margin: 0;
  padding: 0 38px 0 14px;
  border: 1px solid var(--pwb-input-border, #8f8f8f);
  border-radius: var(--pwb-radius, 8px);
  background-color: var(--pwb-surface, #fff);
  color: var(--pwb-text, #222);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  font-size: var(--pwb-font, 15px);
  line-height: 1.3;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
}
.pwb-cord__select:focus-visible {
  outline: none;
  border-color: var(--pwb-primary, #222);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pwb-primary, #222) 15%, transparent);
}
.pwb-cord__submit { cursor: pointer; }

/* ---- Result count ---------------------------------------------------- */
.pwb-rc,
.pwb-rc.woocommerce-result-count {
  float: none;
  margin: 0;
  font-size: var(--pwb-font-sm, 13px);
  line-height: 1.5;
}

/* ---- Product badges ---------------------------------------------------
   The list is a flex row (inline) or column (stacked). Each badge has its
   own colour pair; defaults follow the house tokens so they look right with
   no settings. */
.pwb-pb-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.pwb-pb {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pwb-pb-bg, var(--pwb-text, #222));
  color: var(--pwb-pb-color, #fff);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
}
.pwb-pb--sale { --pwb-pb-bg: var(--pwb-accent-text, #b83c0b); }
.pwb-pb--new { --pwb-pb-bg: var(--pwb-success, #1f7a43); }
.pwb-pb--outofstock { --pwb-pb-bg: #595959; }
.pwb-pb--featured { --pwb-pb-bg: var(--pwb-star, #f5a623); --pwb-pb-color: #222; }
.pwb-pb--backorder { --pwb-pb-bg: var(--pwb-warning, #dba617); --pwb-pb-color: #222; }
