/* "Fit it for me" add-on (class-fitting.php): full-width card, quantity + button on the row below.
   Matches the product group cards in product-group.css. */
/* !important: Elementor's add-to-cart widget forces nowrap with a long :is() selector. */
/* Variable products: the row is .woocommerce-variation-add-to-cart inside the form, not the form itself. */
form.cart:not(.variations_form):has(.mm-fitting-option),
.woocommerce-variation-add-to-cart:has(.mm-fitting-option) {
  display: flex;
  flex-wrap: wrap !important;
  align-items: stretch;
  gap: 10px;
}
/* WooCommerce's clearfix pseudo-elements would become empty flex items and take a gap each. */
form.cart:not(.variations_form):has(.mm-fitting-option)::before,
form.cart:not(.variations_form):has(.mm-fitting-option)::after,
.woocommerce-variation-add-to-cart:has(.mm-fitting-option)::before,
.woocommerce-variation-add-to-cart:has(.mm-fitting-option)::after { display: none !important; }
.mm-fitting-option {
  box-sizing: border-box;
  flex: 0 0 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  background: #fff;
  color: #1d1d1f;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mm-fitting-option:hover { border-color: #86868b; }
.mm-fitting-option:has(input:checked) {
  border-color: #0071e3;
  box-shadow: inset 0 0 0 1px #0071e3;
  background: #f5f9ff;
}
.mm-fitting-option input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #0071e3;
  cursor: pointer;
}
.mm-fitting-option__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mm-fitting-option__text strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.mm-fitting-option__text small {
  font-size: 13px;
  line-height: 18px;
  color: #6e6e73;
}
form.cart:has(.mm-fitting-option) .quantity { margin: 0 !important; }
form.cart:has(.mm-fitting-option) .quantity .qty {
  box-sizing: border-box;
  width: 72px;
  height: 48px;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  text-align: center;
}
form.cart:has(.mm-fitting-option) .single_add_to_cart_button {
  flex: 1 1 auto;
  min-height: 48px;
  margin: 0 !important;
  border-radius: 10px;
}
/* WooCommerce and Variation Swatches both insert a "Clear" link in the last attribute cell; show one. */
.variations .reset_variations ~ .reset_variations { display: none !important; }
/* Phones: the 4-column "find your model" table in the description must wrap instead of widening the page. */
@media (max-width: 767px) {
  .woocommerce-Tabs-panel .specs-table { width: 100%; max-width: 100%; }
  .woocommerce-Tabs-panel .specs-table th,
  .woocommerce-Tabs-panel .specs-table td { overflow-wrap: anywhere; font-size: 13px; padding: 6px; }
}
