/**
 * Deko Hogar — estética unificada cantidad + Añadir al carrito
 *
 * Ficha / vista rápida: cantidad IZQUIERDA + ATC DERECHA (misma fila, tamaño compacto).
 * Miniaturas: siguen apiladas (cantidad arriba, ATC abajo).
 */

/* ========== Ficha + quick view: fila compacta ========== */
.dkh-atc-block {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.625rem !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0.35rem 0 0.75rem 0 !important;
  box-sizing: border-box !important;
}

.dkh-atc-block .elementor-widget-product-quantity,
.dkh-atc-block .elementor-element.elementor-widget-product-quantity {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.dkh-atc-block .elementor-widget-product-quantity > .elementor-widget-container {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.dkh-atc-block .elementor-widget-product-add-to-cart,
.dkh-atc-block .dkh-atc-native-host {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  flex: 0 1 auto !important;
}

.dkh-atc-block .elementor-widget-product-add-to-cart > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
}

/* Stepper compacto (ficha / QV) */
.dkh-atc-block .dkh-qty-stepper,
.dkh-atc-block .ce-product-quantity,
.dkh-atc-block .ce-product-quantity.elementor-field-group {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 7.5rem !important;
  min-width: 7.5rem !important;
  max-width: 7.5rem !important;
  height: 2.25rem !important;
  margin: 0 !important;
  border: 1px solid #E4DFD0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: #F5F4EB !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.dkh-atc-block .dkh-qty-btn,
.dkh-atc-block .ce-product-quantity__btn,
.dkh-atc-block .ce-product-quantity .ce-product-quantity__minus,
.dkh-atc-block .ce-product-quantity .ce-product-quantity__plus {
  flex: 0 0 auto !important;
  position: static !important;
  inset: auto !important;
  width: 1.875rem !important;
  height: 2.25rem !important;
  min-width: 1.875rem !important;
  min-height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #F5F4EB !important;
  background-color: #F5F4EB !important;
  color: #2C4542 !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  font-style: normal !important;
  line-height: 2.25rem !important;
  cursor: pointer !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dkh-atc-block .dkh-qty-btn:hover,
.dkh-atc-block .ce-product-quantity__btn:hover {
  background: #E4DFD0 !important;
  color: #2C4542 !important;
}

.dkh-atc-block .dkh-qty-input,
.dkh-atc-block .ce-product-quantity input[type="number"],
.dkh-atc-block .elementor-widget-product-quantity input[type="number"] {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 0.25rem !important;
  border: 0 !important;
  border-left: 1px solid #E4DFD0 !important;
  border-right: 1px solid #E4DFD0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  text-align: center !important;
  color: #3D3D3D !important;
  font-family: "Quicksand", sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  -moz-appearance: textfield !important;
}

.dkh-atc-block .dkh-qty-input::-webkit-outer-spin-button,
.dkh-atc-block .dkh-qty-input::-webkit-inner-spin-button,
.dkh-atc-block .ce-product-quantity input[type="number"]::-webkit-outer-spin-button,
.dkh-atc-block .ce-product-quantity input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* ATC compacto a la derecha */
.dkh-atc-block .dkh-atc-unified-btn,
.dkh-atc-block .elementor-widget-product-add-to-cart .elementor-button,
.dkh-atc-block .elementor-widget-product-add-to-cart a.elementor-button,
.dkh-atc-block button.elementor-button[data-button-action="add-to-cart"],
.dkh-atc-block a.elementor-button[data-button-action="add-to-cart"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  width: auto !important;
  min-width: 10.5rem !important;
  max-width: none !important;
  height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 1rem !important;
  background: #C9A67E !important;
  background-color: #C9A67E !important;
  color: #3D3D3D !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-family: "Quicksand", sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.dkh-atc-block .dkh-atc-unified-btn:hover,
.dkh-atc-block .elementor-widget-product-add-to-cart .elementor-button:hover {
  background: #3D3D3D !important;
  background-color: #3D3D3D !important;
  color: #C9A67E !important;
}

.dkh-atc-block .elementor-button-content-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
}

/* Anular estilos CE de círculos terracota dentro del bloque */
.dkh-atc-block .ce-product-quantity__btn,
.dkh-atc-block i.ce-product-quantity__btn {
  background: #F5F4EB !important;
  border-radius: 0 !important;
  border-color: transparent !important;
  color: #2C4542 !important;
}

.ce-product-quantity__minus:not(.dkh-qty-btn)::before,
i.ce-product-quantity__minus::before {
  content: "\2212" !important;
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 700 !important;
}
.ce-product-quantity__plus:not(.dkh-qty-btn)::before,
i.ce-product-quantity__plus::before {
  content: "+" !important;
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

/* ========== Miniaturas: apiladas (sin cambiar layout de cards) ========== */
.dkh-qty-stepper,
.product-quantity .qty,
.js-product-add-to-cart .qty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  border: 1px solid #E4DFD0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: #F5F4EB !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.elementor-product-miniature .dkh-qty-stepper,
.product-miniature .dkh-qty-stepper {
  width: 88% !important;
  max-width: none;
  margin: 0 auto 0.5rem auto !important;
}

.dkh-qty-btn,
.bootstrap-touchspin .btn,
.input-group-btn-vertical .btn {
  flex: 0 0 auto !important;
  position: static !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #F5F4EB !important;
  color: #2C4542 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dkh-qty-input,
.product-quantity .qty input[type="number"],
.bootstrap-touchspin input[type="number"] {
  flex: 1 1 auto !important;
  border: 0 !important;
  border-left: 1px solid #E4DFD0 !important;
  border-right: 1px solid #E4DFD0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  text-align: center !important;
  color: #3D3D3D !important;
  font-family: "Quicksand", sans-serif !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  -moz-appearance: textfield !important;
}

.elementor-atc,
.product-miniature .elementor-atc {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}

.elementor-product-miniature .elementor-atc .elementor-button,
.product-miniature .elementor-atc .elementor-button,
.elementor-atc .elementor-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  width: 88% !important;
  margin: 0 auto !important;
  padding: 0.75rem 0.875rem !important;
  background: #C9A67E !important;
  color: #3D3D3D !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-family: "Quicksand", sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.elementor-atc .elementor-button:hover,
.product-miniature .elementor-atc .elementor-button:hover {
  background: #3D3D3D !important;
  color: #C9A67E !important;
}

/* Classic product page row */
.product-add-to-cart .product-quantity,
.js-product-add-to-cart .product-quantity {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.625rem !important;
  width: auto !important;
  max-width: 100%;
}

.product-add-to-cart .product-quantity .qty,
.js-product-add-to-cart .product-quantity .qty {
  width: 7.5rem !important;
  margin: 0 !important;
}

.product-add-to-cart .product-quantity .add,
.js-product-add-to-cart .product-quantity .add {
  width: auto !important;
  margin: 0 !important;
}

.product-add-to-cart .add .add-to-cart,
.js-product-add-to-cart .add-to-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 2.25rem !important;
  padding: 0 1rem !important;
  background: #C9A67E !important;
  color: #3D3D3D !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-family: "Quicksand", sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}

.product-add-to-cart .control-label {
  display: none !important;
}

/* Mobile: sigue en fila si cabe; si no, wrap manteniendo orden */
@media (max-width: 575px) {
  .dkh-atc-block {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .dkh-atc-block .dkh-qty-stepper,
  .dkh-atc-block .ce-product-quantity {
    width: 6.75rem !important;
    min-width: 6.75rem !important;
    max-width: 6.75rem !important;
    height: 2.125rem !important;
  }
  .dkh-atc-block .dkh-qty-btn,
  .dkh-atc-block .ce-product-quantity__btn {
    width: 1.75rem !important;
    height: 2.125rem !important;
    min-width: 1.75rem !important;
    min-height: 2.125rem !important;
    line-height: 2.125rem !important;
  }
  .dkh-atc-block .dkh-qty-input,
  .dkh-atc-block .ce-product-quantity input[type="number"] {
    height: 2.125rem !important;
    font-size: 0.8125rem !important;
  }
  .dkh-atc-block .dkh-atc-unified-btn,
  .dkh-atc-block .elementor-widget-product-add-to-cart .elementor-button {
    height: 2.125rem !important;
    min-width: 9.5rem !important;
    padding: 0 0.875rem !important;
    font-size: 0.75rem !important;
  }
}
