/* =====================================================
   component-quantity-input.css
   Estilos centralizados para <quantity-input>
   Usados en: cart drawer, quick-add modal, product page
   ===================================================== */

/* ─── Wrapper ─── */
quantity-input {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  overflow: hidden;
  height: 2.25rem;
}

/* ─── Botones +/- ─── */
quantity-input .quantity-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  background: transparent;
  border: none;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

quantity-input .quantity-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

quantity-input .quantity-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* ─── Input ─── */
quantity-input input.quantity-input,
quantity-input input[type='number'] {
  width: 2.5rem;
  border: none;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  background: #ffffff;
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Eliminar flechas nativas en Chrome/Edge/Safari */
quantity-input input.quantity-input::-webkit-outer-spin-button,
quantity-input input.quantity-input::-webkit-inner-spin-button,
quantity-input input[type='number']::-webkit-outer-spin-button,
quantity-input input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

quantity-input input.quantity-input:focus,
quantity-input input[type='number']:focus {
  outline: none;
  background: #f9fafb;
}

/* ─── Variante grande (product page) ─── */
quantity-input.quantity-input--lg {
  height: 2.75rem;
}

quantity-input.quantity-input--lg .quantity-btn {
  width: 2.75rem;
  font-size: 1.125rem;
}

quantity-input.quantity-input--lg input.quantity-input,
quantity-input.quantity-input--lg input[type='number'] {
  width: 3rem;
  font-size: 1rem;
}
