/* QI Industrial 0.1.8 - Reparacion de selectores WooCommerce en fichas.
   El HTML de QI no exige un contenedor descendiente .woocommerce.
   Presentacion exclusivamente: NO modifica pedidos, stock, variaciones ni cotizaciones. */

/* Ocultar el selector SOLO despues de que JS haya creado los botones.
   El <select> permanece en el DOM para la logica nativa de variaciones. */
body.single-product form.variations_form select.qi-variation-native-select,
body.single-product .qi-woocommerce-wrapper form.variations_form select.qi-variation-native-select,
body.single-product form.cart.variations_form table.variations select.qi-variation-native-select {
  position: absolute !important;
  display: block !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
body.single-product form.variations_form .qi-variation-choices {
  display: grid !important;
  grid-template-columns: repeat(auto-fit,minmax(100px,1fr));
  gap: 9px;
  width: 100%;
  margin: 6px 0 10px;
}
body.single-product form.variations_form button.qi-variation-choice {
  appearance: none;
  min-height: 46px;
  border: 1px solid #becbc5 !important;
  border-radius: 5px !important;
  background: #fff !important;
  background-image: none !important;
  color: #122025 !important;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none !important;
  text-shadow: none !important;
}
body.single-product form.variations_form button.qi-variation-choice:hover:not(:disabled) {
  border-color: #fc6f38 !important;
  background: #fff2eb !important;
  color: #122025 !important;
}
body.single-product form.variations_form button.qi-variation-choice.is-selected,
body.single-product form.variations_form button.qi-variation-choice[aria-pressed="true"] {
  border-color: #fc6f38 !important;
  background: #fc6f38 !important;
  color: #122025 !important;
}
body.single-product form.variations_form button.qi-variation-choice:disabled {
  opacity: .45 !important;
  cursor: not-allowed !important;
}
body.single-product form.variations_form button.qi-variation-choice:focus-visible {
  outline: 3px solid #122025 !important;
  outline-offset: 2px !important;
}

/* Anadir al carrito: deshabilitado es GRIS, nunca morado. */
body.single-product button.single_add_to_cart_button,
body.single-product button.single_add_to_cart_button.alt,
body.single-product .summary form.cart .single_add_to_cart_button.button {
  background: #122025 !important;
  background-color: #122025 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #122025 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
  min-height: 46px;
  font-weight: 800;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
body.single-product button.single_add_to_cart_button:disabled,
body.single-product button.single_add_to_cart_button.disabled,
body.single-product button.single_add_to_cart_button.wc-variation-selection-needed,
body.single-product .summary form.cart button.single_add_to_cart_button:disabled {
  background: #e8edeb !important;
  background-color: #e8edeb !important;
  color: #5d6c67 !important;
  border-color: #c5d0cb !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  box-shadow: none !important;
  filter: none !important;
}
body.single-product button.single_add_to_cart_button:not(:disabled):not(.disabled):not(.wc-variation-selection-needed):hover,
body.single-product .summary form.cart button.single_add_to_cart_button:not(:disabled):not(.disabled):hover {
  background: #fc6f38 !important;
  background-color: #fc6f38 !important;
  background-image: none !important;
  color: #122025 !important;
  border-color: #fc6f38 !important;
  box-shadow: none !important;
  filter: none !important;
}
body.single-product button.single_add_to_cart_button:disabled:hover,
body.single-product button.single_add_to_cart_button.disabled:hover,
body.single-product button.single_add_to_cart_button.wc-variation-selection-needed:hover {
  background: #e8edeb !important;
  background-color: #e8edeb !important;
  color: #5d6c67 !important;
  border-color: #c5d0cb !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Cotizar Producto desde WPCode #9747 tiene estilo AZUL inline.
   Estas reglas (important) ganan sin editar WPCode ni su disparador .form-cot-01. */
body.single-product a.form-cot-01.cotizar-producto-btn-custom,
body.single-product .summary a.form-cot-01,
body.single-product .contenedor-boton-cotizar-limpio a.form-cot-01,
body.single-product .summary button.qi-volume-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
  padding: 12px 19px !important;
  background: #fc6f38 !important;
  background-color: #fc6f38 !important;
  background-image: none !important;
  color: #122025 !important;
  border: 1px solid #fc6f38 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  filter: none !important;
}
body.single-product a.form-cot-01.cotizar-producto-btn-custom:hover,
body.single-product .summary a.form-cot-01:hover,
body.single-product .contenedor-boton-cotizar-limpio a.form-cot-01:hover,
body.single-product .summary button.qi-volume-button:hover {
  background: #122025 !important;
  background-color: #122025 !important;
  color: #ffffff !important;
  border-color: #122025 !important;
  box-shadow: none !important;
  transform: none !important;
}
@media (max-width: 640px) {
  body.single-product form.variations_form .qi-variation-choices {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
