/* Theme-owned product actions; YITH owns the inner quote markup and messages. */
/* Hide purchase/wishlist controls within products only. */
.twt-quote-only .product .single_add_to_cart_button,
.twt-quote-only .product .add_to_cart_button,
.twt-quote-only .product .ajax_add_to_cart,
.twt-quote-only .product .twt-buy-now,
.twt-quote-only .product .twt-atc-button,
.twt-quote-only .product .wc-block-components-product-button__button,
.twt-quote-only .product a[href*="add-to-cart="],
.twt-quote-only .product .yith-wcwl-add-to-wishlist,
.twt-quote-only .product .yith-add-to-wishlist-button-block {
  display: none !important;
}
.twt-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.woocommerce ul.products li.product .twt-archive-product-actions {
  margin-top: auto;
  flex-direction: column;
  align-items: stretch;
}
.twt-single-product-actions {
  display: block;
}
.twt-single-product-actions > form.cart {
  margin: 0 !important;
  width: 100%;
}
/* Hide duplicate quantity controls beside Cart; retain inputs for Woo/YITH
   and the separate quantity selector beside the product price. */
.single-product .woocommerce-variation-add-to-cart .quantity,
.single-product .product form.cart:not(.grouped_form) .quantity,
.single-product .twt-single-button-row .quantity,
.single-product .twt-single-product-actions .single-tyre-quantity {
  display: none !important;
}
.twt-single-button-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  clear: both;
}
.twt-single-button-row > .twt-product-quote {
  flex: 0 1 auto;
  min-width: 0;
}
.woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button,
.woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button-addons {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 14px !important;
  margin: 0 !important;
  float: none !important;
  line-height: 1.4 !important;
  font-size: 14px !important;
  white-space: nowrap;
  border-radius: 8px;
}
.twt-single-button-row .yith-ywraq-add-button {
  margin: 0 !important;
}
.twt-single-quote-fallback:empty {
  display: none;
}
.twt-single-product-actions > form.variations_form,
.twt-single-product-actions > form.grouped_form {
  flex-basis: 100%;
}
.woocommerce .twt-action-row .twt-product-quote {
  display: block;
  margin: 0;
  max-width: 100%;
}
.woocommerce .twt-action-row .twt-product-quote .yith-ywraq-add-to-quote {
  display: block !important;
  margin: 0 !important;
}
.woocommerce ul.products li.product .twt-action-row .button {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.woocommerce .twt-action-row .twt-product-quote a.add-request-quote-button,
.woocommerce .twt-action-row .twt-product-quote a.add-request-quote-button-addons {
  display: inline-block;
  padding: 10px !important;
  border: 1px solid #d90016 !important;
  background: #d90016 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}
.woocommerce .twt-action-row .twt-quote-secondary a.add-request-quote-button,
.woocommerce .twt-action-row .twt-quote-secondary a.add-request-quote-button-addons {
  background: transparent !important;
  color: #d90016 !important;
}
.woocommerce .twt-action-row .twt-product-quote a.add-request-quote-button:hover,
.woocommerce .twt-action-row .twt-product-quote a.add-request-quote-button-addons:hover {
  background: #ad0012 !important;
  color: #fff !important;
}
.twt-product-quote a:focus-visible,
.twt-action-row .twt-buy-now:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}
/* Preserve selectors for quoting while hiding an ineligible variation's cart. */
.twt-single-product-actions form.variations_form[data-twt-buy-now="no"] .woocommerce-variation-add-to-cart {
  display: none !important;
}
/* Defensive suppression of plugin-injected product Wishlist controls. */
.product .yith-wcwl-add-to-wishlist,
.product .yith-add-to-wishlist-button-block,
.product .yith-wcwl-add-to-wishlist-button,
.product .woocommerce-wishlists-add-to-wishlist,
.product .twt-wishlist-btn,
.product a[href*="add_to_wishlist="],
.product button[name="add-to-wishlist"] {
  display: none !important;
}
@media (max-width: 575.98px) {
  .twt-single-button-row {
    gap: 8px;
  }
  .twt-single-button-row > .twt-product-quote {
    flex: 1 1 0;
    min-width: 0;
  }
  .woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button,
  .woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button-addons {
    width: 100%;
  }
  .woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button,
  .woocommerce .twt-single-product-actions .twt-single-button-row .twt-product-quote a.add-request-quote-button-addons {
    padding: 10px 8px !important;
    font-size: 13px !important;
  }
}

/* Outrank the theme's primary-button display rules in action rows and grids. */
.twt-quote-only.woocommerce .twt-single-product-actions .single_add_to_cart_button,
.twt-quote-only.woocommerce ul.products li.product .twt-buy-now,
.twt-quote-only.woocommerce ul.products li.product .add_to_cart_button,
.twt-quote-only.woocommerce ul.products li.product .ajax_add_to_cart {
  display: none !important;
}
