/*
 * Shop archives (/shop + product category/tag pages) — native WooCommerce
 * loop inside the Elementor archive template. Cards, toolbar, FiboFilters
 * sidebar, pagination and list-view use design-system tokens only.
 *
 * Scope: body.rq-shop-archive (added on shop + product taxonomy archives).
 * Layout columns stay under Elementor's control; this sheet styles surfaces,
 * type, controls and the product grid.
 */

/* ------------------------------------------------------------------ layout */

body.rq-shop-archive .elementor-location-archive,
body.rq-shop-archive .elementor-location-archive > .e-con-boxed,
body.rq-shop-archive .elementor-location-archive > .e-con-boxed > .e-con-inner {
  height: auto !important;
  min-height: 0 !important;
}

body.rq-shop-archive .elementor-location-archive {
  background-color: var(--rq-background);
  color: var(--rq-foreground);
  font-family: var(--rq-font-body);
}

body.rq-shop-archive .elementor-location-archive > .e-con-boxed > .e-con-inner {
  max-width: var(--rq-container-max);
  margin-inline: auto;
  padding-block: 1.25rem 1.5rem;
  padding-inline: var(--rq-container-pad);
}

@media (min-width: 768px) {
  body.rq-shop-archive .elementor-location-archive > .e-con-boxed > .e-con-inner {
    padding-inline: var(--rq-container-pad-md);
    padding-block: 1.5rem 1.75rem;
  }
}

@media (min-width: 1024px) {
  body.rq-shop-archive .elementor-location-archive > .e-con-boxed > .e-con-inner {
    padding-inline: var(--rq-container-pad-lg);
  }
}

/* Filters + products row: side-by-side from laptop up.
 * Structure: row e-con → [filter column e-con > .shop_filter_overlay] + [products e-con]. */
@media (min-width: 1024px) {
  body.rq-shop-archive .e-con:has(.shop_filter_overlay):has(ul.products) {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 2rem !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.rq-shop-archive .e-con:has(> .shop_filter_overlay) {
    flex: 0 0 17.5rem !important;
    width: 17.5rem !important;
    max-width: 17.5rem !important;
    height: auto !important;
    max-height: none;
    min-height: 0 !important;
    position: sticky;
    top: 7.5rem;
    z-index: 1;
    align-self: flex-start !important;
    overflow: visible;
  }

  body.rq-shop-archive .shop_filter_overlay {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
  }

  body.rq-shop-archive .e-con:has(.shop_filter_overlay):has(ul.products) > .e-con:has(ul.products) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: flex-start !important;
  }

  /* Elementor WC products widget must size to its content, not stretch
   * to the tall filters column (that was the big empty gap under pagination). */
  body.rq-shop-archive .e-con:has(ul.products) .elementor-wc-products,
  body.rq-shop-archive .e-con:has(ul.products) .elementor-widget-woocommerce-products,
  body.rq-shop-archive .e-con:has(ul.products) .woocommerce.columns-3 {
    height: auto !important;
    min-height: 0 !important;
  }
}

/* -------------------------------------------------------------- breadcrumb */

body.rq-shop-archive .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--rq-muted-foreground);
}

body.rq-shop-archive .woocommerce-breadcrumb a {
  color: color-mix(in oklab, var(--rq-foreground) 60%, transparent);
  text-decoration: none;
  transition: color 150ms ease;
}

body.rq-shop-archive .woocommerce-breadcrumb a:hover {
  color: var(--rq-foreground);
}

/* ---------------------------------------------------------------- toolbar */

body.rq-shop-archive .woocommerce-result-count {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--rq-muted-foreground);
}

body.rq-shop-archive .shop_productSort {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.625rem !important;
  width: auto !important;
  max-width: none !important;
  margin-inline-start: auto;
}

/* Sort by group + List View sit as siblings — give them room. */
body.rq-shop-archive .e-con:has(> .shop_productSort):has(> .shop_listGrid) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 1.25rem !important;
  width: auto !important;
  margin-inline-start: auto;
}

body.rq-shop-archive .shop_listGrid {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}

body.rq-shop-archive .shop_productSort .elementor-heading-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rq-foreground);
}

body.rq-shop-archive .woocommerce-ordering {
  margin: 0 !important;
}

body.rq-shop-archive .woocommerce-ordering select.orderby {
  height: 2.75rem;
  min-width: 11rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  color: var(--rq-foreground);
  font-family: var(--rq-font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  cursor: pointer;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

body.rq-shop-archive .woocommerce-ordering select.orderby:focus {
  border-color: var(--rq-ring);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--rq-ring) 35%, transparent);
}

body.rq-shop-archive .grid-list-toggle-wrapper {
  margin: 0;
}

body.rq-shop-archive .grid-list-toggle-wrapper .toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-background);
  color: var(--rq-foreground);
  font-family: var(--rq-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

body.rq-shop-archive .grid-list-toggle-wrapper .toggle-btn:hover {
  background-color: var(--rq-muted);
}

body.rq-shop-archive .grid-list-toggle-wrapper .toggle-btn[aria-pressed="true"] {
  background-color: var(--rq-foreground);
  border-color: var(--rq-foreground);
  color: var(--rq-background);
}

body.rq-shop-archive .grid-list-toggle-wrapper .toggle-btn .icon {
  font-size: 0.875rem;
  line-height: 1;
}

/*
 * Toolbar: one row — result count | compact search | sort + list view.
 * Direct-child :has() so this does not match the archive root.
 */
body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 1rem !important;
  width: 100%;
  margin-block-end: 1.25rem;
  padding-block-end: 1rem;
  border-bottom: 1px solid var(--rq-border);
}

body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) > .e-con:has(.shop_resultCount) {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 9rem;
}

body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) > .elementor-widget-shortcode {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 12rem;
  max-width: 22rem;
}

body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) > .e-con:has(.shop_productSort),
body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) > .shop_productSort {
  flex: 0 0 auto !important;
  width: auto !important;
  margin-inline-start: auto;
}

body.rq-shop-archive .elementor-element-b6da032 {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 12rem;
  max-width: 22rem !important;
}

/* Toolbar search widget (FiboSearch / dgwt-wcas). */
body.rq-shop-archive .dgwt-wcas-search-wrapp {
  width: 100%;
  max-width: 22rem;
}

body.rq-shop-archive .dgwt-wcas-search-form {
  display: flex;
  align-items: center;
  height: 2.75rem;
  border: 1px solid var(--rq-border) !important;
  border-radius: var(--rq-radius-brand) !important;
  background-color: var(--rq-card) !important;
  overflow: hidden;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

body.rq-shop-archive .dgwt-wcas-search-form:has(input:focus) {
  border-color: var(--rq-ring) !important;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--rq-ring) 35%, transparent);
}

body.rq-shop-archive .dgwt-wcas-sf-wrapp {
  flex: 1 1 auto;
  height: 100%;
}

body.rq-shop-archive input.dgwt-wcas-search-input {
  width: 100% !important;
  height: 100% !important;
  padding-inline: 0.875rem 2.75rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--rq-foreground) !important;
  font-family: var(--rq-font-body);
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  outline: none !important;
}

body.rq-shop-archive .dgwt-wcas-search-input::placeholder {
  color: var(--rq-muted-foreground) !important;
  opacity: 1;
}

/* Submit button sits inside the rounded field, flush right, no dark box. */
body.rq-shop-archive .dgwt-wcas-search-submit {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 var(--rq-radius-brand) var(--rq-radius-brand) 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color 150ms ease;
}

body.rq-shop-archive .dgwt-wcas-search-submit:hover {
  background-color: var(--rq-muted) !important;
}

body.rq-shop-archive .dgwt-wcas-search-submit svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

body.rq-shop-archive .dgwt-wcas-search-submit svg path,
body.rq-shop-archive .dgwt-wcas-ico-magnifier-handler path,
body.rq-shop-archive .dgwt-wcas-search-icon svg path {
  fill: var(--rq-muted-foreground);
}

/* Solaris layout draws a triangular notch next to the submit — drop it. */
body.rq-shop-archive .dgwt-wcas-search-icon-arrow,
body.rq-shop-archive .dgwt-wcas-search-submit::before,
body.rq-shop-archive .dgwt-wcas-search-submit::after,
body.rq-shop-archive .dgwt-wcas-sf-wrapp::before,
body.rq-shop-archive .dgwt-wcas-sf-wrapp::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  background: none !important;
}

body.rq-shop-archive .dgwt-wcas-preloader {
  inset-inline-end: 2.75rem !important;
}

/* Above 1024px the field is always expanded in the toolbar. */
@media (min-width: 1024px) {
  body.rq-shop-archive .elementor-element-b6da032 .dgwt-wcas-search-icon,
  body.rq-shop-archive .e-con:has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) .dgwt-wcas-search-icon {
    display: none;
  }
}

/* ----------------------------------------------------------- bulk toolbar */

body.rq-shop-archive .bulk-request-header {
  display: none !important;
}

body.rq-shop-archive .bulk-request-header label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 !important;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rq-foreground);
  cursor: pointer;
}

body.rq-shop-archive .bulk-request-header input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--rq-primary);
  cursor: pointer;
}

body.rq-shop-archive .bulk-request-header .bulk-add-to-request,
body.rq-shop-archive .bulk-request-header .button.bulk-add-to-request {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding-inline: 1.25rem;
  border: 1px solid var(--rq-border) !important;
  border-radius: var(--rq-radius-brand) !important;
  background-color: var(--rq-background) !important;
  background-image: none !important;
  color: var(--rq-foreground) !important;
  font-family: var(--rq-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color 150ms ease;
}

body.rq-shop-archive .bulk-request-header .bulk-add-to-request:hover,
body.rq-shop-archive .bulk-request-header .button.bulk-add-to-request:hover {
  background-color: var(--rq-muted) !important;
}

/* ---------------------------------------------------------- product grid */

body.rq-shop-archive ul.products {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

@media (min-width: 640px) {
  body.rq-shop-archive ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1280px) {
  body.rq-shop-archive ul.products.columns-3,
  body.rq-shop-archive ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

body.rq-shop-archive ul.products::before,
body.rq-shop-archive ul.products::after {
  display: none !important;
  content: none !important;
}

/* --------------------------------------------------------- product cards */

body.rq-shop-archive ul.products li.product {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  box-shadow: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

body.rq-shop-archive ul.products li.product:hover {
  border-color: color-mix(in oklab, var(--rq-foreground) 16%, var(--rq-border));
  box-shadow: 0 8px 20px color-mix(in oklab, var(--rq-foreground) 6%, transparent);
}

body.rq-shop-archive ul.products li.product .woocommerce-LoopProduct-link {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

/*
 * Image area — edge-to-edge 4:3 frame, same hover language as
 * `.rq-product-card__media` (clipped slow scale, no card lift).
 */
body.rq-shop-archive ul.products li.product .woocommerce-LoopProduct-link > img,
body.rq-shop-archive ul.products li.product .attachment-woocommerce_thumbnail,
body.rq-shop-archive ul.products li.product img.wp-post-image {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  margin: 0 !important;
  padding: 0;
  background-color: var(--rq-muted);
  border-radius: 0;
  transition: transform 700ms ease;
  box-sizing: border-box;
}

body.rq-shop-archive ul.products li.product:hover .woocommerce-LoopProduct-link > img:not(.woocommerce-placeholder):not([src*="placeholder"]),
body.rq-shop-archive ul.products li.product:hover img.wp-post-image:not(.woocommerce-placeholder):not([src*="placeholder"]) {
  transform: scale(1.03);
}

body.rq-shop-archive ul.products li.product img.woocommerce-placeholder,
body.rq-shop-archive ul.products li.product img[src*="placeholder"],
body.rq-shop-archive ul.products li.product img[src*="woocommerce-placeholder"] {
  object-fit: contain;
  background-color: var(--rq-muted);
  opacity: 0.85;
  transform: none !important;
}

body.rq-shop-archive ul.products li.product .woocommerce-loop-product__title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0 !important;
  padding: 1rem 1rem;
  background-color: var(--rq-card);
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  color: var(--rq-foreground) !important;
}

body.rq-shop-archive ul.products li.product .price {
  margin: 0.5rem 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rq-foreground);
}

/* -------------------------------------------------------------- RFQ / CTA */

/*
 * Stable CTA slot: hide YITH's transient "Adding…" text under the button
 * (it jumps the layout), keep loading feedback on the button itself, then
 * swap cleanly to the browse-list control at the same height.
 */
body.rq-shop-archive ul.products li.product .yith-ywraq-add-to-quote {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-block-start: auto;
  padding: 1rem;
  border-top: 1px solid var(--rq-border);
}

body.rq-shop-archive ul.products li.product .yith-ywraq-add-button {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 2.75rem;
}

body.rq-shop-archive ul.products li.product a.add-request-quote-button.button,
body.rq-shop-archive ul.products li.product .add-request-quote-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0 !important;
  padding-inline: 1rem !important;
  border: 0 !important;
  border-radius: var(--rq-radius-brand) !important;
  background-color: transparent !important;
  background-image: linear-gradient(
    135deg,
    var(--rq-logo-blue-light),
    var(--rq-logo-blue-mid) 52%,
    var(--rq-logo-blue-deep)
  ) !important;
  color: var(--rq-primary-foreground) !important;
  font-family: var(--rq-font-body);
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: normal;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition:
    filter 150ms ease,
    opacity 150ms ease;
}

body.rq-shop-archive ul.products li.product a.add-request-quote-button.button:hover,
body.rq-shop-archive ul.products li.product .add-request-quote-button:hover {
  filter: brightness(0.95);
  color: var(--rq-primary-foreground) !important;
}

/* Loading state lives on the button — never under it. */
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button.loading .add-request-quote-button,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button.ywraq-adding .add-request-quote-button,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button:has(> img.ywraq-loader) .add-request-quote-button,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button:has(> img[src*="ajax-loader"]) .add-request-quote-button,
body.rq-shop-archive ul.products li.product a.add-request-quote-button.loading,
body.rq-shop-archive ul.products li.product a.add-request-quote-button.disabled,
body.rq-shop-archive ul.products li.product a.add-request-quote-button[disabled] {
  opacity: 0.4 !important;
  pointer-events: none;
  cursor: wait !important;
  filter: none;
}

/*
 * YITH injects <img class="ywraq-loader"> as a sibling under the button.
 * Pin it dead-center over the CTA so it never expands the card.
 */
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button > img.ywraq-loader,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button > img[src*="ajax-loader"],
body.rq-shop-archive ul.products li.product .yith-ywraq-add-to-quote > img.ywraq-loader,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-to-quote > img[src*="ajax-loader"] {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 3;
  width: 1.25rem !important;
  height: 1.25rem !important;
  max-width: 1.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none;
  display: block !important;
}

/* YITH's transient product message ("Adding…") — kill the under-button jump. */
body.rq-shop-archive ul.products li.product .yith_ywraq_add_item_product_message,
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_product-response"],
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_product_message"],
body.rq-shop-archive ul.products li.product .yith-ywraq-add-to-quote .blockUI {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* Soft confirmation stays out of the way — browse control is the action. */
body.rq-shop-archive ul.products li.product .yith_ywraq_add_item_response_message,
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_response-"]:not([class*="browse"]) {
  display: none !important;
}

/* Browse list — same footprint as Add to List, muted ladder. */
body.rq-shop-archive ul.products li.product .yith_ywraq_add_item_browse_message,
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_browse"] {
  margin: 0;
  width: 100%;
}

body.rq-shop-archive ul.products li.product .yith_ywraq_add_item_browse_message a,
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_browse"] a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-background);
  color: var(--rq-foreground) !important;
  font-family: var(--rq-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  transition: background-color 150ms ease;
}

body.rq-shop-archive ul.products li.product .yith_ywraq_add_item_browse_message a:hover,
body.rq-shop-archive ul.products li.product [class*="yith_ywraq_add_item_browse"] a:hover {
  background-color: var(--rq-muted);
  color: var(--rq-foreground) !important;
}

/* Already-in-list: outline variant matching rq-product-card__rfq.is-added. */
body.rq-shop-archive ul.products li.product .added .add-request-quote-button,
body.rq-shop-archive ul.products li.product .yith-ywraq-add-button.hide .add-request-quote-button {
  border: 1px solid var(--rq-foreground) !important;
  background-image: none !important;
  background-color: var(--rq-card) !important;
  color: var(--rq-foreground) !important;
}

/* ----------------------------------------------------------- FiboFilters */

body.rq-shop-archive .shop_filter_overlay,
body.rq-shop-archive .fibofilters-vertical-filters-container {
  color: var(--rq-foreground);
}

/* FiboFilters pins #fibofilters at z-index ~999995 — keep it under the header. */
body.rq-shop-archive #fibofilters {
  z-index: 1 !important;
}

body.rq-shop-archive .shop_filter_overlay {
  position: relative;
  z-index: 1;
}

body.rq-shop-archive .shop_filter_overlay .elementor-heading-title {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rq-foreground);
}

/*
 * Elementor paints the FILTERS container border twice: on the box and on
 * ::before. Kill both, then one token hairline on the wrapper.
 */
body.rq-shop-archive .shop_filter_overlay > .e-con {
  margin: 0 0 1rem;
  padding: 0 0 0.75rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rq-border) !important;
  box-shadow: none !important;
  --border-top-width: 0px;
  --border-right-width: 0px;
  --border-bottom-width: 0px;
  --border-left-width: 0px;
  --border-block-start-width: 0px;
  --border-block-end-width: 0px;
}

body.rq-shop-archive .shop_filter_overlay > .e-con::before,
body.rq-shop-archive .shop_filter_overlay > .e-con::after {
  border: 0 !important;
  border-width: 0 !important;
  box-shadow: none !important;
}

body.rq-shop-archive .shop_filter_overlay .elementor-widget-heading {
  margin: 0;
  padding: 0;
  border: 0 !important;
}

body.rq-shop-archive .shop_filter_overlay .elementor-widget-heading ~ .elementor-widget-heading,
body.rq-shop-archive .shop_filter_overlay .elementor-widget-divider,
body.rq-shop-archive .shop_filter_overlay .elementor-widget-separator,
body.rq-shop-archive .shop_filter_overlay .fibofilters-applied-filters-container {
  display: none !important;
}

body.rq-shop-archive .fibofilters-vertical-filters-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

body.rq-shop-archive .fibofilters-block {
  margin-block-end: 0;
  padding-block-end: 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--rq-border);
  box-shadow: none;
}

body.rq-shop-archive .fibofilters-block:last-child {
  border-bottom: 0;
  padding-block-end: 0;
}

/* Thin, quiet scrollbars inside long Fibo lists — not a second page gutter. */
body.rq-shop-archive .shop_filter_overlay,
body.rq-shop-archive .fibofilters-vertical-filters-container,
body.rq-shop-archive .fibofilters-block__content,
body.rq-shop-archive .fibofilters-collapser {
  scrollbar-width: thin;
  scrollbar-color: var(--rq-border) transparent;
}

body.rq-shop-archive .shop_filter_overlay::-webkit-scrollbar,
body.rq-shop-archive .fibofilters-vertical-filters-container::-webkit-scrollbar,
body.rq-shop-archive .fibofilters-block__content::-webkit-scrollbar,
body.rq-shop-archive .fibofilters-collapser::-webkit-scrollbar {
  width: 4px;
}

body.rq-shop-archive .shop_filter_overlay::-webkit-scrollbar-track,
body.rq-shop-archive .fibofilters-vertical-filters-container::-webkit-scrollbar-track,
body.rq-shop-archive .fibofilters-block__content::-webkit-scrollbar-track,
body.rq-shop-archive .fibofilters-collapser::-webkit-scrollbar-track {
  background: transparent;
}

body.rq-shop-archive .shop_filter_overlay::-webkit-scrollbar-thumb,
body.rq-shop-archive .fibofilters-vertical-filters-container::-webkit-scrollbar-thumb,
body.rq-shop-archive .fibofilters-block__content::-webkit-scrollbar-thumb,
body.rq-shop-archive .fibofilters-collapser::-webkit-scrollbar-thumb {
  background-color: var(--rq-border);
  border-radius: 9999px;
}

body.rq-shop-archive .fibofilters-block__headline-box-inner {
  margin: 0;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.3;
  color: var(--rq-foreground) !important;
}

body.rq-shop-archive .fibofilters-block__chevron-btn {
  color: var(--rq-muted-foreground);
}

body.rq-shop-archive .fibofilters-block__chevron-btn svg path {
  stroke: var(--rq-muted-foreground);
}

body.rq-shop-archive .fibofilters-item {
  margin: 0;
  padding: 0.3125rem 0;
}

body.rq-shop-archive .fibofilters-item__interactive {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--rq-foreground);
  cursor: pointer;
  transition: color 150ms ease;
}

body.rq-shop-archive .fibofilters-item__interactive:hover {
  color: var(--rq-primary);
}

body.rq-shop-archive .fibofilters-item__interactive:hover .fibofilters-item__counter {
  color: var(--rq-primary);
}

body.rq-shop-archive .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item--checkbox .fibofilters-item__control {
  flex: 0 0 1.25rem !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  max-width: 1.25rem !important;
  min-height: 1.25rem !important;
  max-height: 1.25rem !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
  border: 1.5px solid var(--rq-border) !important;
  border-radius: 0.25rem !important;
  background-color: var(--rq-card);
  background-image: none;
  box-shadow: none !important;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

body.rq-shop-archive .fibofilters-item__interactive:hover .fibofilters-item__control {
  border-color: color-mix(in oklab, var(--rq-foreground) 35%, var(--rq-border)) !important;
}

/* Fibo marks selection with .fibofilters-selected (and aria-checked). Do not
 * force a white fill with !important — that hides the white SVG check. */
body.rq-shop-archive .fibofilters-item.fibofilters-selected > .fibofilters-item__interactive > .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item.fibofilters-selected > .fibofilters-collapser-container > .fibofilters-item__interactive > .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item__interactive[aria-checked="true"] .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item__interactive[aria-checked="mixed"] .fibofilters-item__control {
  border-color: var(--rq-primary) !important;
  background-color: var(--rq-primary) !important;
  box-shadow: none !important;
}

body.rq-shop-archive .fibofilters-item__control svg {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 0.7rem !important;
  height: 0.7rem !important;
  transform: translate(-50%, -50%) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

body.rq-shop-archive .fibofilters-item__control svg path {
  stroke: #fff !important;
}

body.rq-shop-archive .fibofilters-item--radio .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item--radio.fibofilters-selected > .fibofilters-item__interactive > .fibofilters-item__control {
  border-radius: 9999px !important;
}

body.rq-shop-archive .fibofilters-item--radio.fibofilters-selected > .fibofilters-item__interactive > .fibofilters-item__control,
body.rq-shop-archive .fibofilters-item--radio .fibofilters-item__interactive[aria-checked="true"] .fibofilters-item__control {
  background-color: var(--rq-primary) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 0.2rem var(--rq-card) !important;
}

body.rq-shop-archive .fibofilters-item__label,
body.rq-shop-archive .fibofilters-item__counter {
  color: inherit;
}

body.rq-shop-archive .fibofilters-item__counter {
  margin-inline-start: auto;
  color: var(--rq-muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 150ms ease;
}

body.rq-shop-archive .fibofilters-items-search {
  margin-block-end: 0.75rem;
}

body.rq-shop-archive .fibofilters-items-search input[type="search"],
body.rq-shop-archive .fibofilters-items-search input[type="text"] {
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rq-input);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  color: var(--rq-foreground);
  font-family: var(--rq-font-body);
  font-size: 0.875rem;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

body.rq-shop-archive .fibofilters-items-search input:focus {
  border-color: var(--rq-ring);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--rq-ring) 35%, transparent);
}

/* Applied chips belong above the product grid, never in the sidebar. */
body.rq-shop-archive .shop_filter_overlay .fibofilters-applied-filters-container,
body.rq-shop-archive .fibofilters-vertical-filters-container .fibofilters-applied-filters-container,
body.rq-shop-archive .fibofilters-vertical-filters-container + .fibofilters-applied-filters-container {
  display: none !important;
}

/* Applied-filter chips above the cards. */
body.rq-shop-archive .e-con:has(ul.products) > .fibofilters-applied-filters-container,
body.rq-shop-archive .woocommerce .fibofilters-applied-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 1rem;
}

body.rq-shop-archive .fibofilters-applied-filters-container [class*="chip"],
body.rq-shop-archive .fibofilters-applied-filters-container button,
body.rq-shop-archive .fibofilters-applied-filters-container a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--rq-border);
  border-radius: 9999px;
  background-color: var(--rq-card);
  padding: 0.375rem 0.75rem;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--rq-foreground);
  text-decoration: none;
  cursor: pointer;
}

body.rq-shop-archive .fibofilters-applied-filters-container [class*="clear"],
body.rq-shop-archive .fibofilters-applied-filters-container .fibofilters-clear-all {
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-background);
  color: var(--rq-foreground);
  font-weight: 600;
}

body.rq-shop-archive .fibofilters-applied-filters-container [class*="clear"]:hover,
body.rq-shop-archive .fibofilters-applied-filters-container .fibofilters-clear-all:hover {
  background-color: var(--rq-muted);
}

body.rq-shop-archive .rq-fibofilters-error {
  padding: 0.75rem 1rem;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  font-size: 0.875rem;
  color: var(--rq-foreground);
}

/* ------------------------------------------------------------- pagination */

body.rq-shop-archive .woocommerce-pagination {
  margin-block-start: 1.5rem;
  margin-block-end: 0;
  padding-block-start: 1.25rem;
  padding-block-end: 0;
  border-top: 1px solid var(--rq-border);
}

body.rq-shop-archive .woocommerce-pagination nav,
body.rq-shop-archive nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers li {
  margin: 0;
  border: 0;
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.75rem;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  color: var(--rq-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers a.page-numbers:hover {
  border-color: var(--rq-border);
  background-color: var(--rq-muted);
  color: var(--rq-foreground);
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers a.page-numbers:focus-visible {
  outline: none;
  border-color: var(--rq-ring);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--rq-ring) 35%, transparent);
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers .page-numbers.current {
  border-color: transparent;
  background-color: var(--rq-primary);
  background-image: linear-gradient(
    135deg,
    var(--rq-logo-blue-light),
    var(--rq-logo-blue-mid) 52%,
    var(--rq-logo-blue-deep)
  );
  color: var(--rq-primary-foreground);
  cursor: default;
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers .page-numbers.dots {
  min-width: auto;
  padding-inline: 0.25rem;
  border-color: transparent;
  background: transparent;
  color: var(--rq-muted-foreground);
  cursor: default;
}

/* Next/prev arrows read as icon buttons, not numbered pills. */
body.rq-shop-archive .woocommerce-pagination ul.page-numbers .next.page-numbers,
body.rq-shop-archive .woocommerce-pagination ul.page-numbers .prev.page-numbers {
  font-size: 1rem;
  color: var(--rq-muted-foreground);
}

body.rq-shop-archive .woocommerce-pagination ul.page-numbers .next.page-numbers:hover,
body.rq-shop-archive .woocommerce-pagination ul.page-numbers .prev.page-numbers:hover {
  color: var(--rq-foreground);
}

/* ------------------------------------------------------------- list view */

body.rq-shop-archive ul.products.list-view {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius-brand);
  background-color: var(--rq-card);
  overflow: hidden;
}

body.rq-shop-archive ul.products.list-view li.product {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem;
  width: 100% !important;
  height: auto !important;
  min-height: 0;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--rq-border);
  border-radius: 0;
  box-shadow: none !important;
  overflow: visible;
}

body.rq-shop-archive ul.products.list-view li.product:last-child {
  border-bottom: 0;
}

body.rq-shop-archive ul.products.list-view li.product:hover {
  border-color: transparent;
  box-shadow: none !important;
  background-color: color-mix(in oklab, var(--rq-muted) 45%, var(--rq-card));
}

/* Must be flex — grid cards use display:block/column and stack title under image. */
body.rq-shop-archive ul.products.list-view li.product .woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0;
  gap: 1rem !important;
  padding: 0 !important;
  overflow: visible;
}

body.rq-shop-archive ul.products.list-view li.product .woocommerce-LoopProduct-link > img,
body.rq-shop-archive ul.products.list-view li.product .attachment-woocommerce_thumbnail,
body.rq-shop-archive ul.products.list-view li.product img.wp-post-image {
  flex: 0 0 4.5rem !important;
  width: 4.5rem !important;
  height: 4.5rem !important;
  max-width: 4.5rem !important;
  aspect-ratio: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: var(--rq-radius-brand) !important;
  object-fit: cover;
  transform: none !important;
}

body.rq-shop-archive ul.products.list-view li.product:hover .woocommerce-LoopProduct-link > img,
body.rq-shop-archive ul.products.list-view li.product:hover img.wp-post-image {
  transform: none !important;
}

body.rq-shop-archive ul.products.list-view li.product .woocommerce-loop-product__title {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: 2;
}

body.rq-shop-archive ul.products.list-view li.product .yith-ywraq-add-to-quote {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: auto !important;
  min-width: 9.5rem;
  max-width: 12rem;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 0.5rem;
}

body.rq-shop-archive ul.products.list-view li.product .yith-ywraq-add-button {
  width: 100%;
  margin: 0;
}

body.rq-shop-archive ul.products.list-view li.product a.add-request-quote-button.button,
body.rq-shop-archive ul.products.list-view li.product .add-request-quote-button,
body.rq-shop-archive ul.products.list-view li.product .yith_ywraq_add_item_browse_message a,
body.rq-shop-archive ul.products.list-view li.product [class*="yith_ywraq_add_item_browse"] a {
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap;
}

body.rq-shop-archive ul.products.list-view li.product .clear {
  display: none !important;
}

body.rq-shop-archive .bulk-request-header.list-view {
  border-radius: var(--rq-radius-brand);
  margin-block-end: 0.75rem !important;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1023px) {
  body.rq-shop-archive .e-con:has(> .shop_filter_overlay) {
    width: 100% !important;
    max-width: none !important;
    max-height: none;
    overflow: visible;
    position: static;
  }

  body.rq-shop-archive .e-con:has(.shop_filter_overlay):has(ul.products) {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) {
    flex-wrap: wrap;
  }

  body.rq-shop-archive .e-con:has(> .e-con .shop_resultCount):has(> .elementor-widget-shortcode .dgwt-wcas-search-wrapp) > .elementor-widget-shortcode,
  body.rq-shop-archive .elementor-element-b6da032,
  body.rq-shop-archive .dgwt-wcas-search-wrapp {
    max-width: none;
    width: 100%;
    flex: 1 1 100% !important;
  }
}

@media (max-width: 639px) {
  body.rq-shop-archive ul.products {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.rq-shop-archive .shop_productSort {
    width: 100%;
  }

  body.rq-shop-archive .woocommerce-ordering,
  body.rq-shop-archive .woocommerce-ordering select.orderby,
  body.rq-shop-archive .grid-list-toggle-wrapper,
  body.rq-shop-archive .grid-list-toggle-wrapper .toggle-btn {
    width: 100%;
  }

  body.rq-shop-archive ul.products.list-view li.product {
    flex-wrap: wrap;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  body.rq-shop-archive ul.products.list-view li.product .woocommerce-LoopProduct-link {
    flex: 1 1 calc(100% - 5.5rem) !important;
  }

  body.rq-shop-archive ul.products.list-view li.product .woocommerce-LoopProduct-link > img,
  body.rq-shop-archive ul.products.list-view li.product .attachment-woocommerce_thumbnail,
  body.rq-shop-archive ul.products.list-view li.product img.wp-post-image {
    flex: 0 0 3.5rem !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    max-width: 3.5rem !important;
    aspect-ratio: 1 !important;
  }

  body.rq-shop-archive ul.products.list-view li.product .yith-ywraq-add-to-quote {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none;
    min-width: 0;
  }

  body.rq-shop-archive ul.products.list-view li.product a.add-request-quote-button.button,
  body.rq-shop-archive ul.products.list-view li.product .yith_ywraq_add_item_browse_message a {
    width: 100% !important;
  }
}
